[silo-llnl] 01/96: Initial commit of 4.8

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 13:09:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository silo-llnl.

commit f9c41efd12f6b6e69cd4513936cfc78b0094f364
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jul 4 04:49:27 2011 +0100

    Initial commit of 4.8
---
 BSD_LICENSE_README                             |    60 +
 COPYRIGHT                                      |    49 +
 FAQ                                            |   142 +
 INSTALL                                        |   236 +
 Makefile.am                                    |   115 +
 Makefile.in                                    |   789 +
 SiloWindows/MSVC8/BaseIncludes.vsprops         |    12 +
 SiloWindows/MSVC8/HDF5_Defines.vsprops         |    11 +
 SiloWindows/MSVC8/ModernDTPR.vsprops           |    11 +
 SiloWindows/MSVC8/NO_SEC_DEP.vsprops           |    11 +
 SiloWindows/MSVC8/Silo.vcproj                  |   876 +
 SiloWindows/MSVC8/SiloWindows.sln              |   104 +
 SiloWindows/MSVC8/Tests/TestIncludes.vsprops   |    11 +
 SiloWindows/MSVC8/Tests/TestReadMask.vcproj    |   212 +
 SiloWindows/MSVC8/Tests/Tests.sln              |   498 +
 SiloWindows/MSVC8/Tests/alltypes.vcproj        |   213 +
 SiloWindows/MSVC8/Tests/array.vcproj           |   212 +
 SiloWindows/MSVC8/Tests/array_f.vfproj         |    31 +
 SiloWindows/MSVC8/Tests/compression.vcproj     |   212 +
 SiloWindows/MSVC8/Tests/csg.vcproj             |   212 +
 SiloWindows/MSVC8/Tests/curve_f.vfproj         |    31 +
 SiloWindows/MSVC8/Tests/dirtest.vcproj         |   216 +
 SiloWindows/MSVC8/Tests/extface.vcproj         |   212 +
 SiloWindows/MSVC8/Tests/grab.vcproj            |   212 +
 SiloWindows/MSVC8/Tests/group_test.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/largefile.vcproj       |   212 +
 SiloWindows/MSVC8/Tests/listtypes.vcproj       |   212 +
 SiloWindows/MSVC8/Tests/mat3d_3across.vcproj   |   212 +
 SiloWindows/MSVC8/Tests/mat_f.vfproj           |    31 +
 SiloWindows/MSVC8/Tests/merge_block.vcproj     |   212 +
 SiloWindows/MSVC8/Tests/mmadjacency.vcproj     |   212 +
 SiloWindows/MSVC8/Tests/multi_file.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/multi_test.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/multispec.vcproj       |   212 +
 SiloWindows/MSVC8/Tests/namescheme.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/obj.vcproj             |   212 +
 SiloWindows/MSVC8/Tests/onehex.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/oneprism.vcproj        |   212 +
 SiloWindows/MSVC8/Tests/onepyramid.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/onetet.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/partial_io.vcproj      |   212 +
 SiloWindows/MSVC8/Tests/point.vcproj           |   212 +
 SiloWindows/MSVC8/Tests/point_f.vfproj         |    31 +
 SiloWindows/MSVC8/Tests/polyzl.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/quad.vcproj            |   216 +
 SiloWindows/MSVC8/Tests/rocket.vcproj          |   230 +
 SiloWindows/MSVC8/Tests/sami.vcproj            |   212 +
 SiloWindows/MSVC8/Tests/simple.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/spec.vcproj            |   212 +
 SiloWindows/MSVC8/Tests/specmix.vcproj         |   212 +
 SiloWindows/MSVC8/Tests/subhex.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/testall.vcproj         |   212 +
 SiloWindows/MSVC8/Tests/testall_f.vfproj       |    31 +
 SiloWindows/MSVC8/Tests/testpdb.vcproj         |   212 +
 SiloWindows/MSVC8/Tests/twohex.vcproj          |   212 +
 SiloWindows/MSVC8/Tests/ucd.vcproj             |   212 +
 SiloWindows/MSVC8/Tests/ucd1d.vcproj           |   212 +
 SiloWindows/MSVC8/Tests/ucd_f.vfproj           |    31 +
 SiloWindows/MSVC8/Tests/ucdsamp3.vcproj        |   212 +
 SiloWindows/MSVC8/Tests/version.vcproj         |   212 +
 SiloWindows/MSVC8/Tests/wave.vcproj            |   212 +
 SiloWindows/MSVC8/bin/RunTests.bat             |   137 +
 SiloWindows/MSVC8/pdb_detect/pdb_detect.vcproj |   114 +
 SiloWindows/MSVC8/silex.vcproj                 |   839 +
 SiloWindows/Makefile                           |   562 +
 SiloWindows/Makefile.am                        |   187 +
 SiloWindows/Makefile.in                        |   562 +
 SiloWindows/README                             |    89 +
 SiloWindows/copysilo.bat                       |    81 +
 SiloWindows/include/config.h                   |   180 +
 SiloWindows/resources/silex.aps                |   Bin 0 -> 1448 bytes
 SiloWindows/resources/silex.ico                |   Bin 0 -> 766 bytes
 SiloWindows/resources/silex.rc                 |     5 +
 SiloWindows/runsilexmoc.bat                    |    22 +
 VERSION                                        |     1 +
 aclocal.m4                                     |  8376 +++++++
 config-site/AIX.conf                           |    22 +
 config-site/Darwin.conf                        |    27 +
 config-site/HP-UX.conf                         |    12 +
 config-site/IRIX.conf                          |    23 +
 config-site/IRIX64.conf                        |    22 +
 config-site/Linux.conf                         |    13 +
 config-site/Makefile.am                        |    81 +
 config-site/Makefile.in                        |   458 +
 config-site/OSF1.conf                          |    13 +
 config-site/README                             |    22 +
 config-site/SunOS.conf                         |    14 +
 config-site/alderaan.conf                      |     1 +
 config-site/atlas0.conf                        |     1 +
 config-site/atlas1088.conf                     |     1 +
 config-site/atlas1120.conf                     |     1 +
 config-site/atlas32.conf                       |     1 +
 config-site/atlas512.conf                      |     1 +
 config-site/atlas544.conf                      |     1 +
 config-site/atlas576.conf                      |     1 +
 config-site/atlas608.conf                      |     1 +
 config-site/bgl1.conf                          |     1 +
 config-site/bgl10.conf                         |     1 +
 config-site/bgl11.conf                         |     1 +
 config-site/bgl2.conf                          |     1 +
 config-site/bgl3.conf                          |     1 +
 config-site/bgl4.conf                          |     1 +
 config-site/bgl5.conf                          |     1 +
 config-site/bgl6.conf                          |     1 +
 config-site/bgl7.conf                          |     1 +
 config-site/bgl8.conf                          |     1 +
 config-site/bgl9.conf                          |     1 +
 config-site/cslic.conf                         |     1 +
 config-site/cslic1.conf                        |     1 +
 config-site/cslic2.conf                        |     1 +
 config-site/cslic3.conf                        |     1 +
 config-site/cslic4.conf                        |     1 +
 config-site/cslic5.conf                        |     1 +
 config-site/delenn.conf                        |    37 +
 config-site/eos.conf                           |     1 +
 config-site/eos0.conf                          |     1 +
 config-site/eos1.conf                          |     1 +
 config-site/fc0.llnl.gov.conf                  |     8 +
 config-site/fhp.conf                           |    15 +
 config-site/hera.conf                          |     1 +
 config-site/hera0.conf                         |     1 +
 config-site/hera1.conf                         |     1 +
 config-site/hera552.conf                       |     1 +
 config-site/hera553.conf                       |     1 +
 config-site/hera840.conf                       |     1 +
 config-site/hera841.conf                       |     1 +
 config-site/hoth.conf                          |    16 +
 config-site/janus.conf                         |     9 +
 config-site/kickit.conf                        |    14 +
 config-site/llnl_lc.conf                       |    26 +
 config-site/localhost.conf                     |     1 +
 config-site/minos.conf                         |     1 +
 config-site/minos0.conf                        |     1 +
 config-site/minos32.conf                       |     1 +
 config-site/minos512.conf                      |     1 +
 config-site/minos544.conf                      |     1 +
 config-site/minos576.conf                      |     1 +
 config-site/minos608.conf                      |     1 +
 config-site/naboo.conf                         |     1 +
 config-site/pcr.llnl.gov.conf                  |     5 +
 config-site/prism1.conf                        |     1 +
 config-site/prism2.conf                        |     1 +
 config-site/purple.conf                        |     1 +
 config-site/purple1441.conf                    |     1 +
 config-site/purple1442.conf                    |     1 +
 config-site/purple1443.conf                    |     1 +
 config-site/purple1444.conf                    |     1 +
 config-site/rhea.conf                          |     1 +
 config-site/rhea0.conf                         |     1 +
 config-site/rhea32.conf                        |     1 +
 config-site/rhea512.conf                       |     1 +
 config-site/rhea544.conf                       |     1 +
 config-site/sasn100.conf                       |     9 +
 config-site/sidious.conf                       |    25 +
 config-site/skywalker.conf                     |     1 +
 config-site/sphere.conf                        |    16 +
 config-site/sunburn.conf                       |     1 +
 config-site/sunset.conf                        |    26 +
 config-site/sunspot.conf                       |    34 +
 config-site/t3d.conf                           |    10 +
 config-site/tc127.conf                         |     5 +
 config-site/tempest.conf                       |     1 +
 config-site/tempest01.conf                     |     1 +
 config-site/tempest02.conf                     |     1 +
 config-site/tread.conf                         |    37 +
 config-site/ubgl.conf                          |     1 +
 config-site/um.conf                            |     1 +
 config-site/um006.conf                         |     1 +
 config-site/up.conf                            |     1 +
 config-site/up038.conf                         |     1 +
 config-site/up039.conf                         |     1 +
 config-site/up041.conf                         |     1 +
 config-site/uv.conf                            |     1 +
 config-site/uv006.conf                         |     1 +
 config-site/vader.conf                         |     1 +
 config-site/x86_64.conf                        |    11 +
 config-site/yana.conf                          |     1 +
 config-site/yana1.conf                         |     1 +
 config-site/yana2.conf                         |     1 +
 config-site/yana3.conf                         |     1 +
 config-site/yana4.conf                         |     1 +
 config-site/zeus.conf                          |     1 +
 config-site/zeus279.conf                       |     1 +
 config/Makefile.am                             |    72 +
 config/Makefile.in                             |   447 +
 config/bootstrap                               |    14 +
 config/compile                                 |   142 +
 config/config.guess                            |  1500 ++
 config/config.h.in                             |   192 +
 config/config.sub                              |  1616 ++
 config/depcomp                                 |   584 +
 config/install-sh                              |   507 +
 config/ltmain.sh                               |  6930 ++++++
 config/missing                                 |   367 +
 config/mkinc                                   |   301 +
 configure                                      | 29133 +++++++++++++++++++++++
 configure.ac                                   |  1489 ++
 docs/Chapter1.fm                               |   Bin 0 -> 98304 bytes
 docs/Chapter2-man_pages.fm                     |   Bin 0 -> 851968 bytes
 docs/Chapter2-start.fm                         |   Bin 0 -> 36864 bytes
 docs/Cover.fm                                  |   Bin 0 -> 101376 bytes
 docs/Makefile.am                               |    65 +
 docs/Makefile.in                               |   439 +
 docs/Silo.book.fm                              |   Bin 0 -> 26624 bytes
 docs/Silo.book.pdf                             |   Bin 0 -> 4066727 bytes
 docs/Silo.bookLOP.fm                           |   Bin 0 -> 126976 bytes
 docs/silo.h.fm                                 |   Bin 0 -> 190464 bytes
 src/Makefile.am                                |   146 +
 src/Makefile.in                                |   797 +
 src/debug/Makefile.am                          |    63 +
 src/debug/Makefile.in                          |   550 +
 src/debug/silo_debug.c                         |   272 +
 src/debug/silo_debug_private.h                 |    82 +
 src/filters/Makefile.am                        |    65 +
 src/filters/Makefile.in                        |   552 +
 src/filters/f_ale3d.c                          |  2308 ++
 src/filters/f_sample.c                         |   622 +
 src/filters/filter.h                           |   120 +
 src/hdf5_drv/H5FDsilo.c                        |  2305 ++
 src/hdf5_drv/H5FDsilo.h                        |   118 +
 src/hdf5_drv/Makefile.am                       |    72 +
 src/hdf5_drv/Makefile.in                       |   556 +
 src/hdf5_drv/silo_hdf5.c                       | 15040 ++++++++++++
 src/hdf5_drv/silo_hdf5_private.h               |   321 +
 src/libsilo.settings.in                        |    45 +
 src/libsiloh5.settings.in                      |    39 +
 src/netcdf/Makefile.am                         |    69 +
 src/netcdf/Makefile.in                         |   561 +
 src/netcdf/api.c                               |   699 +
 src/netcdf/ent.c                               |   517 +
 src/netcdf/netcdf.c                            |   680 +
 src/netcdf/obj.c                               |   522 +
 src/netcdf/silo_netcdf.c                       |  2096 ++
 src/netcdf/silo_netcdf_private.h               |   343 +
 src/netcdf/table.c                             |   227 +
 src/netcdf/table.h                             |   138 +
 src/pdb/Makefile.am                            |    89 +
 src/pdb/Makefile.in                            |   591 +
 src/pdb/detect.c                               |   509 +
 src/pdb/pdb.c                                  |  1761 ++
 src/pdb/pdb.h                                  |   621 +
 src/pdb/pdbdir.c                               |   525 +
 src/pdb/pdbio.c                                |   158 +
 src/pdb/pdbmm.c                                |   996 +
 src/pdb/pdbx.c                                 |   197 +
 src/pdb/pdconv.c                               |  1478 ++
 src/pdb/pdlow.c                                |  2302 ++
 src/pdb/pdmemb.c                               |   742 +
 src/pdb/pdpath.c                               |  2114 ++
 src/pdb/pdrdwr.c                               |  1926 ++
 src/pdb_drv/Makefile.am                        |    59 +
 src/pdb_drv/Makefile.in                        |   548 +
 src/pdb_drv/silo_pdb.c                         | 12400 ++++++++++
 src/pdb_drv/silo_pdb_private.h                 |   320 +
 src/pdbp_drv/Makefile.am                       |    61 +
 src/pdbp_drv/Makefile.in                       |   544 +
 src/pdbp_drv/silo_pdbp.c                       |    99 +
 src/score/Makefile.am                          |    66 +
 src/score/Makefile.in                          |   557 +
 src/score/memmove.c                            |    94 +
 src/score/scctl.c                              |   216 +
 src/score/scctla.c                             |   897 +
 src/score/schash.c                             |   510 +
 src/score/score.h                              |   367 +
 src/score/scstr.c                              |   223 +
 src/silo/Makefile.am                           |    98 +
 src/silo/Makefile.in                           |   649 +
 src/silo/alloc.c                               |  1963 ++
 src/silo/extface.c                             |   860 +
 src/silo/pmpio.h                               |   554 +
 src/silo/silo.c                                | 13430 +++++++++++
 src/silo/silo.h.in                             |  2087 ++
 src/silo/silo.inc                              |   495 +
 src/silo/silo_drivers.h                        |   292 +
 src/silo/silo_f.c                              |  5373 +++++
 src/silo/silo_f.h                              |   154 +
 src/silo/silo_fcb.c                            |   105 +
 src/silo/silo_ns.c                             |   478 +
 src/silo/silo_private.h                        |   897 +
 src/silo/silo_win32_compatibility.h            |    40 +
 src/silo_version.c                             |    73 +
 src/siloh5_version.c                           |    74 +
 src/taurus/Makefile.am                         |    68 +
 src/taurus/Makefile.in                         |   556 +
 src/taurus/README                              |    54 +
 src/taurus/silo_taurus.c                       |  1933 ++
 src/taurus/silo_taurus_private.h               |   111 +
 src/taurus/taurus.c                            |  2358 ++
 src/taurus/taurus.h                            |   271 +
 src/unknown/Makefile.am                        |    64 +
 src/unknown/Makefile.in                        |   550 +
 src/unknown/silo_unknown.c                     |   323 +
 src/unknown/silo_unknown_private.h             |    68 +
 svn_bin/Makefile.am                            |    63 +
 svn_bin/Makefile.in                            |   437 +
 svn_bin/build-3rdparty-closed                  |   568 +
 svn_bin/build-3rdparty-open                    |   687 +
 svn_bin/get_sys_info                           |    36 +
 svn_bin/regressiontest                         |   418 +
 svn_bin/silo-release-closed                    |  1338 ++
 svn_bin/silo-release-open                      |  1063 +
 svn_bin/winsilo-dist                           |    55 +
 tests/Make_ioperf                              |   116 +
 tests/Makefile.am                              |   382 +
 tests/Makefile.in                              |  1538 ++
 tests/TestReadMask.c                           |   834 +
 tests/add_amr_mrgtree.c                        |   679 +
 tests/alltypes.c                               |   282 +
 tests/amr2d.silo                               |   Bin 0 -> 658506 bytes
 tests/amr2d_mesh_config.xml                    |   117 +
 tests/amr3d.silo                               |   Bin 0 -> 79596 bytes
 tests/amr3d_mesh_config.xml                    |    20 +
 tests/arbpoly2d.c                              |   214 +
 tests/array.c                                  |   193 +
 tests/arrayf77.f                               |   148 +
 tests/checksums                                |   149 +
 tests/compression.c                            |   350 +
 tests/cpz1plt.c                                |   496 +
 tests/csg.c                                    |   199 +
 tests/curvef77.f                               |   118 +
 tests/dir.c                                    |   221 +
 tests/efcentering.c                            |   364 +
 tests/extface.c                                |  1963 ++
 tests/grab.c                                   |   311 +
 tests/group_test.c                             |  1959 ++
 tests/ioperf.c                                 |   618 +
 tests/ioperf.h                                 |   111 +
 tests/ioperf_hdf5.c                            |   244 +
 tests/ioperf_pdb.c                             |   120 +
 tests/ioperf_sec2.c                            |   136 +
 tests/ioperf_silo.c                            |   196 +
 tests/ioperf_stdio.c                           |   122 +
 tests/ioperf_tests                             |    48 +
 tests/largefile.c                              |   249 +
 tests/listtypes.c                              |   406 +
 tests/mat3d_3across.c                          |   181 +
 tests/matf77.f                                 |   443 +
 tests/merge_block.c                            |   831 +
 tests/mk_nasf_pdb.c                            |    64 +
 tests/mmadjacency.c                            |   162 +
 tests/multi_file.c                             |  1126 +
 tests/multi_test.c                             |  3182 +++
 tests/multispec.c                              |   582 +
 tests/namescheme.c                             |   157 +
 tests/not_a_silo_file.h5                       |   Bin 0 -> 2864 bytes
 tests/not_a_silo_file.pdb                      |   Bin 0 -> 1649 bytes
 tests/obj.c                                    |   161 +
 tests/onehex.c                                 |   335 +
 tests/oneprism.c                               |   237 +
 tests/onepyramid.c                             |   225 +
 tests/onetet.c                                 |   223 +
 tests/package.m4                               |     6 +
 tests/partial_io.c                             |   379 +
 tests/pdbcmp.csh                               |   106 +
 tests/pion0244.silo                            |   Bin 0 -> 259908 bytes
 tests/pmpio_hdf5_test.c                        |   207 +
 tests/pmpio_silo_test_mesh.c                   |   346 +
 tests/point.c                                  |   429 +
 tests/pointf77.f                               |   165 +
 tests/polyzl.c                                 |   161 +
 tests/quad.c                                   |   114 +
 tests/quadf77.f                                |   257 +
 tests/readstuff.c                              |   126 +
 tests/rocket.cpp                               |  1750 ++
 tests/sami.c                                   |  1243 +
 tests/simple.c                                 |   254 +
 tests/spec.c                                   |   307 +
 tests/specmix.c                                |   983 +
 tests/std.c                                    |   250 +
 tests/subhex.c                                 |   323 +
 tests/test_error.py                            |    88 +
 tests/test_read.py                             |   112 +
 tests/test_write.py                            |    78 +
 tests/testall.c                                |  3423 +++
 tests/testallf77.f                             |   410 +
 tests/testdtypes                               |   100 +
 tests/testhzip                                 |   120 +
 tests/testlib.c                                |   860 +
 tests/testpdb.c                                |   313 +
 tests/testsilock                               |    96 +
 tests/testsuite                                |  5865 +++++
 tests/testsuite.at                             |   341 +
 tests/testxvers                                |   127 +
 tests/twohex.c                                 |   287 +
 tests/ucd.c                                    |   306 +
 tests/ucd1d.c                                  |   209 +
 tests/ucdf77.f                                 |   257 +
 tests/ucdsamp3.c                               |   319 +
 tests/version.c                                |   137 +
 tests/wave.c                                   |   196 +
 tests/xvers_data.tar.bz2                       |   Bin 0 -> 8571631 bytes
 tools/Makefile.am                              |    74 +
 tools/Makefile.in                              |   601 +
 tools/browser/Makefile.am                      |   119 +
 tools/browser/Makefile.in                      |   936 +
 tools/browser/array.c                          |  1617 ++
 tools/browser/bif.c                            |   229 +
 tools/browser/browser.c                        |  1789 ++
 tools/browser/browser.h                        |   683 +
 tools/browser/browser.html                     |  1386 ++
 tools/browser/browser.info                     |  1375 ++
 tools/browser/browser.init                     |   133 +
 tools/browser/browser.texi                     |  1500 ++
 tools/browser/cons.c                           |   373 +
 tools/browser/file.c                           |  2806 +++
 tools/browser/func.c                           |  2366 ++
 tools/browser/lex.c                            |   904 +
 tools/browser/num.c                            |   416 +
 tools/browser/obj.c                            |   829 +
 tools/browser/output.c                         |  1286 +
 tools/browser/parse.c                          |  1060 +
 tools/browser/prim.c                           |  1586 ++
 tools/browser/ptr.c                            |   500 +
 tools/browser/range.c                          |   253 +
 tools/browser/sample.init                      |   444 +
 tools/browser/sdo.c                            |   911 +
 tools/browser/silodiff                         |   222 +
 tools/browser/silodiff.init                    |   130 +
 tools/browser/silofile                         |    88 +
 tools/browser/stc.c                            |  2421 ++
 tools/browser/str.c                            |   439 +
 tools/browser/switch.c                         |   657 +
 tools/browser/sym.c                            |  1098 +
 tools/python/Makefile.am                       |    78 +
 tools/python/Makefile.in                       |   605 +
 tools/python/pydbfile.cpp                      |   705 +
 tools/python/pydbfile.h                        |    78 +
 tools/python/pydbtoc.cpp                       |   394 +
 tools/python/pydbtoc.h                         |    78 +
 tools/python/pysilo.cpp                        |   250 +
 tools/python/pysilo.h                          |    66 +
 tools/silex/Explorer.cpp                       |   142 +
 tools/silex/Explorer.h                         |    92 +
 tools/silex/Makefile.am                        |   147 +
 tools/silex/Makefile.in                        |   689 +
 tools/silex/SiloArrayView.cpp                  |   248 +
 tools/silex/SiloArrayView.h                    |    87 +
 tools/silex/SiloDirTreeView.cpp                |   184 +
 tools/silex/SiloDirTreeView.h                  |   120 +
 tools/silex/SiloDirView.cpp                    |   383 +
 tools/silex/SiloDirView.h                      |   127 +
 tools/silex/SiloFile.cpp                       |   287 +
 tools/silex/SiloFile.h                         |   160 +
 tools/silex/SiloObjectView.cpp                 |   305 +
 tools/silex/SiloObjectView.h                   |   115 +
 tools/silex/SiloValueView.cpp                  |   145 +
 tools/silex/SiloValueView.h                    |    86 +
 tools/silex/SiloView.cpp                       |   305 +
 tools/silex/SiloView.h                         |   105 +
 tools/silex/array.xpm                          |    22 +
 tools/silex/curve.xpm                          |    24 +
 tools/silex/folder.xpm                         |    25 +
 tools/silex/main.cpp                           |   122 +
 tools/silex/mat.xpm                            |    24 +
 tools/silex/mesh.xpm                           |    22 +
 tools/silex/object.xpm                         |    23 +
 tools/silex/silovar.xpm                        |    21 +
 tools/silex/species.xpm                        |    26 +
 tools/silex/var.xpm                            |    32 +
 tools/silock/Makefile.am                       |    71 +
 tools/silock/Makefile.in                       |   603 +
 tools/silock/silock.c                          |   456 +
 462 files changed, 245955 insertions(+)

diff --git a/BSD_LICENSE_README b/BSD_LICENSE_README
new file mode 100644
index 0000000..0086696
--- /dev/null
+++ b/BSD_LICENSE_README
@@ -0,0 +1,60 @@
+As of Version  4.8, July, 2010, the Silo source  code is now available
+under the standard BSD Open Source License. See COPYRIGHT file for BSD
+notice.
+
+The source code for two  compression libraries which have been part of
+previous  releases of  the Silo  library  is  not available  under the
+terms of  the BSD Open  Source license. These  are the Hzip  and FPzip
+compression libraries.
+
+For this  reason, two different releases  of the Silo  source code are
+made available. One  is the BSD Open Source  release identified by the
+moniker   'bsd'  in   the  distribution   file  names.   For  example,
+silo-4.8-bsd.tar.gz   is  the  name  of a  BSD  Open   Source  release
+distribution of Silo.  The other is a non-Open  Source release of Silo
+under the  same licensing terms  that all previous releases  have been
+made. We call this other release a /legacy/ release.  The legacy terms
+are repeated, below, for convenience.
+
+   ------------------------------------------------------------------
+   Copyright (c) 1994-2010, Lawrence Livermore National Security, LLC.
+   All rights reserved. This work was produced at Lawrence Livermore
+   National Laboratory under Contract No. DE-AC52-07NA27344 with the
+   DOE.
+
+                             DISCLAIMER
+
+   This work was prepared as an account of work sponsored by an
+   agency of the United States Government. Neither the United States
+   Government nor the University of California nor any of their
+   employees, makes any warranty, express or implied, or assumes any
+   liability or responsibility for the accuracy, completeness, or
+   usefulness of any information, apparatus, product, or process
+   disclosed, or represents that its use would not infringe privately-
+   owned rights. Reference herein to any specific commercial products,
+   process, or service by trade name, trademark, manufacturer or
+   otherwise does not necessarily constitute or imply its endorsement,
+   recommendation, or favoring by the United States Government or the
+   University of California. The views and opinions of authors
+   expressed herein do not necessarily state or reflect those of the
+   United States Government or the University of California, and shall
+   not be used for advertising or product endorsement purposes.
+
+                   NOTIFICATION OF COMMERCIAL USE
+
+   Commercialization of this  product is prohibited without notifying
+   the Department of Energy (DOE) or Lawrence Livermore National
+   Laboratory (LLNL).
+   ----------------------------------------------------------------
+
+The BSD Open Source release  distributions do not contain the Hzip and
+FPzip compression libraries while the legacy release distributions do.
+This  means any objects  within a  Silo file  containing data  that is
+compressed with Hzip  or FPzip from a legacy  distribution will not be
+readable  in a BSD  distribution. Since  compression features  must be
+explicitly turned on by a  Silo application, this impact can be easily
+mitigating by  ensuring that Hzip and FPzip compression are  used only
+for objects within Silo files not intended to be read by BSD releases.
+
+For more  information on availability  of Hzip and  FPzip compression,
+contact the developer, Peter Lindstrom, lindstrom2 at llnl.gov.
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
index 0000000..0703f45
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,49 @@
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
diff --git a/FAQ b/FAQ
new file mode 100644
index 0000000..d8342d5
--- /dev/null
+++ b/FAQ
@@ -0,0 +1,142 @@
+Silo Development FAQ
+--------------------
+1) make errors
+   Some file timestamps become an issue, because of the ClearCase file
+   write protection on non-checkedout files, there will be errors in
+   the build because of these make dependencies. Most of these files
+   can be created manually, by looking at the creating scripts in the
+   Makefiles. (useful command: force a timestamp update "ct ci -ident")
+   make sure that the timestamps of:
+   - Autoreconf files, just make sure of the ClearCase checkin order
+   ./configure       > ./configure.ac
+   */Makefile.in     > */Makefile.am
+   - Targets in tests, used by autotest (i.e., make check)
+   tests/package.m4  > ./configure.ac
+   tests/testsuite   > tests/testsuite.at
+   - Target in src/silo/Makefile,
+   src/silo/silo.inc > src/silo/silo.h
+   src/silo/silo.inc > src/silo/silo_f.h
+
+2) Maintainer mode
+   The "missing" script is a wrapper around several maintainer tools,
+   designed to warn users if a maintainer tool is required but missing.
+   Typical maintainer tools are "autoconf", "automake", etc. Because
+   file generated by these tools are shipped with the other sources of a
+   package, these tools shouldn't be required during a user build and
+   they are not checked for in "configure".
+   However, if for some reason a rebuild rule is triggered and involves
+   a missing tool, "missing" will notice it and warn the user. Besides
+   the warning, when a tool is missing, "missing" will attempt to fix
+   timestamps in a way which allow the build to continue. For instance
+   "missing" will touch "configure" if "autoconf" is not installed.
+   When all distributed files are kept under ClearCase, this feature
+   of "missing" allows user with no maintainer tools to build a package
+   off ClearCase, bypassing any timestamp inconsistency implied by
+   "cleartool checkin".
+   If the required tool is installed, "missing" will run it and won't
+   attempt to continue after failures. This is the correct behavior during
+   development. However, users with wrong versions of maintainer tools
+   may get an error when the rebuild rule is spuriously triggered, halting
+   the build.
+   The rebuild rules are disabled by default, hence all autotools must be
+   manually run (usually through, "config/bootstrap" script). Running
+   "./configure --enable-maintainer-mode", will enable the automatic
+   rebuild rules in Makefile's, which will maintain consistency between
+   the autogenerated files. This feature totally automates the running of
+   maintainer tools. In maintainer mode should just be able to run "make"
+   as it should recognise that Makefile.am, etc. has been modified and run
+   the appropriate commands to regenerate the Makefile.
+   1) you must put the current autotools binaries in your PATH: 
+      PATH=/usr/gapps/silo/autotools/i686-pc-linux-gnu:$PATH
+   2) check-out all of the autotools generated files:
+      config/bootstrap -o
+   3) Enable maintainer tools:
+      ./configure --enable-maintainer-mode
+   4) development 
+      . . .
+      to regenerate all autotools generated files:
+      config/bootstrap 
+      . . .
+   5) Disable maintainer mode for distribution:
+      ./configure
+   6) check-in of the changed autotools generated files:
+      config/bootstrap -i "check-in change comments"
+  
+2) Distributions 
+   Automake generates rules to provide archives of Silo for distributions 
+   in various formats. Their targets are: 
+       dist-bzip2   Generate a bzip2 tar archive of the distribution. 
+                    bzip2 archives are frequently smaller than gzipped 
+                    archives. 
+       dist-gzip    Generate a gzip tar archive of the distribution. 
+       dist-shar    Generate a shar archive of the distribution. 
+       dist-zip     Generate a zip archive of the distribution. 
+       dist-tarZ    Generate a compressed tar archive of the distribution. 
+   The rule "dist" by default executes the dist-gzip target. The files is 
+   named based on the PACKAGE and VERSION variables, and the gzip'd tar
+   file is named "PACKAGE-VERSION.tar.gz". PACKAGE is defined as "silo"
+   in configure.ac, along with VERSION. VERSION is release specific usually
+   defined as something like "5.0.0". The archive will be extracted into
+   the directory "PACKAGE-VERSION".
+   To override the default naming and create a distribution "test-test"
+   do something like:
+      make PACKAGE="test" VERSION="test" dist
+
+3) Installs
+   By default, `make install' will install all the files in `/usr/local/bin',
+   `/usr/local/lib' etc.  You can specify an installation prefix other than
+   `/usr/local' using `--prefix', for instance `--prefix=$HOME'.
+   Alternatively, You run the normal build procedure until you get to the 
+   install target: 
+      ./configure 
+      make 
+   Instead of calling 'make install' you can add a DESTDIR flag which will 
+   prepend the normal PREFIX (must be an absolute directory name), like
+   follows: 
+      make DESTDIR=`pwd` install 
+   This will install all the files (libraries, includes, binaries) at the 
+   level of the current directory. 
+   Automake generates separate install-data and install-exec rules, in case 
+   the installer is installing on multiple machines that share directory 
+   structure--hese targets allow the machine-independent parts to be 
+   installed only once. install-exec installs platform-dependent files, 
+   and install-data installs platform-independent files. The install target 
+   depends on both of these targets. 
+   Variables using the standard directory prefixes "data", "info", "man",
+   "include", "oldinclude", "pkgdata", or "pkginclude" are installed by
+   install-data. 
+   Variables using the standard directory prefixes "bin", "sbin", "libexec",
+   "sysconf", "localstate", "lib", or "pkglib" are installed by install-exec. 
+
+4) clearmake
+   Clearmake has it's own idea of computing dependencies, it is pretty much
+   a special file system tracking all of the reads, writes, etc, and feeding
+   that information back into clearmake.
+   Automake on the otherhand, not nearly as complex an application, generates
+   dependencies as a side effect of complation.
+   Clearmake doesn't follow the automake defined dependencies.
+   Clearmake's dependency tracking does appear to function in parallel with
+   the current silo automake configuration.
+   To use clearmake:
+   1) you must put the current autotools binaries in your PATH: 
+      PATH=/usr/gapps/silo/autotools/i686-pc-linux-gnu:$PATH
+   2) checkout all of the autotools generated files:
+      config/bootstrap -o
+
+5) Configure
+   Variables not defined in a site shell script can be set in the environment
+   passed to configure.  However, some packages may run configure again during
+   the build, and the customized values of these variables may be lost. In
+   order to avoid this problem, you should set them in the configure command
+   line, using "VAR=value". For example: 
+      ./configure CC=/usr/local/pgi/linux86/6.0/bin/pgcc
+   causes the specified Portland Group C to be used as the C compiler.
+   Run "./configure --help" for details on some of the pertinent environment
+   variables.
+   Other examples:
+     ./configure --prefix=/usr/gapps/silo/4.5.1-pre4/i386-pc-linux-gcc-3.2.3 \
+     --with-szlib=/usr/gapps/silo/szip/2.0/i386-pc-linux-gcc-3.2.3 \
+     --with-hdf5=/usr/gapps/silo/hdf5/1.8.0-beta3/i386-pc-linux-gcc-3.2.3/\
+include,/usr/gapps/silo/hdf5/1.8.0-beta3/i386-pc-linux-gcc-3.2.3/lib \
+     --enable-silex \
+     --with-Qt-dir=/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3 
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..23e5f25
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  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.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a7c5630
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,115 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+##############################################################################
+
+#
+# Modifications:
+#
+#   Mark C. Miller, Tue Aug  3 17:23:07 PDT 2010
+#   Added logic to error out of there already exists a bsd dir into which we
+#   wish to create a bsd tree. Added logic to remove the dir after completion.
+#
+#   Mark C. Miller, Wed Aug  4 15:52:52 PDT 2010
+#   Added logic to handle windows project files for BSD release.
+#
+#   Mark C. Miller, Mon Aug  9 16:58:46 PDT 2010
+#   Added creation of smalltest dist for bsd distributions.
+ 
+ACLOCAL_AMFLAGS = -I config
+
+nodist_noinst_HEADERS = config.h
+
+EXTRA_DIST = COPYRIGHT FAQ VERSION BSD_LICENSE_README
+
+MAINTAINERCLEANFILES = Makefile.in\
+ aclocal.m4\
+ configure
+
+## We need `.' in SUBDIRS because we want `check' to build `.' first.
+SUBDIRS = . src tools tests
+DIST_SUBDIRS = . config config-site \
+  svn_bin docs src tests tools SiloWindows
+
+help: config/make.help
+	cat $(srcdir)/config/make.help
+
+dist-gzip-bsd: dist-gzip
+	@if test -e $(PACKAGE)-$(VERSION); then \
+	    echo "A directory or file named $(PACKAGE)-$(VERSION) already exists" ;\
+	    echo "Please remove before proceeding" ;\
+	    exit 1 ;\
+	fi
+	@if test -e $(PACKAGE)-$(VERSION)-bsd; then \
+	    echo "A directory or file named $(PACKAGE)-$(VERSION)-bsd already exists" ;\
+	    echo "Please remove before proceeding" ;\
+	    exit 1 ;\
+	fi
+	rm -f $(PACKAGE)-$(VERSION)-bsd.tar.gz $(PACKAGE)-$(VERSION)-bsd-smalltest.tar.gz
+	gunzip < $(PACKAGE)-$(VERSION).tar.gz | tar xf -
+	cp -R $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)-bsd
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/src/hzip
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/src/fpzip
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8
+	mv $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8-BSD $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8
+	tar cf - $(PACKAGE)-$(VERSION)-bsd | gzip --best > $(PACKAGE)-$(VERSION)-bsd.tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/tests/{amr3d.silo,pion0244.silo,amr2d.silo,xvers_data.tar.bz2}
+	tar cf - $(PACKAGE)-$(VERSION)-bsd | gzip --best > $(PACKAGE)-$(VERSION)-bsd-smalltest.tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)-bsd
+	rm -rf $(PACKAGE)-$(VERSION)/SiloWindows/MSVC8-BSD
+	tar cf - $(PACKAGE)-$(VERSION) | gzip --best > $(PACKAGE)-$(VERSION).tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)
+
+.PHONY: help
+
+## Override Automake's default definition for this
+am__tar = ${AMTAR} cof - "$$tardir"
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..826de1e
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,789 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+##############################################################################
+
+#
+# Modifications:
+#
+#   Mark C. Miller, Tue Aug  3 17:23:07 PDT 2010
+#   Added logic to error out of there already exists a bsd dir into which we
+#   wish to create a bsd tree. Added logic to remove the dir after completion.
+#
+#   Mark C. Miller, Wed Aug  4 15:52:52 PDT 2010
+#   Added logic to handle windows project files for BSD release.
+#
+#   Mark C. Miller, Mon Aug  9 16:58:46 PDT 2010
+#   Added creation of smalltest dist for bsd distributions.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \
+	$(top_srcdir)/configure INSTALL
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+HEADERS = $(nodist_noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = ${AMTAR} cof - "$$tardir"
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I config
+nodist_noinst_HEADERS = config.h
+EXTRA_DIST = COPYRIGHT FAQ VERSION BSD_LICENSE_README
+MAINTAINERCLEANFILES = Makefile.in\
+ aclocal.m4\
+ configure
+
+SUBDIRS = . src tools tests
+DIST_SUBDIRS = . config config-site \
+  svn_bin docs src tests tools SiloWindows
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d $(distdir) || mkdir $(distdir)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && cd $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@cd $(distuninstallcheck_dir) \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(HEADERS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+	dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am
+
+
+help: config/make.help
+	cat $(srcdir)/config/make.help
+
+dist-gzip-bsd: dist-gzip
+	@if test -e $(PACKAGE)-$(VERSION); then \
+	    echo "A directory or file named $(PACKAGE)-$(VERSION) already exists" ;\
+	    echo "Please remove before proceeding" ;\
+	    exit 1 ;\
+	fi
+	@if test -e $(PACKAGE)-$(VERSION)-bsd; then \
+	    echo "A directory or file named $(PACKAGE)-$(VERSION)-bsd already exists" ;\
+	    echo "Please remove before proceeding" ;\
+	    exit 1 ;\
+	fi
+	rm -f $(PACKAGE)-$(VERSION)-bsd.tar.gz $(PACKAGE)-$(VERSION)-bsd-smalltest.tar.gz
+	gunzip < $(PACKAGE)-$(VERSION).tar.gz | tar xf -
+	cp -R $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION)-bsd
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/src/hzip
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/src/fpzip
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8
+	mv $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8-BSD $(PACKAGE)-$(VERSION)-bsd/SiloWindows/MSVC8
+	tar cf - $(PACKAGE)-$(VERSION)-bsd | gzip --best > $(PACKAGE)-$(VERSION)-bsd.tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)-bsd/tests/{amr3d.silo,pion0244.silo,amr2d.silo,xvers_data.tar.bz2}
+	tar cf - $(PACKAGE)-$(VERSION)-bsd | gzip --best > $(PACKAGE)-$(VERSION)-bsd-smalltest.tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)-bsd
+	rm -rf $(PACKAGE)-$(VERSION)/SiloWindows/MSVC8-BSD
+	tar cf - $(PACKAGE)-$(VERSION) | gzip --best > $(PACKAGE)-$(VERSION).tar.gz
+	rm -rf $(PACKAGE)-$(VERSION)
+
+.PHONY: help
+# 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/SiloWindows/MSVC8/BaseIncludes.vsprops b/SiloWindows/MSVC8/BaseIncludes.vsprops
new file mode 100644
index 0000000..63012a1
--- /dev/null
+++ b/SiloWindows/MSVC8/BaseIncludes.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BaseIncludes"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		AdditionalIncludeDirectories="..\..\include;..\..\..\src\debug;..\..\..\src\hdf5_drv;..\..\..\src\pdb;..\..\..\src\pdb_drv;..\..\..\src\score;..\..\..\src\silo;..\..\..\src\taurus;..\..\..\src\unknown"
+
+	/>
+</VisualStudioPropertySheet>
diff --git a/SiloWindows/MSVC8/HDF5_Defines.vsprops b/SiloWindows/MSVC8/HDF5_Defines.vsprops
new file mode 100644
index 0000000..a54c3c2
--- /dev/null
+++ b/SiloWindows/MSVC8/HDF5_Defines.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="HDF5_DEFINES"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="_HDF5USEDLL_;HAVE_HDF5_DRIVER=1;HAVE_HDF5_H=1"
+	/>
+</VisualStudioPropertySheet>
diff --git a/SiloWindows/MSVC8/ModernDTPR.vsprops b/SiloWindows/MSVC8/ModernDTPR.vsprops
new file mode 100644
index 0000000..417e921
--- /dev/null
+++ b/SiloWindows/MSVC8/ModernDTPR.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="MODERN_DTPTR"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="DB_USE_MODERN_DTPTR"
+	/>
+</VisualStudioPropertySheet>
diff --git a/SiloWindows/MSVC8/NO_SEC_DEP.vsprops b/SiloWindows/MSVC8/NO_SEC_DEP.vsprops
new file mode 100644
index 0000000..9dfa9bc
--- /dev/null
+++ b/SiloWindows/MSVC8/NO_SEC_DEP.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="NO_SEC_DEP"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_SCL_NO_DEPRECATE"
+	/>
+</VisualStudioPropertySheet>
diff --git a/SiloWindows/MSVC8/Silo.vcproj b/SiloWindows/MSVC8/Silo.vcproj
new file mode 100644
index 0000000..997d977
--- /dev/null
+++ b/SiloWindows/MSVC8/Silo.vcproj
@@ -0,0 +1,876 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="Silo"
+	ProjectGUID="{20BFB7B0-9F43-43BB-B188-555DEA431CDF}"
+	RootNamespace="Silo"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops;.\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown;$(HDF5_INC_DIR);$(ZLIB_INC_DIR)"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SILO_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLLwithHDF5.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib hdf5dll.lib"
+				OutputFile="$(OutDir)\silohdf5.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(ZLIB_LIB_DIR);$(HDF5_LIB_DIR)"
+				ProgramDatabaseFile="$(OutDir)\silohdf5.pdb"
+				ImportLibrary="$(OutDir)\silohdf5.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops;.\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions=""
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown;$(HDF5_INC_DIR);$(ZLIB_INC_DIR)"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;SILO_EXPORTS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLLwithHDF5.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="zlib1.lib hdf5dll.lib"
+				OutputFile="$(OutDir)\silohdf5.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(ZLIB_LIB_DIR);$(HDF5_LIB_DIR)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silohdf5.pdb"
+				ImportLibrary="$(OutDir)\silohdf5.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLL_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions=""
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLL.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;SILO_EXPORTS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLL.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies=""
+				OutputFile="$(OutDir)\silo.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silo.pdb"
+				ImportLibrary="$(OutDir)\silo.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLL_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLL.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SILO_EXPORTS"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLL.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies=""
+				ShowProgress="0"
+				OutputFile="$(OutDir)\silo.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories=""
+				ProgramDatabaseFile="$(OutDir)\silo.pdb"
+				ImportLibrary="$(OutDir)\silo.lib"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLibwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops;.\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown;$(HDF5_INC_DIR);$(ZLIB_INC_DIR)"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SILO_STATIC_LIBRARY"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLLwithHDF5.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalDependencies="zlib.lib hdf5.lib szlib.lib"
+				OutputFile="$(OutDir)\silohdf5.lib"
+				AdditionalLibraryDirectories="$(ZLIB_LIB_DIR_STATIC);$(HDF5_LIB_DIR_STATIC);$(SZIP_LIB_DIR_STATIC)"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLibwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops;.\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown;$(HDF5_INC_DIR);$(ZLIB_INC_DIR)"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SILO_STATIC_LIBRARY"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\DLLwithHDF5.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalDependencies="zlib.lib hdf5.lib szlib.lib"
+				OutputFile="$(OutDir)/silohdf5.lib"
+				AdditionalLibraryDirectories="$(ZLIB_LIB_DIR_STATIC);$(HDF5_LIB_DIR_STATIC); $(SZIP_LIB_DIR_STATIC)"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLib_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SILO_STATIC_LIBRARY"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silo.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalDependencies=""
+				OutputFile="$(OutDir)\silo.lib"
+				AdditionalLibraryDirectories=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLib_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName="$(OutDir)\DLLwithHDF5.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\src\debug;..\..\src\hdf5_drv;..\..\src\pdb;..\..\src\pdb_drv;..\..\src\score;..\..\src\silo;..\..\src\taurus;..\..\src\unknown"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SILO_STATIC_LIBRARY"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silo.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				CompileAs="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalDependencies=""
+				OutputFile="$(OutDir)\silo.lib"
+				AdditionalLibraryDirectories=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="score"
+			>
+			<File
+				RelativePath="..\..\src\score\memmove.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\score\scctl.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\score\scctla.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\score\schash.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\score\scstr.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="pdb"
+			>
+			<File
+				RelativePath="..\..\src\pdb\pdb.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdbdir.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdbio.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdbmm.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdbx.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdconv.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdlow.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdmemb.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdpath.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\pdb\pdrdwr.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="pdb_drv"
+			>
+			<File
+				RelativePath="..\..\src\pdb_drv\silo_pdb.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="silo"
+			>
+			<File
+				RelativePath="..\..\src\silo\alloc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\silo\extface.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\silo\silo.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\silo\silo_f.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\silo\silo_ns.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="unknown"
+			>
+			<File
+				RelativePath="..\..\src\unknown\silo_unknown.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="debug"
+			>
+			<File
+				RelativePath="..\..\src\debug\silo_debug.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="hdf5_drv"
+			>
+			<File
+				RelativePath="..\..\src\hdf5_drv\H5FDsilo.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\hdf5_drv\silo_hdf5.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="taurus_drv"
+			>
+			<File
+				RelativePath="..\..\src\taurus\silo_taurus.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\taurus\taurus.c"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/SiloWindows.sln b/SiloWindows/MSVC8/SiloWindows.sln
new file mode 100644
index 0000000..7c4d827
--- /dev/null
+++ b/SiloWindows/MSVC8/SiloWindows.sln
@@ -0,0 +1,104 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "silex", "silex.vcproj", "{3D443B05-403C-4907-8F50-DC396DB6BB23}"
+	ProjectSection(ProjectDependencies) = postProject
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF} = {20BFB7B0-9F43-43BB-B188-555DEA431CDF}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silo", "Silo.vcproj", "{20BFB7B0-9F43-43BB-B188-555DEA431CDF}"
+	ProjectSection(ProjectDependencies) = postProject
+		{17857422-AD82-4D37-A5AF-94C4556935D0} = {17857422-AD82-4D37-A5AF-94C4556935D0}
+		{00AB914E-42B9-4775-B1E6-154F8923655B} = {00AB914E-42B9-4775-B1E6-154F8923655B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pdb_detect", "pdb_detect\pdb_detect.vcproj", "{17857422-AD82-4D37-A5AF-94C4556935D0}"
+EndProject
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		DLL_Debug|Win32 = DLL_Debug|Win32
+		DLL_Release|Win32 = DLL_Release|Win32
+		DLLwithHDF5_Debug|Win32 = DLLwithHDF5_Debug|Win32
+		DLLwithHDF5_Release|Win32 = DLLwithHDF5_Release|Win32
+		Release|Win32 = Release|Win32
+		StaticLib_Debug|Win32 = StaticLib_Debug|Win32
+		StaticLib_Release|Win32 = StaticLib_Release|Win32
+		StaticLibwithHDF5_Debug|Win32 = StaticLibwithHDF5_Debug|Win32
+		StaticLibwithHDF5_Release|Win32 = StaticLibwithHDF5_Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.Release|Win32.ActiveCfg = StaticLib_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLib_Debug|Win32.ActiveCfg = StaticLib_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLib_Debug|Win32.Build.0 = StaticLib_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLib_Release|Win32.ActiveCfg = StaticLib_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLib_Release|Win32.Build.0 = StaticLib_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLibwithHDF5_Debug|Win32.ActiveCfg = StaticLibwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLibwithHDF5_Debug|Win32.Build.0 = StaticLibwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLibwithHDF5_Release|Win32.ActiveCfg = StaticLibwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.StaticLibwithHDF5_Release|Win32.Build.0 = StaticLibwithHDF5_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.Release|Win32.ActiveCfg = StaticLibwithHDF5_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLib_Debug|Win32.ActiveCfg = StaticLib_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLib_Debug|Win32.Build.0 = StaticLib_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLib_Release|Win32.ActiveCfg = StaticLib_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLib_Release|Win32.Build.0 = StaticLib_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLibwithHDF5_Debug|Win32.ActiveCfg = StaticLibwithHDF5_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLibwithHDF5_Debug|Win32.Build.0 = StaticLibwithHDF5_Debug|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLibwithHDF5_Release|Win32.ActiveCfg = StaticLibwithHDF5_Release|Win32
+		{20BFB7B0-9F43-43BB-B188-555DEA431CDF}.StaticLibwithHDF5_Release|Win32.Build.0 = StaticLibwithHDF5_Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLL_Debug|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLL_Debug|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLL_Release|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLL_Release|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLLwithHDF5_Debug|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLLwithHDF5_Debug|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLLwithHDF5_Release|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.DLLwithHDF5_Release|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.Release|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.Release|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLib_Debug|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLib_Debug|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLib_Release|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLib_Release|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLibwithHDF5_Debug|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLibwithHDF5_Debug|Win32.Build.0 = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLibwithHDF5_Release|Win32.ActiveCfg = Release|Win32
+		{17857422-AD82-4D37-A5AF-94C4556935D0}.StaticLibwithHDF5_Release|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLL_Debug|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLL_Debug|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLL_Release|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLL_Release|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLLwithHDF5_Debug|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLLwithHDF5_Debug|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLLwithHDF5_Release|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.DLLwithHDF5_Release|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.Release|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.Release|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLib_Debug|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLib_Debug|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLib_Release|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLib_Release|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLibwithHDF5_Debug|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLibwithHDF5_Debug|Win32.Build.0 = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLibwithHDF5_Release|Win32.ActiveCfg = Release|Win32
+		{00AB914E-42B9-4775-B1E6-154F8923655B}.StaticLibwithHDF5_Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/SiloWindows/MSVC8/Tests/TestIncludes.vsprops b/SiloWindows/MSVC8/Tests/TestIncludes.vsprops
new file mode 100644
index 0000000..fbfb3ff
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/TestIncludes.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="TestIncludes"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		AdditionalIncludeDirectories="..\..\..\tests"
+	/>
+</VisualStudioPropertySheet>
diff --git a/SiloWindows/MSVC8/Tests/TestReadMask.vcproj b/SiloWindows/MSVC8/Tests/TestReadMask.vcproj
new file mode 100644
index 0000000..96dc231
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/TestReadMask.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="TestReadMask"
+	ProjectGUID="{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\TestReadMask"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\TestReadMask"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\TestReadMask.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\TestReadMask.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\TestReadMask"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\TestReadMask.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\TestReadMask.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\TestReadMask"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\TestReadMask"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\TestReadMask.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\TestReadMask.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\TestReadMask.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\TestReadMask.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\TestReadMask.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/Tests.sln b/SiloWindows/MSVC8/Tests/Tests.sln
new file mode 100644
index 0000000..5c5d5eb
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/Tests.sln
@@ -0,0 +1,498 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wave", "wave.vcproj", "{3D443B05-403C-4907-8F50-DC396DB6BB23}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "alltypes", "alltypes.vcproj", "{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "array", "array.vcproj", "{CB409787-8ACF-4854-A2AB-6CD727E7120D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compression", "compression.vcproj", "{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csg", "csg.vcproj", "{6DE8948E-8CF8-4650-9749-1C21066AA957}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "extface", "extface.vcproj", "{3482A43B-3A21-4583-88C4-45A4422E2307}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testall", "testall.vcproj", "{E4105EA9-2AB2-4656-B966-01F16961A14B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grab", "grab.vcproj", "{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largefile", "largefile.vcproj", "{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "listtypes", "listtypes.vcproj", "{A79DA077-0644-4DA7-8D8A-BB115597F474}"
+	ProjectSection(ProjectDependencies) = postProject
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54} = {9B955616-D58C-4ED8-AB6F-FBA74E768B54}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mat3d_3across", "mat3d_3across.vcproj", "{CEA025B3-7259-4852-980F-CB39E8206304}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "merge_block", "merge_block.vcproj", "{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mmadjacency", "mmadjacency.vcproj", "{809F6E22-2B80-4264-A220-7974EC9EDBBF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_file", "multi_file.vcproj", "{8CC26B54-D539-4A0A-B461-26F074B790FD}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_test", "multi_test.vcproj", "{7535A535-FDEC-4448-AF9C-C031C9EA8459}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multispec", "multispec.vcproj", "{2D46EF91-58B2-43B5-ADD7-6908D6794578}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj", "obj.vcproj", "{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "onehex", "onehex.vcproj", "{3863899B-7F9F-4823-9383-AE2205DCB054}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oneprism", "oneprism.vcproj", "{4BCA7F35-0742-424F-8E50-39B934312F8F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "onepyramid", "onepyramid.vcproj", "{2AFC873D-E906-4145-A0CB-6264E8CAE97D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "onetet", "onetet.vcproj", "{A76CCA62-BC5F-44F8-B090-9C45DA138680}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "partial_io", "partial_io.vcproj", "{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "point", "point.vcproj", "{025CFEA1-6C43-404D-9DA4-5392A17FA162}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polyzl", "polyzl.vcproj", "{8C6BC636-FF71-4D58-9D63-E12265523982}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quad", "quad.vcproj", "{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rocket", "rocket.vcproj", "{A9F76A7B-20A1-4D93-9444-175824B7B3DF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sami", "sami.vcproj", "{B3C7F964-68B8-4F8C-B5E7-7607836FB101}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple", "simple.vcproj", "{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spec", "spec.vcproj", "{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "specmix", "specmix.vcproj", "{27C64509-94EB-406D-9978-93AE531CEB1E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "subhex", "subhex.vcproj", "{8C02951E-155B-4D09-A1DD-F98695F02A0E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpdb", "testpdb.vcproj", "{29110B58-9FD5-4A8E-B9F7-064650EE16C6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestReadMask", "TestReadMask.vcproj", "{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twohex", "twohex.vcproj", "{64A6CE79-710F-405C-AAE8-F604E74A4374}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucd1d", "ucd1d.vcproj", "{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucd", "ucd.vcproj", "{9B955616-D58C-4ED8-AB6F-FBA74E768B54}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucdsamp3", "ucdsamp3.vcproj", "{94D10A14-5A9B-4E1E-B204-DE3196750126}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "version", "version.vcproj", "{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dirtest", "dirtest.vcproj", "{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "group_test", "group_test.vcproj", "{69340E63-F15C-4A33-85B7-344666F8F25C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "namescheme", "namescheme.vcproj", "{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "array_f", "array_f.vfproj", "{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "curve_f", "curve_f.vfproj", "{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "mat_f", "mat_f.vfproj", "{595357B8-132D-4F3E-9679-6E52B474E8A5}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "point_f", "point_f.vfproj", "{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "quad_f", "quad_f.vfproj", "{12C054D3-D396-45F9-912E-8A7FF6548738}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "testall_f", "testall_f.vfproj", "{BCC584B3-571E-4441-8ABF-D2CDD0646116}"
+EndProject
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "ucd_f", "ucd_f.vfproj", "{A8A0C0C5-A117-4430-B47A-E98603255D01}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		DLLwithHDF5_Debug|Win32 = DLLwithHDF5_Debug|Win32
+		DLLwithHDF5_Release|Win32 = DLLwithHDF5_Release|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3D443B05-403C-4907-8F50-DC396DB6BB23}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CB409787-8ACF-4854-A2AB-6CD727E7120D}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{6DE8948E-8CF8-4650-9749-1C21066AA957}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3482A43B-3A21-4583-88C4-45A4422E2307}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{E4105EA9-2AB2-4656-B966-01F16961A14B}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A79DA077-0644-4DA7-8D8A-BB115597F474}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CEA025B3-7259-4852-980F-CB39E8206304}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{809F6E22-2B80-4264-A220-7974EC9EDBBF}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8CC26B54-D539-4A0A-B461-26F074B790FD}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7535A535-FDEC-4448-AF9C-C031C9EA8459}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2D46EF91-58B2-43B5-ADD7-6908D6794578}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{3863899B-7F9F-4823-9383-AE2205DCB054}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4BCA7F35-0742-424F-8E50-39B934312F8F}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{2AFC873D-E906-4145-A0CB-6264E8CAE97D}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A76CCA62-BC5F-44F8-B090-9C45DA138680}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{025CFEA1-6C43-404D-9DA4-5392A17FA162}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8C6BC636-FF71-4D58-9D63-E12265523982}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A9F76A7B-20A1-4D93-9444-175824B7B3DF}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{B3C7F964-68B8-4F8C-B5E7-7607836FB101}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{27C64509-94EB-406D-9978-93AE531CEB1E}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{8C02951E-155B-4D09-A1DD-F98695F02A0E}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{29110B58-9FD5-4A8E-B9F7-064650EE16C6}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D47B6498-6A8D-4E87-A3B6-C6D08DF29FE2}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{64A6CE79-710F-405C-AAE8-F604E74A4374}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{9B955616-D58C-4ED8-AB6F-FBA74E768B54}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{94D10A14-5A9B-4E1E-B204-DE3196750126}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{69340E63-F15C-4A33-85B7-344666F8F25C}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{D08D4EA4-8AF5-4FD2-BFBE-4FFB247B2A35}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{595357B8-132D-4F3E-9679-6E52B474E8A5}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{EC9BB75A-9691-4DAF-A876-5116DDCBAFBC}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{12C054D3-D396-45F9-912E-8A7FF6548738}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{BCC584B3-571E-4441-8ABF-D2CDD0646116}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.DLLwithHDF5_Debug|Win32.ActiveCfg = DLLwithHDF5_Debug|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.DLLwithHDF5_Debug|Win32.Build.0 = DLLwithHDF5_Debug|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.DLLwithHDF5_Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.DLLwithHDF5_Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.Release|Win32.ActiveCfg = DLLwithHDF5_Release|Win32
+		{A8A0C0C5-A117-4430-B47A-E98603255D01}.Release|Win32.Build.0 = DLLwithHDF5_Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/SiloWindows/MSVC8/Tests/alltypes.vcproj b/SiloWindows/MSVC8/Tests/alltypes.vcproj
new file mode 100644
index 0000000..1176adb
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/alltypes.vcproj
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="alltypes"
+	ProjectGUID="{627C8E54-0ABD-4B8A-B76B-0BD13F5E684B}"
+	RootNamespace="alltypes"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\alltypes"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\alltypes"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\alltypes.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\alltypes.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\alltypes"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\alltypes.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\alltypes.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\alltypes"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\alltypes"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\alltypes.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\alltypes.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\alltypes.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\alltypes.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\alltypes.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/array.vcproj b/SiloWindows/MSVC8/Tests/array.vcproj
new file mode 100644
index 0000000..68813dc
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/array.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="array"
+	ProjectGUID="{CB409787-8ACF-4854-A2AB-6CD727E7120D}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\array.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\array.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\array"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\array.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\array.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\array.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\array.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\array.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\array.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\array.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/array_f.vfproj b/SiloWindows/MSVC8/Tests/array_f.vfproj
new file mode 100644
index 0000000..7533a47
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/array_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\array_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\arrayf77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/compression.vcproj b/SiloWindows/MSVC8/Tests/compression.vcproj
new file mode 100644
index 0000000..94b8497
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/compression.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="compression"
+	ProjectGUID="{AA9DE89B-47C8-4164-944A-6D42B4AF0FEB}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\compression"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\compression"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\compression.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\compression.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\compression"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\compression.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\compression.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\compression"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\compression"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\compression.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\compression.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\compression.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\compression.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\compression.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/csg.vcproj b/SiloWindows/MSVC8/Tests/csg.vcproj
new file mode 100644
index 0000000..a4dfca9
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/csg.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="csg"
+	ProjectGUID="{6DE8948E-8CF8-4650-9749-1C21066AA957}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\csg"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\csg"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\csg.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\csg.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\csg"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\csg.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\csg.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\csg"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\csg"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\csg.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\csg.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\csg.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\csg.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\csg.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/curve_f.vfproj b/SiloWindows/MSVC8/Tests/curve_f.vfproj
new file mode 100644
index 0000000..f6bab90
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/curve_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\curve_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\curve_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\curve_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\curve_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\curvef77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/dirtest.vcproj b/SiloWindows/MSVC8/Tests/dirtest.vcproj
new file mode 100644
index 0000000..70dd5e7
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/dirtest.vcproj
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="dirtest"
+	ProjectGUID="{B8FE1ABF-E1AD-41C7-AFAE-333BAB3636E1}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dirtest"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dirtest"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\dirtest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\dirtest.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\dirtest"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\dirtest.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\dirtest.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dirtest"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dirtest"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\dirtest.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\dirtest.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\dirtest.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\dirtest.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\dir.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\..\tests\testlib.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/extface.vcproj b/SiloWindows/MSVC8/Tests/extface.vcproj
new file mode 100644
index 0000000..6b6810f
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/extface.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="extface"
+	ProjectGUID="{3482A43B-3A21-4583-88C4-45A4422E2307}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\extface"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\extface"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\extface.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\extface.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\extface"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\extface.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\extface.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\extface"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\extface"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\extface.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\extface.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\extface.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\extface.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\extface.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/grab.vcproj b/SiloWindows/MSVC8/Tests/grab.vcproj
new file mode 100644
index 0000000..de62a7f
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/grab.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="grab"
+	ProjectGUID="{DCFFC0C8-1C81-4016-8364-1678FAB1D2D2}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\grab"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\grab"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\grab.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;$(HDF5_INC_DIR)"
+				PreprocessorDefinitions="WIN32;_CONSOLE;_HDF5USEDLL_"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\grab.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\grab"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib hdf5dll.lib"
+				OutputFile="$(SolutionDir)..\bin\grab.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName);$(HDF5_LIB_DIR)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\grab.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\grab"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\grab"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\grab.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;$(HDF5_INC_DIR)"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_HDF5USEDLL_"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\grab.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib hdf5dll.lib"
+				OutputFile="$(SolutionDir)..\bin\grab.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName);$(HDF5_LIB_DIR)"
+				ProgramDatabaseFile="$(OutDir)\grab.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\grab.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/group_test.vcproj b/SiloWindows/MSVC8/Tests/group_test.vcproj
new file mode 100644
index 0000000..4e941cf
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/group_test.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="group_test"
+	ProjectGUID="{69340E63-F15C-4A33-85B7-344666F8F25C}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\group_test"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\group_test"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\group_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\group_test.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\group_test"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\group_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\group_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\group_test"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\group_test"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\group_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\group_test.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\group_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\group_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\group_test.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/largefile.vcproj b/SiloWindows/MSVC8/Tests/largefile.vcproj
new file mode 100644
index 0000000..7da0442
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/largefile.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="largefile"
+	ProjectGUID="{EA0DA3EC-DD78-4C57-A0A9-F0EEAE35A85A}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\largefile"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\largefile"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\largefile.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\largefile.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\largefile"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\largefile.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\largefile.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\largefile"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\largefile"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\largefile.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\largefile.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\largefile.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\largefile.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\largefile.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/listtypes.vcproj b/SiloWindows/MSVC8/Tests/listtypes.vcproj
new file mode 100644
index 0000000..7a8a86b
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/listtypes.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="listtypes"
+	ProjectGUID="{A79DA077-0644-4DA7-8D8A-BB115597F474}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\listtypes"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\listtypes"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\listtypes.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\listtypes.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\listtypes"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\listtypes.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\listtypes.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\listtypes"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\listtypes"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\listtypes.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\listtypes.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\listtypes.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\listtypes.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\listtypes.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/mat3d_3across.vcproj b/SiloWindows/MSVC8/Tests/mat3d_3across.vcproj
new file mode 100644
index 0000000..bfae0a7
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/mat3d_3across.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="mat3d_3across"
+	ProjectGUID="{CEA025B3-7259-4852-980F-CB39E8206304}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat3d_3across"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat3d_3across"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\mat3d_3across.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\mat3d_3across.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\mat3d_3across"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\mat3d_3across.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\mat3d_3across.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat3d_3across"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat3d_3across"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\mat3d_3across.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\mat3d_3across.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\mat3d_3across.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\mat3d_3across.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\mat3d_3across.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/mat_f.vfproj b/SiloWindows/MSVC8/Tests/mat_f.vfproj
new file mode 100644
index 0000000..d81ba47
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/mat_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mat_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\pointf77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/merge_block.vcproj b/SiloWindows/MSVC8/Tests/merge_block.vcproj
new file mode 100644
index 0000000..b66b07f
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/merge_block.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="merge_block"
+	ProjectGUID="{2B22FE6C-0C77-445A-8320-50EEF60EEF7D}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\merge_block"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\merge_block"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\merge_block.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\merge_block.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\merge_block"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\merge_block.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\merge_block.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\merge_block"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\merge_block"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\merge_block.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\merge_block.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\merge_block.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\merge_block.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\merge_block.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/mmadjacency.vcproj b/SiloWindows/MSVC8/Tests/mmadjacency.vcproj
new file mode 100644
index 0000000..99cc0f6
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/mmadjacency.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="mmadjacency"
+	ProjectGUID="{809F6E22-2B80-4264-A220-7974EC9EDBBF}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mmadjacency"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mmadjacency"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\mmadjacency.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\mmadjacency.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\mmadjacency"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\mmadjacency.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\mmadjacency.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mmadjacency"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\mmadjacency"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\mmadjacency.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\mmadjacency.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\mmadjacency.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\mmadjacency.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\mmadjacency.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/multi_file.vcproj b/SiloWindows/MSVC8/Tests/multi_file.vcproj
new file mode 100644
index 0000000..16d9e76
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/multi_file.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="multi_file"
+	ProjectGUID="{8CC26B54-D539-4A0A-B461-26F074B790FD}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_file"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_file"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multi_file.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multi_file.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\multi_file"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multi_file.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\multi_file.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_file"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_file"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multi_file.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multi_file.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multi_file.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\multi_file.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\multi_file.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/multi_test.vcproj b/SiloWindows/MSVC8/Tests/multi_test.vcproj
new file mode 100644
index 0000000..1939156
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/multi_test.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="multi_test"
+	ProjectGUID="{7535A535-FDEC-4448-AF9C-C031C9EA8459}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_test"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_test"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multi_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multi_test.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\multi_test"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multi_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\multi_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_test"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multi_test"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multi_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multi_test.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multi_test.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\multi_test.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\multi_test.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/multispec.vcproj b/SiloWindows/MSVC8/Tests/multispec.vcproj
new file mode 100644
index 0000000..e1ab845
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/multispec.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="multispec"
+	ProjectGUID="{2D46EF91-58B2-43B5-ADD7-6908D6794578}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multispec"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multispec"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multispec.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multispec.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\multispec"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multispec.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\multispec.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multispec"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\multispec"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\multispec.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\multispec.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\multispec.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\multispec.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\multispec.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/namescheme.vcproj b/SiloWindows/MSVC8/Tests/namescheme.vcproj
new file mode 100644
index 0000000..0778438
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/namescheme.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="namescheme"
+	ProjectGUID="{D839F6C1-3736-4269-A5E7-30B2BC1CBCCD}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\namescheme"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\namescheme"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\namescheme.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\namescheme.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\namescheme"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\namescheme.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\namescheme.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\namescheme"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\namescheme"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\namescheme.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\namescheme.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\namescheme.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\namescheme.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\namescheme.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/obj.vcproj b/SiloWindows/MSVC8/Tests/obj.vcproj
new file mode 100644
index 0000000..659c45d
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/obj.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="obj"
+	ProjectGUID="{AC0F21DF-ECA4-4B17-9829-59634B68B0D2}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\obj"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\obj.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\obj.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\obj"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\obj.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\obj.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\obj"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\obj"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\obj.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\obj.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\obj.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\obj.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\obj.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/onehex.vcproj b/SiloWindows/MSVC8/Tests/onehex.vcproj
new file mode 100644
index 0000000..ffdaf00
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/onehex.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="onehex"
+	ProjectGUID="{3863899B-7F9F-4823-9383-AE2205DCB054}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onehex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onehex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onehex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onehex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\onehex"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onehex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\onehex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onehex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onehex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onehex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onehex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onehex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\onehex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\onehex.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/oneprism.vcproj b/SiloWindows/MSVC8/Tests/oneprism.vcproj
new file mode 100644
index 0000000..b556dcc
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/oneprism.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="oneprism"
+	ProjectGUID="{4BCA7F35-0742-424F-8E50-39B934312F8F}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\oneprism"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\oneprism"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\oneprism.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\oneprism.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\oneprism"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\oneprism.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\oneprism.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\oneprism"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\oneprism"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\oneprism.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\oneprism.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\oneprism.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\oneprism.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\oneprism.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/onepyramid.vcproj b/SiloWindows/MSVC8/Tests/onepyramid.vcproj
new file mode 100644
index 0000000..14dac7f
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/onepyramid.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="onepyramid"
+	ProjectGUID="{2AFC873D-E906-4145-A0CB-6264E8CAE97D}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onepyramid"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onepyramid"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onepyramid.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onepyramid.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\onepyramid"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onepyramid.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\onepyramid.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onepyramid"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onepyramid"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onepyramid.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onepyramid.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onepyramid.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\onepyramid.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\onepyramid.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/onetet.vcproj b/SiloWindows/MSVC8/Tests/onetet.vcproj
new file mode 100644
index 0000000..28052fc
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/onetet.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="onetet"
+	ProjectGUID="{A76CCA62-BC5F-44F8-B090-9C45DA138680}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onetet"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onetet"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onetet.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onetet.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\onetet"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onetet.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\onetet.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onetet"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\onetet"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\onetet.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\onetet.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\onetet.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\onetet.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\onetet.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/partial_io.vcproj b/SiloWindows/MSVC8/Tests/partial_io.vcproj
new file mode 100644
index 0000000..e69e9c5
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/partial_io.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="partial_io"
+	ProjectGUID="{4F6A7EC6-F141-4512-B2A8-D108CBD6FAC1}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\partial_io"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\partial_io"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\partial_io.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\partial_io.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\partial_io"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\partial_io.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\partial_io.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\partial_io"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\partial_io"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\partial_io.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\partial_io.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\partial_io.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\partial_io.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\partial_io.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/point.vcproj b/SiloWindows/MSVC8/Tests/point.vcproj
new file mode 100644
index 0000000..8dc3c58
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/point.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="point"
+	ProjectGUID="{025CFEA1-6C43-404D-9DA4-5392A17FA162}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\point.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\point.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\point"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\point.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\point.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\point.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\point.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\point.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\point.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\point.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/point_f.vfproj b/SiloWindows/MSVC8/Tests/point_f.vfproj
new file mode 100644
index 0000000..aac47f0
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/point_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\point_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\pointf77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/polyzl.vcproj b/SiloWindows/MSVC8/Tests/polyzl.vcproj
new file mode 100644
index 0000000..72990a3
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/polyzl.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="polyzl"
+	ProjectGUID="{8C6BC636-FF71-4D58-9D63-E12265523982}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\polyzl"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\polyzl"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\polyzl.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\polyzl.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\polyzl"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\polyzl.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\polyzl.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\polyzl"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\polyzl"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\polyzl.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\polyzl.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\polyzl.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\polyzl.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\polyzl.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/quad.vcproj b/SiloWindows/MSVC8/Tests/quad.vcproj
new file mode 100644
index 0000000..9d0a9a9
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/quad.vcproj
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="quad"
+	ProjectGUID="{4D5EA26A-8356-4665-A13D-51CCEE2BA7F4}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\quad"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\quad"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\quad.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\quad.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\quad"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\quad.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\quad.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\quad"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\quad"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\quad.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\quad.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\quad.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\quad.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\quad.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\..\tests\testlib.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/rocket.vcproj b/SiloWindows/MSVC8/Tests/rocket.vcproj
new file mode 100644
index 0000000..588c7fb
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/rocket.vcproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="rocket"
+	ProjectGUID="{A9F76A7B-20A1-4D93-9444-175824B7B3DF}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\rocket"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\rocket"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\rocket.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\rocket.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\rocket"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\rocket.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\rocket.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\rocket"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\rocket"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\rocket.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\rocket.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\rocket.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\rocket.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\rocket.cpp"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					ObjectFile="$(IntDir)/$(InputName)1.obj"
+					CompileAs="2"
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					ObjectFile="$(IntDir)/$(InputName)1.obj"
+					CompileAs="2"
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/sami.vcproj b/SiloWindows/MSVC8/Tests/sami.vcproj
new file mode 100644
index 0000000..7d36a0b
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/sami.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="sami"
+	ProjectGUID="{B3C7F964-68B8-4F8C-B5E7-7607836FB101}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\sami"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\sami"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\sami.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;$(HDF5_INC_DIR)"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\sami.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\sami"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib hdf5dll.lib"
+				OutputFile="$(SolutionDir)..\bin\sami.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName);$(HDF5_LIB_DIR)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\sami.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\sami"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\sami"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\sami.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;$(HDF5_INC_DIR)"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\sami.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib hdf5dll.lib"
+				OutputFile="$(SolutionDir)..\bin\sami.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName);$(HDF5_LIB_DIR)"
+				ProgramDatabaseFile="$(OutDir)\sami.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\sami.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/simple.vcproj b/SiloWindows/MSVC8/Tests/simple.vcproj
new file mode 100644
index 0000000..b024cee
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/simple.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="simple"
+	ProjectGUID="{7AB46C61-04D5-4E77-AD3F-E7726F3E173A}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\simple"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\simple"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\simple.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\simple.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\simple"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\simple.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\simple.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\simple"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\simple"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\simple.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\simple.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\simple.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\simple.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\simple.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/spec.vcproj b/SiloWindows/MSVC8/Tests/spec.vcproj
new file mode 100644
index 0000000..9bc2595
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/spec.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="spec"
+	ProjectGUID="{7A5F618C-F98A-4F8E-BBC7-C4F5C6BCD5A4}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\spec"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\spec"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\spec.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\spec.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\spec"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\spec.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\spec.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\spec"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\spec"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\spec.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\spec.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\spec.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\spec.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\spec.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/specmix.vcproj b/SiloWindows/MSVC8/Tests/specmix.vcproj
new file mode 100644
index 0000000..6dd34b1
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/specmix.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="specmix"
+	ProjectGUID="{27C64509-94EB-406D-9978-93AE531CEB1E}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\specmix"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\specmix"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\specmix.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\specmix.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\specmix"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\specmix.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\specmix.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\specmix"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\specmix"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\specmix.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\specmix.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\specmix.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\specmix.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\specmix.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/subhex.vcproj b/SiloWindows/MSVC8/Tests/subhex.vcproj
new file mode 100644
index 0000000..c77529e
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/subhex.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="subhex"
+	ProjectGUID="{8C02951E-155B-4D09-A1DD-F98695F02A0E}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\subhex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\subhex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\subhex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\subhex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\subhex"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\subhex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\subhex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\subhex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\subhex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\subhex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\subhex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\subhex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\subhex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\subhex.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/testall.vcproj b/SiloWindows/MSVC8/Tests/testall.vcproj
new file mode 100644
index 0000000..1a5cd3c
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/testall.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="testall"
+	ProjectGUID="{E4105EA9-2AB2-4656-B966-01F16961A14B}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\testall.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\testall.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\testall"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\testall.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\testall.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\testall.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\testall.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\testall.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\testall.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\testall.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/testall_f.vfproj b/SiloWindows/MSVC8/Tests/testall_f.vfproj
new file mode 100644
index 0000000..f371f47
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/testall_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testall_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\testallf77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/testpdb.vcproj b/SiloWindows/MSVC8/Tests/testpdb.vcproj
new file mode 100644
index 0000000..05a723e
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/testpdb.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="testpdb"
+	ProjectGUID="{29110B58-9FD5-4A8E-B9F7-064650EE16C6}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testpdb"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testpdb"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\testpdb.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;..\..\..\src\score;..\..\..\src\pdb"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\testpdb.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\testpdb"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\testpdb.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\testpdb.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testpdb"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\testpdb"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\testpdb.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\include\WithHDF5;..\..\..\src\silo;..\..\..\src\score;..\..\..\src\pdb"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\testpdb.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\testpdb.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\testpdb.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\testpdb.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/twohex.vcproj b/SiloWindows/MSVC8/Tests/twohex.vcproj
new file mode 100644
index 0000000..3360fe9
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/twohex.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="twohex"
+	ProjectGUID="{64A6CE79-710F-405C-AAE8-F604E74A4374}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\twohex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\twohex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\twohex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\twohex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\twohex"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\twohex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\twohex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\twohex"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\twohex"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\twohex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\twohex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\twohex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\twohex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\twohex.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/ucd.vcproj b/SiloWindows/MSVC8/Tests/ucd.vcproj
new file mode 100644
index 0000000..9ac6be9
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/ucd.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="ucd"
+	ProjectGUID="{9B955616-D58C-4ED8-AB6F-FBA74E768B54}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucd.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucd.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\ucd"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucd.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\ucd.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucd.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucd.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucd.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\ucd.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\ucd.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/ucd1d.vcproj b/SiloWindows/MSVC8/Tests/ucd1d.vcproj
new file mode 100644
index 0000000..d4fb36f
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/ucd1d.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="ucd1d"
+	ProjectGUID="{C065DCD0-DE87-4B6E-A1E6-8F7EDB272D53}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd1d"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd1d"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucd1d.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE;_USE_MATH_DEFINES"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucd1d.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\ucd1d"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucd1d.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\ucd1d.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd1d"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd1d"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucd1d.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucd1d.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucd1d.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\ucd1d.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\ucd1d.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/ucd_f.vfproj b/SiloWindows/MSVC8/Tests/ucd_f.vfproj
new file mode 100644
index 0000000..8830be6
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/ucd_f.vfproj
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="11.0" ProjectIdGuid="{A1F2E6F2-6E49-4746-9133-9DF0A404C7DB}">
+	<Platforms>
+		<Platform Name="Win32"/></Platforms>
+	<Configurations>
+		<Configuration Name="DLLwithHDF5_Debug|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" AdditionalIncludeDirectories="..\..\..\src\silo" Interfaces="true" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" GenerateDebugInformation="true" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" TargetMachine="machineX86" AdditionalDep [...]
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration>
+		<Configuration Name="DLLwithHDF5_Release|Win32" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd_f" IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucd_f">
+				<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" AdditionalIncludeDirectories="..\..\..\src\silo" DiagnosticsFile="$(IntDir)$(TargetName).diag" ModulePath="$(IntDir)" ObjectFile="$(IntDir)"/>
+				<Tool Name="VFLinkerTool" OutputFile="$(SolutionDir)..\bin\$(ProjectName).exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)" ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest" ProgramDatabaseFile="$(IntDir)$(TargetName).pdb" SubSystem="subSystemConsole" ImportLibrary="$(IntDir)\$(TargetName).lib" AdditionalDependencies="silohdf5.lib"/>
+				<Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)\$(InputName).res"/>
+				<Tool Name="VFMidlTool" SuppressStartupBanner="true" TypeLibraryName="$(IntDir)\$(ProjectName).tlb"/>
+				<Tool Name="VFCustomBuildTool"/>
+				<Tool Name="VFPreLinkEventTool"/>
+				<Tool Name="VFPreBuildEventTool"/>
+				<Tool Name="VFPostBuildEventTool"/>
+				<Tool Name="VFManifestTool" SuppressStartupBanner="true" OutputManifestFile="$(Intdir)\$(TargetFileName).embed.manifest" ResourceFile="$(IntDir)\$(TargetFileName).embed.manifest.res"/></Configuration></Configurations>
+	<Files>
+		<Filter Name="Header Files" Filter="fi;fd"/>
+		<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
+		<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+		<File RelativePath="..\..\..\tests\ucdf77.f"/></Filter></Files>
+	<Globals/></VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/ucdsamp3.vcproj b/SiloWindows/MSVC8/Tests/ucdsamp3.vcproj
new file mode 100644
index 0000000..734a847
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/ucdsamp3.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="ucdsamp3"
+	ProjectGUID="{94D10A14-5A9B-4E1E-B204-DE3196750126}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucdsamp3"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucdsamp3"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucdsamp3.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucdsamp3.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\ucdsamp3"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucdsamp3.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\ucdsamp3.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucdsamp3"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\ucdsamp3"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\ucdsamp3.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\ucdsamp3.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\ucdsamp3.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\ucdsamp3.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\ucdsamp3.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/version.vcproj b/SiloWindows/MSVC8/Tests/version.vcproj
new file mode 100644
index 0000000..483aad3
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/version.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="version"
+	ProjectGUID="{CBBCFD38-0F91-4CA2-8CBF-2833AC284438}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\version"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\version"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\version.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\version.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\version"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\version.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\version.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\version"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\version"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\version.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\version.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\version.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\version.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\version.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/Tests/wave.vcproj b/SiloWindows/MSVC8/Tests/wave.vcproj
new file mode 100644
index 0000000..59a17de
--- /dev/null
+++ b/SiloWindows/MSVC8/Tests/wave.vcproj
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="wave"
+	ProjectGUID="{3D443B05-403C-4907-8F50-DC396DB6BB23}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\wave"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\wave"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\wave.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\wave.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\wave"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\wave.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\wave.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\wave"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\wave"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\NO_SEC_DEP.vsprops;..\ModernDTPR.vsprops;.\TestIncludes.vsprops;..\BaseIncludes.vsprops;..\HDF5_Defines.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\wave.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\src\silo"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\wave.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="silohdf5.lib"
+				OutputFile="$(SolutionDir)..\bin\wave.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(SolutionDir)..\$(PlatformName)\$(ConfigurationName)"
+				ProgramDatabaseFile="$(OutDir)\wave.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\..\tests\wave.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/bin/RunTests.bat b/SiloWindows/MSVC8/bin/RunTests.bat
new file mode 100644
index 0000000..ec53a24
--- /dev/null
+++ b/SiloWindows/MSVC8/bin/RunTests.bat
@@ -0,0 +1,137 @@
+ at echo off
+
+set errorfile=.\error.txt 
+set resultsfile=.\results.txt 
+set drivers=(DB_PDB DB_HDF5)
+set buildDir=..\Win32\DLLwithHDF5_Release\
+
+
+set gp=(version.exe namescheme.exe point.exe extface.exe testall.exe TesReadMask.exe array.exe multi_test.exe partial_io.exe simple.exe ucd.exe ucdsamp3.exe obj.exe onehex.exe oneprism.exe onepyramid.exe onetet.exe subhex.exe twohex.exe multispec.exe sami.exe specmix.exe spec.exe alltypes.exe wave.exe polyzl.exe csg.exe rocket.exe mmadjacency.exe mat3d_3across.exe ucd1d.exe dirtest.exe quad.exe namescheme.exe)
+
+
+:: copy necessary dlls to this executable directory
+if not exist .\silohdf5.dll  copy %buildDir%\silohdf5.dll .
+if not exist .\hdf5dll.dll   copy %HDF5_LIB_DIR%\hdf5dll.dll .
+if not exist .\zlib1.dll     copy %ZLIB_LIB_DIR%\zlib1.dll .
+if not exist .\szlibdll.dll  copy %SZIP_LIB_DIR%\szlibdll.dll .
+
+if exist %resultsfile% (del %resultsfile%)
+
+
+for %%z in %drivers% do (
+    for %%v in %gp% do (
+        if exist %%v (
+            echo Running %%v %%z 
+            echo Running %%v %%z >> %resultsfile%
+            %%v %%z > %errorfile% 2>&1
+            type %errorfile% >> %resultsfile% 
+            echo exit code: %errorlevel% >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+        )
+    )
+
+    REM tests that require extra arguments
+    if exist testall.exe (
+        for %%i in (small medium large fortran c) do (
+            echo Running testall.exe -%%i %%z 
+            echo Running testall.exe -%%i %%z >> %resultsfile%
+            testall.exe -%%i %%z > %errorfile% 2>&1
+            type %errorfile% >> %resultsfile% 
+            echo exit code: %errorlevel% >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+        )
+    )
+
+    if exist group_test.exe (
+        echo Running group_test.exe 0 0 0 %%z 
+        echo Running group_test.exe 0 0 0 %%z >> %resultsfile%
+        group_test.exe 0 0 0 %%z > %errorfile% 2>&1
+        type %errorfile% >> %resultsfile% 
+        echo exit code: %errorlevel% >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+    )
+
+)
+
+
+if exist listtypes.exe (
+    for %%i in (ucd.h5 ucd.pdb) do (
+        if exist %%i (
+            echo Running listtypes.exe %%i 
+            echo Running listtypes.exe %%i >> %resultsfile%
+            listtypes.exe %%i > %errorfile% 2>&1
+            type %errorfile% >> %resultsfile% 
+            echo exit code: %errorlevel% >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+            echo ============================================== >> %resultsfile%
+        )
+    )
+)
+
+
+
+:: PDB Specific
+if exist testpdb.exe (
+    echo Running testpdb.exe  
+    echo Running testpdb.exe  >> %resultsfile%
+    testpdb.exe > %errorfile% 2>&1
+    type %errorfile% >> %resultsfile% 
+    echo exit code: %errorlevel% >> %resultsfile%
+    echo ============================================== >> %resultsfile%
+    echo ============================================== >> %resultsfile%
+)
+
+:: HDF5 Specific
+if exist compression.exe (
+    for %%i in (gzip szip fpzip lossy3 minratio1000) do (
+        echo Running compression.exe %%i 
+        echo Running compression.exe %%i >> %resultsfile%
+        compression.exe %%i > %errorfile% 2>&1
+        type %errorfile% >> %resultsfile% 
+        echo exit code: %errorlevel% >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+    )
+)
+
+if exist grab.exe (
+    echo Running grab.exe  
+    echo Running grab.exe  >> %resultsfile%
+    grab.exe > %errorfile% 2>&1
+    type %errorfile% >> %resultsfile% 
+    echo exit code: %errorlevel% >> %resultsfile%
+    echo ============================================== >> %resultsfile%
+    echo ============================================== >> %resultsfile%
+)
+
+REM if exist largefile.exe (
+REM    echo Running largefile.exe  >> %resultsfile%
+REM    largefile.exe > %errorfile% 
+REM    type %errorfile% >> %resultsfile% 
+REM    echo exit code: %errorlevel% >> %resultsfile%
+REM    echo ============================================== >> %resultsfile%
+REM    echo ============================================== >> %resultsfile%
+REM )
+
+REM Fortran tests
+set ft=(array_f.exe curve_f.exe mat_f.exe point_f.exe quad_f.exe testall_f.exe ucd_f.exe)
+for %%v in %ft% do (
+    if exist %%v (
+        echo Running %%v
+        echo Running %%v >> %resultsfile%
+        %%v > %errorfile% 2>&1
+        type %errorfile% >> %resultsfile% 
+        echo exit code: %errorlevel% >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+        echo ============================================== >> %resultsfile%
+    )
+)
+
+
+::print results
+::type %resultsfile%
+
+echo all output has been directed to the file results.txt
diff --git a/SiloWindows/MSVC8/pdb_detect/pdb_detect.vcproj b/SiloWindows/MSVC8/pdb_detect/pdb_detect.vcproj
new file mode 100644
index 0000000..9048db7
--- /dev/null
+++ b/SiloWindows/MSVC8/pdb_detect/pdb_detect.vcproj
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pdb_detect"
+	ProjectGUID="{17857422-AD82-4D37-A5AF-94C4556935D0}"
+	RootNamespace="pdb_detect"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="..\NO_SEC_DEP.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Create pdbform.h"
+				CommandLine="$(OutDir)\pdb_detect.exe > ..\..\..\src\pdb\pdform.h&#x0D;&#x0A;"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\..\src\pdb\detect.c"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/MSVC8/silex.vcproj b/SiloWindows/MSVC8/silex.vcproj
new file mode 100644
index 0000000..c89fec7
--- /dev/null
+++ b/SiloWindows/MSVC8/silex.vcproj
@@ -0,0 +1,839 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="silex"
+	ProjectGUID="{3D443B05-403C-4907-8F50-DC396DB6BB23}"
+	RootNamespace="silex"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="DLLwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silohdf5.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLLwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DisableSpecificWarnings="4244;4305"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silohdf5.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				IgnoreDefaultLibraryNames=""
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLL_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions=""
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silo.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="DLL_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silo.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLibwithHDF5_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;SILO_STATIC_LIBRARY"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silohdf5.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLibwithHDF5_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;SILO_STATIC_LIBRARY"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silohdf5.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				IgnoreDefaultLibraryNames="libcmt.lib"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLib_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;SILO_STATIC_LIBRARY"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silo.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="StaticLib_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;.\NO_SEC_DEP.vsprops;.\ModernDTPR.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine="..\runsilexmoc.bat"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="$(OutDir)\silex.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\include;..\..\tools\silex;..\..\src\silo;$(QT_INC_DIR);$(QT_INC_DIR)\QtCore;$(QT_INC_DIR)\QtGui"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;SILO_STATIC_LIBRARY"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile="$(OutDir)\silex.pch"
+				AssemblerListingLocation="$(OutDir)\"
+				ObjectFile="$(OutDir)\"
+				ProgramDataBaseFileName="$(OutDir)\"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="QtCore4.lib QtGui4.lib silo.lib"
+				OutputFile="$(OutDir)\silex.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="$(QT_LIB_DIR);$(OutDir)"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\silex.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="moc"
+			>
+			<File
+				RelativePath="..\..\tools\silex\Explorer_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloArrayView_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloDirTreeView_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloDirView_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloObjectView_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloValueView_moc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\tools\silex\SiloView_moc.cpp"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\..\tools\silex\Explorer.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\main.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\resources\silex.rc"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloArrayView.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloDirTreeView.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloDirView.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloFile.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloObjectView.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloValueView.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\..\tools\silex\SiloView.cpp"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/SiloWindows/Makefile b/SiloWindows/Makefile
new file mode 100644
index 0000000..79ef125
--- /dev/null
+++ b/SiloWindows/Makefile
@@ -0,0 +1,562 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# SiloWindows/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+#
+# Makefile.am --- automake input file for SiloWindows directory
+#
+#
+# Modifications:
+#   Mark C. Miller, Tue Aug  3 17:24:43 PDT 2010
+#   Ensure a number of silo project files were included.
+
+pkgdatadir = $(datadir)/silo
+pkglibdir = $(libdir)/silo
+pkgincludedir = $(includedir)/silo
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+subdir = SiloWindows
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run aclocal-1.10
+AMTAR = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run automake-1.10
+AWK = gawk
+BROWSER = browser
+BUNDLE_TARGET = 
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CC_FULLPATH = /usr/bin/gcc
+CFLAGS = -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wdeclaration-after-statement
+CONFIG_CMD = ./configure 'LDFLAGS=-static' 'CFLAGS=-g' 'CXXFLAGS=-g' 'FC=g77' 'F77=g77' '--with-hdf5=/usr/gapps/silo/hdf5/1.8.4/i686_Linux_ELsmp/include,/usr/gapps/silo/hdf5/1.8.4/i686_Linux_ELsmp/lib' '--with-szlib=/usr/gapps/silo/szip/2.1/i686_Linux_ELsmp' '--disable-shared' '--prefix=/groups/visit/miller/silo/trunk/install'
+CONFIG_DATE = Wed Sep 15 07:49:24 PDT 2010
+CONFIG_USER = miller86 at alderaan.llnl.gov
+CPP = gcc -E
+CPPFLAGS = -I/usr/gapps/silo/hdf5/1.8.4/i686_Linux_ELsmp/include 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g
+CXX_FULLPATH = /usr/bin/g++
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+F77 = g77
+FC = g77
+FCFLAGS = -g -O2
+FCLIBS =  -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../.. -lfrtbegin -lg2c -lm
+FC_FULLPATH = /usr/bin/g77
+FFLAGS = -g -O2
+FORTRAN = fortran
+FPZIP = fpzip
+GREP = /bin/grep
+HDF5_DRV = hdf5_drv
+HZIP = hzip
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = -L/usr/gapps/silo/hdf5/1.8.4/i686_Linux_ELsmp/lib -L/usr/gapps/silo/szip/2.1/i686_Linux_ELsmp/lib -static -L/usr/gapps/silo/szip/2.1/i686_Linux_ELsmp/lib
+LIBOBJS = 
+LIBS = -lhdf5 -lsz -lsz -lz  -lm -lsz
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAINT = #
+MAKEINFO = ${SHELL} /groups/visit/miller/silo/trunk/config/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NETCDF = netcdf
+OBJEXT = o
+PACKAGE = silo
+PACKAGE_BUGREPORT = visit-users at email.ornl.gov
+PACKAGE_NAME = silo
+PACKAGE_STRING = silo 4.8
+PACKAGE_TARNAME = silo
+PACKAGE_VERSION = 4.8
+PATH_SEPARATOR = :
+PDBP_DRV = 
+PDB_DRV = pdb_drv
+PRTDIAG = 
+PYTHON = 
+PYTHONMODULE = 
+PYTHON_CPPFLAGS = 
+PYTHON_EXEC_PREFIX = 
+PYTHON_PLATFORM = 
+PYTHON_PREFIX = 
+PYTHON_VERSION = 
+QT_BIN = /usr/lib/qt-3.1/bin
+QT_CORE = libQtCore.so
+QT_CORE_LIB = -lQtCore
+QT_CXXFLAGS = -I$(QT_INCLUDE) -I$(QT_INCLUDE)/Qt -I$(QT_INCLUDE)/QtCore -I$(QT_INCLUDE)/QtGui
+QT_GUI = libQtGui.so
+QT_GUI_LIB = -lQtGui
+QT_INCLUDE = /usr/lib/qt-3.1/include
+QT_LDFLAGS = -L$(QT_LIB)
+QT_LIB = /usr/lib/qt-3.1/lib
+QT_LIBS = $(QT_CORE_LIB) $(QT_GUI_LIB)
+QT_MOC = $(QT_BIN)/moc
+RANLIB = ranlib
+READLINE_LIBS = -lreadline -ltermcap 
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+SILEX = 
+SILO_DTYPPTR = void
+SILO_DTYPPTR1 = void*
+SILO_DTYPPTR2 = void*
+SILO_VERS_MAJ = 4
+SILO_VERS_MIN = 8
+SILO_VERS_PAT = 
+SILO_VERS_PRE = 
+SILO_VERS_TAG = Silo_version_4_8
+STRIP = strip
+TAURUS = taurus
+VERSION = 4.8
+ZLIB = zlib
+abs_builddir = /groups/visit/miller/silo/trunk/SiloWindows
+abs_srcdir = /groups/visit/miller/silo/trunk/SiloWindows
+abs_top_builddir = /groups/visit/miller/silo/trunk
+abs_top_srcdir = /groups/visit/miller/silo/trunk
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+ac_ct_FC = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /groups/visit/miller/silo/trunk/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = 
+pkgpythondir = 
+prefix = /groups/visit/miller/silo/trunk/install
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = 
+pythondir = 
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_builddir = ..
+top_srcdir = ..
+EXTRA_DIST = \
+./MSVC8/Tests/alltypes.vcproj\
+./MSVC8/Tests/array.vcproj\
+./MSVC8/Tests/array_f.vfproj\
+./MSVC8/Tests/compression.vcproj\
+./MSVC8/Tests/csg.vcproj\
+./MSVC8/Tests/curve_f.vfproj\
+./MSVC8/Tests/dirtest.vcproj\
+./MSVC8/Tests/extface.vcproj\
+./MSVC8/Tests/grab.vcproj\
+./MSVC8/Tests/group_test.vcproj\
+./MSVC8/Tests/largefile.vcproj\
+./MSVC8/Tests/listtypes.vcproj\
+./MSVC8/Tests/mat3d_3across.vcproj\
+./MSVC8/Tests/mat_f.vfproj\
+./MSVC8/Tests/merge_block.vcproj\
+./MSVC8/Tests/mmadjacency.vcproj\
+./MSVC8/Tests/multi_file.vcproj\
+./MSVC8/Tests/multi_test.vcproj\
+./MSVC8/Tests/multispec.vcproj\
+./MSVC8/Tests/namescheme.vcproj\
+./MSVC8/Tests/obj.vcproj\
+./MSVC8/Tests/onehex.vcproj\
+./MSVC8/Tests/oneprism.vcproj\
+./MSVC8/Tests/onepyramid.vcproj\
+./MSVC8/Tests/onetet.vcproj\
+./MSVC8/Tests/partial_io.vcproj\
+./MSVC8/Tests/point.vcproj\
+./MSVC8/Tests/point_f.vfproj\
+./MSVC8/Tests/polyzl.vcproj\
+./MSVC8/Tests/quad.vcproj\
+./MSVC8/Tests/rocket.vcproj\
+./MSVC8/Tests/sami.vcproj\
+./MSVC8/Tests/simple.vcproj\
+./MSVC8/Tests/spec.vcproj\
+./MSVC8/Tests/specmix.vcproj\
+./MSVC8/Tests/subhex.vcproj\
+./MSVC8/Tests/testall.vcproj\
+./MSVC8/Tests/testall_f.vfproj\
+./MSVC8/Tests/TestIncludes.vsprops\
+./MSVC8/Tests/testpdb.vcproj\
+./MSVC8/Tests/TestReadMask.vcproj\
+./MSVC8/Tests/Tests.sln\
+./MSVC8/Tests/twohex.vcproj\
+./MSVC8/Tests/ucd1d.vcproj\
+./MSVC8/Tests/ucd.vcproj\
+./MSVC8/Tests/ucd_f.vfproj\
+./MSVC8/Tests/ucdsamp3.vcproj\
+./MSVC8/Tests/version.vcproj\
+./MSVC8/Tests/wave.vcproj\
+./MSVC8/bin/RunTests.bat\
+./MSVC8/pdb_detect/pdb_detect.vcproj\
+./MSVC8/BaseIncludes.vsprops\
+./MSVC8/HDF5_Defines.vsprops\
+./MSVC8/ModernDTPR.vsprops\
+./MSVC8/NO_SEC_DEP.vsprops\
+./MSVC8/NON_BSD_DEFINES.vsprops\
+./MSVC8/silex.vcproj\
+./MSVC8/Silo.vcproj\
+./MSVC8/SiloWindows.sln\
+./include/config.h\
+./resources/silex.aps\
+./resources/silex.ico\
+./resources/silex.rc\
+./Makefile.am\
+./Makefile\
+./runsilexmoc.bat\
+./Makefile.in\
+./copysilo.bat\
+./README\
+./MSVC8-BSD/Tests/alltypes.vcproj\
+./MSVC8-BSD/Tests/array.vcproj\
+./MSVC8-BSD/Tests/array_f.vfproj\
+./MSVC8-BSD/Tests/compression.vcproj\
+./MSVC8-BSD/Tests/csg.vcproj\
+./MSVC8-BSD/Tests/curve_f.vfproj\
+./MSVC8-BSD/Tests/dirtest.vcproj\
+./MSVC8-BSD/Tests/extface.vcproj\
+./MSVC8-BSD/Tests/grab.vcproj\
+./MSVC8-BSD/Tests/group_test.vcproj\
+./MSVC8-BSD/Tests/largefile.vcproj\
+./MSVC8-BSD/Tests/listtypes.vcproj\
+./MSVC8-BSD/Tests/mat3d_3across.vcproj\
+./MSVC8-BSD/Tests/mat_f.vfproj\
+./MSVC8-BSD/Tests/merge_block.vcproj\
+./MSVC8-BSD/Tests/mmadjacency.vcproj\
+./MSVC8-BSD/Tests/multi_file.vcproj\
+./MSVC8-BSD/Tests/multi_test.vcproj\
+./MSVC8-BSD/Tests/multispec.vcproj\
+./MSVC8-BSD/Tests/namescheme.vcproj\
+./MSVC8-BSD/Tests/obj.vcproj\
+./MSVC8-BSD/Tests/onehex.vcproj\
+./MSVC8-BSD/Tests/oneprism.vcproj\
+./MSVC8-BSD/Tests/onepyramid.vcproj\
+./MSVC8-BSD/Tests/onetet.vcproj\
+./MSVC8-BSD/Tests/partial_io.vcproj\
+./MSVC8-BSD/Tests/point.vcproj\
+./MSVC8-BSD/Tests/point_f.vfproj\
+./MSVC8-BSD/Tests/polyzl.vcproj\
+./MSVC8-BSD/Tests/quad.vcproj\
+./MSVC8-BSD/Tests/rocket.vcproj\
+./MSVC8-BSD/Tests/sami.vcproj\
+./MSVC8-BSD/Tests/simple.vcproj\
+./MSVC8-BSD/Tests/spec.vcproj\
+./MSVC8-BSD/Tests/specmix.vcproj\
+./MSVC8-BSD/Tests/subhex.vcproj\
+./MSVC8-BSD/Tests/testall.vcproj\
+./MSVC8-BSD/Tests/testall_f.vfproj\
+./MSVC8-BSD/Tests/TestIncludes.vsprops\
+./MSVC8-BSD/Tests/testpdb.vcproj\
+./MSVC8-BSD/Tests/TestReadMask.vcproj\
+./MSVC8-BSD/Tests/Tests.sln\
+./MSVC8-BSD/Tests/twohex.vcproj\
+./MSVC8-BSD/Tests/ucd1d.vcproj\
+./MSVC8-BSD/Tests/ucd.vcproj\
+./MSVC8-BSD/Tests/ucd_f.vfproj\
+./MSVC8-BSD/Tests/ucdsamp3.vcproj\
+./MSVC8-BSD/Tests/version.vcproj\
+./MSVC8-BSD/Tests/wave.vcproj\
+./MSVC8-BSD/bin/RunTests.bat\
+./MSVC8-BSD/pdb_detect/pdb_detect.vcproj\
+./MSVC8-BSD/BaseIncludes.vsprops\
+./MSVC8-BSD/HDF5_Defines.vsprops\
+./MSVC8-BSD/ModernDTPR.vsprops\
+./MSVC8-BSD/NO_SEC_DEP.vsprops\
+./MSVC8-BSD/silex.vcproj\
+./MSVC8-BSD/Silo.vcproj\
+./MSVC8-BSD/SiloWindows.sln
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  SiloWindows/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  SiloWindows/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: # $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# 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/SiloWindows/Makefile.am b/SiloWindows/Makefile.am
new file mode 100644
index 0000000..adf02de
--- /dev/null
+++ b/SiloWindows/Makefile.am
@@ -0,0 +1,187 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+#
+# Makefile.am --- automake input file for SiloWindows directory
+#
+## Process this file with automake to create Makefile.in
+#
+# Modifications:
+#   Mark C. Miller, Tue Aug  3 17:24:43 PDT 2010
+#   Ensure a number of silo project files were included.
+
+EXTRA_DIST = \
+./MSVC8/Tests/alltypes.vcproj\
+./MSVC8/Tests/array.vcproj\
+./MSVC8/Tests/array_f.vfproj\
+./MSVC8/Tests/compression.vcproj\
+./MSVC8/Tests/csg.vcproj\
+./MSVC8/Tests/curve_f.vfproj\
+./MSVC8/Tests/dirtest.vcproj\
+./MSVC8/Tests/extface.vcproj\
+./MSVC8/Tests/grab.vcproj\
+./MSVC8/Tests/group_test.vcproj\
+./MSVC8/Tests/largefile.vcproj\
+./MSVC8/Tests/listtypes.vcproj\
+./MSVC8/Tests/mat3d_3across.vcproj\
+./MSVC8/Tests/mat_f.vfproj\
+./MSVC8/Tests/merge_block.vcproj\
+./MSVC8/Tests/mmadjacency.vcproj\
+./MSVC8/Tests/multi_file.vcproj\
+./MSVC8/Tests/multi_test.vcproj\
+./MSVC8/Tests/multispec.vcproj\
+./MSVC8/Tests/namescheme.vcproj\
+./MSVC8/Tests/obj.vcproj\
+./MSVC8/Tests/onehex.vcproj\
+./MSVC8/Tests/oneprism.vcproj\
+./MSVC8/Tests/onepyramid.vcproj\
+./MSVC8/Tests/onetet.vcproj\
+./MSVC8/Tests/partial_io.vcproj\
+./MSVC8/Tests/point.vcproj\
+./MSVC8/Tests/point_f.vfproj\
+./MSVC8/Tests/polyzl.vcproj\
+./MSVC8/Tests/quad.vcproj\
+./MSVC8/Tests/rocket.vcproj\
+./MSVC8/Tests/sami.vcproj\
+./MSVC8/Tests/simple.vcproj\
+./MSVC8/Tests/spec.vcproj\
+./MSVC8/Tests/specmix.vcproj\
+./MSVC8/Tests/subhex.vcproj\
+./MSVC8/Tests/testall.vcproj\
+./MSVC8/Tests/testall_f.vfproj\
+./MSVC8/Tests/TestIncludes.vsprops\
+./MSVC8/Tests/testpdb.vcproj\
+./MSVC8/Tests/TestReadMask.vcproj\
+./MSVC8/Tests/Tests.sln\
+./MSVC8/Tests/twohex.vcproj\
+./MSVC8/Tests/ucd1d.vcproj\
+./MSVC8/Tests/ucd.vcproj\
+./MSVC8/Tests/ucd_f.vfproj\
+./MSVC8/Tests/ucdsamp3.vcproj\
+./MSVC8/Tests/version.vcproj\
+./MSVC8/Tests/wave.vcproj\
+./MSVC8/bin/RunTests.bat\
+./MSVC8/pdb_detect/pdb_detect.vcproj\
+./MSVC8/BaseIncludes.vsprops\
+./MSVC8/HDF5_Defines.vsprops\
+./MSVC8/ModernDTPR.vsprops\
+./MSVC8/NO_SEC_DEP.vsprops\
+./MSVC8/NON_BSD_DEFINES.vsprops\
+./MSVC8/silex.vcproj\
+./MSVC8/Silo.vcproj\
+./MSVC8/SiloWindows.sln\
+./include/config.h\
+./resources/silex.aps\
+./resources/silex.ico\
+./resources/silex.rc\
+./Makefile.am\
+./Makefile\
+./runsilexmoc.bat\
+./Makefile.in\
+./copysilo.bat\
+./README\
+./MSVC8-BSD/Tests/alltypes.vcproj\
+./MSVC8-BSD/Tests/array.vcproj\
+./MSVC8-BSD/Tests/array_f.vfproj\
+./MSVC8-BSD/Tests/compression.vcproj\
+./MSVC8-BSD/Tests/csg.vcproj\
+./MSVC8-BSD/Tests/curve_f.vfproj\
+./MSVC8-BSD/Tests/dirtest.vcproj\
+./MSVC8-BSD/Tests/extface.vcproj\
+./MSVC8-BSD/Tests/grab.vcproj\
+./MSVC8-BSD/Tests/group_test.vcproj\
+./MSVC8-BSD/Tests/largefile.vcproj\
+./MSVC8-BSD/Tests/listtypes.vcproj\
+./MSVC8-BSD/Tests/mat3d_3across.vcproj\
+./MSVC8-BSD/Tests/mat_f.vfproj\
+./MSVC8-BSD/Tests/merge_block.vcproj\
+./MSVC8-BSD/Tests/mmadjacency.vcproj\
+./MSVC8-BSD/Tests/multi_file.vcproj\
+./MSVC8-BSD/Tests/multi_test.vcproj\
+./MSVC8-BSD/Tests/multispec.vcproj\
+./MSVC8-BSD/Tests/namescheme.vcproj\
+./MSVC8-BSD/Tests/obj.vcproj\
+./MSVC8-BSD/Tests/onehex.vcproj\
+./MSVC8-BSD/Tests/oneprism.vcproj\
+./MSVC8-BSD/Tests/onepyramid.vcproj\
+./MSVC8-BSD/Tests/onetet.vcproj\
+./MSVC8-BSD/Tests/partial_io.vcproj\
+./MSVC8-BSD/Tests/point.vcproj\
+./MSVC8-BSD/Tests/point_f.vfproj\
+./MSVC8-BSD/Tests/polyzl.vcproj\
+./MSVC8-BSD/Tests/quad.vcproj\
+./MSVC8-BSD/Tests/rocket.vcproj\
+./MSVC8-BSD/Tests/sami.vcproj\
+./MSVC8-BSD/Tests/simple.vcproj\
+./MSVC8-BSD/Tests/spec.vcproj\
+./MSVC8-BSD/Tests/specmix.vcproj\
+./MSVC8-BSD/Tests/subhex.vcproj\
+./MSVC8-BSD/Tests/testall.vcproj\
+./MSVC8-BSD/Tests/testall_f.vfproj\
+./MSVC8-BSD/Tests/TestIncludes.vsprops\
+./MSVC8-BSD/Tests/testpdb.vcproj\
+./MSVC8-BSD/Tests/TestReadMask.vcproj\
+./MSVC8-BSD/Tests/Tests.sln\
+./MSVC8-BSD/Tests/twohex.vcproj\
+./MSVC8-BSD/Tests/ucd1d.vcproj\
+./MSVC8-BSD/Tests/ucd.vcproj\
+./MSVC8-BSD/Tests/ucd_f.vfproj\
+./MSVC8-BSD/Tests/ucdsamp3.vcproj\
+./MSVC8-BSD/Tests/version.vcproj\
+./MSVC8-BSD/Tests/wave.vcproj\
+./MSVC8-BSD/bin/RunTests.bat\
+./MSVC8-BSD/pdb_detect/pdb_detect.vcproj\
+./MSVC8-BSD/BaseIncludes.vsprops\
+./MSVC8-BSD/HDF5_Defines.vsprops\
+./MSVC8-BSD/ModernDTPR.vsprops\
+./MSVC8-BSD/NO_SEC_DEP.vsprops\
+./MSVC8-BSD/silex.vcproj\
+./MSVC8-BSD/Silo.vcproj\
+./MSVC8-BSD/SiloWindows.sln
diff --git a/SiloWindows/Makefile.in b/SiloWindows/Makefile.in
new file mode 100644
index 0000000..eed1613
--- /dev/null
+++ b/SiloWindows/Makefile.in
@@ -0,0 +1,562 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+#
+# Makefile.am --- automake input file for SiloWindows directory
+#
+#
+# Modifications:
+#   Mark C. Miller, Tue Aug  3 17:24:43 PDT 2010
+#   Ensure a number of silo project files were included.
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = SiloWindows
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+./MSVC8/Tests/alltypes.vcproj\
+./MSVC8/Tests/array.vcproj\
+./MSVC8/Tests/array_f.vfproj\
+./MSVC8/Tests/compression.vcproj\
+./MSVC8/Tests/csg.vcproj\
+./MSVC8/Tests/curve_f.vfproj\
+./MSVC8/Tests/dirtest.vcproj\
+./MSVC8/Tests/extface.vcproj\
+./MSVC8/Tests/grab.vcproj\
+./MSVC8/Tests/group_test.vcproj\
+./MSVC8/Tests/largefile.vcproj\
+./MSVC8/Tests/listtypes.vcproj\
+./MSVC8/Tests/mat3d_3across.vcproj\
+./MSVC8/Tests/mat_f.vfproj\
+./MSVC8/Tests/merge_block.vcproj\
+./MSVC8/Tests/mmadjacency.vcproj\
+./MSVC8/Tests/multi_file.vcproj\
+./MSVC8/Tests/multi_test.vcproj\
+./MSVC8/Tests/multispec.vcproj\
+./MSVC8/Tests/namescheme.vcproj\
+./MSVC8/Tests/obj.vcproj\
+./MSVC8/Tests/onehex.vcproj\
+./MSVC8/Tests/oneprism.vcproj\
+./MSVC8/Tests/onepyramid.vcproj\
+./MSVC8/Tests/onetet.vcproj\
+./MSVC8/Tests/partial_io.vcproj\
+./MSVC8/Tests/point.vcproj\
+./MSVC8/Tests/point_f.vfproj\
+./MSVC8/Tests/polyzl.vcproj\
+./MSVC8/Tests/quad.vcproj\
+./MSVC8/Tests/rocket.vcproj\
+./MSVC8/Tests/sami.vcproj\
+./MSVC8/Tests/simple.vcproj\
+./MSVC8/Tests/spec.vcproj\
+./MSVC8/Tests/specmix.vcproj\
+./MSVC8/Tests/subhex.vcproj\
+./MSVC8/Tests/testall.vcproj\
+./MSVC8/Tests/testall_f.vfproj\
+./MSVC8/Tests/TestIncludes.vsprops\
+./MSVC8/Tests/testpdb.vcproj\
+./MSVC8/Tests/TestReadMask.vcproj\
+./MSVC8/Tests/Tests.sln\
+./MSVC8/Tests/twohex.vcproj\
+./MSVC8/Tests/ucd1d.vcproj\
+./MSVC8/Tests/ucd.vcproj\
+./MSVC8/Tests/ucd_f.vfproj\
+./MSVC8/Tests/ucdsamp3.vcproj\
+./MSVC8/Tests/version.vcproj\
+./MSVC8/Tests/wave.vcproj\
+./MSVC8/bin/RunTests.bat\
+./MSVC8/pdb_detect/pdb_detect.vcproj\
+./MSVC8/BaseIncludes.vsprops\
+./MSVC8/HDF5_Defines.vsprops\
+./MSVC8/ModernDTPR.vsprops\
+./MSVC8/NO_SEC_DEP.vsprops\
+./MSVC8/NON_BSD_DEFINES.vsprops\
+./MSVC8/silex.vcproj\
+./MSVC8/Silo.vcproj\
+./MSVC8/SiloWindows.sln\
+./include/config.h\
+./resources/silex.aps\
+./resources/silex.ico\
+./resources/silex.rc\
+./Makefile.am\
+./Makefile\
+./runsilexmoc.bat\
+./Makefile.in\
+./copysilo.bat\
+./README\
+./MSVC8-BSD/Tests/alltypes.vcproj\
+./MSVC8-BSD/Tests/array.vcproj\
+./MSVC8-BSD/Tests/array_f.vfproj\
+./MSVC8-BSD/Tests/compression.vcproj\
+./MSVC8-BSD/Tests/csg.vcproj\
+./MSVC8-BSD/Tests/curve_f.vfproj\
+./MSVC8-BSD/Tests/dirtest.vcproj\
+./MSVC8-BSD/Tests/extface.vcproj\
+./MSVC8-BSD/Tests/grab.vcproj\
+./MSVC8-BSD/Tests/group_test.vcproj\
+./MSVC8-BSD/Tests/largefile.vcproj\
+./MSVC8-BSD/Tests/listtypes.vcproj\
+./MSVC8-BSD/Tests/mat3d_3across.vcproj\
+./MSVC8-BSD/Tests/mat_f.vfproj\
+./MSVC8-BSD/Tests/merge_block.vcproj\
+./MSVC8-BSD/Tests/mmadjacency.vcproj\
+./MSVC8-BSD/Tests/multi_file.vcproj\
+./MSVC8-BSD/Tests/multi_test.vcproj\
+./MSVC8-BSD/Tests/multispec.vcproj\
+./MSVC8-BSD/Tests/namescheme.vcproj\
+./MSVC8-BSD/Tests/obj.vcproj\
+./MSVC8-BSD/Tests/onehex.vcproj\
+./MSVC8-BSD/Tests/oneprism.vcproj\
+./MSVC8-BSD/Tests/onepyramid.vcproj\
+./MSVC8-BSD/Tests/onetet.vcproj\
+./MSVC8-BSD/Tests/partial_io.vcproj\
+./MSVC8-BSD/Tests/point.vcproj\
+./MSVC8-BSD/Tests/point_f.vfproj\
+./MSVC8-BSD/Tests/polyzl.vcproj\
+./MSVC8-BSD/Tests/quad.vcproj\
+./MSVC8-BSD/Tests/rocket.vcproj\
+./MSVC8-BSD/Tests/sami.vcproj\
+./MSVC8-BSD/Tests/simple.vcproj\
+./MSVC8-BSD/Tests/spec.vcproj\
+./MSVC8-BSD/Tests/specmix.vcproj\
+./MSVC8-BSD/Tests/subhex.vcproj\
+./MSVC8-BSD/Tests/testall.vcproj\
+./MSVC8-BSD/Tests/testall_f.vfproj\
+./MSVC8-BSD/Tests/TestIncludes.vsprops\
+./MSVC8-BSD/Tests/testpdb.vcproj\
+./MSVC8-BSD/Tests/TestReadMask.vcproj\
+./MSVC8-BSD/Tests/Tests.sln\
+./MSVC8-BSD/Tests/twohex.vcproj\
+./MSVC8-BSD/Tests/ucd1d.vcproj\
+./MSVC8-BSD/Tests/ucd.vcproj\
+./MSVC8-BSD/Tests/ucd_f.vfproj\
+./MSVC8-BSD/Tests/ucdsamp3.vcproj\
+./MSVC8-BSD/Tests/version.vcproj\
+./MSVC8-BSD/Tests/wave.vcproj\
+./MSVC8-BSD/bin/RunTests.bat\
+./MSVC8-BSD/pdb_detect/pdb_detect.vcproj\
+./MSVC8-BSD/BaseIncludes.vsprops\
+./MSVC8-BSD/HDF5_Defines.vsprops\
+./MSVC8-BSD/ModernDTPR.vsprops\
+./MSVC8-BSD/NO_SEC_DEP.vsprops\
+./MSVC8-BSD/silex.vcproj\
+./MSVC8-BSD/Silo.vcproj\
+./MSVC8-BSD/SiloWindows.sln
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  SiloWindows/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  SiloWindows/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# 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/SiloWindows/README b/SiloWindows/README
new file mode 100644
index 0000000..95de1ea
--- /dev/null
+++ b/SiloWindows/README
@@ -0,0 +1,89 @@
+          Building Silo using Microsoft Visual C++ version 8.0
+          ===========================================================
+
+This guide contains instructions for building Silo using MSVC 8.0
+on a computer running MS Windows. While the Silo source code should build using
+other compilers, we only provide project files and support for MSVC and 8.0.
+
+What gets built
+===============
+
+Two project files are provided: Silo and Silex.  There are 8 configuration 
+options within the solution: combinations of debug or release, static or dll, 
+with hdf5 or without. (e.g. DLLwithHDF5 Debug, DLLWithHDF5 Release, StaticLib 
+Debug, StaticLib Release, etc.)
+
+The DLL configurations build Silo as a dynamic link library, while the 
+StaticLib configurations build Silo as a static library.
+
+The configuration ending in 'WithHDF5' build Silo with the HDF5 driver. 
+When the Silo DLL is built, an import library called silo.lib is also created. 
+When developing applications that use the Silo DLL, be sure to link your 
+application with the silo.lib import library. This resolves the symbols that 
+come from the Silo DLL at runtime.
+
+Then be sure that silo.dll is in your path when you run your application.  
+The HDF5 versions append 'hdf5' to the name: silohdf5.lib, silohdf5.dll.
+
+When using the static library version of Silo, link your applications with the 
+silo.lib produced by the build of the static library.  
+
+When linking against the 'WithHDF5' versions, be sure to also link with the 
+appropriate hdf5 lib (hdf5.lib for static or hdf5dll.lib).  HDF5 also has a 
+dependency on zlib, so you must also link your applications with that.
+
+Build instructions
+==================
+
+1. Run the copysilo.bat file in the SiloWindows subdirectory.
+
+2. The solution and project files are found in the SiloWindows subdirectory of 
+   the silo source tree.  There is a subdirectory for MSVC8 project file. In
+   addition there are subdirectories for special includes and resource files 
+   necessary for the build process.
+
+3. Environment variables need to be defined:
+        ZLIB_INC_DIR    path to zlib include directory
+        ZLIB_LIB_DIR    path to zlib library files 
+        ZLIB_LIB_DIR_STATIC    path to static zlib library files 
+ 
+4. If building silo with HDF5 support, you must define a few environment 
+   variables so that the compiler can find the necessary files
+   
+        HDF5_INC_DIR    path to the HDF5 incude directory (where headers are 
+                        located)
+        HDF5_LIB_DIR    path to location of HDF5 libs
+        HDF5_LIB_DIR_STATIC    path to location of static HDF5 libs
+
+        SZIP_INC_DIR    path to the szip incude directory (where headers are 
+                        located)
+        SZIP_LIB_DIR    path to location of szip libs
+        SZIP_LIB_DIR_STATIC    path to location of static szip libs
+  
+5. Silex is built by default after Silo completes, and it also requires an 
+   evironment variable to be defined:
+        QT_DIR          path to the Qt directory.
+   If you do not have Qt or simply choose not to build Silex, you can remove 
+   it from the build process by opening the Configuration Management window 
+   (Once Visual Studio is open).  To do so, right-click the solution name, 
+   Unselect the silex project for the configuration you will be building.
+
+6. Open VisualStudio and the SiloWindows solution file located in 
+   the MSVC8 subdirectory of SiloWindows.
+
+7. Choose the build configuration that is appropriate for your needs. Most 
+   users should choose the DLL and only build the Release version.
+   To change the active build configuration, select Build->Select active
+   configuration from the main menu and choose the desired build configuration
+   from the available list.  
+
+8. Build the Silo library. If you are building the Silo DLL, both silo.dll and
+   silo.lib are placed in the subdirectory for the selected build configuration.
+   Those directories are: 
+
+       SiloWindows\MSVC8\<ConfigurationName) 
+       e.g.
+
+       SiloWindows\MSVC8\DLLwithHDF5_Debug
+       SiloWindows\MSVC8\DLLwithHDF5_Release
+
diff --git a/SiloWindows/copysilo.bat b/SiloWindows/copysilo.bat
new file mode 100644
index 0000000..9d2f445
--- /dev/null
+++ b/SiloWindows/copysilo.bat
@@ -0,0 +1,81 @@
+ at echo off
+
+set SiloIn=.\\..\\src\\silo\\silo.h.in
+set SiloOut=.\\include\\silo.h
+set VersionOut=.\\include\\siloversion.h
+set major=0
+set minor=0
+set patch=0
+set pre=
+
+REM Retrieve and parse the version tokens
+for /F "tokens=1,2,3* delims=.,-pre" %%i in (.\\..\\VERSION) do (
+  Set major=%%i
+  Set minor=%%j
+  Set patch=%%k
+  Set pre=%%l
+)
+
+if exist %SiloOut% (
+  del %SiloOut%
+)
+
+if exist %VersionOut% (
+  del %VersionOut%
+)
+
+REM Read silo.h.in, parsing for VERS info, and substituting in appropriate values
+for /F "tokens=1* delims=]" %%i in ('find /v /n "" ^.\..\src\silo\silo.h.in') do (
+  REM preserve blank lines
+  if "%%j"=="" (
+    @echo.>>%SiloOut%
+  ) else (
+    REM search the input line for special tokens
+    for /F "tokens=1,2,3* delims=@" %%A in ("%%j") do (
+      :: @echo %%A%%B%%C%%D>>mytest.txt 
+      if "%%B"=="SILO_VERS_MAJ" (
+        @echo %%A%major%>> %SiloOut% 
+      ) else if "%%B"=="SILO_VERS_MIN" (
+        @echo %%A%minor%>> %SiloOut% 
+      ) else if "%%B"=="SILO_VERS_PAT" (
+        @echo %%A%patch%>> %SiloOut% 
+      ) else if "%%B"=="SILO_VERS_PRE" (
+        @echo %%A%pre%>> %SiloOut% 
+      ) else if "%%B"=="SILO_VERS_TAG" (
+        if "%pre%"=="" (
+          @echo %%A Silo_version_%major%_%minor%_%patch%>> %SiloOut% 
+        ) else (
+          @echo %%A Silo_version_%major%_%minor%_%patch%_pre%pre%>> %SiloOut% 
+        )
+      ) else if "%%B"=="SILO_DTYPPTR" (
+          @echo %%Avoid%%C>> %SiloOut%
+      ) else if "%%B"=="SILO_DTYPPTR1" (
+          @echo %%Avoid*%%C>> %SiloOut%
+      ) else if "%%B"=="SILO_DTYPPTR2" (
+          @echo %%Avoid*%%C>> %SiloOut%
+      ) else if "%%B"=="DB_LONG_LONG_DEF" (
+          @echo %%A22%%C>> %SiloOut%
+      ) else (
+        if not "%%C"=="" (
+          @echo %%A%%B%%C>> %SiloOut%
+        ) else if not "%%B"=="" (
+          @echo %%A%%B>> %SiloOut%
+        ) else (
+          @echo %%A>> %SiloOut%
+        )
+      )
+    )
+  )
+)
+
+if "%pre%"=="" (
+  @echo #define PACKAGE_STRING "silo %major%.%minor%.%patch%>> %VersionOut% 
+  @echo #define PACKAGE_VERSION "%major%.%minor%.%patch%>> %VersionOut% 
+  @echo #define VERSION "%major%.%minor%.%patch%>> %VersionOut% 
+) else (
+  @echo #define PACKAGE_STRING "silo %major%.%minor%.%patch%-pre%pre%">> %VersionOut% 
+  @echo #define PACKAGE_VERSION "%major%.%minor%.%patch%-pre%pre%">> %VersionOut% 
+  @echo #define VERSION "%major%.%minor%.%patch%-pre%pre%">> %VersionOut% 
+)
+
+
diff --git a/SiloWindows/include/config.h b/SiloWindows/include/config.h
new file mode 100644
index 0000000..fe1dbd1
--- /dev/null
+++ b/SiloWindows/include/config.h
@@ -0,0 +1,180 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+   libraries. */
+/* #undef FC_DUMMY_MAIN */
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+/* #undef FC_DUMMY_MAIN_EQ_F77 */
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+   case), which must not contain underscores, for linking with Fortran. */
+#define FC_FUNC(name,NAME) NAME
+
+/* As FC_FUNC, but for C identifiers containing underscores. */
+/*#define SILO_FC_FUNC_(name,NAME) name ## _*/
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #define HAVE_DLFCN_H 1 */
+
+/* System provides fclose prototypes */
+#define HAVE_FCLOSE_POINTER 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* System provides fflush prototypes */
+#define HAVE_FFLUSH_POINTER 1
+
+/* Define to 1 if you have the `fnmatch' function. */
+/* #define HAVE_FNMATCH 1 */
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+/* #define HAVE_FNMATCH_H 1 */
+
+/* System provides fopen prototypes */
+#define HAVE_FOPEN_POINTER 1
+
+/* Define to 1 if you have the `fpclass' function. */
+#define HAVE_FPCLASS 1
+
+/* System provides fprintf prototypes */
+#define HAVE_FPRINTF_POINTER 1
+
+/* System provides fread prototypes */
+#define HAVE_FREAD_POINTER 1
+
+/* System provides fseek prototypes */
+#define HAVE_FSEEK_POINTER 1
+
+/* System provides ftell prototypes */
+#define HAVE_FTELL_POINTER 1
+
+/* System provides fwrite prototypes */
+#define HAVE_FWRITE_POINTER 1
+
+
+/* Define to 1 if you have the <history.h> header file. */
+/* #undef HAVE_HISTORY_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. */
+/* #define HAVE_INTTYPES_H 1 */
+
+/* Define to 1 if you have the `isnan' function. */
+#define HAVE_ISNAN 1
+
+/* Define to 1 if you have the `hdf5' library (-lhdf5). */
+#define HAVE_LIBHDF5 1
+
+/* Define if you have a readline compatible library */
+#define HAVE_LIBREADLINE 1
+
+/* Define to 1 if you have the `sz' library (-lsz). */
+#define HAVE_LIBSZ 1
+
+/* Define to 1 if you have the `z' library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the `memmove' function. */
+#ifndef HAVE_MEMMOVE
+#define HAVE_MEMMOVE 1
+#endif
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Support for NetCDF */
+/* #define HAVE_NETCDF_DRIVER 1 */
+
+/* Support for PDB */
+#define HAVE_PDB_DRIVER 1
+
+/* Define to 1 if you have the <readline.h> header file. */
+/* #undef HAVE_READLINE_H */
+
+/* Define if your readline library has \`add_history' */
+/* #define HAVE_READLINE_HISTORY 1 */
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+/* #define HAVE_READLINE_HISTORY_H 1 */
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+/* #define HAVE_READLINE_READLINE_H 1 */
+
+/* System provides setvbuf prototypes */
+#define HAVE_SETVBUF_POINTER 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #define HAVE_STDINT_H 1 */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+/* #define HAVE_STRINGS_H 1 */
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+/* #define HAVE_SYS_FCNTL_H 1 */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+/* #define HAVE_SYS_TIME_H 1 */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Support for Taurus */
+#define HAVE_TAURUS_DRIVER 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #define HAVE_UNISTD_H 1 */
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#define HAVE_ZLIB_H 1
+
+#define SILO_LONG_LONG __int64
+
+/* Name of package */
+#define PACKAGE "silo"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "visit-help at llnl.gov"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "silo"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "silo"
+
+/* include the file that has the version defines */
+#include "siloversion.h"
+
+/* The size of `off64_t', as computed by sizeof. */
+#define SIZEOF_OFF64_T 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+
+/* Override longjmp */
+/* #undef longjmp */
+
+/* Override setjmp */
+/* #undef setjmp */
diff --git a/SiloWindows/resources/silex.aps b/SiloWindows/resources/silex.aps
new file mode 100644
index 0000000..fe81e67
Binary files /dev/null and b/SiloWindows/resources/silex.aps differ
diff --git a/SiloWindows/resources/silex.ico b/SiloWindows/resources/silex.ico
new file mode 100644
index 0000000..af0f4a9
Binary files /dev/null and b/SiloWindows/resources/silex.ico differ
diff --git a/SiloWindows/resources/silex.rc b/SiloWindows/resources/silex.rc
new file mode 100644
index 0000000..76cb608
--- /dev/null
+++ b/SiloWindows/resources/silex.rc
@@ -0,0 +1,5 @@
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1               ICON    DISCARDABLE     "silex.ico"
+
+
diff --git a/SiloWindows/runsilexmoc.bat b/SiloWindows/runsilexmoc.bat
new file mode 100644
index 0000000..4bbd26f
--- /dev/null
+++ b/SiloWindows/runsilexmoc.bat
@@ -0,0 +1,22 @@
+ at echo off
+set MOC=%QTDIR%\bin\moc.exe
+set SILEX=..\..\tools\silex
+
+
+echo ************************************************************************
+echo Preprocessing silex source using %MOC%
+echo ...
+
+echo Running moc on the silex source
+
+%MOC% %SILEX%\Explorer.h        -o %SILEX%\Explorer_moc.cpp
+%MOC% %SILEX%\SiloArrayView.h   -o %SILEX%\SiloArrayView_moc.cpp
+%MOC% %SILEX%\SiloDirTreeView.h -o %SILEX%\SiloDirTreeView_moc.cpp
+%MOC% %SILEX%\SiloDirView.h     -o %SILEX%\SiloDirView_moc.cpp
+%MOC% %SILEX%\SiloObjectView.h  -o %SILEX%\SiloObjectView_moc.cpp
+%MOC% %SILEX%\SiloValueView.h   -o %SILEX%\SiloValueView_moc.cpp
+%MOC% %SILEX%\SiloView.h        -o %SILEX%\SiloView_moc.cpp
+
+echo ...
+echo Done.
+echo ************************************************************************
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..ef216a5
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+4.8
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..263311a
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,8376 @@
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf.  If you want to use that,
+you should regenerate the build system entirely.], [63])])
+
+#
+# SYNOPSIS
+#
+#   AX_CC_MAXOPT
+#
+# DESCRIPTION
+#
+#   Try to turn on "good" C optimization flags for various compilers
+#   and architectures, for some definition of "good". (In our case,
+#   good for FFTW and hopefully for other scientific codes. Modify as
+#   needed.)
+#
+#   The user can override the flags by setting the CFLAGS environment
+#   variable. The user can also specify --enable-portable-binary in
+#   order to disable any optimization flags that might result in a
+#   binary that only runs on the host architecture.
+#
+#   Note also that the flags assume that ANSI C aliasing rules are
+#   followed by the code (e.g. for gcc's -fstrict-aliasing), and that
+#   floating-point computations can be re-ordered as needed.
+#
+#   Requires macros: AX_CHECK_COMPILER_FLAGS, AX_COMPILER_VENDOR,
+#   AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID.
+#
+# LAST MODIFICATION
+#
+#   2007-07-29
+#
+# COPYLEFT
+#
+#   Copyright (c) 2007 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2007 Matteo Frigo
+#
+#   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 3 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, see
+#   <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright
+#   owner gives unlimited permission to copy, distribute and modify the
+#   configure scripts that are the output of Autoconf when processing
+#   the Macro. You need not follow the terms of the GNU General Public
+#   License when using or distributing such scripts, even though
+#   portions of the text of the Macro appear in them. The GNU General
+#   Public License (GPL) does govern all other use of the material that
+#   constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the
+#   Autoconf Macro released by the Autoconf Macro Archive. When you
+#   make and distribute a modified version of the Autoconf Macro, you
+#   may extend this special exception to the GPL to apply to your
+#   modified version as well.
+
+AC_DEFUN([AX_CC_MAXOPT],
+[
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AX_COMPILER_VENDOR])
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
+	acx_maxopt_portable=$withval, acx_maxopt_portable=no)
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+  CFLAGS=""
+  case $ax_cv_c_compiler_vendor in
+    dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+	 if test "x$acx_maxopt_portable" = xno; then
+           CFLAGS="$CFLAGS -arch host"
+         fi;;
+
+    sun) CFLAGS="-native -fast -xO5 -dalign"
+	 if test "x$acx_maxopt_portable" = xyes; then
+	   CFLAGS="$CFLAGS -xarch=generic"
+         fi;;
+
+    hp)  CFLAGS="+Oall +Optrs_ansi +DSnative"
+	 if test "x$acx_maxopt_portable" = xyes; then
+	   CFLAGS="$CFLAGS +DAportable"
+	 fi;;
+
+    ibm) if test "x$acx_maxopt_portable" = xno; then
+           xlc_opt="-qarch=auto -qtune=auto"
+	 else
+           xlc_opt="-qtune=auto"
+	 fi
+         AX_CHECK_COMPILER_FLAGS($xlc_opt,
+         	CFLAGS="-O3 -qansialias -w $xlc_opt",
+               [CFLAGS="-O3 -qansialias -w"
+                echo "******************************************************"
+                echo "*  You seem to have the IBM  C compiler.  It is      *"
+                echo "*  recommended for best performance that you use:    *"
+                echo "*                                                    *"
+                echo "*    CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
+                echo "*                      ^^^        ^^^                *"
+                echo "*  where xxx is pwr2, pwr3, 604, or whatever kind of *"
+                echo "*  CPU you have.  (Set the CFLAGS environment var.   *"
+                echo "*  and re-run configure.)  For more info, man cc.    *"
+                echo "******************************************************"])
+         ;;
+
+    intel) CFLAGS="-O3 -ansi_alias"
+	if test "x$acx_maxopt_portable" = xno; then
+	  icc_archflag=unknown
+	  icc_flags=""
+	  case $host_cpu in
+	    i686*|x86_64*)
+              # icc accepts gcc assembly syntax, so these should work:
+	      AX_GCC_X86_CPUID(0)
+              AX_GCC_X86_CPUID(1)
+	      case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+                *:756e6547:*:*) # Intel
+                  case $ax_cv_gcc_x86_cpuid_1 in
+                    *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
+                    *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
+                    *f??:*:*:*) icc_flags="-xN -xW -xK";;
+                  esac ;;
+              esac ;;
+          esac
+          if test "x$icc_flags" != x; then
+            for flag in $icc_flags; do
+              AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
+            done
+          fi
+          AC_MSG_CHECKING([for icc architecture flag])
+	  AC_MSG_RESULT($icc_archflag)
+          if test "x$icc_archflag" != xunknown; then
+            CFLAGS="$CFLAGS $icc_archflag"
+          fi
+        fi
+	;;
+
+    gnu)
+     # default optimization flags for gcc on all systems
+     CFLAGS="-O3 -fomit-frame-pointer"
+
+     # -malign-double for x86 systems
+     AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
+
+     #  -fstrict-aliasing for gcc-2.95+
+     AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
+	CFLAGS="$CFLAGS -fstrict-aliasing")
+
+     # note that we enable "unsafe" fp optimization with other compilers, too
+     AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
+
+     AX_GCC_ARCHFLAG($acx_maxopt_portable)
+     ;;
+  esac
+
+  if test -z "$CFLAGS"; then
+	echo ""
+	echo "********************************************************"
+        echo "* WARNING: Don't know the best CFLAGS for this system  *"
+        echo "* Use ./configure CFLAGS=... to specify your own flags *"
+	echo "* (otherwise, a default of CFLAGS=-O3 will be used)    *"
+	echo "********************************************************"
+	echo ""
+        CFLAGS="-O3"
+  fi
+
+  AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
+	echo ""
+        echo "********************************************************"
+        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
+        echo "* your compiler.                                       *"
+        echo "* Use ./configure CFLAGS=... to specify your own flags *"
+        echo "********************************************************"
+        echo ""
+        CFLAGS=""
+  ])
+
+fi
+])
+
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+#   Check whether the given compiler FLAGS work with the current
+#   language's compiler, or whether they give an error. (Warnings,
+#   however, are ignored.)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+# LAST MODIFICATION
+#
+#   2007-07-29
+#
+# COPYLEFT
+#
+#   Copyright (c) 2007 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2007 Matteo Frigo
+#
+#   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 3 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, see
+#   <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright
+#   owner gives unlimited permission to copy, distribute and modify the
+#   configure scripts that are the output of Autoconf when processing
+#   the Macro. You need not follow the terms of the GNU General Public
+#   License when using or distributing such scripts, even though
+#   portions of the text of the Macro appear in them. The GNU General
+#   Public License (GPL) does govern all other use of the material that
+#   constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the
+#   Autoconf Macro released by the Autoconf Macro Archive. When you
+#   make and distribute a modified version of the Autoconf Macro, you
+#   may extend this special exception to the GPL to apply to your
+#   modified version as well.
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+  [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
+      ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+      _AC_LANG_PREFIX[]FLAGS="$1"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+        AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+      _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+  [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+   _AC_LANG_PREFIX[]FLAGS="$1"
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
+     eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
+   _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+	m4_default([$2], :)
+else
+	m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAGS
+
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VENDOR
+#
+# DESCRIPTION
+#
+#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm,
+#   sun, hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi,
+#   microsoft, watcom, etc. The vendor is returned in the cache
+#   variable $ax_cv_c_compiler_vendor for C and
+#   $ax_cv_cxx_compiler_vendor for C++.
+#
+# LAST MODIFICATION
+#
+#   2007-08-01
+#
+# COPYLEFT
+#
+#   Copyright (c) 2007 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2007 Matteo Frigo
+#
+#   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 3 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, see
+#   <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright
+#   owner gives unlimited permission to copy, distribute and modify the
+#   configure scripts that are the output of Autoconf when processing
+#   the Macro. You need not follow the terms of the GNU General Public
+#   License when using or distributing such scripts, even though
+#   portions of the text of the Macro appear in them. The GNU General
+#   Public License (GPL) does govern all other use of the material that
+#   constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the
+#   Autoconf Macro released by the Autoconf Macro Archive. When you
+#   make and distribute a modified version of the Autoconf Macro, you
+#   may extend this special exception to the GPL to apply to your
+#   modified version as well.
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+  # note: don't check for gcc first since some other compilers define __GNUC__
+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+      thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+  done
+ ])
+])
+
+#
+# SYNOPSIS
+#
+#   AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+#   This macro tries to guess the "native" arch corresponding to the
+#   target architecture for use with gcc's -march=arch or -mtune=arch
+#   flags. If found, the cache variable $ax_cv_gcc_archflag is set to
+#   this flag and ACTION-SUCCESS is executed; otherwise
+#   $ax_cv_gcc_archflag is is set to "unknown" and ACTION-FAILURE is
+#   executed. The default ACTION-SUCCESS is to add $ax_cv_gcc_archflag
+#   to the end of $CFLAGS.
+#
+#   PORTABLE? should be either [yes] (default) or [no]. In the former
+#   case, the flag is set to -mtune (or equivalent) so that the
+#   architecture is only used for tuning, but the instruction set used
+#   is still portable. In the latter case, the flag is set to -march
+#   (or equivalent) so that architecture-specific instructions are
+#   enabled.
+#
+#   The user can specify --with-gcc-arch=<arch> in order to override
+#   the macro's choice of architecture, or --without-gcc-arch to
+#   disable this.
+#
+#   When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
+#   called unless the user specified --with-gcc-arch manually.
+#
+#   Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
+#
+#   (The main emphasis here is on recent CPUs, on the principle that
+#   doing high-performance computing on old hardware is uncommon.)
+#
+# LAST MODIFICATION
+#
+#   2007-07-29
+#
+# COPYLEFT
+#
+#   Copyright (c) 2007 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2007 Matteo Frigo
+#
+#   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 3 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, see
+#   <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright
+#   owner gives unlimited permission to copy, distribute and modify the
+#   configure scripts that are the output of Autoconf when processing
+#   the Macro. You need not follow the terms of the GNU General Public
+#   License when using or distributing such scripts, even though
+#   portions of the text of the Macro appear in them. The GNU General
+#   Public License (GPL) does govern all other use of the material that
+#   constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the
+#   Autoconf Macro released by the Autoconf Macro Archive. When you
+#   make and distribute a modified version of the Autoconf Macro, you
+#   may extend this special exception to the GPL to apply to your
+#   modified version as well.
+
+AC_DEFUN([AX_GCC_ARCHFLAG],
+[AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
+	ax_gcc_arch=$withval, ax_gcc_arch=yes)
+
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT([])
+AC_CACHE_VAL(ax_cv_gcc_archflag,
+[
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+  i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+     AX_GCC_X86_CPUID(0)
+     AX_GCC_X86_CPUID(1)
+     case $ax_cv_gcc_x86_cpuid_0 in
+       *:756e6547:*:*) # Intel
+          case $ax_cv_gcc_x86_cpuid_1 in
+	    *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+	    *5??:*:*:*) ax_gcc_arch=pentium ;;
+	    *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+	    *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+	    *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+	    *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+	    *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+	    *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+            *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
+		case $host_cpu in
+                  x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+                  *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+                esac ;;
+            *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+          esac ;;
+       *:68747541:*:*) # AMD
+          case $ax_cv_gcc_x86_cpuid_1 in
+	    *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
+	    *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+	    *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+	    *60?:*:*:*) ax_gcc_arch=k7 ;;
+	    *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+	    *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+	    *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+	    *6[[68a]]?:*:*:*)
+	       AX_GCC_X86_CPUID(0x80000006) # L2 cache size
+	       case $ax_cv_gcc_x86_cpuid_0x80000006 in
+                 *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
+			ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+                 *) ax_gcc_arch="athlon-4 athlon k7" ;;
+	       esac ;;
+	    *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+	    *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+	    *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+	    *f??:*:*:*) ax_gcc_arch="k8" ;;
+          esac ;;
+	*:746e6543:*:*) # IDT
+	   case $ax_cv_gcc_x86_cpuid_1 in
+	     *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+	     *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+	     *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
+	     *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+	   esac ;;
+     esac
+     if test x"$ax_gcc_arch" = x; then # fallback
+	case $host_cpu in
+	  i586*) ax_gcc_arch=pentium ;;
+	  i686*) ax_gcc_arch=pentiumpro ;;
+        esac
+     fi
+     ;;
+
+  sparc*)
+     AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
+     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+     case $cputype in
+         *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+         *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+         *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+         *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
+         *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
+         *cypress*) ax_gcc_arch=cypress ;;
+     esac ;;
+
+  alphaev5) ax_gcc_arch=ev5 ;;
+  alphaev56) ax_gcc_arch=ev56 ;;
+  alphapca56) ax_gcc_arch="pca56 ev56" ;;
+  alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+  alphaev6) ax_gcc_arch=ev6 ;;
+  alphaev67) ax_gcc_arch=ev67 ;;
+  alphaev68) ax_gcc_arch="ev68 ev67" ;;
+  alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+  alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+  alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+  powerpc*)
+     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+     case $cputype in
+       *750*) ax_gcc_arch="750 G3" ;;
+       *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
+       *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
+       *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
+       *970*) ax_gcc_arch="970 G5 power4";;
+       *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+       *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+       603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+       *) ax_gcc_arch=$cputype ;;
+     esac
+     ax_gcc_arch="$ax_gcc_arch powerpc"
+     ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+  if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
+    flags="-mtune=$arch"
+    # -mcpu=$arch and m$arch generate nonportable code on every arch except
+    # x86.  And some other arches (e.g. Alpha) don't accept -mtune.  Grrr.
+    case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+  else
+    flags="-march=$arch -mcpu=$arch -m$arch"
+  fi
+  for flag in $flags; do
+    AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
+  done
+  test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+])
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT($ax_cv_gcc_archflag)
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+  m4_default([$3],:)
+else
+  m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
+fi
+])
+
+#
+# SYNOPSIS
+#
+#   AX_GCC_X86_CPUID(OP)
+#
+# DESCRIPTION
+#
+#   On Pentium and later x86 processors, with gcc or a compiler that
+#   has a compatible syntax for inline assembly instructions, run a
+#   small program that executes the cpuid instruction with input OP.
+#   This can be used to detect the CPU type.
+#
+#   On output, the values of the eax, ebx, ecx, and edx registers are
+#   stored as hexadecimal strings as "eax:ebx:ecx:edx" in the cache
+#   variable ax_cv_gcc_x86_cpuid_OP.
+#
+#   If the cpuid instruction fails (because you are running a
+#   cross-compiler, or because you are not using gcc, or because you
+#   are on a processor that doesn't have this instruction),
+#   ax_cv_gcc_x86_cpuid_OP is set to the string "unknown".
+#
+#   This macro mainly exists to be used in AX_GCC_ARCHFLAG.
+#
+# LAST MODIFICATION
+#
+#   2007-07-29
+#
+# COPYLEFT
+#
+#   Copyright (c) 2007 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2007 Matteo Frigo
+#
+#   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 3 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, see
+#   <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright
+#   owner gives unlimited permission to copy, distribute and modify the
+#   configure scripts that are the output of Autoconf when processing
+#   the Macro. You need not follow the terms of the GNU General Public
+#   License when using or distributing such scripts, even though
+#   portions of the text of the Macro appear in them. The GNU General
+#   Public License (GPL) does govern all other use of the material that
+#   constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the
+#   Autoconf Macro released by the Autoconf Macro Archive. When you
+#   make and distribute a modified version of the Autoconf Macro, you
+#   may extend this special exception to the GPL to apply to your
+#   modified version as well.
+
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+     int op = $1, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+])],
+     [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 51 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+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 "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	      lt_cv_sys_max_cmd_len=$new_result &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on massive
+      # amounts of additional arguments before passing them to the linker.
+      # It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         old_striplib="$STRIP -S"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+# set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognize shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognize a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't 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
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; 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
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+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
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  :
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  interix[[3-9]]*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux* | k*bsd*-gnu)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # Archives containing C++ object files must be created using
+	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	  # necessary to make sure instantiated templates are included
+	  # in the archive.
+	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    if test -f /usr/libexec/ld.so; then
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      fi
+      output_verbose_link_cmd='echo'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx*)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	  *)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+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
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# -------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by 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., 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.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# 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 "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# 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='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux* | k*bsd*-gnu)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    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'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    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'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # 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*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+  as_executable_p='test -x'
+else
+  as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])
+
+#
+# SYNOPSIS
+#
+#   VL_LIB_READLINE
+#
+# DESCRIPTION
+#
+#   Searches for a readline compatible library. If found, defines
+#   `HAVE_LIBREADLINE'. If the found library has the `add_history'
+#   function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
+#   locations of the necessary include files and sets `HAVE_READLINE_H'
+#   or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
+#   'HAVE_HISTORY_H' if the corresponding include files exists.
+#
+#   The libraries that may be readline compatible are `libedit',
+#   `libeditline' and `libreadline'. Sometimes we need to link a
+#   termcap library for readline to work, this macro tests these cases
+#   too by trying to link with `libtermcap', `libcurses' or
+#   `libncurses' before giving up.
+#
+#   Here is an example of how to use the information provided by this
+#   macro to perform the necessary includes or declarations in a C
+#   file:
+#
+#     #ifdef HAVE_LIBREADLINE
+#     #  if defined(HAVE_READLINE_READLINE_H)
+#     #    include <readline/readline.h>
+#     #  elif defined(HAVE_READLINE_H)
+#     #    include <readline.h>
+#     #  else /* !defined(HAVE_READLINE_H) */
+#     extern char *readline ();
+#     #  endif /* !defined(HAVE_READLINE_H) */
+#     char *cmdline = NULL;
+#     #else /* !defined(HAVE_READLINE_READLINE_H) */
+#       /* no readline */
+#     #endif /* HAVE_LIBREADLINE */
+#
+#     #ifdef HAVE_READLINE_HISTORY
+#     #  if defined(HAVE_READLINE_HISTORY_H)
+#     #    include <readline/history.h>
+#     #  elif defined(HAVE_HISTORY_H)
+#     #    include <history.h>
+#     #  else /* !defined(HAVE_HISTORY_H) */
+#     extern void add_history ();
+#     extern int write_history ();
+#     extern int read_history ();
+#     #  endif /* defined(HAVE_READLINE_HISTORY_H) */
+#       /* no history */
+#     #endif /* HAVE_READLINE_HISTORY */
+#
+# LAST MODIFICATION
+#
+#   2002-04-04
+#
+# COPYLEFT
+#
+#   Copyright (c) 2002 Ville Laurikari <vl at iki.fi>
+#
+#   Copying and distribution of this file, with or without
+#   modification, are permitted in any medium without royalty provided
+#   the copyright notice and this notice are preserved.
+
+AC_DEFUN([VL_LIB_READLINE], [
+  AC_CACHE_CHECK([for a readline compatible library],
+                 vl_cv_lib_readline, [
+    ORIG_LIBS="$LIBS"
+    for readline_lib in readline edit editline; do
+      for termcap_lib in "" termcap curses ncurses; do
+        if test -z "$termcap_lib"; then
+          TRY_LIB="-l$readline_lib"
+        else
+          TRY_LIB="-l$readline_lib -l$termcap_lib"
+        fi
+        LIBS="$ORIG_LIBS $TRY_LIB"
+        AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
+        if test -n "$vl_cv_lib_readline"; then
+          break
+        fi
+      done
+      if test -n "$vl_cv_lib_readline"; then
+        break
+      fi
+    done
+    if test -z "$vl_cv_lib_readline"; then
+      vl_cv_lib_readline="no"
+      LIBS="$ORIG_LIBS"
+    fi
+  ])
+
+  if test "$vl_cv_lib_readline" != "no"; then
+    AC_DEFINE(HAVE_LIBREADLINE, 1,
+              [Define if you have a readline compatible library])
+    AC_CHECK_HEADERS(readline.h readline/readline.h)
+    AC_CACHE_CHECK([whether readline supports history],
+                   vl_cv_lib_readline_history, [
+      vl_cv_lib_readline_history="no"
+      AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
+    ])
+    if test "$vl_cv_lib_readline_history" = "yes"; then
+      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
+                [Define if your readline library has \`add_history'])
+      AC_CHECK_HEADERS(history.h readline/history.h)
+    fi
+  fi
+])dnl
+
+# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+	      		     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
+  dnl supported because the default installation locations changed from
+  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+  dnl in 1.5.
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0 python1.6 python1.5])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+			      [AC_MSG_RESULT(yes)],
+			      [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+	[am_cv_pathless_PYTHON],[
+	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+	done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# hexversion has been introduced in Python 1.5.2; it's probably not
+# worth to support older versions (1.5.1 was released on October 31, 1998).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/config-site/AIX.conf b/config-site/AIX.conf
new file mode 100644
index 0000000..3072988
--- /dev/null
+++ b/config-site/AIX.conf
@@ -0,0 +1,22 @@
+##
+## Site configuration for an IBM AIX system.  Any special configuration that
+## should be done on an AIX system should go in here.
+##
+
+# If the user hasn't specified a C compile, use xlc
+if test "X$CC" = "X"; then
+    CC="xlc"
+fi
+if test "X$CXX" = "X"; then
+    CXX="xlC"
+fi
+if test "X$FC" = "X"; then
+    FC="xlf"
+fi
+
+# Set up other configuration
+if test "X$CC" = "Xgcc"; then
+  CPPFLAGS="-D_LARGE_FILE_API -D_ALL_SOURCE $CPPFLAGS"
+else
+  CPPFLAGS="-D_LARGE_FILES -D_ALL_SOURCE $CPPFLAGS"
+fi
diff --git a/config-site/Darwin.conf b/config-site/Darwin.conf
new file mode 100644
index 0000000..23325da
--- /dev/null
+++ b/config-site/Darwin.conf
@@ -0,0 +1,27 @@
+##
+##
+## Preprocessor flags
+##
+## Compiler and Loader flags
+##
+if test -z "$CFLAGS"; then
+  CFLAGS="-O3 -fexceptions"
+# Universal build case
+# CFLAGS="-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+# -arch ppc -arch i386"
+fi
+if test -z "$CXXFLAGS"; then
+  CXXFLAGS="-O3 -fexceptions"
+# Universal build case
+# CXXFLAGS="-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+# -arch ppc -arch i386"
+fi
+if test -z "$LDFLAGS"; then
+  LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"
+# Universal build case
+# LDFLAGS="$LDFLAGS -L$HOME/mpich2/lib \
+# -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk \
+# -Wl,-headerpad_max_install_names \
+# -Wl,-undefined,dynamic_lookup -arch ppc -arch i386"
+fi
+##
diff --git a/config-site/HP-UX.conf b/config-site/HP-UX.conf
new file mode 100644
index 0000000..8e5136a
--- /dev/null
+++ b/config-site/HP-UX.conf
@@ -0,0 +1,12 @@
+##
+## Site configuration for an HP-UX system.  Any special configuration that
+## should be done on an HP-UX system should go in here.
+##
+
+# If the user hasn't specified a C compiler, use c89.  Also, set up some
+# CFLAGS.
+if test "X$CC" = "X"; then
+    CC="cc"
+    CFLAGS="$CFLAGS -Aa +u1 +z +e"
+    CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+fi
diff --git a/config-site/IRIX.conf b/config-site/IRIX.conf
new file mode 100644
index 0000000..698d018
--- /dev/null
+++ b/config-site/IRIX.conf
@@ -0,0 +1,23 @@
+##
+## Site configuration for a SGI IRIX system.  Any special configuration that
+## should be done on an IRIX system should go in here.
+##
+## Use sgi's compiler.
+##
+if test -z "$CC"; then
+   CC=cc
+fi
+if test -z "$CXX"; then
+   CXX=CC
+fi
+
+##
+## Turn on full warnings unless the user specifies something else.
+##
+if test -z "$CFLAGS"; then
+   CFLAGS="-n32 -fullwarn"
+fi
+
+if test -z "$LDFLAGS"; then
+   LDFLAGS=-n32
+fi
diff --git a/config-site/IRIX64.conf b/config-site/IRIX64.conf
new file mode 100644
index 0000000..efdfd0a
--- /dev/null
+++ b/config-site/IRIX64.conf
@@ -0,0 +1,22 @@
+##
+## Site configuration for a SGI IRIX64 system.  Any special configuration that
+## should be done on an IRIX64 system should go in here.
+##
+## Use sgi's compiler.
+##
+if test -z "$CC"; then
+   CC=cc
+fi
+if test -z "$CXX"; then
+   CXX=CC
+fi
+
+##
+## Turn on full warnings unless the user specifies something else.
+##
+if test -z "$CFLAGS"; then
+   CFLAGS="-64 -fullwarn"
+fi
+if test -z "$LDFLAGS"; then
+   LDFLAGS=-64
+fi
diff --git a/config-site/Linux.conf b/config-site/Linux.conf
new file mode 100644
index 0000000..0f25640
--- /dev/null
+++ b/config-site/Linux.conf
@@ -0,0 +1,13 @@
+##
+## Site configuration for an Linux system.  Any special configuration that
+## should be done on an Linux system should go in here.
+##
+# Linux like to see the -fPIC flag if this Library ever links staticly
+# with a shared library
+if test -z "$CFLAGS"; then
+   CFLAGS="-fPIC"
+fi
+if test -z "$CXXFLAGS"; then
+   CXXFLAGS="-fPIC"
+fi
+
diff --git a/config-site/Makefile.am b/config-site/Makefile.am
new file mode 100644
index 0000000..8dda401
--- /dev/null
+++ b/config-site/Makefile.am
@@ -0,0 +1,81 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+ 
+EXTRA_DIST = *.conf
+
+#
+# By default, the dist-gzip target (as well as other distribution
+# targets) winds up creating copies of files that are really links
+# instead of preserving the links. I did not find any ways to control
+# the flags Automake uses to do the copy to, for example, ensure a
+# '-d' was included in the 'cp' command to preserve links. I learned
+# from reading AutoMake documentation that you can kinda-sorta do
+# what you want by making special code in the 'dist-hook' target. So,
+# we create that target here to ensure we wind up with a config-site
+# dir where the links between config-site files are preserved. The
+# code below is a based on code generated by Automake for the distdir
+# target, but modified to handle this case.
+#
+dist-hook:
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+        list='$(DISTFILES)'; \
+        dist_files=`for file in $$list; do echo $$file; done | \
+        sed -e "s|^$$srcdirstrip/||;t" \
+            -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+        for file in $$dist_files; do \
+	    rm -f $(distdir)/$$file; \
+            cp -pd $(srcdir)/$$file $(distdir)/$$file ;\
+        done
diff --git a/config-site/Makefile.in b/config-site/Makefile.in
new file mode 100644
index 0000000..fe54be7
--- /dev/null
+++ b/config-site/Makefile.in
@@ -0,0 +1,458 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = config-site
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = *.conf
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  config-site/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  config-site/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	dist-hook distclean distclean-generic distclean-libtool \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	uninstall uninstall-am
+
+
+#
+# By default, the dist-gzip target (as well as other distribution
+# targets) winds up creating copies of files that are really links
+# instead of preserving the links. I did not find any ways to control
+# the flags Automake uses to do the copy to, for example, ensure a
+# '-d' was included in the 'cp' command to preserve links. I learned
+# from reading AutoMake documentation that you can kinda-sorta do
+# what you want by making special code in the 'dist-hook' target. So,
+# we create that target here to ensure we wind up with a config-site
+# dir where the links between config-site files are preserved. The
+# code below is a based on code generated by Automake for the distdir
+# target, but modified to handle this case.
+#
+dist-hook:
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+        list='$(DISTFILES)'; \
+        dist_files=`for file in $$list; do echo $$file; done | \
+        sed -e "s|^$$srcdirstrip/||;t" \
+            -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+        for file in $$dist_files; do \
+	    rm -f $(distdir)/$$file; \
+            cp -pd $(srcdir)/$$file $(distdir)/$$file ;\
+        done
+# 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/config-site/OSF1.conf b/config-site/OSF1.conf
new file mode 100644
index 0000000..0ab30fe
--- /dev/null
+++ b/config-site/OSF1.conf
@@ -0,0 +1,13 @@
+##
+## Site configuration for a DEC OSF1 system.  Any special configuration that
+## should be done on an OSF1 system should go in here.
+##
+## If we're on an alpha, use a different C compiler.
+##
+
+if test "`uname -p`"="alpha"; then
+   if test "X$CC" = "X"; then
+      CC="/usr/bin/cc"
+   fi
+   CFLAGS="-std1 $CFLAGS"
+fi
diff --git a/config-site/README b/config-site/README
new file mode 100644
index 0000000..10e6c7b
--- /dev/null
+++ b/config-site/README
@@ -0,0 +1,22 @@
+This directory contains examples of site configuration files.  
+The selection order of the configure files is:
+`hostname`.conf
+CPU-VENDOR-OS.conf
+VENDOR-OS.conf
+CPU-OS.conf
+CPU-VENDOR.conf
+OS.conf
+VENDOR.conf
+CPU.conf
+`uname`.conf
+
+To quote from the autoconf manual:
+
+    If the environment variable `CONFIG_SITE' is set,
+    `configure' uses its value as the name of a shell script
+    to read.  Otherwise, it reads the shell script
+    `PREFIX/share/config.site' if it exists, then
+    `PREFIX/etc/config.site' if it exists.  Thus, settings in
+    machine-specific files override those in
+    machine-independent ones in case of conflict.
+
diff --git a/config-site/SunOS.conf b/config-site/SunOS.conf
new file mode 100644
index 0000000..bfdf227
--- /dev/null
+++ b/config-site/SunOS.conf
@@ -0,0 +1,14 @@
+##
+## Site configuration for an SunOS system.  Any special configuration that
+## should be done on an SunOS system should go in here.
+##
+
+##
+## Over-ride the default C compilers.
+##
+##if test -z "$CC"; then
+##    CC=/opt/SUNWspro/bin/c89
+##fi
+##if test -z "$CXX"; then
+##    CXX=/opt/SUNWspro/bin/CC
+##fi
diff --git a/config-site/alderaan.conf b/config-site/alderaan.conf
new file mode 120000
index 0000000..52a7258
--- /dev/null
+++ b/config-site/alderaan.conf
@@ -0,0 +1 @@
+hoth.conf
\ No newline at end of file
diff --git a/config-site/atlas0.conf b/config-site/atlas0.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas0.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas1088.conf b/config-site/atlas1088.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas1088.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas1120.conf b/config-site/atlas1120.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas1120.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas32.conf b/config-site/atlas32.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas32.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas512.conf b/config-site/atlas512.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas512.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas544.conf b/config-site/atlas544.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas544.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas576.conf b/config-site/atlas576.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas576.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/atlas608.conf b/config-site/atlas608.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/atlas608.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/bgl1.conf b/config-site/bgl1.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl1.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl10.conf b/config-site/bgl10.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl10.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl11.conf b/config-site/bgl11.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl11.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl2.conf b/config-site/bgl2.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl2.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl3.conf b/config-site/bgl3.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl3.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl4.conf b/config-site/bgl4.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl4.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl5.conf b/config-site/bgl5.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl5.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl6.conf b/config-site/bgl6.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl6.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl7.conf b/config-site/bgl7.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl7.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl8.conf b/config-site/bgl8.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl8.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/bgl9.conf b/config-site/bgl9.conf
new file mode 120000
index 0000000..8052c2e
--- /dev/null
+++ b/config-site/bgl9.conf
@@ -0,0 +1 @@
+ubgl.conf
\ No newline at end of file
diff --git a/config-site/cslic.conf b/config-site/cslic.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/cslic.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/cslic1.conf b/config-site/cslic1.conf
new file mode 120000
index 0000000..f6bedfe
--- /dev/null
+++ b/config-site/cslic1.conf
@@ -0,0 +1 @@
+cslic.conf
\ No newline at end of file
diff --git a/config-site/cslic2.conf b/config-site/cslic2.conf
new file mode 120000
index 0000000..f6bedfe
--- /dev/null
+++ b/config-site/cslic2.conf
@@ -0,0 +1 @@
+cslic.conf
\ No newline at end of file
diff --git a/config-site/cslic3.conf b/config-site/cslic3.conf
new file mode 120000
index 0000000..f6bedfe
--- /dev/null
+++ b/config-site/cslic3.conf
@@ -0,0 +1 @@
+cslic.conf
\ No newline at end of file
diff --git a/config-site/cslic4.conf b/config-site/cslic4.conf
new file mode 120000
index 0000000..f6bedfe
--- /dev/null
+++ b/config-site/cslic4.conf
@@ -0,0 +1 @@
+cslic.conf
\ No newline at end of file
diff --git a/config-site/cslic5.conf b/config-site/cslic5.conf
new file mode 120000
index 0000000..f6bedfe
--- /dev/null
+++ b/config-site/cslic5.conf
@@ -0,0 +1 @@
+cslic.conf
\ No newline at end of file
diff --git a/config-site/delenn.conf b/config-site/delenn.conf
new file mode 100644
index 0000000..1def2da
--- /dev/null
+++ b/config-site/delenn.conf
@@ -0,0 +1,37 @@
+##
+##  Site configuration for B Division delenn Linux RedHat
+##
+
+#if test -z "$DEFAULT_HEXZIP"; then
+#   HEXZIP=YES
+#fi
+#if test -z "$DEFAULT_LOCAL"; then
+#   DEFAULT_LOCAL=YES
+#fi
+if test -z "$DEFAULT_FORTRAN"; then
+   DEFAULT_FORTRAN=YES
+fi
+if test -z "$F77"; then
+   F77=g77
+fi
+if test -z "$FC"; then
+   FC=g77
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/i386-pc-linux-gcc-3.2.3/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.6.6/i386-pc-linux-gcc-3.2.3/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.6.6/i386-pc-linux-gcc-3.2.3/include
+fi
+if test -z "$QTDIR"; then
+   QTDIR=/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3
+#  QT_CXXFLAGS="-I/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3/include -DQT_THREAD_SUPPORT"
+#  QT_DIR=/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3
+#  QT_LIBS="-L/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3/lib -lqt-mt -lSM -lICE  -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi"
+#  QT_UIC=/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3/bin/uic
+#  QT_MOC=/usr/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3/bin/moc
+fi
+
diff --git a/config-site/eos.conf b/config-site/eos.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/eos.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/eos0.conf b/config-site/eos0.conf
new file mode 120000
index 0000000..d6b8cda
--- /dev/null
+++ b/config-site/eos0.conf
@@ -0,0 +1 @@
+eos.conf
\ No newline at end of file
diff --git a/config-site/eos1.conf b/config-site/eos1.conf
new file mode 120000
index 0000000..d6b8cda
--- /dev/null
+++ b/config-site/eos1.conf
@@ -0,0 +1 @@
+eos.conf
\ No newline at end of file
diff --git a/config-site/fc0.llnl.gov.conf b/config-site/fc0.llnl.gov.conf
new file mode 100644
index 0000000..218b398
--- /dev/null
+++ b/config-site/fc0.llnl.gov.conf
@@ -0,0 +1,8 @@
+##
+##  Site configuration for LLNL's Frankencluster [fc0.llnl.gov]
+##
+
+CFLAGS="-I/usr/lib/mpi/include $CFLAGS"
+LDFLAGS="-L/usr/lib/mpi/lib $LDFLAGS"
+MPI_LIBS="-lmpi -lelan -lelan3 -lots -lrmscall"
+
diff --git a/config-site/fhp.conf b/config-site/fhp.conf
new file mode 100644
index 0000000..867e57b
--- /dev/null
+++ b/config-site/fhp.conf
@@ -0,0 +1,15 @@
+##
+## Site configuration file for fhp.llnl.gov where the X11 include files
+## and libraries are in different directories than the Motif include
+## files and libraries.
+##
+
+if test "$x_includes" = NONE; then
+   echo '--x-includes="/usr/include/X11R5 /usr/include/Motif1.2"'
+   x_includes="/usr/include/X11R5 /usr/include/Motif1.2"
+fi
+
+if test "$x_libraries" = NONE; then
+   echo '--x-libraries="/usr/lib/X11R5 /usr/lib/Motif1.2"'
+   x_libraries="/usr/lib/X11R5 /usr/lib/Motif1.2"
+fi
diff --git a/config-site/hera.conf b/config-site/hera.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/hera.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/hera0.conf b/config-site/hera0.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera0.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hera1.conf b/config-site/hera1.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera1.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hera552.conf b/config-site/hera552.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera552.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hera553.conf b/config-site/hera553.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera553.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hera840.conf b/config-site/hera840.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera840.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hera841.conf b/config-site/hera841.conf
new file mode 120000
index 0000000..ed3c8ac
--- /dev/null
+++ b/config-site/hera841.conf
@@ -0,0 +1 @@
+hera.conf
\ No newline at end of file
diff --git a/config-site/hoth.conf b/config-site/hoth.conf
new file mode 100644
index 0000000..470607a
--- /dev/null
+++ b/config-site/hoth.conf
@@ -0,0 +1,16 @@
+##
+##  Site configuration for B Division hoth Linux RedHat
+##
+
+if test -z "$QTDIR"; then
+    QTDIR=/usr/gapps/visit/qt/4.4.3/linux_rhel3_gcc_3.2.3
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/i686_Linux_ELsmp/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/include
+fi
diff --git a/config-site/janus.conf b/config-site/janus.conf
new file mode 100644
index 0000000..887dda6
--- /dev/null
+++ b/config-site/janus.conf
@@ -0,0 +1,9 @@
+##
+## Site configuration for Sandia's ASCI Red machine. This file contains
+## the "common denominator" settings that can be used for both the 
+## scalar version on the service nodes and the stripped-down parallel
+## version on the compute nodes.
+##
+
+CFLAGS="-fast $CFLAGS"
+SETJMP_OVERRIDE="true"
diff --git a/config-site/kickit.conf b/config-site/kickit.conf
new file mode 100644
index 0000000..02490a4
--- /dev/null
+++ b/config-site/kickit.conf
@@ -0,0 +1,14 @@
+##
+## Site configuration for kickit, an R10000 running IRIX 6.2.
+##
+## People are having problems compiling gcc for this configuration, so use cc
+## instead.
+##
+CC=cc
+
+##
+## Turn on full warnings unless the user specifies something else.
+##
+if test -z "$CFLAGS"; then
+   CFLAGS="-n32 -fullwarn -g"
+fi
diff --git a/config-site/llnl_lc.conf b/config-site/llnl_lc.conf
new file mode 100644
index 0000000..840a3f3
--- /dev/null
+++ b/config-site/llnl_lc.conf
@@ -0,0 +1,26 @@
+##
+##  Site configuration for LLNL, LC Systems
+##
+if test -z "$DEFAULT_FORTRAN"; then
+    DEFAULT_FORTRAN=YES
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+    DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/$SYS_TYPE/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+    DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.8.1/$SYS_TYPE/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+    DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.8.1/$SYS_TYPE/include
+fi
+if test -z "$QTDIR"; then
+    if test "`echo $SYS_TYPE | cut -d'_' -f1`" = chaos; then
+        if test -d /usr/gapps/visit/qt/4.4.3/chaos_4_x86_64_gcc_4.1.2; then
+            QTDIR=/usr/gapps/visit/qt/4.4.3/chaos_4_x86_64_gcc_4.1.2
+        elif test -d /usr/gapps/visit/qt/4.4.3/chaos_4_x86_64_ib_gcc_4.1.2; then
+            QTDIR=/usr/gapps/visit/qt/4.4.3/chaos_4_x86_64_ib_gcc_4.1.2
+        fi
+    else
+        QTDIR=/usr/gapps/visit/qt/4.4.3/aix_5_xlc_64
+    fi
+fi
diff --git a/config-site/localhost.conf b/config-site/localhost.conf
new file mode 120000
index 0000000..ae46819
--- /dev/null
+++ b/config-site/localhost.conf
@@ -0,0 +1 @@
+delenn.conf
\ No newline at end of file
diff --git a/config-site/minos.conf b/config-site/minos.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/minos.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/minos0.conf b/config-site/minos0.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos0.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/minos32.conf b/config-site/minos32.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos32.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/minos512.conf b/config-site/minos512.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos512.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/minos544.conf b/config-site/minos544.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos544.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/minos576.conf b/config-site/minos576.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos576.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/minos608.conf b/config-site/minos608.conf
new file mode 120000
index 0000000..f7a13b0
--- /dev/null
+++ b/config-site/minos608.conf
@@ -0,0 +1 @@
+minos.conf
\ No newline at end of file
diff --git a/config-site/naboo.conf b/config-site/naboo.conf
new file mode 120000
index 0000000..52a7258
--- /dev/null
+++ b/config-site/naboo.conf
@@ -0,0 +1 @@
+hoth.conf
\ No newline at end of file
diff --git a/config-site/pcr.llnl.gov.conf b/config-site/pcr.llnl.gov.conf
new file mode 100644
index 0000000..c62995b
--- /dev/null
+++ b/config-site/pcr.llnl.gov.conf
@@ -0,0 +1,5 @@
+# Config-site file for emperor.llnl.gov and adelie.llnl.gov,
+# 88 and 126 node, dual-P4 1.7GHz linux clusters
+
+CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/mpi/include $CFLAGS"
+MPI_LIBS="-L/usr/lib/mpi/lib -lmpi -lelan -lelan3 -lrmscall"
diff --git a/config-site/prism1.conf b/config-site/prism1.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/prism1.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/prism2.conf b/config-site/prism2.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/prism2.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/purple.conf b/config-site/purple.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/purple.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/purple1441.conf b/config-site/purple1441.conf
new file mode 120000
index 0000000..a5b9805
--- /dev/null
+++ b/config-site/purple1441.conf
@@ -0,0 +1 @@
+purple.conf
\ No newline at end of file
diff --git a/config-site/purple1442.conf b/config-site/purple1442.conf
new file mode 120000
index 0000000..a5b9805
--- /dev/null
+++ b/config-site/purple1442.conf
@@ -0,0 +1 @@
+purple.conf
\ No newline at end of file
diff --git a/config-site/purple1443.conf b/config-site/purple1443.conf
new file mode 120000
index 0000000..a5b9805
--- /dev/null
+++ b/config-site/purple1443.conf
@@ -0,0 +1 @@
+purple.conf
\ No newline at end of file
diff --git a/config-site/purple1444.conf b/config-site/purple1444.conf
new file mode 120000
index 0000000..a5b9805
--- /dev/null
+++ b/config-site/purple1444.conf
@@ -0,0 +1 @@
+purple.conf
\ No newline at end of file
diff --git a/config-site/rhea.conf b/config-site/rhea.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/rhea.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/rhea0.conf b/config-site/rhea0.conf
new file mode 120000
index 0000000..769495f
--- /dev/null
+++ b/config-site/rhea0.conf
@@ -0,0 +1 @@
+rhea.conf
\ No newline at end of file
diff --git a/config-site/rhea32.conf b/config-site/rhea32.conf
new file mode 120000
index 0000000..769495f
--- /dev/null
+++ b/config-site/rhea32.conf
@@ -0,0 +1 @@
+rhea.conf
\ No newline at end of file
diff --git a/config-site/rhea512.conf b/config-site/rhea512.conf
new file mode 120000
index 0000000..769495f
--- /dev/null
+++ b/config-site/rhea512.conf
@@ -0,0 +1 @@
+rhea.conf
\ No newline at end of file
diff --git a/config-site/rhea544.conf b/config-site/rhea544.conf
new file mode 120000
index 0000000..769495f
--- /dev/null
+++ b/config-site/rhea544.conf
@@ -0,0 +1 @@
+rhea.conf
\ No newline at end of file
diff --git a/config-site/sasn100.conf b/config-site/sasn100.conf
new file mode 100644
index 0000000..887dda6
--- /dev/null
+++ b/config-site/sasn100.conf
@@ -0,0 +1,9 @@
+##
+## Site configuration for Sandia's ASCI Red machine. This file contains
+## the "common denominator" settings that can be used for both the 
+## scalar version on the service nodes and the stripped-down parallel
+## version on the compute nodes.
+##
+
+CFLAGS="-fast $CFLAGS"
+SETJMP_OVERRIDE="true"
diff --git a/config-site/sidious.conf b/config-site/sidious.conf
new file mode 100644
index 0000000..cefc56b
--- /dev/null
+++ b/config-site/sidious.conf
@@ -0,0 +1,25 @@
+##
+##  Site configuration for B Division sidious Linux RedHat-Enterprise 5
+##
+
+if test -z "$QTDIR"; then
+    QTDIR=/usr/gapps/visit/qt/4.4.3/linux-x86_64_gcc_4.1.2
+fi
+if test -z "$DEFAULT_FORTRAN"; then
+   DEFAULT_FORTRAN=YES
+fi
+if test -z "$F77"; then
+   F77=g77
+fi
+if test -z "$FC"; then
+   FC=g77
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/x86_64-linux-el5-gcc-4.2.1/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.6.6/x86_64-linux-el5-gcc-4.2.1/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.6.6/x86_64-linux-el5-gcc-4.2.1/include
+fi
diff --git a/config-site/skywalker.conf b/config-site/skywalker.conf
new file mode 120000
index 0000000..52a7258
--- /dev/null
+++ b/config-site/skywalker.conf
@@ -0,0 +1 @@
+hoth.conf
\ No newline at end of file
diff --git a/config-site/sphere.conf b/config-site/sphere.conf
new file mode 100644
index 0000000..9acee49
--- /dev/null
+++ b/config-site/sphere.conf
@@ -0,0 +1,16 @@
+##
+## Site configuration for sphere, an R5000 running IRIX 6.3.
+##
+## People are having problems compiling gcc for this configuration, so use cc
+## instead.
+##
+CC=cc
+
+##
+## Turn on full warnings unless the user specifies something else.
+##
+if test -z "$CFLAGS"; then
+   CFLAGS="-fullwarn -g"
+fi
+
+enable_browser=no
diff --git a/config-site/sunburn.conf b/config-site/sunburn.conf
new file mode 120000
index 0000000..b6b98e5
--- /dev/null
+++ b/config-site/sunburn.conf
@@ -0,0 +1 @@
+sunspot.conf
\ No newline at end of file
diff --git a/config-site/sunset.conf b/config-site/sunset.conf
new file mode 100644
index 0000000..55e6788
--- /dev/null
+++ b/config-site/sunset.conf
@@ -0,0 +1,26 @@
+##
+##  Site configuration for B Division sunset Sun Solaris 5
+##
+
+#if test -z "$DEFAULT_HEXZIP"; then
+#   HEXZIP=YES
+#fi
+#if test -z "$DEFAULT_LOCAL"; then
+#   DEFAULT_LOCAL=YES
+#fi
+if test -z "$DEFAULT_FORTRAN"; then
+   DEFAULT_FORTRAN=YES
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/sparc-sun-solaris-gcc-2.95/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.6.6/sparc-sun-solaris-gcc-2.95/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.6.6/sparc-sun-solaris-gcc-2.95/include
+fi
+if test -z "$QTDIR"; then
+   QTDIR=/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95
+fi
+
diff --git a/config-site/sunspot.conf b/config-site/sunspot.conf
new file mode 100644
index 0000000..158808b
--- /dev/null
+++ b/config-site/sunspot.conf
@@ -0,0 +1,34 @@
+##
+##  Site configuration for B Division sunspot Sun Solaris 5
+##
+
+#if test -z "$DEFAULT_HEXZIP"; then
+#   HEXZIP=YES
+#fi
+#if test -z "$DEFAULT_LOCAL"; then
+#   DEFAULT_LOCAL=YES
+#fi
+if test -z "$DEFAULT_FORTRAN"; then
+   DEFAULT_FORTRAN=YES
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/sparc-sun-solaris-gcc-2.95/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.6.6/sparc-sun-solaris-gcc-2.95/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.6.6/sparc-sun-solaris-gcc-2.95/include
+fi
+if test -z "$QTDIR"; then
+#  QTDIR=/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95
+   QT_CXXFLAGS="-I/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95/include \
+-DQT_THREAD_SUPPORT"
+   QT_DIR=/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95
+   QT_LIBS="-L/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95/lib -lqt-mt \
+-L/usr/openwin/lib -L/usr/openwin/lib -lGL -lXmu -lXext -lX11 -lresolv \
+-lsocket -lnsl -lSM -lICE -ldl -lpthread -lrt"
+   QT_UIC=/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95/bin/uic
+   QT_MOC=/usr/gapps/silo/qt/3.3.8/sparc-sun-solaris-gcc-2.95/bin/moc
+fi
+
diff --git a/config-site/t3d.conf b/config-site/t3d.conf
new file mode 100644
index 0000000..3610b49
--- /dev/null
+++ b/config-site/t3d.conf
@@ -0,0 +1,10 @@
+##
+## Site configuration for cross compiling for a Cray T3D from its front end.
+##
+## Set up the targetting ($TARGET) to be "cray-t3d".  That sets up cross
+## compilation.  Also set MPP_NPES to 1 to set the number of MPP nodes for
+## an executable.  This allows us to run the binaries without "mppexec" or
+## "-npes".
+
+TARGET=cray-t3d
+MPP_NPES=1
diff --git a/config-site/tc127.conf b/config-site/tc127.conf
new file mode 100644
index 0000000..02f4829
--- /dev/null
+++ b/config-site/tc127.conf
@@ -0,0 +1,5 @@
+##
+##  Site configuration for LLNL DEC TC (TeraCluster)
+##
+
+MPI_LIBS="-lfmpi -lmpi -lelan -lelan3 -lrmscall -lmach"
diff --git a/config-site/tempest.conf b/config-site/tempest.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/tempest.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/tempest01.conf b/config-site/tempest01.conf
new file mode 120000
index 0000000..114940d
--- /dev/null
+++ b/config-site/tempest01.conf
@@ -0,0 +1 @@
+tempest.conf
\ No newline at end of file
diff --git a/config-site/tempest02.conf b/config-site/tempest02.conf
new file mode 120000
index 0000000..114940d
--- /dev/null
+++ b/config-site/tempest02.conf
@@ -0,0 +1 @@
+tempest.conf
\ No newline at end of file
diff --git a/config-site/tread.conf b/config-site/tread.conf
new file mode 100644
index 0000000..4e3bac8
--- /dev/null
+++ b/config-site/tread.conf
@@ -0,0 +1,37 @@
+##
+##  Site configuration for Intel Macintosh running Mac OS X 10.4
+##
+
+#if test -z "$DEFAULT_HEXZIP"; then
+#   HEXZIP=YES
+#fi
+#if test -z "$DEFAULT_LOCAL"; then
+#   DEFAULT_LOCAL=YES
+#fi
+if test -z "$DEFAULT_FORTRAN"; then
+   DEFAULT_FORTRAN=NO
+fi
+if test -z "$F77"; then
+   F77=""
+fi
+if test -z "$FC"; then
+   FC=""
+fi
+if test -z "$DEFAULT_SZIP_LIBDIR"; then
+   DEFAULT_SZIP_LIBDIR=/usr/gapps/silo/szip/2.1/i386-apple-darwin8-gcc-4.0.1/lib
+fi
+if test -z "$DEFAULT_HDF5_LIBDIR"; then
+   DEFAULT_HDF5_LIBDIR=/usr/gapps/silo/hdf5/1.6.6/i386-apple-darwin8-gcc-4.0.1/lib
+fi
+if test -z "$DEFAULT_HDF5_INCLUDE"; then
+   DEFAULT_HDF5_INCLUDE=/usr/gapps/silo/hdf5/1.6.6/i386-apple-darwin8-gcc-4.0.1/include
+fi
+if test -z "$QTDIR"; then
+#  QTDIR=/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1
+   QT_CXXFLAGS="-I/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1/include -DQT_THREAD_SUPPORT"
+   QT_DIR=/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1
+   QT_LIBS="-L/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1/lib -lqt-mt -framework Carbon -framework QuickTime -lz -framework OpenGL -framework AGL"
+   QT_UIC=/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1/bin/uic
+   QT_MOC=/usr/gapps/silo/qt/3.3.8/i386-apple-darwin8-gcc-4.0.1/bin/moc
+fi
+
diff --git a/config-site/ubgl.conf b/config-site/ubgl.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/ubgl.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/um.conf b/config-site/um.conf
new file mode 120000
index 0000000..7152534
--- /dev/null
+++ b/config-site/um.conf
@@ -0,0 +1 @@
+uv.conf
\ No newline at end of file
diff --git a/config-site/um006.conf b/config-site/um006.conf
new file mode 120000
index 0000000..7152534
--- /dev/null
+++ b/config-site/um006.conf
@@ -0,0 +1 @@
+uv.conf
\ No newline at end of file
diff --git a/config-site/up.conf b/config-site/up.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/up.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/up038.conf b/config-site/up038.conf
new file mode 120000
index 0000000..cca6006
--- /dev/null
+++ b/config-site/up038.conf
@@ -0,0 +1 @@
+up.conf
\ No newline at end of file
diff --git a/config-site/up039.conf b/config-site/up039.conf
new file mode 120000
index 0000000..cca6006
--- /dev/null
+++ b/config-site/up039.conf
@@ -0,0 +1 @@
+up.conf
\ No newline at end of file
diff --git a/config-site/up041.conf b/config-site/up041.conf
new file mode 120000
index 0000000..cca6006
--- /dev/null
+++ b/config-site/up041.conf
@@ -0,0 +1 @@
+up.conf
\ No newline at end of file
diff --git a/config-site/uv.conf b/config-site/uv.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/uv.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/uv006.conf b/config-site/uv006.conf
new file mode 120000
index 0000000..7152534
--- /dev/null
+++ b/config-site/uv006.conf
@@ -0,0 +1 @@
+uv.conf
\ No newline at end of file
diff --git a/config-site/vader.conf b/config-site/vader.conf
new file mode 120000
index 0000000..ae46819
--- /dev/null
+++ b/config-site/vader.conf
@@ -0,0 +1 @@
+delenn.conf
\ No newline at end of file
diff --git a/config-site/x86_64.conf b/config-site/x86_64.conf
new file mode 100644
index 0000000..11551f0
--- /dev/null
+++ b/config-site/x86_64.conf
@@ -0,0 +1,11 @@
+##
+## Site configuration for an Linux system.  Any special configuration that
+## should be done on an Linux system should go in here.
+##
+if test -z "$CFLAGS"; then
+   CFLAGS="-fPIC"
+fi
+if test -z "$CXXFLAGS"; then
+   CXXFLAGS="-fPIC"
+fi
+
diff --git a/config-site/yana.conf b/config-site/yana.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/yana.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/yana1.conf b/config-site/yana1.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/yana1.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/yana2.conf b/config-site/yana2.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/yana2.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/yana3.conf b/config-site/yana3.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/yana3.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/yana4.conf b/config-site/yana4.conf
new file mode 120000
index 0000000..b04d896
--- /dev/null
+++ b/config-site/yana4.conf
@@ -0,0 +1 @@
+yana.conf
\ No newline at end of file
diff --git a/config-site/zeus.conf b/config-site/zeus.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/zeus.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config-site/zeus279.conf b/config-site/zeus279.conf
new file mode 120000
index 0000000..7cf226a
--- /dev/null
+++ b/config-site/zeus279.conf
@@ -0,0 +1 @@
+llnl_lc.conf
\ No newline at end of file
diff --git a/config/Makefile.am b/config/Makefile.am
new file mode 100644
index 0000000..d9465ee
--- /dev/null
+++ b/config/Makefile.am
@@ -0,0 +1,72 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+AUX_DIST = \
+ config.guess\
+ config.sub\
+ depcomp\
+ install-sh\
+ ltmain.sh\
+ missing
+
+EXTRA_DIST = \
+ bootstrap\
+ mkinc
+
+MAINTAINERCLEANFILES = \
+ config.h.in\
+ Makefile.in\
+ $(AUX_DIST)
+
diff --git a/config/Makefile.in b/config/Makefile.in
new file mode 100644
index 0000000..0dd75d8
--- /dev/null
+++ b/config/Makefile.in
@@ -0,0 +1,447 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = config
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in compile \
+	config.guess config.sub depcomp install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUX_DIST = \
+ config.guess\
+ config.sub\
+ depcomp\
+ install-sh\
+ ltmain.sh\
+ missing
+
+EXTRA_DIST = \
+ bootstrap\
+ mkinc
+
+MAINTAINERCLEANFILES = \
+ config.h.in\
+ Makefile.in\
+ $(AUX_DIST)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  config/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  config/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# 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/config/bootstrap b/config/bootstrap
new file mode 100755
index 0000000..ac91e7a
--- /dev/null
+++ b/config/bootstrap
@@ -0,0 +1,14 @@
+#!/bin/sh
+#set -x
+HOST=`/usr/gapps/silo/autotools/bin/config.guess`
+AUTOTOOLS=/usr/gapps/silo/autotools/$HOST/bin
+# somewhat of a hack
+if test -x configure.ac ; then
+  echo "must be in the same directory as ./configure to run this script"
+  exit 1
+fi
+if test "`which autoreconf`" != $AUTOTOOLS/autoreconf; then
+  echo "make sure your path is set to the correct version of autotools"
+  exit 1
+fi
+$AUTOTOOLS/autoreconf -vif
diff --git a/config/compile b/config/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/config/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# 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, 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/config.guess b/config/config.guess
new file mode 100755
index 0000000..396482d
--- /dev/null
+++ b/config/config.guess
@@ -0,0 +1,1500 @@
+#! /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 Free Software Foundation,
+#   Inc.
+
+timestamp='2006-07-02'
+
+# 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
+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 ;;
+	    *) 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.*:*)
+	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:*:[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 ;;
+    *: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 ;;
+    i*: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 ;;
+    x86:Interix*:[3456]*)
+	echo i586-pc-interix${UNAME_RELEASE}
+	exit ;;
+    EM64T:Interix*:[3456]*)
+	echo x86_64-unknown-interix${UNAME_RELEASE}
+	exit ;;
+    [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:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	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 ;;
+    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 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		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 ;;
+    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 ;;
+    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://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+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/config/config.h.in b/config/config.h.in
new file mode 100644
index 0000000..06f3485
--- /dev/null
+++ b/config/config.h.in
@@ -0,0 +1,192 @@
+/* config/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+   libraries. */
+#undef FC_DUMMY_MAIN
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+#undef FC_DUMMY_MAIN_EQ_F77
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+   case), which must not contain underscores, for linking with Fortran. */
+#undef FC_FUNC
+
+/* As FC_FUNC, but for C identifiers containing underscores. */
+#undef FC_FUNC_
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* System provides fclose prototypes */
+#undef HAVE_FCLOSE_POINTER
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* System provides fflush prototypes */
+#undef HAVE_FFLUSH_POINTER
+
+/* Define to 1 if you have the `fnmatch' function. */
+#undef HAVE_FNMATCH
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
+/* System provides fopen prototypes */
+#undef HAVE_FOPEN_POINTER
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* System provides fprintf prototypes */
+#undef HAVE_FPRINTF_POINTER
+
+/* Support for Lindstrom float array compression */
+#undef HAVE_FPZIP
+
+/* System provides fread prototypes */
+#undef HAVE_FREAD_POINTER
+
+/* System provides fseek prototypes */
+#undef HAVE_FSEEK_POINTER
+
+/* System provides ftell prototypes */
+#undef HAVE_FTELL_POINTER
+
+/* System provides fwrite prototypes */
+#undef HAVE_FWRITE_POINTER
+
+/* Support for HDF5 */
+#undef HAVE_HDF5_DRIVER
+
+/* Define to 1 if you have the <hdf5.h> header file. */
+#undef HAVE_HDF5_H
+
+/* Define to 1 if you have the <history.h> header file. */
+#undef HAVE_HISTORY_H
+
+/* Support for Lindstrom hex/quad mesh compression */
+#undef HAVE_HZIP
+
+/* 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 to 1 if you have the `isnan' function. */
+#undef HAVE_ISNAN
+
+/* Define to 1 if you have the `hdf5' library (-lhdf5). */
+#undef HAVE_LIBHDF5
+
+/* Define if you have a readline compatible library */
+#undef HAVE_LIBREADLINE
+
+/* Define to 1 if you have the `sz' library (-lsz). */
+#undef HAVE_LIBSZ
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Support for NetCDF */
+#undef HAVE_NETCDF_DRIVER
+
+/* Support for PDB Proper */
+#undef HAVE_PDBP_DRIVER
+
+/* Support for PDB */
+#undef HAVE_PDB_DRIVER
+
+/* Define to 1 if you have the <readline.h> header file. */
+#undef HAVE_READLINE_H
+
+/* Define if your readline library has \`add_history' */
+#undef HAVE_READLINE_HISTORY
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+#undef HAVE_READLINE_HISTORY_H
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+#undef HAVE_READLINE_READLINE_H
+
+/* System provides setvbuf prototypes */
+#undef HAVE_SETVBUF_POINTER
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_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 `strerror' function. */
+#undef HAVE_STRERROR
+
+/* 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 <sys/fcntl.h> header file. */
+#undef HAVE_SYS_FCNTL_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
+
+/* Support for Taurus */
+#undef HAVE_TAURUS_DRIVER
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* 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 version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of `off64_t', as computed by sizeof. */
+#undef SIZEOF_OFF64_T
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Override longjmp */
+#undef longjmp
+
+/* Override setjmp */
+#undef setjmp
diff --git a/config/config.sub b/config/config.sub
new file mode 100755
index 0000000..fab0aa3
--- /dev/null
+++ b/config/config.sub
@@ -0,0 +1,1616 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2006-09-20'
+
+# 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
+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 \
+	| 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 \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| 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-* | 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-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| 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-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| 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
+		;;
+    	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
+		;;
+	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
+		;;
+	cr16c)
+		basic_machine=cr16c-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
+		;;
+	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
+		;;
+	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
+		;;
+	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
+		;;
+	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
+		;;
+	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
+		;;
+	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*)
+	# 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
+		;;
+	-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
+		;;
+	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/config/depcomp b/config/depcomp
new file mode 100755
index 0000000..ca5ea4e
--- /dev/null
+++ b/config/depcomp
@@ -0,0 +1,584 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2006-10-15.18
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# 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, 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 Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/install-sh b/config/install-sh
new file mode 100755
index 0000000..4fbbae7
--- /dev/null
+++ b/config/install-sh
@@ -0,0 +1,507 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-10-14.15
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# 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
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# 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.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment 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}"
+
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+        shift
+        shift
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dstarg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dstarg"
+      shift # fnord
+    fi
+    shift # arg
+    dstarg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix=/ ;;
+	-*) prefix=./ ;;
+	*)  prefix= ;;
+      esac
+
+      case $posix_glob in
+        '')
+	  if (set -f) 2>/dev/null; then
+	    posix_glob=true
+	  else
+	    posix_glob=false
+	  fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob && set -f
+      set fnord $dstdir
+      shift
+      $posix_glob && set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$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 $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # 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 test -f "$dst"; then
+	       $doit $rmcmd -f "$dst" 2>/dev/null \
+	       || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+		     && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+	       || {
+		 echo "$0: cannot unlink or rename $dst" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dst"
+	 }
+    } || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
new file mode 100644
index 0000000..4598ec6
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,6930 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007  Free Software Foundation, Inc.
+# Originally by 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., 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.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.24
+TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+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 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+# 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).
+# We save the old values to restore during execute mode.
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+	  save_$lt_var=\$$lt_var
+	  $lt_var=C
+	  export $lt_var
+	fi"
+done
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+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 $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+	# Failing that, at least try and use $RANDOM to avoid a race
+	my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+	save_mktempdir_umask=`umask`
+	umask 0077
+	$mkdir "$my_tmpdir"
+	umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+	exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	$SED -n -e '1,100{
+		/ I /{
+			s,.*,import,
+			p
+			q
+			}
+		}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  extracted_serial=`expr $extracted_serial + 1`
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+disable_libs=no
+
+# 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)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      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$TIMESTAMP
+
+Copyright (C) 2007  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."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --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 $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      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 $EXIT_FAILURE
+  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=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.[fF][09]?) xform=[fF][09]. ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
+	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # 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
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	exit_status=$?
+	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $exit_status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if 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
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	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.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # 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)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit $EXIT_FAILURE
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit $EXIT_FAILURE
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	darwin_framework|darwin_framework_skip)
+	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      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
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit $EXIT_FAILURE
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework|-arch|-isysroot)
+	case " $CC " in
+	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
+		prev=darwin_framework_skip ;;
+	  *) compiler_flags="$compiler_flags $arg"
+	     prev=darwin_framework ;;
+	esac
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# 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
+	    absdir="$dir"
+	    notinst_path="$notinst_path $dir"
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs -framework System"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+
+	# 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
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	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
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit $EXIT_FAILURE
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	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 # arg
+
+      # 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 # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit $EXIT_FAILURE
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit $EXIT_FAILURE
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	    tmp_libs=
+	    for deplib in $dependency_libs; do
+	      deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
+	      tmp_libs="$tmp_libs $deplib"
+	    done
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  continue
+	fi # $pass = conv
+
+
+	# 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 \`$lib'" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $absdir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes ; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$extract_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      cmds=$old_archive_from_expsyms_cmds
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit $EXIT_FAILURE
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # 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_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit $EXIT_FAILURE
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
+		;;
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit $EXIT_FAILURE
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      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"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	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 $EXIT_FAILURE
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    major=`expr $current - $age`
+	  else
+	    major=`expr $current - $age + 1`
+	  fi
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 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)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	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
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs -framework System"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name=`expr $i : '-l\(.*\)'`
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "*** make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name=`expr $a_deplib : '-l\(.*\)'`
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  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
+		  hardcode_libdirs="$libdir"
+		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
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      case $archive_cmds in
+	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+	      esac
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  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
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	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
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	  fi
+	fi
+	
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
+	else
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$output_la-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$output_la-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$output_la-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
+	    fi
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      $show "${rm}r $gentop"
+	      $run ${rm}r "$gentop"
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# 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 $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	cmds=$reload_cmds
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+	;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    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
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    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
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$outputname.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    else
+	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	exit_status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $exit_status
+      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
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# 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 the build directory.
+# 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 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  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\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && 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
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      exit $EXIT_FAILURE
+    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 $EXIT_FAILURE
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    exit_status=$?
+	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+	      exit $exit_status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit $EXIT_FAILURE
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit $EXIT_FAILURE
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# 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
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; 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=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) 
+      	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o) prev=$arg ;;
+      -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 $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    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 $EXIT_FAILURE
+    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 "$isdir" = yes; 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 $EXIT_FAILURE
+      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 $EXIT_FAILURE
+	  ;;
+	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
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# 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"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+	  else
+	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  cmds=$postinstall_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || {
+	      lt_exit=$?
+
+	      # Restore the uninstalled library and exit
+	      if test "$mode" = relink; then
+		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+	      fi
+
+	      exit $lt_exit
+	    }
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $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 "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	  ;;
+	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 "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# 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
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; 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'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # Note that it is not necessary on cygwin/mingw to append a dot to
+	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
+	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+	  # `FILE.' does not work on cygwin managed mounts.
+	  #
+	  # If there is no directory component, then add one.
+	  case $wrapper in
+	  */* | *\\*) . ${wrapper} ;;
+	  *) . ./${wrapper} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir=`func_mktempdir`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway 
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      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 $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
+	$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_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    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.
+	  cmds=$finish_cmds
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least 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 -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    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 "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # 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 $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit $EXIT_FAILURE
+	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
+	  if test ! -f "$dir/$dlname"; then
+	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	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 | grep "^# Generated by .*$PACKAGE") >/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
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+		$lt_var=\$save_$lt_var; export $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) 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 $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      cmds=$postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      cmds=$old_postuninstall_cmds
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# 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.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic 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
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      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.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build 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, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+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
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    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, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', 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 $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/config/missing b/config/missing
new file mode 100755
index 0000000..1c8ff70
--- /dev/null
+++ b/config/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 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, 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case $firstarg in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case $firstarg in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/mkinc b/config/mkinc
new file mode 100755
index 0000000..636e6b7
--- /dev/null
+++ b/config/mkinc
@@ -0,0 +1,301 @@
+#!/bin/sh
+# Do a little magic to run perl from anywhere in your path.
+
+lines=`cat $0 | wc -l`
+lines=`expr $lines - 16`
+checksys=`uname -s`
+if [ "$checksys" != "SunOS" ]
+then
+  tail -n $lines $0 > /tmp/visitperl$$
+else
+  tail -$lines $0 > /tmp/visitperl$$
+fi
+echo "__END__" >> /tmp/visitperl$$
+echo "$0 $*" >> /tmp/visitperl$$
+exec perl /tmp/visitperl$$ $0 ${1+"$@"}
+
+unlink $0;
+$0 = shift @ARGV;
+
+#########################################################################
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#########################################################################
+#
+# Purpose:  Build the `silo.inc' Fortran include file from the
+#           C header files `silo.h' and `silo-f.h' by defining
+#           the public Fortran functions and the DB_* and DBOPT_*
+#           constants.
+#
+# Usage:    Run this script with input redirected from `silo.h'
+#           and output directed to `silo.inc' as in:
+#
+#           mv silo.inc silo.inc~
+#           mkinc < silo.h > silo.inc
+#
+# Programmer:   Robb Matzke, Wed Nov 30 10:44:43 PST 1994
+#
+# Modified:
+#
+#   Robb Matzie, Mon Dec 19 10:45:49 PST 1994
+#   The SDX_ prefix is removed from those #define's.
+#
+#   Sean Ahern, Wed Apr 19 16:07:19 PDT 1995
+#   Added a list of character arrays.
+#
+#   Sean Ahern, Fri Oct 11 12:22:04 PDT 1996
+#   Added parsing of enum datatypes.
+#
+#   Robb Matzke, 12 Mar 1997
+#   The generated files have `-*- fortran -*-' in the first line so
+#   emacsen know the type (since `.inc' isn't too standard).
+#
+#   Robb Matzke, 10 Jun 1997
+#   Added a comma to the stop set for matching enum NAME=VALUE pairs.
+#   Changed a Perl-5 construct to Perl-4.
+#
+#   Eric Brugger, Thu Sep  2 08:28:05 PDT 1999
+#   I modified the script to output Fortran 90 style comments instead
+#   of Fortran 77 style comments.  Sean also changed a couple of lines
+#   to eliminate a run time warning.
+#
+#   Mark C. Miller, Thu Nov  2 14:30:00 PST 2006
+#   Made it handle SILO_VERS_... symbols
+#
+#   Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+#   Modfied to handle new Fortran name-mangling 
+#
+#########################################################################
+
+
+local (@parameters, @functions);
+local ($sdx) = 0;
+
+local($enum_body) = 0;
+local($brace_level) = 0;
+
+### Gather the info...
+while (<>) {
+    next if (/NO_FORTRAN_DEFINE/);
+    if (/^#[ \t]*define[ \t]+((SILO_VERS|DB|SDX)(OPT|CSG)?_\w+)[ \t]+([^ \t\n]*)/) {
+        local ($name, $value) = ($1, $4);
+        $sdx=1 if ($name=~/^SDX/);
+        $name =~ s/^SDX_//;
+	if ($name eq "SILO_VERS_TAG")
+	{
+	    next;
+	}
+	if ($value eq "")
+	{
+	    $value = 0;
+	}
+        if (/FORTRAN STRING/)
+        {
+            push (@strings, join(':',$name,$value));
+        } else {
+            push (@parameters, join(':',$name,$value));
+        }
+    }
+
+    if (/^#[ \t]*define[ \t]+\w+[ \t]+FC_FUNC[ \t]*\([ \t]*(\w+)[ \t,]+\w+/) {
+        push (@functions, $1);
+    }
+
+    # Turn on `enum' handling?
+    $enum_body = $brace_level+1 if /^(typedef\s+)?enum\b/;
+    $brace_level += tr/{/{/;
+    $brace_level -= tr/}/}/;
+
+    # Turn off `enum' handling.  This assumes that the left curly
+    # brace for the enum body is on the same line as `enum'.
+    $enum_body = 0 if $brace_level<$enum_body;
+
+    # The enum body must be indented.  The `VAR=VALUE' form must be used.
+    if ($enum_body && /^\s+(DB_\w+)\s*=\s*([^ \t\n,]+)\s*,?/) {
+       push (@parameters, join (':', $1, $2));
+    }
+}
+
+#
+# Write a Fortran comment describing this file.
+#
+$title = ($sdx?"SDX":"SILO");
+$date = `date`;
+chop($date);
+$user = $ENV{USER};
+print <<"EOF";
+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccc -*- fortran -*-
+!
+!     $title include file for Fortan applications.
+!
+! Programmer:   $user $date
+!
+! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+!    This file is generated automatically from C header files in the
+!    SILO distribution.  Do not make changes to this file manually,
+!    as those changes will disappear.
+! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+!
+! This file was generated by the following commands...
+EOF
+
+if ($sdx) { print <<"EOF";
+!       mv sdx.inc sdx.inc~
+!       cat sdx.h sdx_server.h | mkinc > sdx.inc
+!
+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+EOF
+} else { print <<"EOF";
+!       mv silo.inc silo.inc~
+!       cat silo.h silo_f.h | mkinc > silo.inc
+!
+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+EOF
+}
+
+### Write `external' statements for the functions...
+print "!...Functions.\n";
+$line = "";
+foreach $var (sort @functions) {
+    if (length($line)+2+length($var)>72) {
+        print "$line\n";
+        $line = "";
+        }
+    if (0==length($line)) {
+        $line = "      external $var";
+    } else {
+        $line .= ", " . $var;
+    }
+}
+print "$line\n" if (0!=length($line));
+
+### Write `integer' statements for the functions...
+print "\n";
+$line = "";
+foreach $var (sort @functions) {
+    if (length($line)+2+length($var)>72) {
+        print "$line\n";
+        $line = "";
+        }
+    if (0==length($line)) {
+        $line = "      integer  $var";
+    } else {
+        $line .= ", " . $var;
+    }
+}
+print "$line\n" if (0!=length($line));
+
+### Write `integer' statements for the constants...
+print "\n\n!...Parameters.\n";
+$line = "";
+foreach $var (sort @parameters) {
+    local ($name, $value) = split (':', $var);
+    if (length($line)+2+length($name)>72) {
+        print "$line\n";
+        $line = "";
+        }
+    if (0==length($line)) {
+        $line = "      integer  $name";
+    } else {
+        $line .= ", " . $name;
+    }
+}
+print "$line\n" if (0!=length($line));
+
+### Write `character' statements for the constants...
+foreach $var (sort @strings)
+{
+    local ($name, $value) = split (':', $var);
+    print "      character*".length($value)."  $name\n";
+}
+
+### Write `parameter' statements for the constants...
+### Don't sort these, because some $value's may depend on
+### previous parameter statements.
+print "\n";
+push(@temparray, at parameters);
+push(@temparray, at strings);
+foreach $var (@temparray) {
+    local ($name, $value) = split (':', $var);
+    if ($value =~ /^0x[0-9A-F]*/) {
+        $value = hex($value);
+    } elsif ($value =~ /^0[0-7]*/) {
+        $value = oct($value);
+    } elsif ($value =~ /^DB_HDF5_OPTS(.*)/) {
+        local ($foo, $bar) = split ('\(', $value);
+        local ($g1, $g2) = split ( '\)', $bar);
+        $value = "DB_HDF5X+$g1*2048";
+    }
+    $line = sprintf("      parameter (%-25s = %-15s)", $name, $value);
+    if (length($line)>72) {
+        local $off=0;
+        while ($off < length($line)) {
+            $curline = substr($line, $off, $off+64);
+            if ($off == 0) {
+                printf "$curline\n";
+            } else {
+                printf "     c$curline\n";
+            }
+            $off += 64;
+        }
+    } else {
+        printf "$line\n";
+    }
+}
+
+print "\n\n! End.\n";
+
+exit 0;
diff --git a/configure b/configure
new file mode 100755
index 0000000..ae99642
--- /dev/null
+++ b/configure
@@ -0,0 +1,29133 @@
+#! /bin/sh
+# From configure.ac Id.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for silo 4.8.
+#
+# Report bugs to <visit-users at email.ornl.gov>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+# This work was performed under the auspices of the
+# U.S. Department of Energy by Lawrence Livermore National Laboratory
+# in part under Contract W-7405-Eng-48 and in part under
+# Contract DE-AC52-07NA27344.
+## --------------------- ##
+## 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=:
+  # Zsh 3.x and 4.x performs 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
+
+
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+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.)
+as_nl='
+'
+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
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  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" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+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
+fi
+echo >conf$$.file
+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
+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=:
+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'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "$0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+exec 7<&0 </dev/null 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=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='silo'
+PACKAGE_TARNAME='silo'
+PACKAGE_VERSION='4.8'
+PACKAGE_STRING='silo 4.8'
+PACKAGE_BUGREPORT='visit-users at email.ornl.gov'
+
+ac_unique_file="src/silo/silo.h.in"
+ac_default_prefix="`pwd`"
+# 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='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+MAINTAINER_MODE_TRUE
+MAINTAINER_MODE_FALSE
+MAINT
+PYTHONMODULE
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+SILO_VERS_MAJ
+SILO_VERS_MIN
+SILO_VERS_PAT
+SILO_VERS_PRE
+SILO_VERS_TAG
+CONFIG_CMD
+CONFIG_DATE
+CONFIG_USER
+FORTRAN
+CXX
+CXXFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CXX
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+CC
+CFLAGS
+ac_ct_CC
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+CPP
+FC
+FCFLAGS
+ac_ct_FC
+FCLIBS
+SED
+GREP
+EGREP
+LN_S
+ECHO
+AR
+RANLIB
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+SILO_DTYPPTR
+SILO_DTYPPTR1
+SILO_DTYPPTR2
+NETCDF
+PDB_DRV
+TAURUS
+HDF5_DRV
+BROWSER
+SILEX
+HZIP
+ZLIB
+FPZIP
+PRTDIAG
+PDBP_DRV
+READLINE_LIBS
+QT_BIN
+QT_INCLUDE
+QT_LIB
+QT_LDFLAGS
+QT_LIBS
+QT_CORE
+QT_CORE_LIB
+QT_GUI
+QT_GUI_LIB
+QT_CXXFLAGS
+QT_MOC
+PYTHON
+PYTHON_VERSION
+PYTHON_PREFIX
+PYTHON_EXEC_PREFIX
+PYTHON_PLATFORM
+pythondir
+pkgpythondir
+pyexecdir
+pkgpyexecdir
+PYTHON_CPPFLAGS
+BUNDLE_TARGET
+NETCDF_NEEDED_TRUE
+NETCDF_NEEDED_FALSE
+PDB_DRV_NEEDED_TRUE
+PDB_DRV_NEEDED_FALSE
+PDBP_DRV_NEEDED_TRUE
+PDBP_DRV_NEEDED_FALSE
+TAURUS_NEEDED_TRUE
+TAURUS_NEEDED_FALSE
+HDF5_DRV_NEEDED_TRUE
+HDF5_DRV_NEEDED_FALSE
+BROWSER_NEEDED_TRUE
+BROWSER_NEEDED_FALSE
+PYTHON_NEEDED_TRUE
+PYTHON_NEEDED_FALSE
+FORTRAN_NEEDED_TRUE
+FORTRAN_NEEDED_FALSE
+SILEX_NEEDED_TRUE
+SILEX_NEEDED_FALSE
+HZIP_NEEDED_TRUE
+HZIP_NEEDED_FALSE
+FPZIP_NEEDED_TRUE
+FPZIP_NEEDED_FALSE
+ZLIB_AVAILABLE_TRUE
+ZLIB_AVAILABLE_FALSE
+CXX_LINK_NEEDED_TRUE
+CXX_LINK_NEEDED_FALSE
+CC_FULLPATH
+CXX_FULLPATH
+FC_FULLPATH
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+CPP
+FC
+FCFLAGS
+CXXCPP
+F77
+FFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# 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_TARNAME}'
+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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    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 | -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    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 "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      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'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+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
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+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
+    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 .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# 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 -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    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 .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	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 silo 4.8 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/silo]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --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
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of silo 4.8:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --enable-pythonmodule   build python module [default=no]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-fortran        compile Fortran interface to Silo [default=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-optimization   compile with optimization [default=no]
+  --enable-legacy-datatyped-pointers
+                          compile using legacy (float) pointers for datatype'd
+                          pointers [default=no]
+  --enable-browser        build browser [default=yes]
+  --enable-silex          build the silex browser [default=no]
+  --enable-hzip           enable Lindstrom hex/quad mesh compression
+                          [default=yes]
+  --enable-fpzip          enable Lindstrom float 1,2,3D array compression
+                          [default=yes]
+  --enable-portable-binary
+                          disable compiler optimizations that would produce
+                          unportable binaries
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-readline         enable detection of GNU readline [default=yes]
+  --with-zlib=INC,DIR     Use the GNU zlib compression [default=yes]
+  --with-gcc-arch=<arch>  use architecture <arch> for gcc -march/-mtune,
+                          instead of guessing
+  --with-szlib=DIR        Use szlib library for external szlib I/O filter
+                          [default=no]
+  --with-hdf5=INC,LIB     Location of HDF5 header and library
+  --with-pdb-proper       directory where PDB proper is installed [default=no]
+  --with-qt               specify top-level Qt directory [default=yes]
+  --with-qt-bin           specify Qt bin directory
+  --with-qt-include       specify Qt include directory
+  --with-qt-lib           specify Qt lib directory
+
+Some influential environment variables:
+  CXX         C++ compiler command
+  CXXFLAGS    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    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CPP         C preprocessor
+  FC          Fortran compiler command
+  FCFLAGS     Fortran compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+
+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 <visit-users at email.ornl.gov>.
+_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" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`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
+      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
+silo configure 4.8
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+This work was performed under the auspices of the
+U.S. Department of Energy by Lawrence Livermore National Laboratory
+in part under Contract W-7405-Eng-48 and in part under
+Contract DE-AC52-07NA27344.
+_ACEOF
+  exit
+fi
+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 silo $as_me 4.8, which was
+generated by GNU Autoconf 2.61.  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=.
+  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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$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
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	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 &&
+      echo "$as_me: caught signal $ac_signal"
+    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'; { (exit 1); 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
+
+# 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
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# 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,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+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
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`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.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+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_aux_dir=
+for ac_dir in config "$srcdir"/config; 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
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
+   { (exit 1); exit 1; }; }
+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.
+
+
+am__api_version='1.10'
+
+# 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.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_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.  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
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$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'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+
+  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.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='silo'
+ VERSION='4.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h:config/config.h.in"
+
+{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# using autotest
+ac_config_commands="$ac_config_commands tests/atconfig"
+
+
+
+
+
+PYTHONMODULE=$DEFAULT_PYTHONMODULE
+# Check whether --enable-pythonmodule was given.
+if test "${enable_pythonmodule+set}" = set; then
+  enableval=$enable_pythonmodule; if test "$enable_pythonmodule" = "yes"; then
+        PYTHONMODULE="python"
+    fi
+fi
+
+
+if test -n "$PYTHONMODULE"; then
+    # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+else
+    # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=no
+fi
+
+
+
+fi
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+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
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+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
+
+
+
+# Grab the version number
+{ echo "$as_me:$LINENO: checking what version the package is" >&5
+echo $ECHO_N "checking what version the package is... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: 4.8" >&5
+echo "${ECHO_T}4.8" >&6; }
+ SILO_VERS_MAJ="`echo 4.8 | cut -d'.' -f1`"
+ SILO_VERS_MIN="`echo 4.8 | cut -d'.' -f2 | cut -d'-' -f1`"
+ SILO_VERS_PAT="`echo 4.8 | cut -d'.' -f3 | cut -d'-' -f1`"
+ SILO_VERS_PRE="`echo 4.8 | grep pre | cut -d'-' -f2 | cut -d'e' -f2`"
+ SILO_VERS_TAG="`echo Silo_version 4.8 | sed -e 's/ /_/' -e 's/\./_/g' -e 's/-/_/g'`"
+
+ CONFIG_CMD="`echo $0 $ac_configure_args`"
+
+ CONFIG_DATE="`date`"
+
+ CONFIG_USER="`whoami`@`hostname`"
+if test -n "$ORGANIZATION"; then
+  CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
+fi
+
+
+
+DEFAULT_PYTHONMODULE=""
+DEFAULT_BROWSER="browser"
+DEFAULT_SILEX="silex"
+DEFAULT_HZIP="hzip"
+DEFAULT_FPZIP="fpzip"
+DEFAULT_FORTRAN="fortran"
+default_detect_readline="yes"
+
+hname="`hostname`"
+file=$srcdir/config-site/$hname.conf
+{ echo "$as_me:$LINENO: checking for site config host file" >&5
+echo $ECHO_N "checking for site config host file... $ECHO_C" >&6; }
+if test -f "$file"; then
+    . $file
+    { echo "$as_me:$LINENO: result: found $file" >&5
+echo "${ECHO_T}found $file" >&6; }
+else
+    hname="`hostname | cut -f1 -d.`"
+    file=$srcdir/config-site/$hname.conf
+    if test -f "$file"; then
+        . $file
+        { echo "$as_me:$LINENO: result: found $file" >&5
+echo "${ECHO_T}found $file" >&6; }
+    else
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    fi
+fi
+
+case $host_os in
+  aix4.*)
+    host_os_novers=aix4.x
+    ;;
+  aix5.*)
+    host_os_novers=aix5.x
+    ;;
+  freebsd*)
+    host_os_novers=freebsd
+    ;;
+  irix5.*)
+    host_os_novers=irix5.x
+    ;;
+  irix6.*)
+    host_os_novers=irix6.x
+    ;;
+  osf4.*)
+    host_os_novers=osf4.x
+    ;;
+  osf5.*)
+    host_os_novers=osf5.x
+    ;;
+  solaris2.*)
+    host_os_novers=solaris2.x
+    ;;
+  *)
+    host_os_novers=$host_os
+    ;;
+esac
+
+UNAME="`uname`"
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os \
+         $host_vendor-$host_os_novers \
+         $host_cpu-$host_os \
+         $host_cpu-$host_os_novers \
+         $host_cpu-$host_vendor \
+         $host_os \
+         $host_os_novers \
+         $host_vendor \
+         $host_cpu \
+         $UNAME; do
+  { echo "$as_me:$LINENO: checking for config-site $f" >&5
+echo $ECHO_N "checking for config-site $f... $ECHO_C" >&6; }
+  if test -f "$srcdir/config-site/$f.conf"; then
+    host_config=$srcdir/config-site/$f.conf
+    { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+    break
+  fi
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+done
+if test "X$host_config" != "Xnone"; then
+  . $host_config
+fi
+
+#
+# MCM -- 22Jul08. I don't know why we're mixing FC and F77 stuf here.
+# According to autoconf web pages, we should probably use one or the
+# other but not both. Also, given that silo_f.h uses FC_FUNC macro,
+# I don't see how we can get by using F77. So, it is removed and we're
+# using only FC.
+#
+
+FORTRAN=$DEFAULT_FORTRAN
+# Check whether --enable-fortran was given.
+if test "${enable_fortran+set}" = set; then
+  enableval=$enable_fortran; if test "$enable_fortran" = "no" ; then
+        FORTRAN=""
+    fi
+fi
+
+
+
+# Check for programs.
+# We shouldn't depend on too many!
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out 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.
+{ echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
+echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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 | *.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
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
+echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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 | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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 ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	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
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$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
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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"
+  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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+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
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+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 "$FORTRAN"; then
+    ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+  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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_FC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$FC"; then
+  ac_cv_prog_FC="$FC" # 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_FC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+FC=$ac_cv_prog_FC
+if test -n "$FC"; then
+  { echo "$as_me:$LINENO: result: $FC" >&5
+echo "${ECHO_T}$FC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$FC" && break
+  done
+fi
+if test -z "$FC"; then
+  ac_ct_FC=$FC
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_FC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_FC"; then
+  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # 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_FC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FC=$ac_cv_prog_ac_ct_FC
+if test -n "$ac_ct_FC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_FC" >&5
+echo "${ECHO_T}$ac_ct_FC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_FC" && break
+done
+
+  if test "x$ac_ct_FC" = x; then
+    FC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    FC=$ac_ct_FC
+  fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran compiler... $ECHO_C" >&6; }
+if test "${ac_cv_fc_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_fc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_fc_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FCFLAGS+set}
+ac_save_FFLAGS=$FCFLAGS
+FCFLAGS=
+{ echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5
+echo $ECHO_N "checking whether $FC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_fc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FCFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_fc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_fc_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_fc_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FCFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_fc_g = yes; then
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-g -O2"
+  else
+    FCFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-O2"
+  else
+    FCFLAGS=
+  fi
+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=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to get verbose linking output from $FC" >&5
+echo $ECHO_N "checking how to get verbose linking output from $FC... $ECHO_C" >&6; }
+if test "${ac_cv_prog_fc_v+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_fc_v=
+# Try some options frequently used verbose output
+for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FCFLAGS
+FCFLAGS="$FCFLAGS $ac_verb"
+eval "set x $ac_link"
+shift
+echo "$as_me:$LINENO: $*" >&5
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
+echo "$ac_fc_v_output" >&5
+FCFLAGS=$ac_save_FFLAGS
+
+rm -f conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_fc_v_output="`echo $ac_fc_v_output |
+	grep 'LPATH is:' |
+	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_fc_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_fc_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
+esac
+
+
+  # look for -l* and *.a constructs in the output
+  for ac_arg in $ac_fc_v_output; do
+     case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
+          ac_cv_prog_fc_v=$ac_verb
+          break 2 ;;
+     esac
+  done
+done
+if test -z "$ac_cv_prog_fc_v"; then
+   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $FC" >&5
+echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5
+echo "$as_me: WARNING: compilation failed" >&2;}
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_fc_v" >&5
+echo "${ECHO_T}$ac_cv_prog_fc_v" >&6; }
+{ echo "$as_me:$LINENO: checking for Fortran libraries of $FC" >&5
+echo $ECHO_N "checking for Fortran libraries of $FC... $ECHO_C" >&6; }
+if test "${ac_cv_fc_libs+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$FCLIBS" != "x"; then
+  ac_cv_fc_libs="$FCLIBS" # Let the user override the test.
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FCFLAGS
+FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v"
+eval "set x $ac_link"
+shift
+echo "$as_me:$LINENO: $*" >&5
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
+echo "$ac_fc_v_output" >&5
+FCFLAGS=$ac_save_FFLAGS
+
+rm -f conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_fc_v_output="`echo $ac_fc_v_output |
+	grep 'LPATH is:' |
+	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_fc_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_fc_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
+esac
+
+
+
+ac_cv_fc_libs=
+
+# Save positional arguments (if any)
+ac_save_positional="$@"
+
+set X $ac_fc_v_output
+while test $# != 1; do
+  shift
+  ac_arg=$1
+  case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a)
+            ac_exists=false
+  for ac_i in $ac_cv_fc_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+
+          ;;
+        -bI:*)
+            ac_exists=false
+  for ac_i in $ac_cv_fc_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_arg; do
+    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+fi
+
+          ;;
+          # Ignore these flags.
+        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*)
+          ;;
+        -lkernel32)
+          test x"$CYGWIN" != xyes && ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+          ;;
+        -[LRuYz])
+          # These flags, when seen by themselves, take an argument.
+          # We remove the space between option and argument and re-iterate
+          # unless we find an empty arg or a new option (starting with -)
+	  case $2 in
+	     "" | -*);;
+	     *)
+		ac_arg="$ac_arg$2"
+		shift; shift
+		set X $ac_arg "$@"
+		;;
+	  esac
+          ;;
+        -YP,*)
+          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+              ac_exists=false
+  for ac_i in $ac_cv_fc_libs; do
+    if test x"$ac_j" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_arg="$ac_arg $ac_j"
+                               ac_cv_fc_libs="$ac_cv_fc_libs $ac_j"
+fi
+
+          done
+          ;;
+        -[lLR]*)
+            ac_exists=false
+  for ac_i in $ac_cv_fc_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+
+          ;;
+	-zallextract*| -zdefaultextract)
+	  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+	  ;;
+          # Ignore everything else.
+  esac
+done
+# restore positional arguments
+set X $ac_save_positional; shift
+
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`echo $ac_fc_v_output |
+                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
+      test "x$ac_ld_run_path" != x &&
+        if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_ld_run_path; do
+    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path"
+fi
+      ;;
+esac
+fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_fc_libs" >&5
+echo "${ECHO_T}$ac_cv_fc_libs" >&6; }
+FCLIBS="$ac_cv_fc_libs"
+
+
+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=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+{ echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5
+echo $ECHO_N "checking for dummy main to link with Fortran libraries... $ECHO_C" >&6; }
+if test "${ac_cv_fc_dummy_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_fc_dm_save_LIBS=$LIBS
+ LIBS="$LIBS $FCLIBS"
+ ac_fortran_dm_var=FC_DUMMY_MAIN
+ 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
+
+ # First, try linking without a dummy main:
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_fortran_dummy_main=none
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_fortran_dummy_main=unknown
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+ if test $ac_cv_fortran_dummy_main = unknown; then
+   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define $ac_fortran_dm_var $ac_func
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_fortran_dummy_main=$ac_func; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+   done
+ fi
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+ ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main
+ rm -f conftest*
+ LIBS=$ac_fc_dm_save_LIBS
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_fc_dummy_main" >&5
+echo "${ECHO_T}$ac_cv_fc_dummy_main" >&6; }
+FC_DUMMY_MAIN=$ac_cv_fc_dummy_main
+if test "$FC_DUMMY_MAIN" != unknown; then
+  if test $FC_DUMMY_MAIN != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define FC_DUMMY_MAIN $FC_DUMMY_MAIN
+_ACEOF
+
+  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FC_DUMMY_MAIN_EQ_F77 1
+_ACEOF
+
+  fi
+fi
+else
+  { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&5
+echo "$as_me: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+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=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+{ echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5
+echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6; }
+if test "${ac_cv_fc_mangling+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      subroutine foobar()
+      return
+      end
+      subroutine foo_bar()
+      return
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  mv conftest.$ac_objext cfortran_test.$ac_objext
+
+  ac_save_LIBS=$LIBS
+  LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS"
+
+  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_success=no
+  for ac_foobar in foobar FOOBAR; do
+    for ac_underscore in "" "_"; do
+      ac_func="$ac_foobar$ac_underscore"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 $ac_func ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_success=yes; break 2
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    done
+  done
+  ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+  if test "$ac_success" = "yes"; then
+     case $ac_foobar in
+	foobar)
+	   ac_case=lower
+	   ac_foo_bar=foo_bar
+	   ;;
+	FOOBAR)
+	   ac_case=upper
+	   ac_foo_bar=FOO_BAR
+	   ;;
+     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
+     ac_success_extra=no
+     for ac_extra in "" "_"; do
+	ac_func="$ac_foo_bar$ac_underscore$ac_extra"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 $ac_func ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_success_extra=yes; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     done
+     ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+     if test "$ac_success_extra" = "yes"; then
+	ac_cv_fc_mangling="$ac_case case"
+        if test -z "$ac_underscore"; then
+           ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore"
+	else
+           ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore"
+        fi
+        if test -z "$ac_extra"; then
+           ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore"
+	else
+           ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore"
+        fi
+      else
+	ac_cv_fc_mangling="unknown"
+      fi
+  else
+     ac_cv_fc_mangling="unknown"
+  fi
+
+  LIBS=$ac_save_LIBS
+  rm -f cfortran_test* conftest*
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5
+echo "${ECHO_T}$ac_cv_fc_mangling" >&6; }
+
+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=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+case $ac_cv_fc_mangling in
+  "lower case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) name
+_ACEOF
+ ;;
+  "lower case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) name ## __
+_ACEOF
+ ;;
+  "upper case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) NAME
+_ACEOF
+ ;;
+  "upper case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define FC_FUNC_(name,NAME) NAME ## __
+_ACEOF
+ ;;
+  *)
+          { echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5
+echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+          ;;
+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
+
+fi
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+# Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+{ echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6; }
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  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
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    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
+    ac_count=`expr $ac_count + 1`
+    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
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  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
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    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
+    ac_count=`expr $ac_count + 1`
+    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
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't 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 "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; 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
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+NM="$lt_cv_path_NM"
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 6463 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_i386_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*kfreebsd*-gnu)
+          LD="${LD-ld} -m elf_x86_64_fbsd"
+          ;;
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  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
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	lt_cv_cc_needs_belf=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     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
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # 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
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_f77_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+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
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+	       = "XX$teststring") >/dev/null 2>&1 &&
+	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
+	      lt_cv_sys_max_cmd_len=$new_result &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on massive
+      # amounts of additional arguments before passing them to the linker.
+      # It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6; }
+fi
+
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# 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='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux* | k*bsd*-gnu)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	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 $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6; }
+else
+  { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+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 "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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"
+    echo "$as_me:$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
+  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+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
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8519: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:8523: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    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'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8809: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:8813: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works=yes
+       fi
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8913: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8917: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L=yes
+  	  hardcode_libdir_flag_spec='-L$libdir'
+  	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # 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 $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	hardcode_direct=yes
+	export_dynamic_flag_spec='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld='+b $libdir'
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`echo $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != 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
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         old_striplib="$STRIP -S"
+         { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+       ;;
+   *)
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    { echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); 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 shl_load
+
+/* 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 ();
+/* 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_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  { echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); 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 dlopen
+
+/* 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 dlopen ();
+/* 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_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_svld_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 dld_link ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dld_dld_link=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 11334 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 11434 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which library types will actually be built
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    fix_srcfile_path \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by 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., 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.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} 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
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# 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 "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+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
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags was given.
+if test "${with_tags+set}" = set; then
+  withval=$with_tags; tagnames="$withval"
+fi
+
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+	    (test "X$CXX" != "Xg++"))) ; then
+	  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't 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 "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	for ld_flag in $LDFLAGS; do
+	  case $ld_flag in
+	  *-brtl*)
+	    aix_use_runtimelinking=yes
+	    break
+	    ;;
+	  esac
+	done
+	;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  :
+	else
+	  # We have old collect2
+	  hardcode_direct_CXX=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_CXX=yes
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  hardcode_libdir_separator_CXX=
+	fi
+	;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+	shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='${wl}-G'
+	else
+	  shared_flag='${wl}-bM:SRE'
+	fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	allow_undefined_flag_CXX="-z nodefs"
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	no_undefined_flag_CXX=' ${wl}-bernotok'
+	allow_undefined_flag_CXX=' ${wl}-berok'
+	# Exported symbols can be pulled into shared objects from archives
+	whole_archive_flag_spec_CXX='$convenience'
+	archive_cmds_need_lc_CXX=yes
+	# This is similar to how AIX traditionally builds its shared libraries.
+	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      ghcx*)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC*)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_CXX=:
+
+      case $host_cpu in
+      hppa*64*|ia64*) ;;
+      *)
+	export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      aCC*)
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case $host_cpu in
+	    hppa*64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    ia64*)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    *)
+	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  interix[3-9]*)
+    hardcode_direct_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+	# SGI C++
+	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	  else
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	link_all_deplibs_CXX=yes
+	;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux* | k*bsd*-gnu)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc*)
+	# Intel C++
+	with_gnu_ld=yes
+	# version 8.0 and above of icpc choke on multiply defined symbols
+	# if we add $predep_objects and $postdep_objects, however 7.1 and
+	# earlier do not add the objects themselves.
+	case `$CC -V 2>&1` in
+	*"Version 7."*)
+  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	*)  # Version 8.0 or newer
+	  tmp_idyn=
+	  case $host_cpu in
+	    ia64*) tmp_idyn=' -i_dynamic';;
+	  esac
+  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  ;;
+	esac
+	archive_cmds_need_lc_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      pgCC*)
+        # Portland Group C++ compiler
+	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+	# Compaq C++
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C++ 5.9
+	  no_undefined_flag_CXX=' -zdefs'
+	  archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+	  # Not sure whether something based on
+	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	  # would be better.
+	  output_verbose_link_cmd='echo'
+
+	  # Archives containing C++ object files must be created using
+	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	  # necessary to make sure instantiated templates are included
+	  # in the archive.
+	  old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	  ;;
+	esac
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    if test -f /usr/libexec/ld.so; then
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      fi
+      output_verbose_link_cmd='echo'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+	;;
+      RCC*)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      cxx*)
+	allow_undefined_flag_CXX=' -expect_unresolved \*'
+	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	hardcode_libdir_separator_CXX=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      lcc*)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+	# Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
+	no_undefined_flag_CXX=' -zdefs'
+	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	hardcode_libdir_flag_spec_CXX='-R$libdir'
+	hardcode_shlibpath_var_CXX=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The compiler driver will combine and reorder linker options,
+	    # but understands `-z linker_flag'.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	    ;;
+	esac
+	link_all_deplibs_CXX=yes
+
+	output_verbose_link_cmd='echo'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx*)
+	# Green Hills C++ Compiler
+	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	  case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	  esac
+	fi
+	;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    no_undefined_flag_CXX='${wl}-z,text'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    no_undefined_flag_CXX='${wl}-z,text'
+    allow_undefined_flag_CXX='${wl}-z,nodefs'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+    export_dynamic_flag_spec_CXX='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      *)
+	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+    #
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    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'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  icpc* | ecpc*)
+	    # Intel C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC*)
+	    # Portland Group C++ compiler.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13870: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13874: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13974: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13978: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    fix_srcfile_path_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+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
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="\
+      program t
+      end
+"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    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'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_F77='-Bstatic'
+      else
+	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_F77='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-KPIC'
+	lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fpic'
+	lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_F77='-Kconform_pic'
+	lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15536: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15540: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
+
+if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15640: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15644: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_F77=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_F77=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_F77=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_F77=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_F77=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_F77=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_F77=yes
+  	  hardcode_libdir_flag_spec_F77='-L$libdir'
+  	  hardcode_libdir_separator_F77=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_F77="-z nodefs"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_F77=' ${wl}-bernotok'
+	  allow_undefined_flag_F77=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_F77='$convenience'
+	  archive_cmds_need_lc_F77=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # 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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	hardcode_direct_F77=yes
+	export_dynamic_flag_spec_F77='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_F77=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_F77=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+	  hardcode_direct_F77=no
+	  hardcode_shlibpath_var_F77=no
+	  ;;
+	*)
+	  hardcode_direct_F77=yes
+	  export_dynamic_flag_spec_F77='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_F77=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_F77=yes
+	hardcode_shlibpath_var_F77=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_F77='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_F77='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs_F77=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_F77=' -expect_unresolved \*'
+	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_F77='$CC -r -o $output$reload_objs'
+	  hardcode_direct_F77=no
+        ;;
+	motorola)
+	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_F77=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6; }
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+	pic_flag=$lt_prog_compiler_pic_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_F77=no
+        else
+	  archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6; }
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    fix_srcfile_path_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+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
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+old_archive_cmds_GCJ=$old_archive_cmds
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17827: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17831: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    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'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | cygwin* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_GCJ='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      icc* | ecc*)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-KPIC'
+	lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_GCJ='-Wl,'
+	lt_prog_compiler_pic_GCJ='-fpic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      *)
+        case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_GCJ='-KPIC'
+	  lt_prog_compiler_static_GCJ='-Bstatic'
+	  lt_prog_compiler_wl_GCJ=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_GCJ='-Kconform_pic'
+	lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:18117: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:18121: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_GCJ=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_GCJ=yes
+       fi
+     else
+       lt_prog_compiler_static_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
+
+if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+    :
+else
+    lt_prog_compiler_static_GCJ=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:18221: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:18225: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	whole_archive_flag_spec_GCJ=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_GCJ=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	tmp_addflag=
+	case $cc_basename,$host_cpu in
+	pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	*)
+	  tmp_sharedflag='-shared' ;;
+	esac
+	archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+	if test $supports_anon_versioning = yes; then
+	  archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_GCJ=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_GCJ=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+	  else
+	    ld_shlibs_GCJ=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+	  for ld_flag in $LDFLAGS; do
+  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+  	    aix_use_runtimelinking=yes
+  	    break
+  	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  :
+	  else
+  	  # We have old collect2
+  	  hardcode_direct_GCJ=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  hardcode_minus_L_GCJ=yes
+  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
+  	  hardcode_libdir_separator_GCJ=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_GCJ="-z nodefs"
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_GCJ=' ${wl}-bernotok'
+	  allow_undefined_flag_GCJ=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_GCJ='$convenience'
+	  archive_cmds_need_lc_GCJ=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+    	output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # 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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	hardcode_direct_GCJ=yes
+	export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_GCJ=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_GCJ=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+	  hardcode_direct_GCJ=no
+	  hardcode_shlibpath_var_GCJ=no
+	  ;;
+	*)
+	  hardcode_direct_GCJ=yes
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_GCJ=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_GCJ=yes
+	hardcode_shlibpath_var_GCJ=no
+	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_GCJ='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_GCJ='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+        fi
+      else
+	ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_GCJ=' -expect_unresolved \*'
+	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+	wlarc=''
+	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+ 	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+	  hardcode_direct_GCJ=no
+        ;;
+	motorola)
+	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_GCJ=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_GCJ='${wl}-z,text'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_GCJ='${wl}-z,text'
+      allow_undefined_flag_GCJ='${wl}-z,nodefs'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+	pic_flag=$lt_prog_compiler_pic_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_GCJ=no
+        else
+	  archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    fix_srcfile_path_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+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
+
+CC="$lt_save_CC"
+
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    fix_srcfile_path_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_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=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+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
+
+CC="$lt_save_CC"
+
+	;;
+
+      *)
+	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
+if test "${ac_cv_search_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 strerror ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_search_strerror=$ac_res
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_strerror+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_strerror+set}" = set; then
+  :
+else
+  ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+# save the cache so far
+cat >confcache <<\_ACEOF
+# 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, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# 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.
+(
+  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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+# Check whether --enable-optimization was given.
+if test "${enable_optimization+set}" = set; then
+  enableval=$enable_optimization; case "${enableval}" in
+        yes) USING_DEBUG="no";;
+        no)  USING_DEBUG="yes";;
+        *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-optimization" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-optimization" >&2;}
+   { (exit 1); exit 1; }; } ;;
+    esac
+else
+  USING_DEBUG="yes"
+fi
+
+
+SILO_DTYPPTR="void"
+SILO_DTYPPTR1="void*"
+SILO_DTYPPTR2="void*"
+# Check whether --enable-legacy-datatyped-pointers was given.
+if test "${enable_legacy_datatyped_pointers+set}" = set; then
+  enableval=$enable_legacy_datatyped_pointers; if test $enableval = yes; then
+        SILO_DTYPPTR="float"
+        SILO_DTYPPTR1="float*"
+        SILO_DTYPPTR2="float**"
+    fi
+fi
+
+
+
+
+
+NETCDF="netcdf"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NETCDF_DRIVER 1
+_ACEOF
+
+
+
+PDB_DRV="pdb_drv"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PDB_DRIVER 1
+_ACEOF
+
+
+
+TAURUS="taurus"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TAURUS_DRIVER 1
+_ACEOF
+
+
+
+HDF5_DRV="hdf5_drv"
+
+
+# Some sites have the GNU readline header files and libraries installed
+# incorrectly which causes programs that use them to not link or possibly
+# not run.  This configure doesn't check for misconfigured systems, but
+# it does allow the user to prevent the GNU readline files from being
+# detected.
+
+# Check whether --with-readline was given.
+if test "${with_readline+set}" = set; then
+  withval=$with_readline; detect_readline=$withval
+else
+  detect_readline=$default_detect_readline
+fi
+
+
+BROWSER=$DEFAULT_BROWSER
+# Check whether --enable-browser was given.
+if test "${enable_browser+set}" = set; then
+  enableval=$enable_browser; if test "$enable_browser" = "no"; then
+        BROWSER=""
+    fi
+fi
+
+
+
+SILEX=$DEFAULT_SILEX
+# Check whether --enable-silex was given.
+if test "${enable_silex+set}" = set; then
+  enableval=$enable_silex; if test "$enable_silex" = "no"; then
+        SILEX=""
+    fi
+fi
+
+
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval=$with_zlib;
+fi
+
+if test "$with_zlib" = no; then
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB_H 0
+_ACEOF
+
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZ 0
+_ACEOF
+
+    ZLIB=""
+elif test -n "$with_zlib" && test "$with_zlib" != yes; then
+    ZLIB_INCDIR="`echo $with_zlib |cut -f1 -d,`"
+    if test ! -f $ZLIB_INCDIR/zlib.h; then
+        { { echo "$as_me:$LINENO: error: problem with directory specified for zlib includes" >&5
+echo "$as_me: error: problem with directory specified for zlib includes" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ZLIB_LIBDIR="`echo $with_zlib | cut -f2 -d, -s`"
+    if test ! -f $ZLIB_LIBDIR/libz.a && test ! -f $ZLIB_LIBDIR/libz.so; then
+        { { echo "$as_me:$LINENO: error: problem with directory specified for zlib libs" >&5
+echo "$as_me: error: problem with directory specified for zlib libs" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    CPPFLAGS="$CPPFLAGS -I$ZLIB_INCDIR"
+    LDFLAGS="$LDFLAGS -L$ZLIB_LIBDIR"
+    LIBS="$LIBS -lz"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+    ZLIB="zlib"
+fi
+
+{ echo "$as_me:$LINENO: checking for hzip" >&5
+echo $ECHO_N "checking for hzip... $ECHO_C" >&6; }
+if test -d $srcdir/src/hzip; then
+    { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+    HZIP=$DEFAULT_HZIP
+else
+    { echo "$as_me:$LINENO: result: hzip compression not available in BSD version" >&5
+echo "${ECHO_T}hzip compression not available in BSD version" >&6; }
+    HZIP=""
+fi
+# Check whether --enable-hzip was given.
+if test "${enable_hzip+set}" = set; then
+  enableval=$enable_hzip; if test "$enable_hzip" = "no"; then
+        HZIP=""
+    fi
+fi
+
+
+
+if test -n "$HZIP" && test "$with_zlib" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HZIP 1
+_ACEOF
+
+    ZLIB="zlib"
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ have_zlib_h="yes"
+fi
+
+done
+
+    if test -n "$have_zlib_h"; then
+
+{ echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
+echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 inflateEnd ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return inflateEnd ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_z_inflateEnd=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_inflateEnd=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6; }
+if test $ac_cv_lib_z_inflateEnd = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+fi
+
+        if test -z "`echo $LIBS | tr ' ' '\n' | grep -x -e '-lz'`"; then
+            cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB_H 0
+_ACEOF
+
+            cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZ 0
+_ACEOF
+
+            ZLIB=""
+        fi
+    fi
+
+fi
+
+{ echo "$as_me:$LINENO: checking for fpzip" >&5
+echo $ECHO_N "checking for fpzip... $ECHO_C" >&6; }
+if test -d $srcdir/src/fpzip; then
+    { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+    FPZIP=$DEFAULT_FPZIP
+else
+    { echo "$as_me:$LINENO: result: fpzip compression not available in BSD version" >&5
+echo "${ECHO_T}fpzip compression not available in BSD version" >&6; }
+    FPZIP=""
+fi
+# Check whether --enable-fpzip was given.
+if test "${enable_fpzip+set}" = set; then
+  enableval=$enable_fpzip; if test "$enable_fpzip" = "no"; then
+        FPZIP=""
+    fi
+fi
+
+
+if test -n "$FPZIP"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPZIP 1
+_ACEOF
+
+fi
+
+# Turn on C optimization flags
+{ echo "$as_me:$LINENO: checking compiler optimization" >&5
+echo $ECHO_N "checking compiler optimization... $ECHO_C" >&6; }
+if test "X$USING_DEBUG" = Xno; then
+# use contributed GNU m4 macro library provided see:
+#   autoconf-archive-2006-06-04/htmldoc/ax_cc_maxopt.html
+
+{ echo "$as_me:$LINENO: checking for C compiler vendor" >&5
+echo $ECHO_N "checking for C compiler vendor... $ECHO_C" >&6; }
+if test "${ax_cv_c_compiler_vendor+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ax_cv_c_compiler_vendor=unknown
+  # note: don't check for gcc first since some other compilers define __GNUC__
+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+#if !($vencpp)
+      thisisanerror;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_c_compiler_vendor" >&5
+echo "${ECHO_T}$ax_cv_c_compiler_vendor" >&6; }
+
+
+
+
+
+
+# Check whether --enable-portable-binary was given.
+if test "${enable_portable_binary+set}" = set; then
+  enableval=$enable_portable_binary; acx_maxopt_portable=$withval
+else
+  acx_maxopt_portable=no
+fi
+
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+  CFLAGS=""
+  case $ax_cv_c_compiler_vendor in
+    dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+	 if test "x$acx_maxopt_portable" = xno; then
+           CFLAGS="$CFLAGS -arch host"
+         fi;;
+
+    sun) CFLAGS="-native -fast -xO5 -dalign"
+	 if test "x$acx_maxopt_portable" = xyes; then
+	   CFLAGS="$CFLAGS -xarch=generic"
+         fi;;
+
+    hp)  CFLAGS="+Oall +Optrs_ansi +DSnative"
+	 if test "x$acx_maxopt_portable" = xyes; then
+	   CFLAGS="$CFLAGS +DAportable"
+	 fi;;
+
+    ibm) if test "x$acx_maxopt_portable" = xno; then
+           xlc_opt="-qarch=auto -qtune=auto"
+	 else
+           xlc_opt="-qtune=auto"
+	 fi
+          { echo "$as_me:$LINENO: checking whether C compiler accepts $xlc_opt" >&5
+echo $ECHO_N "checking whether C compiler accepts $xlc_opt... $ECHO_C" >&6; }
+ax_save_FLAGS=$CFLAGS
+   CFLAGS="$xlc_opt"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval `echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval `echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="-O3 -qansialias -w $xlc_opt"
+else
+	CFLAGS="-O3 -qansialias -w"
+                echo "******************************************************"
+                echo "*  You seem to have the IBM  C compiler.  It is      *"
+                echo "*  recommended for best performance that you use:    *"
+                echo "*                                                    *"
+                echo "*    CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
+                echo "*                      ^^^        ^^^                *"
+                echo "*  where xxx is pwr2, pwr3, 604, or whatever kind of *"
+                echo "*  CPU you have.  (Set the CFLAGS environment var.   *"
+                echo "*  and re-run configure.)  For more info, man cc.    *"
+                echo "******************************************************"
+fi
+
+         ;;
+
+    intel) CFLAGS="-O3 -ansi_alias"
+	if test "x$acx_maxopt_portable" = xno; then
+	  icc_archflag=unknown
+	  icc_flags=""
+	  case $host_cpu in
+	    i686*|x86_64*)
+              # icc accepts gcc assembly syntax, so these should work:
+
+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
+
+{ echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5
+echo $ECHO_N "checking for x86 cpuid 0 output... $ECHO_C" >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ax_cv_gcc_x86_cpuid_0=unknown
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+     int op = 0, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5
+echo "${ECHO_T}$ax_cv_gcc_x86_cpuid_0" >&6; }
+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
+
+{ echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5
+echo $ECHO_N "checking for x86 cpuid 1 output... $ECHO_C" >&6; }
+if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ax_cv_gcc_x86_cpuid_1=unknown
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+     int op = 1, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5
+echo "${ECHO_T}$ax_cv_gcc_x86_cpuid_1" >&6; }
+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
+
+
+	      case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+                *:756e6547:*:*) # Intel
+                  case $ax_cv_gcc_x86_cpuid_1 in
+                    *6a?:*[234]:*:*|*6[789b]?:*:*:*) icc_flags="-xK";;
+                    *f3[347]:*:*:*|*f41347:*:*:*) icc_flags="-xP -xN -xW -xK";;
+                    *f??:*:*:*) icc_flags="-xN -xW -xK";;
+                  esac ;;
+              esac ;;
+          esac
+          if test "x$icc_flags" != x; then
+            for flag in $icc_flags; do
+               { echo "$as_me:$LINENO: checking whether C compiler accepts $flag" >&5
+echo $ECHO_N "checking whether C compiler accepts $flag... $ECHO_C" >&6; }
+ax_save_FLAGS=$CFLAGS
+   CFLAGS="$flag"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval `echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval `echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`echo "ax_cv_c_flags_$flag" | $as_tr_sh`
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	icc_archflag=$flag; break
+else
+	:
+fi
+
+            done
+          fi
+          { echo "$as_me:$LINENO: checking for icc architecture flag" >&5
+echo $ECHO_N "checking for icc architecture flag... $ECHO_C" >&6; }
+	  { echo "$as_me:$LINENO: result: $icc_archflag" >&5
+echo "${ECHO_T}$icc_archflag" >&6; }
+          if test "x$icc_archflag" != xunknown; then
+            CFLAGS="$CFLAGS $icc_archflag"
+          fi
+        fi
+	;;
+
+    gnu)
+     # default optimization flags for gcc on all systems
+     CFLAGS="-O3 -fomit-frame-pointer"
+
+     # -malign-double for x86 systems
+      { echo "$as_me:$LINENO: checking whether C compiler accepts -malign-double" >&5
+echo $ECHO_N "checking whether C compiler accepts -malign-double... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags__malign_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS="-malign-double"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags__malign_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags__malign_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -malign-double"
+else
+	:
+fi
+
+
+     #  -fstrict-aliasing for gcc-2.95+
+      { echo "$as_me:$LINENO: checking whether C compiler accepts -fstrict-aliasing" >&5
+echo $ECHO_N "checking whether C compiler accepts -fstrict-aliasing... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS="-fstrict-aliasing"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags__fstrict_aliasing=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags__fstrict_aliasing=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -fstrict-aliasing"
+else
+	:
+fi
+
+
+     # note that we enable "unsafe" fp optimization with other compilers, too
+      { echo "$as_me:$LINENO: checking whether C compiler accepts -ffast-math" >&5
+echo $ECHO_N "checking whether C compiler accepts -ffast-math... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags__ffast_math+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS="-ffast-math"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags__ffast_math=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags__ffast_math=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -ffast-math"
+else
+	:
+fi
+
+
+
+
+
+
+# Check whether --with-gcc-arch was given.
+if test "${with_gcc_arch+set}" = set; then
+  withval=$with_gcc_arch; ax_gcc_arch=$withval
+else
+  ax_gcc_arch=yes
+fi
+
+
+{ echo "$as_me:$LINENO: checking for gcc architecture flag" >&5
+echo $ECHO_N "checking for gcc architecture flag... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6; }
+if test "${ax_cv_gcc_archflag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+  i[3456]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+
+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
+
+{ echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5
+echo $ECHO_N "checking for x86 cpuid 0 output... $ECHO_C" >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ax_cv_gcc_x86_cpuid_0=unknown
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+     int op = 0, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5
+echo "${ECHO_T}$ax_cv_gcc_x86_cpuid_0" >&6; }
+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
+
+{ echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5
+echo $ECHO_N "checking for x86 cpuid 1 output... $ECHO_C" >&6; }
+if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ax_cv_gcc_x86_cpuid_1=unknown
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+     int op = 1, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5
+echo "${ECHO_T}$ax_cv_gcc_x86_cpuid_1" >&6; }
+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
+
+
+     case $ax_cv_gcc_x86_cpuid_0 in
+       *:756e6547:*:*) # Intel
+          case $ax_cv_gcc_x86_cpuid_1 in
+	    *5[48]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+	    *5??:*:*:*) ax_gcc_arch=pentium ;;
+	    *6[3456]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+	    *6a?:*[01]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+	    *6a?:*[234]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+	    *6[9d]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+	    *6[78b]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+	    *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+            *f3[347]:*:*:*|*f41347:*:*:*)
+		case $host_cpu in
+                  x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+                  *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+                esac ;;
+            *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+          esac ;;
+       *:68747541:*:*) # AMD
+          case $ax_cv_gcc_x86_cpuid_1 in
+	    *5[67]?:*:*:*) ax_gcc_arch=k6 ;;
+	    *5[8d]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+	    *5[9]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+	    *60?:*:*:*) ax_gcc_arch=k7 ;;
+	    *6[12]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+	    *6[34]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+	    *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+	    *6[68a]?:*:*:*)
+
+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
+
+{ echo "$as_me:$LINENO: checking for x86 cpuid 0x80000006 output" >&5
+echo $ECHO_N "checking for x86 cpuid 0x80000006 output... $ECHO_C" >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ax_cv_gcc_x86_cpuid_0x80000006=unknown
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+     int op = 0x80000006, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__("cpuid"
+        : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op));
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5
+echo "${ECHO_T}$ax_cv_gcc_x86_cpuid_0x80000006" >&6; }
+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
+
+ # L2 cache size
+	       case $ax_cv_gcc_x86_cpuid_0x80000006 in
+                 *:*:*[1-9a-f]??????:*) # (L2 = ecx >> 16) >= 256
+			ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+                 *) ax_gcc_arch="athlon-4 athlon k7" ;;
+	       esac ;;
+	    *f[4cef8b]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+	    *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+	    *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+	    *f??:*:*:*) ax_gcc_arch="k8" ;;
+          esac ;;
+	*:746e6543:*:*) # IDT
+	   case $ax_cv_gcc_x86_cpuid_1 in
+	     *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+	     *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+	     *6[78]?:*:*:*) ax_gcc_arch=c3 ;;
+	     *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+	   esac ;;
+     esac
+     if test x"$ax_gcc_arch" = x; then # fallback
+	case $host_cpu in
+	  i586*) ax_gcc_arch=pentium ;;
+	  i686*) ax_gcc_arch=pentiumpro ;;
+        esac
+     fi
+     ;;
+
+  sparc*)
+     # Extract the first word of "prtdiag", so it can be a program name with args.
+set dummy prtdiag; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PRTDIAG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PRTDIAG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/"
+for as_dir in $as_dummy
+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_PRTDIAG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag"
+  ;;
+esac
+fi
+PRTDIAG=$ac_cv_path_PRTDIAG
+if test -n "$PRTDIAG"; then
+  { echo "$as_me:$LINENO: result: $PRTDIAG" >&5
+echo "${ECHO_T}$PRTDIAG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+     case $cputype in
+         *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+         *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+         *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+         *supersparc*|*tms390z5[05]*) ax_gcc_arch="supersparc v8" ;;
+         *hypersparc*|*rt62[056]*) ax_gcc_arch="hypersparc v8" ;;
+         *cypress*) ax_gcc_arch=cypress ;;
+     esac ;;
+
+  alphaev5) ax_gcc_arch=ev5 ;;
+  alphaev56) ax_gcc_arch=ev56 ;;
+  alphapca56) ax_gcc_arch="pca56 ev56" ;;
+  alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+  alphaev6) ax_gcc_arch=ev6 ;;
+  alphaev67) ax_gcc_arch=ev67 ;;
+  alphaev68) ax_gcc_arch="ev68 ev67" ;;
+  alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+  alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+  alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+  powerpc*)
+     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+     case $cputype in
+       *750*) ax_gcc_arch="750 G3" ;;
+       *740[0-9]*) ax_gcc_arch="$cputype 7400 G4" ;;
+       *74[4-5][0-9]*) ax_gcc_arch="$cputype 7450 G4" ;;
+       *74[0-9][0-9]*) ax_gcc_arch="$cputype G4" ;;
+       *970*) ax_gcc_arch="970 G5 power4";;
+       *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+       *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+       603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+       *) ax_gcc_arch=$cputype ;;
+     esac
+     ax_gcc_arch="$ax_gcc_arch powerpc"
+     ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+  if test "x$acx_maxopt_portable" = xyes; then # if we require portable code
+    flags="-mtune=$arch"
+    # -mcpu=$arch and m$arch generate nonportable code on every arch except
+    # x86.  And some other arches (e.g. Alpha) don't accept -mtune.  Grrr.
+    case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+  else
+    flags="-march=$arch -mcpu=$arch -m$arch"
+  fi
+  for flag in $flags; do
+     { echo "$as_me:$LINENO: checking whether C compiler accepts $flag" >&5
+echo $ECHO_N "checking whether C compiler accepts $flag... $ECHO_C" >&6; }
+ax_save_FLAGS=$CFLAGS
+   CFLAGS="$flag"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval `echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval `echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`echo "ax_cv_c_flags_$flag" | $as_tr_sh`
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	ax_cv_gcc_archflag=$flag; break
+else
+	:
+fi
+
+  done
+  test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+
+fi
+
+{ echo "$as_me:$LINENO: checking for gcc architecture flag" >&5
+echo $ECHO_N "checking for gcc architecture flag... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $ax_cv_gcc_archflag" >&5
+echo "${ECHO_T}$ax_cv_gcc_archflag" >&6; }
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+  :
+else
+  CFLAGS="$CFLAGS $ax_cv_gcc_archflag"
+fi
+
+     ;;
+  esac
+
+  if test -z "$CFLAGS"; then
+	echo ""
+	echo "********************************************************"
+        echo "* WARNING: Don't know the best CFLAGS for this system  *"
+        echo "* Use ./configure CFLAGS=... to specify your own flags *"
+	echo "* (otherwise, a default of CFLAGS=-O3 will be used)    *"
+	echo "********************************************************"
+	echo ""
+        CFLAGS="-O3"
+  fi
+
+   { echo "$as_me:$LINENO: checking whether C compiler accepts $CFLAGS" >&5
+echo $ECHO_N "checking whether C compiler accepts $CFLAGS... $ECHO_C" >&6; }
+ax_save_FLAGS=$CFLAGS
+   CFLAGS="$CFLAGS"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval `echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval `echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	:
+else
+
+	echo ""
+        echo "********************************************************"
+        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
+        echo "* your compiler.                                       *"
+        echo "* Use ./configure CFLAGS=... to specify your own flags *"
+        echo "********************************************************"
+        echo ""
+        CFLAGS=""
+
+fi
+
+
+fi
+
+   { echo "$as_me:$LINENO: result: enabled" >&5
+echo "${ECHO_T}enabled" >&6; }
+else
+   { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+fi
+
+#
+# MCM: I have no idea what good the following line does. I think
+# all compilers accept the -D argument and any string following
+# it is an argument to the -D argument. So, I think this is
+# just totally bogus!
+# Default to large file support
+ { echo "$as_me:$LINENO: checking whether C compiler accepts \"-D_LARGEFILE_SOURCE\"" >&5
+echo $ECHO_N "checking whether C compiler accepts \"-D_LARGEFILE_SOURCE\"... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags___D_LARGEFILE_SOURCE_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS=""-D_LARGEFILE_SOURCE""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags___D_LARGEFILE_SOURCE_=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags___D_LARGEFILE_SOURCE_=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags___D_LARGEFILE_SOURCE_
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE";
+else
+	:
+fi
+
+ { echo "$as_me:$LINENO: checking whether C compiler accepts \"-D_LARGEFILE64_SOURCE\"" >&5
+echo $ECHO_N "checking whether C compiler accepts \"-D_LARGEFILE64_SOURCE\"... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags___D_LARGEFILE64_SOURCE_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS=""-D_LARGEFILE64_SOURCE""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags___D_LARGEFILE64_SOURCE_=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags___D_LARGEFILE64_SOURCE_=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags___D_LARGEFILE64_SOURCE_
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE";
+else
+	:
+fi
+
+ { echo "$as_me:$LINENO: checking whether C compiler accepts \"-D_FILE_OFFSET_BITS=64\"" >&5
+echo $ECHO_N "checking whether C compiler accepts \"-D_FILE_OFFSET_BITS=64\"... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags___D_FILE_OFFSET_BITS_64_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS=""-D_FILE_OFFSET_BITS=64""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags___D_FILE_OFFSET_BITS_64_=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags___D_FILE_OFFSET_BITS_64_=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags___D_FILE_OFFSET_BITS_64_
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64";
+else
+	:
+fi
+
+ { echo "$as_me:$LINENO: checking whether C compiler accepts \"-Wdeclaration-after-statement\"" >&5
+echo $ECHO_N "checking whether C compiler accepts \"-Wdeclaration-after-statement\"... $ECHO_C" >&6; }
+if test "${ax_cv_c_flags___Wdeclaration_after_statement_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS=""-Wdeclaration-after-statement""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ax_cv_c_flags___Wdeclaration_after_statement_=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ax_cv_c_flags___Wdeclaration_after_statement_=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags___Wdeclaration_after_statement_
+{ echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+echo "${ECHO_T}$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -Wdeclaration-after-statement";
+else
+	:
+fi
+
+
+#
+# Note: regardless of what the stuff above regarding large file support
+# appears to do, the following test is the one that affects Silo's
+# knowledge and support for large files. It may be that the result of
+# the sizeof check is dependent on whether -D_LARGEFILE64_SOURCE is
+# defined on the command line to the compiler though.
+# Use size of off64_t to determine which form of stat() calls to make
+#
+{ echo "$as_me:$LINENO: checking for off64_t" >&5
+echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_off64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef off64_t ac__type_new_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_off64_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_off64_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5
+echo "${ECHO_T}$ac_cv_type_off64_t" >&6; }
+
+# 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.
+{ echo "$as_me:$LINENO: checking size of off64_t" >&5
+echo $ECHO_N "checking size of off64_t... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_off64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	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
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_off64_t=$ac_lo;;
+'') if test "$ac_cv_type_off64_t" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (off64_t)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_off64_t=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef off64_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_off64_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_off64_t" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (off64_t)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_off64_t=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off64_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_off64_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t
+_ACEOF
+
+
+
+# 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.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_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.  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
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$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'
+
+
+
+
+
+for ac_header in sys/time.h stdarg.h sys/stat.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { { echo "$as_me:$LINENO: error: $0 wasn't able to find a necessary header file
+(see above).  Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened." >&5
+echo "$as_me: error: $0 wasn't able to find a necessary header file
+(see above).  Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+done
+
+
+
+for ac_header in fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in sys/fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+if test ! "$ac_cv_header_fcntl_h"="yes" && test ! "$ac_cv_header_sys_fcntl_h"="yes" ; then
+{ { echo "$as_me:$LINENO: error: $0 wasn't able to find a necessary fcntl.h or
+sys/fcntl.h header file.
+Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened." >&5
+echo "$as_me: error: $0 wasn't able to find a necessary fcntl.h or
+sys/fcntl.h header file.
+Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+for ac_header in fnmatch.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in ieeefp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in sys/types.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+if false; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FCLOSE_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FFLUSH_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOPEN_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPRINTF_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FREAD_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEK_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETVBUF_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FTELL_POINTER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FWRITE_POINTER 1
+_ACEOF
+
+fi
+
+for function in fclose fflush fopen fprintf fread fseek setvbuf ftell fwrite
+do
+
+    cap_func="`echo ${function}|tr [a-z] [A-Z]`"
+
+    cache_name="`echo vc_cv_${function}_pointer`"
+    have_name="`echo HAVE_${cap_func}_POINTER`"
+    { echo "$as_me:$LINENO: checking for $function function pointer" >&5
+echo $ECHO_N "checking for $function function pointer... $ECHO_C" >&6; }
+    if { as_var=$cache_name; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+ int (*f)() = (int(*)())$function;
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval $cache_name=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval $cache_name=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+    if eval "test \"`echo '$''{'$cache_name'}'`\" = no"; then
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    else
+
+cat >>confdefs.h <<_ACEOF
+#define ${have_name} 1
+_ACEOF
+
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    fi
+done
+
+
+
+
+
+
+for ac_func in memmove fnmatch isnan fpclass strerror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); 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 $ac_func
+
+/* 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 $ac_func ();
+/* 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
+#endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+{ echo "$as_me:$LINENO: checking if setjmp and longjmp work" >&5
+echo $ECHO_N "checking if setjmp and longjmp work... $ECHO_C" >&6; }
+if test -n "$SETJMP_OVERRIDE"; then
+   { echo "$as_me:$LINENO: result: no.  Replacing with _setjmp and _longjmp." >&5
+echo "${ECHO_T}no.  Replacing with _setjmp and _longjmp." >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define setjmp _setjmp
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define longjmp _longjmp
+_ACEOF
+
+else
+   { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+fi
+
+cat >confcache <<\_ACEOF
+# 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, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# 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.
+(
+  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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  { echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
+echo $ECHO_N "checking for _mwvalidcheckl in -lmw... $ECHO_C" >&6; }
+if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmw  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 _mwvalidcheckl ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return _mwvalidcheckl ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_mw__mwvalidcheckl=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_mw__mwvalidcheckl=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
+echo "${ECHO_T}$ac_cv_lib_mw__mwvalidcheckl" >&6; }
+if test $ac_cv_lib_mw__mwvalidcheckl = yes; then
+  LIBM="-lmw"
+fi
+
+  { echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 cos ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return cos ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_m_cos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_m_cos=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6; }
+if test $ac_cv_lib_m_cos = yes; then
+  LIBM="$LIBM -lm"
+fi
+
+  ;;
+*)
+  { echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_cos+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 cos ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return cos ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_m_cos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_m_cos=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6; }
+if test $ac_cv_lib_m_cos = yes; then
+  LIBM="-lm"
+fi
+
+  ;;
+esac
+
+LIBS="$LIBS $LIBM"
+
+
+# Check whether --with-szlib was given.
+if test "${with_szlib+set}" = set; then
+  withval=$with_szlib;
+else
+  withval=default
+fi
+
+
+case $withval in
+  default)
+    HAVE_SZLIB="no"
+    if test "$DEFAULT_SZIP" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP/lib"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP/lib"
+    fi
+    if test "$DEFAULT_SZIP_LIB" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIB"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIB"
+    fi
+    if test "$DEFAULT_SZIP_LIBDIR" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIBDIR"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIBDIR"
+    fi
+    if test "$HAVE_SZLIB" = "yes" ; then
+      { echo "$as_me:$LINENO: checking default szlib path provided" >&5
+echo $ECHO_N "checking default szlib path provided... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: result: $szlib_lib" >&5
+echo "${ECHO_T}$szlib_lib" >&6; }
+    else
+      { echo "$as_me:$LINENO: checking for szlib" >&5
+echo $ECHO_N "checking for szlib... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6; }
+    fi
+    ;;
+  yes)
+    HAVE_SZLIB="no"
+    if test "$DEFAULT_SZIP" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP/lib"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP/lib"
+    fi
+    if test "$DEFAULT_SZIP_LIB" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIB"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIB"
+    fi
+    if test "$DEFAULT_SZIP_LIBDIR" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIBDIR"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIBDIR"
+    fi
+    if test "$HAVE_SZLIB" = "yes" ; then
+      { echo "$as_me:$LINENO: checking using szlib path provided" >&5
+echo $ECHO_N "checking using szlib path provided... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: result: $szlib_lib" >&5
+echo "${ECHO_T}$szlib_lib" >&6; }
+    else
+      { { echo "$as_me:$LINENO: error: expect to find szlib environment variables" >&5
+echo "$as_me: error: expect to find szlib environment variables" >&2;}
+   { (exit 1); exit 1; }; }
+      { echo "$as_me:$LINENO: checking for szlib" >&5
+echo $ECHO_N "checking for szlib... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6; }
+    fi
+    ;;
+  no)
+    HAVE_SZLIB="no"
+    { echo "$as_me:$LINENO: checking for szlib" >&5
+echo $ECHO_N "checking for szlib... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6; }
+    ;;
+  *)
+    HAVE_SZLIB="yes"
+    case "$withval" in
+      *)
+        if test -n "$withval"; then
+          szlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+    if test -n "$szlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$szlib_lib"
+    fi
+
+
+{ echo "$as_me:$LINENO: checking for SZ_BufftoBuffCompress in -lsz" >&5
+echo $ECHO_N "checking for SZ_BufftoBuffCompress in -lsz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_sz_SZ_BufftoBuffCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 SZ_BufftoBuffCompress ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return SZ_BufftoBuffCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_sz_SZ_BufftoBuffCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_sz_SZ_BufftoBuffCompress=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6; }
+if test $ac_cv_lib_sz_SZ_BufftoBuffCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSZ 1
+_ACEOF
+
+  LIBS="-lsz $LIBS"
+
+else
+  LDFLAGS="$saved_LDFLAGS"; unset HAVE_SZLIB
+fi
+
+
+    if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
+      { { echo "$as_me:$LINENO: error: couldn't find szlib library" >&5
+echo "$as_me: error: couldn't find szlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+esac
+
+# Is HDF5 present (it's needed for the silo/hdf5 driver for pmesh/alec SAMI
+# files larger than 2GB until SAF is in place)?  Normally check for
+# hdf5.h and libhdf5.a but skip the test if `--without-hdf5' is specified.
+# Alternate directories can be specified for hdf5.h and/or libhdf5.a by giving
+# the names like this `--with-hdf5=INC,LIB' (if only the LIB directory is
+# given then it must still be preceded by a comma).
+#
+# Checking for hdf5 is complicated by the fact that hdf5 may or may not
+# in turn depend on zlib compression lib. In and of itself, Silo does NOT
+# depend on zlib. So, we don't want -lz on the link line if zlib is either
+# not needed or, worse, not present as this generates warning messages
+# or fatal errors. So, we first test for hdf5 without -lz on the link line.
+# If this succeeds, we conclude hdf5 is present and we can build the hdf5
+# driver. If hdf5 fails, it may be that hdf5 was compiled with zlib. So, next
+# we make an independent test for zlib. If zlib fails, we conclude that the
+# failure on the hdf5 test was due to something other than lack of zlib and
+# decide libhdf5.a is NOT present and we cannot build the hdf5 driver. If
+# zlib succeeds, we re-try the hdf5 test with -lz on the link line. If that
+# succeeds, we conclude we need -lz on the link line and we can build the
+# hdf5 driver. Again, if it fails, we neither put -lz on the link line nor
+# build the hdf5 driver. One other possibility that could be tested for
+# and configure could make a reasonable comment on is to see if only the
+# binaries for hdf5 were installed AND they have zlib dependences which
+# are NOT resolvable on the platform they are installed on. This would be
+# a boneheaded thing to do, but nonetheless something that configure could
+# inform the user has gone wrong and what to do.
+#
+
+if test -n "$HDF5_DRV"; then
+   { echo "$as_me:$LINENO: checking for hdf5" >&5
+echo $ECHO_N "checking for hdf5... $ECHO_C" >&6; }
+   saved_CPPFLAGS="$CPPFLAGS"
+   saved_LDFLAGS="$LDFLAGS"
+   saved_LIBS="$LIBS"
+
+# Check whether --with-hdf5 was given.
+if test "${with_hdf5+set}" = set; then
+  withval=$with_hdf5;
+else
+  withval="default"
+fi
+
+   if test "$withval" = "no" ; then
+      { echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6; }
+      HDF5_DRV=""
+   elif test "$withval" = "default" ; then
+      if test "$DEFAULT_HDF5_LIBDIR" != "" ; then
+         LDFLAGS="$LDFLAGS -L$DEFAULT_HDF5_LIBDIR"
+         LIBS="$LIBS -lhdf5 -lz"
+         hdf5_lib=$DEFAULT_HDF5_LIBDIR
+         hdf5_explicit=true
+      fi
+      if test "$DEFAULT_HDF5_INCLUDE" != "" ; then
+         CPPFLAGS="$CPPFLAGS -I$DEFAULT_HDF5_INCLUDE"
+         hdf5_inc=$DEFAULT_HDF5_INCLUDE
+         hdf5_explicit=true
+      fi
+      if test -d "$hdf5_lib"; then
+         { echo "$as_me:$LINENO: result: $hdf5_lib" >&5
+echo "${ECHO_T}$hdf5_lib" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HDF5_H 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBHDF5 1
+_ACEOF
+
+      else
+         { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+         HDF5_DRV=""
+      fi
+   elif test "$withval" = "yes" ; then
+      if test "$DEFAULT_HDF5_LIBDIR" != "" ; then
+         LDFLAGS="$LDFLAGS -L$DEFAULT_HDF5_LIBDIR"
+         LIBS="$LIBS -lhdf5 -lz"
+         hdf5_lib=$DEFAULT_HDF5_LIBDIR
+         hdf5_explicit=true
+      fi
+      if test "$DEFAULT_HDF5_INCLUDE" != "" ; then
+         CPPFLAGS="$CPPFLAGS -I$DEFAULT_HDF5_INCLUDE"
+         hdf5_inc=$DEFAULT_HDF5_INCLUDE
+         hdf5_explicit=true
+      fi
+      if test -d "$hdf5_lib"; then
+         { echo "$as_me:$LINENO: result: $hdf5_lib" >&5
+echo "${ECHO_T}$hdf5_lib" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HDF5_H 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBHDF5 1
+_ACEOF
+
+      else
+         { { echo "$as_me:$LINENO: error: expected to find hdf5 environment variables" >&5
+echo "$as_me: error: expected to find hdf5 environment variables" >&2;}
+   { (exit 1); exit 1; }; }
+         { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+         HDF5_DRV=""
+      fi
+   else
+      { echo "$as_me:$LINENO: checking for hdf5 and supporting libraries..." >&5
+echo "$as_me: checking for hdf5 and supporting libraries..." >&6;}
+      hdf5_inc="`echo $withval |cut -f1 -d,`"
+      if test "$withval" != "yes" && test -n "$hdf5_inc"; then
+	 hdf5_explicit=true
+         if test -d "$hdf5_inc"; then
+            CPPFLAGS="-I$hdf5_inc $CPPFLAGS"
+         else
+            { { echo "$as_me:$LINENO: error: problem with directory specified for hdf5 includes" >&5
+echo "$as_me: error: problem with directory specified for hdf5 includes" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+      fi
+      hdf5_lib="`echo $withval |cut -f2 -d, -s`"
+      if test "$withval" != "yes" && test -n "$hdf5_lib"; then
+	 hdf5_explicit=true
+         if test -d "$hdf5_lib"; then
+            if test -n "$szlib_lib"; then
+               LDFLAGS="-L$hdf5_lib -L$szlib_lib $LDFLAGS"
+            else
+               LDFLAGS="-L$hdf5_lib $LDFLAGS"
+            fi
+         else
+            { { echo "$as_me:$LINENO: error: problem with directory specified for hdf5 library" >&5
+echo "$as_me: error: problem with directory specified for hdf5 library" >&2;}
+   { (exit 1); exit 1; }; }
+         fi
+      fi
+      notfound=""
+
+for ac_header in hdf5.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  notfound="hdf5.h"
+fi
+
+done
+
+      tmp_LIBS="$LIBS"
+      if test -n "$szlib_lib"; then
+###      LIBS="$hdf5_lib/libhdf5.a $LIBS"
+         LIBS="-lhdf5 -lsz $LIBS"
+      else
+         LIBS="-lhdf5 $LIBS"
+      fi
+      { echo "$as_me:$LINENO: checking for H5open" >&5
+echo $ECHO_N "checking for H5open... $ECHO_C" >&6; }
+if test "${ac_cv_func_H5open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define H5open to an innocuous variant, in case <limits.h> declares H5open.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define H5open innocuous_H5open
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char H5open (); 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 H5open
+
+/* 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 H5open ();
+/* 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_H5open || defined __stub___H5open
+choke me
+#endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return H5open ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_H5open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_H5open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_H5open" >&5
+echo "${ECHO_T}$ac_cv_func_H5open" >&6; }
+if test $ac_cv_func_H5open = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBHDF5 1
+_ACEOF
+
+else
+  notfound="$notfound libhdf5.a"
+fi
+
+      if test -n "$notfound"; then
+         LIBS="$tmp_LIBS"
+      fi
+      #
+      # If the above tests did NOT find headers and lib for
+      # hdf5, it could be due to zlib, so now test for zlib
+      # MCM -- July, 2008: This code now looks completely useless
+      # It is supposed to attempt to check if '-lz' is needed to
+      # link with HDF5. However, it doesn't appear to do any of
+      # that and had a useless embedded AC_ARG_WITH in it which
+      # I removed and replaced all instances of 'withval' to the
+      # with variable the code needs, with_zlib
+      #
+      if test -n "$notfound"; then
+         # reset the compile and link flags
+         CPPFLAGS="$saved_CPPFLAGS"
+         LDFLAGS="$saved_LDFLAGS"
+         { echo "$as_me:$LINENO: checking if lack of zlib caused tests for hdf5 to fail..." >&5
+echo "$as_me: checking if lack of zlib caused tests for hdf5 to fail..." >&6;}
+         if test "no" = "$with_zlib"; then
+            { echo "$as_me:$LINENO: checking for zlib" >&5
+echo $ECHO_N "checking for zlib... $ECHO_C" >&6; }
+            { echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6; }
+         else
+            zlib_inc="`echo $with_zlibval |cut -f1 -d,`"
+            if test "$with_zlibval" != "yes" && test -n "$zlib_inc"; then
+               if test -d "$zlib_inc"; then
+                  CPPFLAGS="-I$zlib_inc $CPPFLAGS"
+               else
+                  { { echo "$as_me:$LINENO: error: problem with directory specified for zlib includes" >&5
+echo "$as_me: error: problem with directory specified for zlib includes" >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+            fi
+            zlib_lib="`echo $with_zlibval |cut -f2 -d, -s`"
+            if test "$with_zlibval" != "yes" && test -n "$zlib_lib"; then
+               if test -d "$zlib_lib"; then
+                  LDFLAGS="-L$zlib_lib $LDFLAGS"
+               else
+                  { { echo "$as_me:$LINENO: error: problem with directory specified for zlib library" >&5
+echo "$as_me: error: problem with directory specified for zlib library" >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+            fi
+	    notfound=""
+                                                if test -z "`echo $LIBS | tr ' ' '\n' | grep -x -e '-lz'`"; then
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  notfound="zlib.h"
+fi
+
+done
+
+
+{ echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_compress2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 compress2 ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_z_compress2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_compress2=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6; }
+if test $ac_cv_lib_z_compress2 = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  notfound="$notfound libz.a"
+fi
+
+            fi
+         fi
+         #
+         # If libz was not found, the failure of hdf5 must be something else.
+         #
+         if test -n "$notfound"; then
+            CPPFLAGS="$saved_CPPFLAGS"
+            LDFLAGS="$saved_LDFLAGS"
+            HDF5_DRV=""
+	    if test -n "$hdf5_explicit"; then
+               { { echo "$as_me:$LINENO: error:
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes." >&5
+echo "$as_me: error:
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes." >&2;}
+   { (exit 1); exit 1; }; }
+   	    else
+	       { echo "$as_me:$LINENO: WARNING: hdf5 driver disabled" >&5
+echo "$as_me: WARNING: hdf5 driver disabled" >&2;}
+	    fi
+         else
+            # we unset these to defeat autoconf's cache
+            unset ac_cv_header_hdf5_h
+            unset ac_cv_lib_hdf5_H5open
+            #
+            # Now, retest for hdf5 with zlib
+            #
+            if test -n "$hdf5_inc"; then
+               CPPFLAGS="-I$hdf5_inc $CPPFLAGS"
+            fi
+            if test -n "$hdf5_lib"; then
+               if test -n "$szlib_lib"; then
+                  LDFLAGS="-L$hdf5_lib -L$szlib_lib $LDFLAGS"
+               else
+                  LDFLAGS="-L$hdf5_lib $LDFLAGS"
+               fi
+            fi
+	    notfound=""
+
+for ac_header in hdf5.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  notfound="hdf5.h"
+fi
+
+done
+
+            tmp_LIBS="$LIBS"
+
+{ echo "$as_me:$LINENO: checking for H5open in -lhdf5" >&5
+echo $ECHO_N "checking for H5open in -lhdf5... $ECHO_C" >&6; }
+if test "${ac_cv_lib_hdf5_H5open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhdf5  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 H5open ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return H5open ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_hdf5_H5open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_hdf5_H5open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_hdf5_H5open" >&5
+echo "${ECHO_T}$ac_cv_lib_hdf5_H5open" >&6; }
+if test $ac_cv_lib_hdf5_H5open = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBHDF5 1
+_ACEOF
+
+  LIBS="-lhdf5 $LIBS"
+
+else
+  notfound="$notfound libhdf5.a"
+fi
+
+            if test "$notfound" = ""; then
+               if test -n "$szlib_lib"; then
+###               LIBS="$hdf5_lib/libhdf5.a $tmp_LIBS"
+                  LIBS="-lhdf5 -lsz $tmp_LIBS"
+               else
+                  LIBS="-lhdf5 $tmp_LIBS"
+               fi
+            fi
+            if test -n "$notfound"; then
+               CPPFLAGS="$saved_CPPFLAGS"
+               LDFLAGS="$saved_LDFLAGS"
+               HDF5_DRV=""
+	       if test -n "$hdf5_explicit"; then
+                  { { echo "$as_me:$LINENO: error:
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes." >&5
+echo "$as_me: error:
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes." >&2;}
+   { (exit 1); exit 1; }; }
+	       else
+                  { echo "$as_me:$LINENO: WARNING: hdf5 driver disabled" >&5
+echo "$as_me: WARNING: hdf5 driver disabled" >&2;}
+	       fi
+            fi
+         fi # if test -n "$notfound" (for second hdf5 test)
+      fi # if test -n "$notfound" (for zlib)
+   fi # if test "no" = "$withval"
+fi # if test -n "$HDF5_DRV"
+
+# Check to see if the results of the above tests found the HDF5 libraries
+if test -n "$HDF5_DRV"; then
+    # Short-term hack to deal with bogus code above (too complex)
+    # putting -lsz AHEAD of -lhdf5 in libs
+    if test "$HAVE_SZLIB" = "yes"; then
+        LIBS="$LIBS -lsz"
+    fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HDF5_DRIVER 1
+_ACEOF
+
+else
+   LIBS="$saved_LIBS"
+fi
+
+
+# Check whether --with-pdb-proper was given.
+if test "${with_pdb_proper+set}" = set; then
+  withval=$with_pdb_proper; if test $withval != yes; then
+        PDBP_DRV="pdbp_drv"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PDBP_DRIVER 1
+_ACEOF
+
+
+        CPPFLAGS="-I$withval/include $CPPFLAGS"
+        LDFLAGS="-L$withval/lib $LDFLAGS"
+        LIBS="-lpdb -lpml -lscore $LIBS"
+    else
+        { { echo "$as_me:$LINENO: error: You must specify a directory for PDB proper" >&5
+echo "$as_me: error: You must specify a directory for PDB proper" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+fi
+
+
+READLINE_LIBS=""
+if test "X$detect_readline" = Xyes; then
+# use contributed GNU m4 macro library provided see:
+#   autoconf-archive-2006-06-04/htmldoc/vl_lib_readline.html
+   saved_LIBS="$LIBS"
+
+  { echo "$as_me:$LINENO: checking for a readline compatible library" >&5
+echo $ECHO_N "checking for a readline compatible library... $ECHO_C" >&6; }
+if test "${vl_cv_lib_readline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    ORIG_LIBS="$LIBS"
+    for readline_lib in readline edit editline; do
+      for termcap_lib in "" termcap curses ncurses; do
+        if test -z "$termcap_lib"; then
+          TRY_LIB="-l$readline_lib"
+        else
+          TRY_LIB="-l$readline_lib -l$termcap_lib"
+        fi
+        LIBS="$ORIG_LIBS $TRY_LIB"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 readline ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return readline ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  vl_cv_lib_readline="$TRY_LIB"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        if test -n "$vl_cv_lib_readline"; then
+          break
+        fi
+      done
+      if test -n "$vl_cv_lib_readline"; then
+        break
+      fi
+    done
+    if test -z "$vl_cv_lib_readline"; then
+      vl_cv_lib_readline="no"
+      LIBS="$ORIG_LIBS"
+    fi
+
+fi
+{ echo "$as_me:$LINENO: result: $vl_cv_lib_readline" >&5
+echo "${ECHO_T}$vl_cv_lib_readline" >&6; }
+
+  if test "$vl_cv_lib_readline" != "no"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBREADLINE 1
+_ACEOF
+
+
+
+for ac_header in readline.h readline/readline.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    { echo "$as_me:$LINENO: checking whether readline supports history" >&5
+echo $ECHO_N "checking whether readline supports history... $ECHO_C" >&6; }
+if test "${vl_cv_lib_readline_history+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      vl_cv_lib_readline_history="no"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 add_history ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return add_history ();
+  ;
+  return 0;
+}
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  vl_cv_lib_readline_history="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $vl_cv_lib_readline_history" >&5
+echo "${ECHO_T}$vl_cv_lib_readline_history" >&6; }
+    if test "$vl_cv_lib_readline_history" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_READLINE_HISTORY 1
+_ACEOF
+
+
+
+for ac_header in history.h readline/history.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to visit-users at email.ornl.gov ##
+## ----------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    fi
+  fi
+
+   # Put only the stuff NOT already in $LIBS into READLINE_LIBS
+   saved_LIBS_grep=$(echo $saved_LIBS | tr -s ' ' | sed 's% %\\|%g')
+   READLINE_LIBS=$(echo $LIBS | tr -s ' ' | tr ' ' '\n' | grep -v -e $saved_LIBS_grep | tr '\n' ' ')
+   LIBS="$saved_LIBS"
+else
+   { echo "$as_me:$LINENO: checking for readline" >&5
+echo $ECHO_N "checking for readline... $ECHO_C" >&6; }
+   { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+fi
+
+
+
+# Check whether --with-qt was given.
+if test "${with_qt+set}" = set; then
+  withval=$with_qt; if test $withval != yes; then
+        QTDIR=$withval
+    fi
+
+fi
+
+
+# Check whether --with-qt-bin was given.
+if test "${with_qt_bin+set}" = set; then
+  withval=$with_qt_bin; if test $withval != yes; then
+        QT_BIN=$withval
+    fi
+
+fi
+
+
+# Check whether --with-qt-include was given.
+if test "${with_qt_include+set}" = set; then
+  withval=$with_qt_include; if test $withval != yes; then
+        QT_INCLUDE=$withval
+    fi
+
+fi
+
+
+# Check whether --with-qt-lib was given.
+if test "${with_qt_lib+set}" = set; then
+  withval=$with_qt_lib; if test $withval != yes; then
+        QT_LIB=$withval
+    fi
+
+fi
+
+
+if test -n "$SILEX"; then
+
+    if test -z "$QT_BIN" || test -z "$QT_INCLUDE" || test -z "$QT_LIB"; then
+        if test -z "QTDIR"; then
+            { echo "$as_me:$LINENO: WARNING: The QT_BIN, QT_INCLUDE and QT_LIB environment variables must be set in order to find Qt. silex is being disabled" >&5
+echo "$as_me: WARNING: The QT_BIN, QT_INCLUDE and QT_LIB environment variables must be set in order to find Qt. silex is being disabled" >&2;}
+            SILEX=""
+        else
+            QT_BIN="$QTDIR/bin"
+            QT_INCLUDE="$QTDIR/include"
+            QT_LIB="$QTDIR/lib"
+        fi
+    fi
+    { echo "$as_me:$LINENO: checking for supported Qt version" >&5
+echo $ECHO_N "checking for supported Qt version... $ECHO_C" >&6; }
+    QtVersion=""
+    QtVersion2=""
+    consumeCount=-1
+    toks=`$QT_BIN/qmake --version`
+    for tok in $toks; do
+        if test "$tok" == "Qt"; then
+            consumeCount=2
+        fi
+        if test $consumeCount == 0; then
+            QtVersion2=$tok
+            break
+        else
+            consumeCount=$((consumeCount-1))
+        fi
+    done
+
+    ## Check for supported versions of Qt.
+    for ver in  4.4.0 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 \
+                4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 \
+                4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 ; do
+       if test "$QtVersion2" == "$ver"; then
+           QtVersion=$ver
+           break
+       fi
+    done
+
+    if test -z "$QtVersion"; then
+        { echo "$as_me:$LINENO: WARNING:   Sorry, but you need Qt version 4.4.0 or higher to compile Silo's silex tool. silex is being disabled" >&5
+echo "$as_me: WARNING:   Sorry, but you need Qt version 4.4.0 or higher to compile Silo's silex tool. silex is being disabled" >&2;}
+        SILEX=""
+    else
+        { echo "$as_me:$LINENO: result: Qt $QtVersion in $QT_INCLUDE" >&5
+echo "${ECHO_T}Qt $QtVersion in $QT_INCLUDE" >&6; }
+    fi
+
+    # Set the Qt bin,include,lib directories
+
+
+
+
+    # Set platform-specific options
+    if test "$UNAME" = "Darwin"; then
+        QT_LDFLAGS="-F$""(QT_LIB) -L$""(QT_LIB)"
+
+        QT_CORE=QtCore.framework
+        QT_CORE_LIB="-framework QtCore"
+
+        QT_GUI=QtGui.framework
+        QT_GUI_LIB="-framework QtGui"
+
+    else
+        QT_LDFLAGS="-L$""(QT_LIB)"
+
+        QT_CORE=libQtCore.so
+        QT_CORE_LIB=-lQtCore
+
+        QT_GUI=libQtGui.so
+        QT_GUI_LIB=-lQtGui
+
+    fi
+
+
+    # Qt libraries
+    QT_LIBS="$""(QT_CORE_LIB) $""(QT_GUI_LIB)"
+
+
+
+
+
+
+    # Include path
+    QT_CXXFLAGS="-I$""(QT_INCLUDE) -I$""(QT_INCLUDE)/Qt -I$""(QT_INCLUDE)/QtCore -I$""(QT_INCLUDE)/QtGui"
+
+
+    # Path to moc
+    QT_MOC="$""(QT_BIN)/moc"
+
+
+fi
+if test -n "$PYTHONMODULE"; then
+
+
+
+
+        if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.1" >&5
+echo $ECHO_N "checking whether $PYTHON version >= 2.1... $ECHO_C" >&6; }
+      prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('2.1', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { { echo "$as_me:$LINENO: error: too old" >&5
+echo "$as_me: error: too old" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      { echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.1" >&5
+echo $ECHO_N "checking for a Python interpreter with version >= 2.1... $ECHO_C" >&6; }
+if test "${am_cv_pathless_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+	for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('2.1', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+  break
+fi
+
+	done
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
+echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+
+
+  if test "$PYTHON" = :; then
+      :
+  else
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
+if test "${am_cv_python_version+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
+echo "${ECHO_T}$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
+echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
+if test "${am_cv_python_platform+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
+echo "${ECHO_T}$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pythondir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
+echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pyexecdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
+echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+  fi
+
+
+# Check for Python include path
+#
+   { echo "$as_me:$LINENO: checking for Python include path" >&5
+echo $ECHO_N "checking for Python include path... $ECHO_C" >&6; }
+   if test -z "$PYTHON_CPPFLAGS"; then
+      python_path=`$PYTHON -c "import distutils.sysconfig; \
+         print distutils.sysconfig.get_python_inc();"`
+      if test -n "${python_path}"; then
+         python_path="-I$python_path"
+      fi
+      PYTHON_CPPFLAGS=$python_path
+   fi
+   { echo "$as_me:$LINENO: result: $PYTHON_CPPFLAGS" >&5
+echo "${ECHO_T}$PYTHON_CPPFLAGS" >&6; }
+
+fi
+
+# skip for now
+#ACX_MPI
+
+# Create a bundle target for Darwin
+BUNDLE_TARGET=""
+case $host_os in
+  darwin*)
+    BUNDLE_TARGET="silo.app"
+    ;;
+esac
+
+
+cat >confcache <<\_ACEOF
+# 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, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# 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.
+(
+  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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+ if test -n "$NETCDF"; then
+  NETCDF_NEEDED_TRUE=
+  NETCDF_NEEDED_FALSE='#'
+else
+  NETCDF_NEEDED_TRUE='#'
+  NETCDF_NEEDED_FALSE=
+fi
+
+ if test -n "$PDB_DRV"; then
+  PDB_DRV_NEEDED_TRUE=
+  PDB_DRV_NEEDED_FALSE='#'
+else
+  PDB_DRV_NEEDED_TRUE='#'
+  PDB_DRV_NEEDED_FALSE=
+fi
+
+ if test -n "$PDBP_DRV"; then
+  PDBP_DRV_NEEDED_TRUE=
+  PDBP_DRV_NEEDED_FALSE='#'
+else
+  PDBP_DRV_NEEDED_TRUE='#'
+  PDBP_DRV_NEEDED_FALSE=
+fi
+
+ if test -n "$TAURUS"; then
+  TAURUS_NEEDED_TRUE=
+  TAURUS_NEEDED_FALSE='#'
+else
+  TAURUS_NEEDED_TRUE='#'
+  TAURUS_NEEDED_FALSE=
+fi
+
+ if test -n "$HDF5_DRV"; then
+  HDF5_DRV_NEEDED_TRUE=
+  HDF5_DRV_NEEDED_FALSE='#'
+else
+  HDF5_DRV_NEEDED_TRUE='#'
+  HDF5_DRV_NEEDED_FALSE=
+fi
+
+ if test -n "$BROWSER"; then
+  BROWSER_NEEDED_TRUE=
+  BROWSER_NEEDED_FALSE='#'
+else
+  BROWSER_NEEDED_TRUE='#'
+  BROWSER_NEEDED_FALSE=
+fi
+
+ if test -n "$PYTHONMODULE"; then
+  PYTHON_NEEDED_TRUE=
+  PYTHON_NEEDED_FALSE='#'
+else
+  PYTHON_NEEDED_TRUE='#'
+  PYTHON_NEEDED_FALSE=
+fi
+
+ if test -n "$FORTRAN"; then
+  FORTRAN_NEEDED_TRUE=
+  FORTRAN_NEEDED_FALSE='#'
+else
+  FORTRAN_NEEDED_TRUE='#'
+  FORTRAN_NEEDED_FALSE=
+fi
+
+ if test -n "$SILEX"; then
+  SILEX_NEEDED_TRUE=
+  SILEX_NEEDED_FALSE='#'
+else
+  SILEX_NEEDED_TRUE='#'
+  SILEX_NEEDED_FALSE=
+fi
+
+ if test -n "$HZIP"; then
+  HZIP_NEEDED_TRUE=
+  HZIP_NEEDED_FALSE='#'
+else
+  HZIP_NEEDED_TRUE='#'
+  HZIP_NEEDED_FALSE=
+fi
+
+ if test -n "$FPZIP"; then
+  FPZIP_NEEDED_TRUE=
+  FPZIP_NEEDED_FALSE='#'
+else
+  FPZIP_NEEDED_TRUE='#'
+  FPZIP_NEEDED_FALSE=
+fi
+
+ if test -n "$ZLIB"; then
+  ZLIB_AVAILABLE_TRUE=
+  ZLIB_AVAILABLE_FALSE='#'
+else
+  ZLIB_AVAILABLE_TRUE='#'
+  ZLIB_AVAILABLE_FALSE=
+fi
+
+ if test "$enable_shared" = "no" -a \( -n "$FPZIP" -o -n "$HZIP" \); then
+  CXX_LINK_NEEDED_TRUE=
+  CXX_LINK_NEEDED_FALSE='#'
+else
+  CXX_LINK_NEEDED_TRUE='#'
+  CXX_LINK_NEEDED_FALSE=
+fi
+
+ac_config_files="$ac_config_files Makefile SiloWindows/Makefile svn_bin/Makefile config/Makefile config-site/Makefile docs/Makefile src/Makefile src/score/Makefile src/pdb/Makefile src/silo/Makefile src/silo/silo.h src/debug/Makefile src/netcdf/Makefile src/pdb_drv/Makefile src/pdbp_drv/Makefile src/hdf5_drv/Makefile src/taurus/Makefile src/unknown/Makefile src/filters/Makefile tests/Makefile tools/Makefile tools/browser/Makefile tools/python/Makefile tools/silex/Makefile tools/silock/Makefile"
+
+if test -n "$HZIP"; then
+  ac_config_files="$ac_config_files src/hzip/Makefile"
+
+fi
+if test -n "$FPZIP"; then
+  ac_config_files="$ac_config_files src/fpzip/Makefile"
+
+fi
+if test -n "$HDF5_DRV"; then
+  ac_config_files="$ac_config_files src/libsiloh5.settings"
+
+else
+  ac_config_files="$ac_config_files src/libsilo.settings"
+
+fi
+CC_FULLPATH=""
+if test -n "$CC"; then
+    CC_FULLPATH=`which $CC`
+fi
+CXX_FULLPATH=""
+if test -n "$CXX"; then
+    CXX_FULLPATH=`which $CXX`
+fi
+FC_FULLPATH=""
+if test -n "$FC"; then
+    FC_FULLPATH=`which $FC`
+fi
+
+
+
+cat >confcache <<\_ACEOF
+# 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, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# 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.
+(
+  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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+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=`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.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NETCDF_NEEDED_TRUE}" && test -z "${NETCDF_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"NETCDF_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"NETCDF_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${PDB_DRV_NEEDED_TRUE}" && test -z "${PDB_DRV_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"PDB_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"PDB_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${PDBP_DRV_NEEDED_TRUE}" && test -z "${PDBP_DRV_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"PDBP_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"PDBP_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${TAURUS_NEEDED_TRUE}" && test -z "${TAURUS_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"TAURUS_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"TAURUS_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HDF5_DRV_NEEDED_TRUE}" && test -z "${HDF5_DRV_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HDF5_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HDF5_DRV_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BROWSER_NEEDED_TRUE}" && test -z "${BROWSER_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"BROWSER_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BROWSER_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${PYTHON_NEEDED_TRUE}" && test -z "${PYTHON_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"PYTHON_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"PYTHON_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${FORTRAN_NEEDED_TRUE}" && test -z "${FORTRAN_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"FORTRAN_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"FORTRAN_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${SILEX_NEEDED_TRUE}" && test -z "${SILEX_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"SILEX_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"SILEX_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HZIP_NEEDED_TRUE}" && test -z "${HZIP_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HZIP_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HZIP_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${FPZIP_NEEDED_TRUE}" && test -z "${FPZIP_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"FPZIP_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"FPZIP_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ZLIB_AVAILABLE_TRUE}" && test -z "${ZLIB_AVAILABLE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ZLIB_AVAILABLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ZLIB_AVAILABLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${CXX_LINK_NEEDED_TRUE}" && test -z "${CXX_LINK_NEEDED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"CXX_LINK_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CXX_LINK_NEEDED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $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}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## 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=:
+  # Zsh 3.x and 4.x performs 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
+
+
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+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.)
+as_nl='
+'
+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
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  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" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+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
+fi
+echo >conf$$.file
+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
+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=:
+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
+
+# 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 silo $as_me 4.8, which was
+generated by GNU Autoconf 2.61.  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
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet      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
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+silo config.status 4.8
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 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'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+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 )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    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.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$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
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config/config.h.in" ;;
+    "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "SiloWindows/Makefile") CONFIG_FILES="$CONFIG_FILES SiloWindows/Makefile" ;;
+    "svn_bin/Makefile") CONFIG_FILES="$CONFIG_FILES svn_bin/Makefile" ;;
+    "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;;
+    "config-site/Makefile") CONFIG_FILES="$CONFIG_FILES config-site/Makefile" ;;
+    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "src/score/Makefile") CONFIG_FILES="$CONFIG_FILES src/score/Makefile" ;;
+    "src/pdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/pdb/Makefile" ;;
+    "src/silo/Makefile") CONFIG_FILES="$CONFIG_FILES src/silo/Makefile" ;;
+    "src/silo/silo.h") CONFIG_FILES="$CONFIG_FILES src/silo/silo.h" ;;
+    "src/debug/Makefile") CONFIG_FILES="$CONFIG_FILES src/debug/Makefile" ;;
+    "src/netcdf/Makefile") CONFIG_FILES="$CONFIG_FILES src/netcdf/Makefile" ;;
+    "src/pdb_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/pdb_drv/Makefile" ;;
+    "src/pdbp_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/pdbp_drv/Makefile" ;;
+    "src/hdf5_drv/Makefile") CONFIG_FILES="$CONFIG_FILES src/hdf5_drv/Makefile" ;;
+    "src/taurus/Makefile") CONFIG_FILES="$CONFIG_FILES src/taurus/Makefile" ;;
+    "src/unknown/Makefile") CONFIG_FILES="$CONFIG_FILES src/unknown/Makefile" ;;
+    "src/filters/Makefile") CONFIG_FILES="$CONFIG_FILES src/filters/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+    "tools/browser/Makefile") CONFIG_FILES="$CONFIG_FILES tools/browser/Makefile" ;;
+    "tools/python/Makefile") CONFIG_FILES="$CONFIG_FILES tools/python/Makefile" ;;
+    "tools/silex/Makefile") CONFIG_FILES="$CONFIG_FILES tools/silex/Makefile" ;;
+    "tools/silock/Makefile") CONFIG_FILES="$CONFIG_FILES tools/silock/Makefile" ;;
+    "src/hzip/Makefile") CONFIG_FILES="$CONFIG_FILES src/hzip/Makefile" ;;
+    "src/fpzip/Makefile") CONFIG_FILES="$CONFIG_FILES src/fpzip/Makefile" ;;
+    "src/libsiloh5.settings") CONFIG_FILES="$CONFIG_FILES src/libsiloh5.settings" ;;
+    "src/libsilo.settings") CONFIG_FILES="$CONFIG_FILES src/libsilo.settings" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  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
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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 '{ (exit 1); 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")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
+MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
+MAINT!$MAINT$ac_delim
+PYTHONMODULE!$PYTHONMODULE$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+SILO_VERS_MAJ!$SILO_VERS_MAJ$ac_delim
+SILO_VERS_MIN!$SILO_VERS_MIN$ac_delim
+SILO_VERS_PAT!$SILO_VERS_PAT$ac_delim
+SILO_VERS_PRE!$SILO_VERS_PRE$ac_delim
+SILO_VERS_TAG!$SILO_VERS_TAG$ac_delim
+CONFIG_CMD!$CONFIG_CMD$ac_delim
+CONFIG_DATE!$CONFIG_DATE$ac_delim
+CONFIG_USER!$CONFIG_USER$ac_delim
+FORTRAN!$FORTRAN$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+CC!$CC$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+CFLAGS!$CFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CPP!$CPP$ac_delim
+FC!$FC$ac_delim
+FCFLAGS!$FCFLAGS$ac_delim
+ac_ct_FC!$ac_ct_FC$ac_delim
+FCLIBS!$FCLIBS$ac_delim
+SED!$SED$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+F77!$F77$ac_delim
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+SILO_DTYPPTR!$SILO_DTYPPTR$ac_delim
+SILO_DTYPPTR1!$SILO_DTYPPTR1$ac_delim
+SILO_DTYPPTR2!$SILO_DTYPPTR2$ac_delim
+NETCDF!$NETCDF$ac_delim
+PDB_DRV!$PDB_DRV$ac_delim
+TAURUS!$TAURUS$ac_delim
+HDF5_DRV!$HDF5_DRV$ac_delim
+BROWSER!$BROWSER$ac_delim
+SILEX!$SILEX$ac_delim
+HZIP!$HZIP$ac_delim
+ZLIB!$ZLIB$ac_delim
+FPZIP!$FPZIP$ac_delim
+PRTDIAG!$PRTDIAG$ac_delim
+PDBP_DRV!$PDBP_DRV$ac_delim
+READLINE_LIBS!$READLINE_LIBS$ac_delim
+QT_BIN!$QT_BIN$ac_delim
+QT_INCLUDE!$QT_INCLUDE$ac_delim
+QT_LIB!$QT_LIB$ac_delim
+QT_LDFLAGS!$QT_LDFLAGS$ac_delim
+QT_LIBS!$QT_LIBS$ac_delim
+QT_CORE!$QT_CORE$ac_delim
+QT_CORE_LIB!$QT_CORE_LIB$ac_delim
+QT_GUI!$QT_GUI$ac_delim
+QT_GUI_LIB!$QT_GUI_LIB$ac_delim
+QT_CXXFLAGS!$QT_CXXFLAGS$ac_delim
+QT_MOC!$QT_MOC$ac_delim
+PYTHON!$PYTHON$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
+PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
+PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
+PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
+pythondir!$pythondir$ac_delim
+pkgpythondir!$pkgpythondir$ac_delim
+pyexecdir!$pyexecdir$ac_delim
+pkgpyexecdir!$pkgpyexecdir$ac_delim
+PYTHON_CPPFLAGS!$PYTHON_CPPFLAGS$ac_delim
+BUNDLE_TARGET!$BUNDLE_TARGET$ac_delim
+NETCDF_NEEDED_TRUE!$NETCDF_NEEDED_TRUE$ac_delim
+NETCDF_NEEDED_FALSE!$NETCDF_NEEDED_FALSE$ac_delim
+PDB_DRV_NEEDED_TRUE!$PDB_DRV_NEEDED_TRUE$ac_delim
+PDB_DRV_NEEDED_FALSE!$PDB_DRV_NEEDED_FALSE$ac_delim
+PDBP_DRV_NEEDED_TRUE!$PDBP_DRV_NEEDED_TRUE$ac_delim
+PDBP_DRV_NEEDED_FALSE!$PDBP_DRV_NEEDED_FALSE$ac_delim
+TAURUS_NEEDED_TRUE!$TAURUS_NEEDED_TRUE$ac_delim
+TAURUS_NEEDED_FALSE!$TAURUS_NEEDED_FALSE$ac_delim
+HDF5_DRV_NEEDED_TRUE!$HDF5_DRV_NEEDED_TRUE$ac_delim
+HDF5_DRV_NEEDED_FALSE!$HDF5_DRV_NEEDED_FALSE$ac_delim
+BROWSER_NEEDED_TRUE!$BROWSER_NEEDED_TRUE$ac_delim
+BROWSER_NEEDED_FALSE!$BROWSER_NEEDED_FALSE$ac_delim
+PYTHON_NEEDED_TRUE!$PYTHON_NEEDED_TRUE$ac_delim
+PYTHON_NEEDED_FALSE!$PYTHON_NEEDED_FALSE$ac_delim
+FORTRAN_NEEDED_TRUE!$FORTRAN_NEEDED_TRUE$ac_delim
+FORTRAN_NEEDED_FALSE!$FORTRAN_NEEDED_FALSE$ac_delim
+SILEX_NEEDED_TRUE!$SILEX_NEEDED_TRUE$ac_delim
+SILEX_NEEDED_FALSE!$SILEX_NEEDED_FALSE$ac_delim
+HZIP_NEEDED_TRUE!$HZIP_NEEDED_TRUE$ac_delim
+HZIP_NEEDED_FALSE!$HZIP_NEEDED_FALSE$ac_delim
+FPZIP_NEEDED_TRUE!$FPZIP_NEEDED_TRUE$ac_delim
+FPZIP_NEEDED_FALSE!$FPZIP_NEEDED_FALSE$ac_delim
+ZLIB_AVAILABLE_TRUE!$ZLIB_AVAILABLE_TRUE$ac_delim
+ZLIB_AVAILABLE_FALSE!$ZLIB_AVAILABLE_FALSE$ac_delim
+CXX_LINK_NEEDED_TRUE!$CXX_LINK_NEEDED_TRUE$ac_delim
+CXX_LINK_NEEDED_FALSE!$CXX_LINK_NEEDED_FALSE$ac_delim
+CC_FULLPATH!$CC_FULLPATH$ac_delim
+CXX_FULLPATH!$CXX_FULLPATH$ac_delim
+FC_FULLPATH!$FC_FULLPATH$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_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
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[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 ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$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 "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    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 ||
+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"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`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 ||
+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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`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
+# 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=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  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
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;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
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+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"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+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
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then 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.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+  if test x"$ac_file" != x-; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
+    fi
+  else
+    echo "/* $configure_input  */"
+    cat "$ac_result"
+  fi
+  rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`$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 ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "tests/atconfig":C) cat >tests/atconfig <<ATEOF
+# Configurable variable values for building test suites.
+# Generated by $0.
+# Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+
+# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
+at_testdir='tests'
+abs_builddir='$ac_abs_builddir'
+at_srcdir='$ac_srcdir'
+abs_srcdir='$ac_abs_srcdir'
+at_top_srcdir='$ac_top_srcdir'
+abs_top_srcdir='$ac_abs_top_srcdir'
+at_top_build_prefix='$ac_top_build_prefix'
+abs_top_builddir='$ac_abs_top_builddir'
+
+# Backward compatibility with Autotest <= 2.59b:
+at_top_builddir=\$at_top_build_prefix
+
+AUTOTEST_PATH='tests'
+
+SHELL=\${CONFIG_SHELL-'$SHELL'}
+ATEOF
+ ;;
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`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 ||
+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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+
+  esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# 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 || { (exit 1); exit 1; }
+fi
+
+echo;echo
+if test -n "$HDF5_DRV"; then
+  cat src/libsiloh5.settings | sed 's|\\n||' | sed 's|"||g'
+else
+  cat src/libsilo.settings | sed 's|\\n||' | sed 's|"||g'
+fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..94e2a8a
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1489 @@
+dnl Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+dnl LLNL-CODE-425250.
+dnl All rights reserved.
+dnl 
+dnl This file is part of Silo. For details, see silo.llnl.gov.
+dnl 
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl 
+dnl    * Redistributions of source code must retain the above copyright
+dnl      notice, this list of conditions and the disclaimer below.
+dnl    * Redistributions in binary form must reproduce the above copyright
+dnl      notice, this list of conditions and the disclaimer (as noted
+dnl      below) in the documentation and/or other materials provided with
+dnl      the distribution.
+dnl    * Neither the name of the LLNS/LLNL nor the names of its
+dnl      contributors may be used to endorse or promote products derived
+dnl      from this software without specific prior written permission.
+dnl 
+dnl THIS SOFTWARE  IS PROVIDED BY  THE COPYRIGHT HOLDERS  AND CONTRIBUTORS
+dnl "AS  IS" AND  ANY EXPRESS  OR IMPLIED  WARRANTIES, INCLUDING,  BUT NOT
+dnl LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A  PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN  NO  EVENT SHALL  LAWRENCE
+dnl LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY OR
+dnl CONTRIBUTORS BE LIABLE FOR  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+dnl EXEMPLARY, OR  CONSEQUENTIAL DAMAGES  (INCLUDING, BUT NOT  LIMITED TO,
+dnl PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS  OF USE,  DATA, OR
+dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+dnl LIABILITY, WHETHER  IN CONTRACT, STRICT LIABILITY,  OR TORT (INCLUDING
+dnl NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT  OF THE USE  OF THIS
+dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl 
+dnl This work was produced at Lawrence Livermore National Laboratory under
+dnl Contract No.  DE-AC52-07NA27344 with the DOE.
+dnl 
+dnl Neither the  United States Government nor  Lawrence Livermore National
+dnl Security, LLC nor any of  their employees, makes any warranty, express
+dnl or  implied,  or  assumes  any  liability or  responsibility  for  the
+dnl accuracy, completeness,  or usefulness of  any information, apparatus,
+dnl product, or  process disclosed, or  represents that its use  would not
+dnl infringe privately-owned rights.
+dnl 
+dnl Any reference herein to  any specific commercial products, process, or
+dnl services by trade name,  trademark, manufacturer or otherwise does not
+dnl necessarily  constitute or imply  its endorsement,  recommendation, or
+dnl favoring  by  the  United  States  Government  or  Lawrence  Livermore
+dnl National Security,  LLC. The views  and opinions of  authors expressed
+dnl herein do not necessarily state  or reflect those of the United States
+dnl Government or Lawrence Livermore National Security, LLC, and shall not
+dnl
+dnl This is the autoconf configuration file for MeshTV and company.
+dnl Robb Matzke <matzke at llnl.gov>
+dnl Mar 18, 1996
+dnl
+dnl Modifications:
+dnl
+dnl     Robb Matzke, 5 Mar 1997
+dnl     Replaced `touch X' with `echo something > X' because touch doesn't
+dnl     update the mtime when touching an empty file on some old BSD systems
+dnl     (and neither do other commands that open an empty file for read/write
+dnl     access).
+dnl
+dnl     Robb Matzke, 6 Mar 1997
+dnl     Added checks for `-lXpm' and `-lXext' needed by meshtv and meshtvx.
+dnl
+dnl     Robb Matzke, 19 Mar 1997
+dnl     Added a check for a site configuration file based on the host
+dnl     name.  If `hostname` returns X, then the configuration file
+dnl     ./cofig-site/X.conf is sourced.  The file contains envronment
+dnl     variable settings which would have normally appeared on the
+dnl     command line so that when make reruns configure the appropriate
+dnl     variables are set.  For instance, when I work on maya.nuance.mdn.com
+dnl     I use the GNU gcc compiler and I want to turn on warnings and generate
+dnl     debug tables.  This is done by adding the line
+dnl
+dnl           export CFLAGS="-Wall -g"
+dnl
+dnl     to the ./config-site/maya.nuance.mdn.com.conf file.  These personal
+dnl     site configuration files should not be part of a distribution.
+dnl
+dnl     Robb Matzke, 20 Mar 1997
+dnl     The builtin `pwd' command fails on some systems, so we use
+dnl     `/bin/pwd' instead if available.
+dnl
+dnl     Robb Matzke, 20 Mar 1997
+dnl     Added the `-f /dev/null' option to the GNU make test in case
+dnl     a valid makefile accidently exists.
+dnl
+dnl     Robb Matzke, 2 Apr 1997
+dnl     Removed the AC_FUNC_MMAP check since nothing uses it.
+dnl
+dnl     Robb Matzke, 15 May 1997
+dnl     Removed OS_TYPE as a config.h constant since it was never added to
+dnl     acconfig.h anyway.
+dnl
+dnl     Quincey Koziol, 15 May 1997
+dnl     Added link checking for FreeBSD.
+dnl
+dnl     Sean Ahern, 18 June 1997
+dnl     Added the ability to have a config-site configuration file that is
+dnl     named the same as the operating system.  Configure now checks
+dnl     automatically for this (using uname(1)).  For example, I added
+dnl     config-site/OSF1.conf for DEC machines.  Any configuration needed for
+dnl     that operating system should go in that file.
+dnl
+dnl     Robb Matzke, 19 Jun 1997
+dnl     Changed the default from `test -L' to `test -h'.
+dnl
+dnl	Robb Matzke, 27 Aug 1997
+dnl	Added -I/usr/local/include and -L/usr/local/lib to the compile
+dnl	command so we have a better chance of finding the readline
+dnl	library.
+dnl
+dnl     Robb Matzke, 23 Dec 1997
+dnl	Added ability to turn off checking for the GNU readline since lots
+dnl     of systems have the software but it's misconfigured, causing
+dnl     configure to detect it's presence and causing make to fail.  Say
+dnl     `--without-readline' to turn detection off.
+dnl
+dnl	Robb Matzke, 4 Feb 1998
+dnl	Combined GNU target file with non-GNU target file and put the results
+dnl	in include/make-targets.in with the other targets.
+dnl
+dnl     Eric Brugger, Wed Aug 12 15:50:27 PDT 1998
+dnl     I made the libraries load static on Linux since most people do not
+dnl     have Motif.  Added a check for the Motif includes and libraries
+dnl     being found without an explicit include or lib path and added one
+dnl     one if it didn't work.  I changed the CPPFLAGS and LDFLAGS to
+dnl     append /usr/local/include and /usr/local/lib instead of setting it
+dnl     if they weren't already set.  I modified LDFLAGS to contain $tmplib
+dnl     at the beginning so that libraries will be found in the local lib
+dnl     directory before the public lib directories.
+dnl
+dnl     Eric Brugger, Thu Aug 13 13:18:43 PDT 1998
+dnl     I corrected a bug with the checking of the knowledge of the Motif
+dnl     libraries where the test always returned false.
+dnl
+dnl     Eric Brugger, Fri Aug 28 16:43:46 PDT 1998
+dnl     I added support for parallel meshtv.
+dnl
+dnl     Sean Ahern, Wed Dec  2 11:29:54 PST 1998
+dnl     Added a check for "clearmake".  If we're running clearmake,
+dnl     set the verbosity to 0.  Also, create a line for the
+dnl     compile target in the Makefiles so that clearmake only
+dnl     winks in object files that have been created on the same OS
+dnl     type.
+dnl
+dnl     Eric Brugger, Mon Dec 28 09:51:18 PST 1998
+dnl     I removed checks for basename and dirname.  The behavior of both
+dnl     is poorly defined and varies between OSes.  We could check for a
+dnl     specific behavior and then use the system one in that case that
+dnl     is a lot of work when using our own is much simpler.
+dnl
+dnl	Robb Matzke, Tue Feb  9 10:38:54 EST 1999
+dnl	Check for location of hdf5 headers and libraries.
+dnl
+dnl	Robb Matzke, Tue Mar  2 16:35:48 EST 1999
+dnl	Check for location of vbt, dsl, and dmf headers and libraries.
+dnl
+dnl     Eric Brugger, Mon Mar 15 11:39:40 PST 1999
+dnl     Made the silo netcdf, pdb and taurus drivers optional.
+dnl
+dnl	Mark Miller, Thu Mar 25 17:11:34 PST 1999
+dnl     Made dmf and hdf5 drivers optional as Eric did above
+dnl
+dnl     Jeremy Meredith, Thu May 20 15:56:45 PDT 1999
+dnl     Added a check for a site config with the first field of hostname
+dnl     removed.  This allows a single site config for node-addressable
+dnl     machines such as the IBM SP2.  Also reordered the hostname and
+dnl     OSname config checks so that a single machine can override the
+dnl     OS-based default configuration.
+dnl
+dnl     Brad Whitlock, Wed Jun 23 15:30:34 PST 1999
+dnl     Added a check for the VDL libraries. If the environment variable
+dnl     "VDL" is set, then the CFLAGS of meshtvx and Spi are modified
+dnl     to include -DVDL and -I$(VDL)/include and -L$(VDL)/lib.
+dnl
+dnl     Jeremy Meredith, Tue Jul 27 18:27:37 PDT 1999
+dnl     Added code to clear MPI_LIBS if we did not --enable-parallel.
+dnl
+dnl     Eric Brugger, Wed Aug 11 13:11:45 PDT 1999
+dnl     I removed the check for -lXpm.  I modified the script to only
+dnl     check for -lXext on Linux.  I modified the script to only check
+dnl     for -lnsl and -lsocket on Solaris.
+dnl
+dnl     Brad Whitlock, Wed Jul 7 15:29:45 PST 1999
+dnl     Added a check for parallel when the VDL libraries are being 
+dnl     checked. If parallel is enabled at that time, then the VDLP
+dnl     driver will be compiled.
+dnl
+dnl     Eric Brugger, Fri Oct  8 14:12:27 PDT 1999
+dnl     I added a check for -lXp on Linux.
+dnl
+dnl     Brad Whitlock, Fri Nov 5 14:53:17 PST 1999
+dnl     Removed the GL driver from SpiLib.
+dnl
+dnl     Jeremy Meredith, Thu Nov 11 13:35:02 PST 1999
+dnl     Added ability to have dynamic libraries on Linux systems.
+dnl
+dnl     Brad Whitlock, Thu Oct 14 10:23:34 PDT 1999
+dnl     Added build target for the spectrum widget.
+dnl
+dnl     Jeremy Meredith and Sean Ahern, Mon Dec 13 14:24:28 PST 1999
+dnl     Allow override of MPI_LIBS by external configuration.
+dnl
+dnl     Jeremy Meredith, Fri Jan  7 10:19:39 PST 2000
+dnl     Check for existence of Mesa.  If it's not there: error if we need it,
+dnl     don't try to build it if we don't need it.
+dnl
+dnl     Brad Whitlock, Thu Feb 17 15:17:41 PST 2000
+dnl     I added -lpt to the meshtvx link line when using VDL. This makes
+dnl     meshtv work with the new VDL library.
+dnl
+dnl     Sean Ahern, Mon Jan 10 16:26:31 PST 2000
+dnl     I put in logic to read the version number in from a file.
+dnl
+dnl     Brad Whitlock, Thu Feb 10 16:47:50 PST 2000
+dnl     Added --disable-sdx flag. Also added a variable called
+dnl     tflops_override which will be set to yes on TFLOPS systems.
+dnl     (ASCI Red) This bypasses some function tests. Added --disable_gui
+dnl     flag. This disables all X and motif stuff from meshtvx and Spi.
+dnl     Added --disable-browser so it does not have to be compiled.
+dnl
+dnl     Brad Whitlock, Fri Mar 31 16:41:33 PST 2000
+dnl     Fixed a bug that caused a parallel compiler to be used all the time
+dnl     on some platforms.
+dnl
+dnl     Eric Brugger, Mon May 15 12:02:59 PDT 2000
+dnl     I changed references of -lpt to -lptutil to account for the name
+dnl     change of the library.
+dnl
+dnl     Mark Miller, Wed Aug 23 15:38:27 PDT 2000 
+dnl     I changed the logic for lib hdf5 to deal correctly with presence or
+dnl     absence of zlib. 
+dnl
+dnl     Eric Brugger, Fri Apr  6 17:52:30 PDT 2001
+dnl     I added -lXext to the meshtvx link line when using VDL. This makes
+dnl     meshtv work with the new VDL library.
+dnl
+dnl     Brad Whitlock, Tue Jan 22 16:42:30 PST 2002
+dnl     I added options for building JPEG support.
+dnl
+dnl     Eric Brugger, Tue Mar 12 10:44:02 PST 2002
+dnl     I made the tests for jpeg and glr support more robust.  I also added
+dnl     a check which adds the dynamic link library (-ldl) on Linux.
+dnl
+dnl     Jeremy Meredith, Wed Apr 24 11:17:24 PDT 2002
+dnl     I changed the SunOS linker flags for the jpeg library.
+dnl
+dnl     Mark Miller, Tue Oct  1 12:27:07 PDT 2002
+dnl     I removed the old dmf-driver checks 
+dnl	I fixed the check for hdf5 libs to only change $LIB if HDF5 was
+dnl	requested AND found.
+dnl	I removed the checks for GLR
+dnl
+dnl     Eric Brugger, Fri Nov  8 15:15:26 PST 2002
+dnl     I removed the logic that statically loaded the libraries on Linux
+dnl     systems.
+dnl
+dnl     Eric Brugger, Thu Dec  5 13:27:13 PST 2002 
+dnl     I reordered some of the tests to avoid a problem with hdf5 and the
+dnl     size tests.
+dnl
+dnl     Eric Brugger, Thu Sep  4 13:05:39 PDT 2003
+dnl     I corrected a bug with --without-exodus not disabling the exodus
+dnl     driver.
+dnl
+dnl     Eric Brugger, Tue Mar  2 12:41:32 PST 2004
+dnl     I modified the hdf5 library logic to statically link the hdf5
+dnl     library to avoid LD_LIBRARY_PATH problems and having to distribute
+dnl     the shared hdf5 library with binary distributions.
+dnl
+dnl     Jeremy Meredith, Tue Jul 12 16:34:00 PDT 2005
+dnl     Added a Python wrapper for Silo.  This required adding
+dnl     checks for the Python include files, adding support
+dnl     for shared libraries, and adding support for C++ builds.
+dnl 
+dnl     Eric Brugger, Thu Mar  9 08:49:31 PST 2006
+dnl     I added AC_PROG_EGREP to avoid some problems handling uid and gid
+dnl     on some platforms.
+dnl
+dnl     Thomas Treadway, Mon May 22 11:30:52 PDT 2006
+dnl     Initial configuration file for Silo, after MeshTV split.
+dnl     Based on Mark Miller's "meshtv_mark_silo_451_enhancments" view.
+dnl     Reformated to support recent versions autoconf, and automake.
+dnl
+dnl     Thomas Treadway, Mon Jun  1 13:11:00 PDT 2006
+dnl     Bugs go to visit-help at llnl.gov
+dnl
+dnl     Thomas Treadway, Mon Jun 12 10:24:53 PDT 2006
+dnl     Conversion to libtool seems to be working pretty well.
+dnl     Currently using autoreconfig via config/bootstrap to use
+dnl     autoheaders, libtoolize, aclocal, automake, autoconf, and
+dnl     autotest.
+dnl
+dnl     Thomas Treadway, Mon Jun 26 13:06:39 PDT 2006
+dnl     The building of tools/python is conditional and performed only on
+dnl     explicit request.
+dnl
+dnl     Thomas Treadway, Wed Sep 13 12:45:01 PDT 2006
+dnl     Changed defaults: fortran compiler, optimization, and largefiles.
+dnl
+dnl     Thomas Treadway, Fri Oct  6 13:50:01 PDT 2006
+dnl     re-enabled config-site files, added version information file
+dnl     src/libsilo.settings or src/libsiloh5.settings, changed version
+dnl     back to 4.6 (expect 5.0 after re-factoring of the driver code into
+dnl     an abstract I/O layer.
+dnl
+dnl     Mark C. Miller, Wed Oct 18 17:36:59 PDT 2006
+dnl     Added AC_DEFINE_UNQUOTED calls to create compile-time symbols for
+dnl     Silo's version information. Added code at end to put this into
+dnl     a separate 'config_vers.h' file
+dnl
+dnl     Thomas R. Treadway, Thu Mar 15 12:19:56 PDT 2007
+dnl     Added hooks for building Macintosh application bundle
+dnl     Added szlib support
+dnl
+dnl     Thomas R. Treadway, Mon Jul 23 10:32:06 PDT 2007
+dnl     Added support for Peter Lindstrom's compression algorthims.
+dnl
+dnl     Thomas R. Treadway, Tue Oct 23 11:47:22 PDT 2007
+dnl     Corrected HDF5 checking when szip present.
+dnl     New pre-release.
+dnl
+dnl     Thomas R. Treadway, Thu Oct 25 16:32:40 PDT 2007
+dnl     Using environment variable to over SZLIB, HDF5, SILEX, QT, 
+dnl     Fortran, and readline.
+dnl
+dnl     Thomas R. Treadway, Thu Oct 25 16:32:40 PDT 2007
+dnl     Changed release, and auspices statement
+dnl
+dnl     Thomas R. Treadway, Wed Nov 28 14:17:56 PST 2007
+dnl     Changed release to 4.6.1
+dnl     Added check for sys/stat.h
+dnl     Removed src/swat directory
+dnl
+dnl     Mark C. Miller, Wed Jul  2 09:08:13 PDT 2008
+dnl     Isolated version information to VERSION file, though configure
+dnl     still needs to get re-generated with each new version.
+dnl     Removed slew of extraneous refs to 'UsingXXX' variables.
+dnl
+dnl     Mark C. Miller, Mon Mar 30 13:29:57 PDT 2009
+dnl     Fixed uname="`uname`" to UNAME="`uname`" so Darwin check would work.
+dnl
+dnl     Mark C. Miller, Wed Sep  2 15:21:52 PDT 2009
+dnl     Making it work with '--with-hdf5' where HDF5 locations are specified
+dnl     in the config-site file. Fixed problem where READLINE_LIBS was
+dnl     getting populated with ALL libs not just those necessary to support
+dnl     readline. Fixed problem where browser would REQUIRE readline. Still
+dnl     can't handle case where user wants to specify different readline
+dnl     include/lib dirs.
+dnl
+dnl     Mark C. Miller, Sat Dec  5 15:20:30 PST 2009
+dnl     Added logic to inspect size of long and long long datatypes and, if
+dnl     they are different sizes, ensuring Silo's DB_LONG_LONG enum value
+dnl     is unique. Otherwise, ensuring it is the same as DB_LONG enum value.
+dnl
+dnl     Mark C. Miller, Wed Jul 21 09:31:24 PDT 2010
+dnl     Adjusted logic to support BSD releases which will NOT include
+dnl     hzip/fpzip compression features or source dirs.
+dnl --------------------------------------------------------------------------
+
+dnl
+dnl The esyscmd macro invokation allows us to keep version number in
+dnl VERSION file and just re-generate configure instead of having to
+dnl also checkout and edit configure.ac
+dnl
+m4_define(SILO_VERSION, m4_esyscmd([cat VERSION | tr -d '\n']))
+m4_define(SILO_NAME, silo)
+m4_define(SILO_BUGS,visit-users at email.ornl.gov)
+m4_define(SILO_TOP_SRC_DIR, `pwd`)
+
+AC_PREREQ(2.60)
+AC_REVISION($Id$)dnl
+AC_INIT(SILO_NAME, SILO_VERSION, SILO_BUGS, SILO_NAME)
+AC_CONFIG_SRCDIR([src/silo/silo.h.in])
+AC_CONFIG_AUX_DIR(config)
+dnl AM_INIT_AUTOMAKE takes a list of options that should be applied to
+dnl every Makefile.am when automake is run.
+AM_INIT_AUTOMAKE([1.9 foreign no-installinfo no-installman no-texinfo.tex])
+
+AC_CONFIG_HEADER([config.h:config/config.h.in])
+dnl AM_MAINTAINER_MODE turns off "rebuild rules" that contain dependencies
+dnl for Makefiles, configure, src/H5config.h, etc.  If AM_MAINTAINER_MODE
+dnl is *not* included here, these files will be rebuilt if out of date.
+dnl This is a problem because if users try to build on a machine with
+dnl the wrong versions of autoconf and automake, these files will be
+dnl rebuilt with the wrong versions and bad things can happen.
+dnl Also, Clearcase doesn't preserve dependencies between timestamps
+dnl when doing (group) checkin's, so extra care is needed to manually
+dnl verify timestamps (see, FAQ) so that Makefiles doesn't think rebuilding 
+dnl needs to occur when it doesn't.
+dnl Developers should './configure --enable-maintainer-mode' to turn on
+dnl rebuild rules.
+AM_MAINTAINER_MODE
+AC_COPYRIGHT([This work was performed under the auspices of the 
+U.S. Department of Energy by Lawrence Livermore National Laboratory 
+in part under Contract W-7405-Eng-48 and in part under 
+Contract DE-AC52-07NA27344.])
+# using autotest
+AC_CONFIG_TESTDIR(tests)
+
+dnl Change the default prefix (/usr/local) to `pwd`
+dnl Set prefix default (install directory) to a directory in the build area.
+dnl This allows multiple src-dir builds within one host.
+AC_PREFIX_DEFAULT("SILO_TOP_SRC_DIR")
+
+dnl
+dnl Handle the python module right away to determine if we need shared libs.
+dnl Ordinarily, we default to static libs
+dnl
+PYTHONMODULE=$DEFAULT_PYTHONMODULE
+AC_ARG_ENABLE(pythonmodule,
+    AS_HELP_STRING([--enable-pythonmodule],[build python module @<:@default=no@:>@]),
+    if test "$enable_pythonmodule" = "yes"; then
+        PYTHONMODULE="python"
+    fi)
+AC_SUBST(PYTHONMODULE)
+if test -n "$PYTHONMODULE"; then
+    AC_ENABLE_SHARED
+else
+    AC_DISABLE_SHARED
+fi
+
+dnl Determine the host type
+AC_CANONICAL_HOST
+
+# Grab the version number
+AC_MSG_CHECKING(what version the package is)
+AC_MSG_RESULT(SILO_VERSION)
+AC_SUBST([SILO_VERS_MAJ]) SILO_VERS_MAJ="`echo SILO_VERSION | cut -d'.' -f1`"
+AC_SUBST([SILO_VERS_MIN]) SILO_VERS_MIN="`echo SILO_VERSION | cut -d'.' -f2 | cut -d'-' -f1`"
+AC_SUBST([SILO_VERS_PAT]) SILO_VERS_PAT="`echo SILO_VERSION | cut -d'.' -f3 | cut -d'-' -f1`"
+AC_SUBST([SILO_VERS_PRE]) SILO_VERS_PRE="`echo SILO_VERSION | grep pre | cut -d'-' -f2 | cut -d'e' -f2`"
+AC_SUBST([SILO_VERS_TAG]) SILO_VERS_TAG="`echo Silo_version SILO_VERSION | sed -e 's/ /_/' -e 's/\./_/g' -e 's/-/_/g'`"
+
+dnl Configuration command invocation
+AC_SUBST([CONFIG_CMD]) CONFIG_CMD="`echo $0 $ac_configure_args`"
+
+dnl Configuration date
+AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`"
+
+dnl User doing the configuration
+AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`"
+if test -n "$ORGANIZATION"; then
+  CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
+fi
+
+
+dnl ----------------------------------------------------------------------
+
+dnl
+dnl Specify default settings for various options. These may be overridden
+dnl in site-specific config files. Empty string means feature is disabled
+dnl while non-empty string means it is enabled.
+dnl
+DEFAULT_PYTHONMODULE=""
+DEFAULT_BROWSER="browser"
+DEFAULT_SILEX="silex"
+DEFAULT_HZIP="hzip"
+DEFAULT_FPZIP="fpzip"
+DEFAULT_FORTRAN="fortran"
+default_detect_readline="yes"
+
+dnl Source any special site-specific file
+hname="`hostname`"
+file=$srcdir/config-site/$hname.conf
+AC_MSG_CHECKING([for site config host file])
+if test -f "$file"; then
+    . $file
+    AC_MSG_RESULT(found [$file])
+else
+    hname="`hostname | cut -f1 -d.`"
+    file=$srcdir/config-site/$hname.conf
+    if test -f "$file"; then
+        . $file
+        AC_MSG_RESULT(found [$file])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+dnl Source any special files that we need.  These files normally aren't
+dnl present but can be used by the maintainers to fine tune things like
+dnl turning on debug or profiling flags for the compiler.  The search order
+dnl is:
+dnl
+dnl     CPU-VENDOR-OS
+dnl     VENDOR-OS
+dnl     CPU-OS
+dnl     CPU-VENDOR
+dnl     OS
+dnl     VENDOR
+dnl     CPU
+dnl     uname
+dnl
+dnl If the `OS' ends with a version number then remove it. For instance,
+dnl `freebsd3.1' would become `freebsd'
+case $host_os in
+  aix4.*)
+    host_os_novers=aix4.x
+    ;;
+  aix5.*)
+    host_os_novers=aix5.x
+    ;;
+  freebsd*)
+    host_os_novers=freebsd
+    ;;
+  irix5.*)
+    host_os_novers=irix5.x
+    ;;
+  irix6.*)
+    host_os_novers=irix6.x
+    ;;
+  osf4.*)
+    host_os_novers=osf4.x
+    ;;
+  osf5.*)
+    host_os_novers=osf5.x
+    ;;
+  solaris2.*)
+    host_os_novers=solaris2.x
+    ;;
+  *)
+    host_os_novers=$host_os
+    ;;
+esac
+
+UNAME="`uname`"
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os \
+         $host_vendor-$host_os_novers \
+         $host_cpu-$host_os \
+         $host_cpu-$host_os_novers \
+         $host_cpu-$host_vendor \
+         $host_os \
+         $host_os_novers \
+         $host_vendor \
+         $host_cpu \
+         $UNAME; do
+  AC_MSG_CHECKING([for config-site $f])
+  if test -f "$srcdir/config-site/$f.conf"; then
+    host_config=$srcdir/config-site/$f.conf
+    AC_MSG_RESULT([found])
+    break
+  fi
+  AC_MSG_RESULT([no])
+done
+if test "X$host_config" != "Xnone"; then
+  . $host_config
+fi
+
+#
+# MCM -- 22Jul08. I don't know why we're mixing FC and F77 stuf here.
+# According to autoconf web pages, we should probably use one or the
+# other but not both. Also, given that silo_f.h uses FC_FUNC macro,
+# I don't see how we can get by using F77. So, it is removed and we're
+# using only FC.
+#
+
+dnl handle fortran compiler.
+FORTRAN=$DEFAULT_FORTRAN
+AC_ARG_ENABLE(fortran,
+    AC_HELP_STRING([--enable-fortran],
+        [compile Fortran interface to Silo @<:@default=yes@:>@]),
+    if test "$enable_fortran" = "no" ; then
+        FORTRAN=""
+    fi)
+AC_SUBST(FORTRAN)
+
+# Check for programs.
+# We shouldn't depend on too many!
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+if test -n "$FORTRAN"; then
+    AC_PROG_FC
+    AC_FC_LIBRARY_LDFLAGS
+    AC_FC_WRAPPERS
+fi
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+AC_ISC_POSIX
+# save the cache so far
+AC_CACHE_SAVE
+
+dnl C optimization flags
+AC_ARG_ENABLE(optimization,
+    AC_HELP_STRING([--enable-optimization], 
+        [compile with optimization @<:@default=no@:>@]),
+    [case "${enableval}" in
+        yes) USING_DEBUG="no";;
+        no)  USING_DEBUG="yes";;
+        *) AC_MSG_ERROR(bad value ${enableval} for --enable-optimization) ;;
+    esac],
+    [USING_DEBUG="yes"])
+
+dnl Conform to legacy API where datatype'd pointers are used
+SILO_DTYPPTR="void"
+SILO_DTYPPTR1="void*"
+SILO_DTYPPTR2="void*"
+AC_ARG_ENABLE(legacy-datatyped-pointers,
+    AC_HELP_STRING([--enable-legacy-datatyped-pointers], 
+        [compile using legacy (float) pointers for datatype'd pointers @<:@default=no@:>@]),
+    if test $enableval = yes; then
+        SILO_DTYPPTR="float"
+        SILO_DTYPPTR1="float*"
+        SILO_DTYPPTR2="float**"
+    fi)
+AC_SUBST(SILO_DTYPPTR)
+AC_SUBST(SILO_DTYPPTR1)
+AC_SUBST(SILO_DTYPPTR2)
+
+dnl we don't need to check for netcdf driver. It is always there.
+NETCDF="netcdf"
+AC_DEFINE(HAVE_NETCDF_DRIVER,1,[Support for NetCDF])
+AC_SUBST(NETCDF)
+
+dnl we don't need to check for pdb driver. It is always there. 
+PDB_DRV="pdb_drv"
+AC_DEFINE(HAVE_PDB_DRIVER,1,[Support for PDB])
+AC_SUBST(PDB_DRV)
+
+dnl we don't need to check for taurus driver. It is always there.
+TAURUS="taurus"
+AC_DEFINE(HAVE_TAURUS_DRIVER,1,[Support for Taurus])
+AC_SUBST(TAURUS)
+
+dnl we don't need to check for hdf5 driver. It is always there.
+HDF5_DRV="hdf5_drv"
+AC_SUBST(HDF5_DRV)
+
+# Some sites have the GNU readline header files and libraries installed
+# incorrectly which causes programs that use them to not link or possibly
+# not run.  This configure doesn't check for misconfigured systems, but
+# it does allow the user to prevent the GNU readline files from being
+# detected.
+AC_ARG_WITH(readline,
+    AC_HELP_STRING([--with-readline],
+        [enable detection of GNU readline @<:@default=yes@:>@]),
+    detect_readline=$withval,
+    detect_readline=$default_detect_readline)
+
+dnl
+dnl handle browser.
+dnl
+BROWSER=$DEFAULT_BROWSER
+AC_ARG_ENABLE(browser,
+    AC_HELP_STRING([--enable-browser],
+        [build browser @<:@default=yes@:>@]),
+    if test "$enable_browser" = "no"; then
+        BROWSER=""
+    fi)
+AC_SUBST(BROWSER)
+
+dnl handle silex
+SILEX=$DEFAULT_SILEX
+AC_ARG_ENABLE(silex,
+    AC_HELP_STRING([--enable-silex], 
+        [build the silex browser @<:@default=no@:>@]),
+    if test "$enable_silex" = "no"; then
+        SILEX=""
+    fi)
+AC_SUBST(SILEX)
+
+dnl Handle explicit request for libz
+AC_ARG_WITH(zlib, [  --with-zlib=INC,DIR     Use the GNU zlib compression @<:@default=yes@:>@])
+if test "$with_zlib" = no; then
+    AC_DEFINE(HAVE_ZLIB_H,0)
+    AC_DEFINE(HAVE_LIBZ,0)
+    ZLIB=""
+elif test -n "$with_zlib" && test "$with_zlib" != yes; then
+    ZLIB_INCDIR="`echo $with_zlib |cut -f1 -d,`"
+    if test ! -f $ZLIB_INCDIR/zlib.h; then
+        AC_MSG_ERROR(problem with directory specified for zlib includes)
+    fi
+    ZLIB_LIBDIR="`echo $with_zlib | cut -f2 -d, -s`"
+    if test ! -f $ZLIB_LIBDIR/libz.a && test ! -f $ZLIB_LIBDIR/libz.so; then
+        AC_MSG_ERROR(problem with directory specified for zlib libs)
+    fi
+    CPPFLAGS="$CPPFLAGS -I$ZLIB_INCDIR"
+    LDFLAGS="$LDFLAGS -L$ZLIB_LIBDIR"
+    LIBS="$LIBS -lz"
+    AC_DEFINE(HAVE_ZLIB_H,1)
+    AC_DEFINE(HAVE_LIBZ,1)
+    ZLIB="zlib"
+fi
+
+dnl handle Peter Lindstrom's hzip compression stuff 
+AC_MSG_CHECKING(for hzip)
+if test -d $srcdir/src/hzip; then
+    AC_MSG_RESULT(found)
+    HZIP=$DEFAULT_HZIP
+else
+    AC_MSG_RESULT(hzip compression not available in BSD version)
+    HZIP=""
+fi
+AC_ARG_ENABLE(hzip,
+    AC_HELP_STRING([--enable-hzip], 
+        [enable Lindstrom hex/quad mesh compression @<:@default=yes@:>@]),
+    if test "$enable_hzip" = "no"; then
+        HZIP=""
+    fi)
+AC_SUBST(HZIP)
+
+dnl hzip does better with zlib if available. It may have been
+dnl explicitly turned off, above. If not, Assume we have both
+dnl header & lib. Turn it off if not.
+if test -n "$HZIP" && test "$with_zlib" != no; then
+    AC_DEFINE(HAVE_HZIP,1,[Support for Lindstrom hex/quad mesh compression])
+    ZLIB="zlib"
+    AC_CHECK_HEADERS(zlib.h,have_zlib_h="yes")
+    if test -n "$have_zlib_h"; then
+        AC_CHECK_LIB(z, inflateEnd)
+        if test -z "`echo $LIBS | tr ' ' '\n' | grep -x -e '-lz'`"; then
+            AC_DEFINE(HAVE_ZLIB_H,0)
+            AC_DEFINE(HAVE_LIBZ,0)
+            ZLIB=""
+        fi
+    fi
+    AC_SUBST(ZLIB)
+fi
+
+dnl enable Peter Lindstrom's fpzip compression stuff 
+AC_MSG_CHECKING(for fpzip)
+if test -d $srcdir/src/fpzip; then
+    AC_MSG_RESULT(found)
+    FPZIP=$DEFAULT_FPZIP
+else
+    AC_MSG_RESULT(fpzip compression not available in BSD version)
+    FPZIP=""
+fi
+AC_ARG_ENABLE(fpzip,
+    AC_HELP_STRING([--enable-fpzip], 
+        [enable Lindstrom float 1,2,3D array compression @<:@default=yes@:>@]),
+    if test "$enable_fpzip" = "no"; then
+        FPZIP=""
+    fi)
+AC_SUBST(FPZIP)
+if test -n "$FPZIP"; then
+    AC_DEFINE(HAVE_FPZIP,1,[Support for Lindstrom float array compression])
+fi
+
+# Turn on C optimization flags
+AC_MSG_CHECKING(compiler optimization)
+if test "X$USING_DEBUG" = Xno; then
+# use contributed GNU m4 macro library provided see:
+#   autoconf-archive-2006-06-04/htmldoc/ax_cc_maxopt.html
+   AX_CC_MAXOPT
+   AC_MSG_RESULT(enabled)
+else
+   AC_MSG_RESULT(disabled)
+fi
+
+dnl
+#
+# MCM: I have no idea what good the following line does. I think
+# all compilers accept the -D argument and any string following
+# it is an argument to the -D argument. So, I think this is
+# just totally bogus!
+# Default to large file support
+AX_CHECK_COMPILER_FLAGS("-D_LARGEFILE_SOURCE",CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE";)
+AX_CHECK_COMPILER_FLAGS("-D_LARGEFILE64_SOURCE",CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE";)
+AX_CHECK_COMPILER_FLAGS("-D_FILE_OFFSET_BITS=64",CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64";)
+AX_CHECK_COMPILER_FLAGS("-Wdeclaration-after-statement",CFLAGS="$CFLAGS -Wdeclaration-after-statement";)
+
+#
+# Note: regardless of what the stuff above regarding large file support
+# appears to do, the following test is the one that affects Silo's
+# knowledge and support for large files. It may be that the result of
+# the sizeof check is dependent on whether -D_LARGEFILE64_SOURCE is
+# defined on the command line to the compiler though.
+# Use size of off64_t to determine which form of stat() calls to make 
+#
+AC_CHECK_SIZEOF(off64_t)
+
+dnl We always use the install-sh script, so don't uncomment the following line.
+AC_PROG_INSTALL
+
+dnl
+dnl Checks for header files.
+dnl
+dnl If we don't have these header files, we can't continue.
+dnl
+AC_CHECK_HEADERS([sys/time.h stdarg.h sys/stat.h], [],
+AC_MSG_ERROR([$0 wasn't able to find a necessary header file
+(see above).  Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened.]))
+
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([sys/fcntl.h])
+if test ! "$ac_cv_header_fcntl_h"="yes" && test ! "$ac_cv_header_sys_fcntl_h"="yes" ; then
+AC_MSG_ERROR([$0 wasn't able to find a necessary fcntl.h or
+sys/fcntl.h header file.
+Please rectify this and rerun configure.
+See the file INSTALL_FAQ in this directory for possible reasons
+this might have happened.])
+fi
+
+dnl
+dnl Check for header files that we can do without.
+dnl Only needed by browser
+AC_CHECK_HEADERS([fnmatch.h])
+dnl Only needed by silock
+AC_CHECK_HEADERS([ieeefp.h])
+dnl a few systems define O_RDONLY here
+AC_CHECK_HEADERS([sys/types.h unistd.h])
+dnl
+AC_HEADER_STDC
+
+dnl
+dnl Check for various functions in the STDIO header files.
+dnl
+dnl Note that we are calling two "changequote" macros.  This is because the
+dnl default quoting mechanism is to use `[' and `]'.  Since we have to use
+dnl these in the "tr" call, we need to change them to something else
+dnl temporarily.
+dnl
+dnl The following `if false' statement is *only* so autoheader can pick up
+dnl the names of the constants and insert them into the config.h.in file. If
+dnl the AC_DEFINE statements are removed then autoheader never sees the
+dnl constants.
+if false; then
+    AC_DEFINE(HAVE_FCLOSE_POINTER,1,[System provides fclose prototypes])
+    AC_DEFINE(HAVE_FFLUSH_POINTER,1,[System provides fflush prototypes])
+    AC_DEFINE(HAVE_FOPEN_POINTER,1,[System provides fopen prototypes])
+    AC_DEFINE(HAVE_FPRINTF_POINTER,1,[System provides fprintf prototypes])
+    AC_DEFINE(HAVE_FREAD_POINTER,1,[System provides fread prototypes])
+    AC_DEFINE(HAVE_FSEEK_POINTER,1,[System provides fseek prototypes])
+    AC_DEFINE(HAVE_SETVBUF_POINTER,1,[System provides setvbuf prototypes])
+    AC_DEFINE(HAVE_FTELL_POINTER,1,[System provides ftell prototypes])
+    AC_DEFINE(HAVE_FWRITE_POINTER,1,[System provides fwrite prototypes])
+fi
+
+for function in fclose fflush fopen fprintf fread fseek setvbuf ftell fwrite
+do
+    changequote(<<,>>)
+    cap_func="`echo ${function}|tr [a-z] [A-Z]`"
+    changequote([,])
+    cache_name="`echo vc_cv_${function}_pointer`"
+    have_name="`echo HAVE_${cap_func}_POINTER`"
+    AC_MSG_CHECKING(for $function function pointer)
+    AC_CACHE_VAL($cache_name,
+        AC_TRY_COMPILE([#include <stdio.h>],
+        [ int (*f)() = (int(*)())$function; ],
+            [eval $cache_name=yes ],
+            [eval $cache_name=no ]
+        )
+    )
+    if eval "test \"`echo '$''{'$cache_name'}'`\" = no"; then
+        AC_MSG_RESULT(no, using a replacement.)
+    else
+        AC_DEFINE_UNQUOTED(${have_name},1,[System provides prototype])
+        AC_MSG_RESULT(yes)
+    fi
+done
+
+dnl
+dnl Check for library functions that can work around, or that we have
+dnl replacements for.
+dnl
+AC_CHECK_FUNCS([memmove fnmatch isnan fpclass strerror])
+
+dnl
+dnl On Paragon/TeraFLOP systems there are "buggy" versions of
+dnl `setjmp' and `longjmp' that print an error message to use
+dnl `_setjmp' and `_longjmp' instead and exit with a non-zero
+dnl status.
+dnl
+AC_MSG_CHECKING(if setjmp and longjmp work)
+if test -n "$SETJMP_OVERRIDE"; then
+   AC_MSG_RESULT(no.  Replacing with _setjmp and _longjmp.)
+   AC_DEFINE(setjmp,_setjmp,[Override setjmp])
+   AC_DEFINE(longjmp,_longjmp,[Override longjmp])
+else
+   AC_MSG_RESULT(yes)
+fi
+
+dnl
+dnl save the cache
+dnl
+AC_CACHE_SAVE
+
+dnl the hdf5 library checks (to follow) will require the -lm if its required
+AC_CHECK_LIBM
+LIBS="$LIBS $LIBM"
+
+dnl ----------------------------------------------------------------------
+dnl Is the szlib present? It has a library
+dnl `-lsz' and their locations might be specified with the `--with-szlib'
+dnl command-line switch. The value is a root directory contain the lib 
+dnl directory.
+dnl
+AC_ARG_WITH([szlib],
+            [AC_HELP_STRING([--with-szlib=DIR],
+                            [Use szlib library for external szlib I/O
+                             filter [default=no]])],,
+            withval=default)
+
+case $withval in
+  default)
+    HAVE_SZLIB="no"
+    if test "$DEFAULT_SZIP" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP/lib"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP/lib"
+    fi
+    if test "$DEFAULT_SZIP_LIB" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIB"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIB"
+    fi
+    if test "$DEFAULT_SZIP_LIBDIR" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIBDIR"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIBDIR"
+    fi
+    if test "$HAVE_SZLIB" = "yes" ; then
+      AC_MSG_CHECKING([default szlib path provided])
+      AC_MSG_RESULT([$szlib_lib])
+    else
+      AC_MSG_CHECKING([for szlib])
+      AC_MSG_RESULT([suppressed])
+    fi
+    ;;
+  yes)
+    HAVE_SZLIB="no"
+    if test "$DEFAULT_SZIP" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP/lib"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP/lib"
+    fi
+    if test "$DEFAULT_SZIP_LIB" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIB"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIB"
+    fi
+    if test "$DEFAULT_SZIP_LIBDIR" != "" ; then
+      LDFLAGS="$LDFLAGS -L$DEFAULT_SZIP_LIBDIR"
+      LIBS="$LIBS -lsz"
+      HAVE_SZLIB="yes"
+      szlib_lib="$DEFAULT_SZIP_LIBDIR"
+    fi
+    if test "$HAVE_SZLIB" = "yes" ; then
+      AC_MSG_CHECKING([using szlib path provided])
+      AC_MSG_RESULT([$szlib_lib])
+    else
+      AC_MSG_ERROR([expect to find szlib environment variables])
+      AC_MSG_CHECKING([for szlib])
+      AC_MSG_RESULT([suppressed])
+    fi
+    ;;
+  no)
+    HAVE_SZLIB="no"
+    AC_MSG_CHECKING([for szlib])
+    AC_MSG_RESULT([suppressed])
+    ;;
+  *)
+    HAVE_SZLIB="yes"
+    case "$withval" in
+      *)
+        if test -n "$withval"; then
+          szlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+    if test -n "$szlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$szlib_lib"
+    fi
+
+    AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
+                 [LDFLAGS="$saved_LDFLAGS"; unset HAVE_SZLIB])
+
+    if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
+      AC_MSG_ERROR([couldn't find szlib library])
+    fi
+    ;;
+esac
+
+# Is HDF5 present (it's needed for the silo/hdf5 driver for pmesh/alec SAMI
+# files larger than 2GB until SAF is in place)?  Normally check for
+# hdf5.h and libhdf5.a but skip the test if `--without-hdf5' is specified.
+# Alternate directories can be specified for hdf5.h and/or libhdf5.a by giving
+# the names like this `--with-hdf5=INC,LIB' (if only the LIB directory is
+# given then it must still be preceded by a comma).
+#
+# Checking for hdf5 is complicated by the fact that hdf5 may or may not
+# in turn depend on zlib compression lib. In and of itself, Silo does NOT
+# depend on zlib. So, we don't want -lz on the link line if zlib is either
+# not needed or, worse, not present as this generates warning messages
+# or fatal errors. So, we first test for hdf5 without -lz on the link line.
+# If this succeeds, we conclude hdf5 is present and we can build the hdf5
+# driver. If hdf5 fails, it may be that hdf5 was compiled with zlib. So, next
+# we make an independent test for zlib. If zlib fails, we conclude that the
+# failure on the hdf5 test was due to something other than lack of zlib and
+# decide libhdf5.a is NOT present and we cannot build the hdf5 driver. If
+# zlib succeeds, we re-try the hdf5 test with -lz on the link line. If that
+# succeeds, we conclude we need -lz on the link line and we can build the
+# hdf5 driver. Again, if it fails, we neither put -lz on the link line nor
+# build the hdf5 driver. One other possibility that could be tested for
+# and configure could make a reasonable comment on is to see if only the
+# binaries for hdf5 were installed AND they have zlib dependences which
+# are NOT resolvable on the platform they are installed on. This would be
+# a boneheaded thing to do, but nonetheless something that configure could
+# inform the user has gone wrong and what to do.
+#
+
+if test -n "$HDF5_DRV"; then
+   AC_MSG_CHECKING(for hdf5)
+   saved_CPPFLAGS="$CPPFLAGS"
+   saved_LDFLAGS="$LDFLAGS"
+   saved_LIBS="$LIBS"
+   AC_ARG_WITH([hdf5],
+           [  --with-hdf5=INC,LIB     Location of HDF5 header and library],
+	   ,
+	   withval="default")
+   if test "$withval" = "no" ; then
+      AC_MSG_RESULT(suppressed)
+      HDF5_DRV=""
+   elif test "$withval" = "default" ; then
+      if test "$DEFAULT_HDF5_LIBDIR" != "" ; then
+         LDFLAGS="$LDFLAGS -L$DEFAULT_HDF5_LIBDIR"
+         LIBS="$LIBS -lhdf5 -lz"
+         hdf5_lib=$DEFAULT_HDF5_LIBDIR
+         hdf5_explicit=true
+      fi
+      if test "$DEFAULT_HDF5_INCLUDE" != "" ; then
+         CPPFLAGS="$CPPFLAGS -I$DEFAULT_HDF5_INCLUDE"
+         hdf5_inc=$DEFAULT_HDF5_INCLUDE
+         hdf5_explicit=true
+      fi
+      if test -d "$hdf5_lib"; then
+         AC_MSG_RESULT([$hdf5_lib])
+         AC_DEFINE(HAVE_HDF5_H,1,[hdf5 header file])
+         AC_DEFINE(HAVE_LIBHDF5,1,[hdf5 library])
+      else
+         AC_MSG_RESULT(no)
+         HDF5_DRV=""
+      fi
+   elif test "$withval" = "yes" ; then
+      if test "$DEFAULT_HDF5_LIBDIR" != "" ; then
+         LDFLAGS="$LDFLAGS -L$DEFAULT_HDF5_LIBDIR"
+         LIBS="$LIBS -lhdf5 -lz"
+         hdf5_lib=$DEFAULT_HDF5_LIBDIR
+         hdf5_explicit=true
+      fi
+      if test "$DEFAULT_HDF5_INCLUDE" != "" ; then
+         CPPFLAGS="$CPPFLAGS -I$DEFAULT_HDF5_INCLUDE"
+         hdf5_inc=$DEFAULT_HDF5_INCLUDE
+         hdf5_explicit=true
+      fi
+      if test -d "$hdf5_lib"; then
+         AC_MSG_RESULT([$hdf5_lib])
+         AC_DEFINE(HAVE_HDF5_H,1,[hdf5 header file])
+         AC_DEFINE(HAVE_LIBHDF5,1,[hdf5 library])
+      else
+         AC_MSG_ERROR([expected to find hdf5 environment variables])
+         AC_MSG_RESULT(no)
+         HDF5_DRV=""
+      fi
+   else
+      AC_CHECKING(for hdf5 and supporting libraries)
+      hdf5_inc="`echo $withval |cut -f1 -d,`"
+      if test "$withval" != "yes" && test -n "$hdf5_inc"; then
+	 hdf5_explicit=true
+         if test -d "$hdf5_inc"; then
+            CPPFLAGS="-I$hdf5_inc $CPPFLAGS"
+         else
+            AC_MSG_ERROR(problem with directory specified for hdf5 includes)
+         fi
+      fi
+      hdf5_lib="`echo $withval |cut -f2 -d, -s`"
+      if test "$withval" != "yes" && test -n "$hdf5_lib"; then
+	 hdf5_explicit=true
+         if test -d "$hdf5_lib"; then
+            if test -n "$szlib_lib"; then
+               LDFLAGS="-L$hdf5_lib -L$szlib_lib $LDFLAGS"
+            else
+               LDFLAGS="-L$hdf5_lib $LDFLAGS"
+            fi
+         else
+            AC_MSG_ERROR(problem with directory specified for hdf5 library)
+         fi
+      fi
+      notfound=""
+      AC_CHECK_HEADERS(hdf5.h,,notfound="hdf5.h")
+      tmp_LIBS="$LIBS"
+      if test -n "$szlib_lib"; then
+###      LIBS="$hdf5_lib/libhdf5.a $LIBS"
+         LIBS="-lhdf5 -lsz $LIBS"
+      else
+         LIBS="-lhdf5 $LIBS"
+      fi
+      AC_CHECK_FUNC(H5open,[AC_DEFINE(HAVE_LIBHDF5,1,[using HDF5])],notfound="$notfound libhdf5.a")
+      if test -n "$notfound"; then
+         LIBS="$tmp_LIBS"
+      fi
+      #
+      # If the above tests did NOT find headers and lib for
+      # hdf5, it could be due to zlib, so now test for zlib
+      # MCM -- July, 2008: This code now looks completely useless
+      # It is supposed to attempt to check if '-lz' is needed to
+      # link with HDF5. However, it doesn't appear to do any of
+      # that and had a useless embedded AC_ARG_WITH in it which
+      # I removed and replaced all instances of 'withval' to the
+      # with variable the code needs, with_zlib
+      #
+      if test -n "$notfound"; then
+         # reset the compile and link flags
+         CPPFLAGS="$saved_CPPFLAGS"
+         LDFLAGS="$saved_LDFLAGS"
+         AC_CHECKING(if lack of zlib caused tests for hdf5 to fail) 
+         if test "no" = "$with_zlib"; then
+            AC_MSG_CHECKING(for zlib)
+            AC_MSG_RESULT(suppressed)
+         else
+            zlib_inc="`echo $with_zlibval |cut -f1 -d,`"
+            if test "$with_zlibval" != "yes" && test -n "$zlib_inc"; then
+               if test -d "$zlib_inc"; then
+                  CPPFLAGS="-I$zlib_inc $CPPFLAGS"
+               else
+                  AC_MSG_ERROR(problem with directory specified for zlib includes)
+               fi
+            fi
+            zlib_lib="`echo $with_zlibval |cut -f2 -d, -s`"
+            if test "$with_zlibval" != "yes" && test -n "$zlib_lib"; then
+               if test -d "$zlib_lib"; then
+                  LDFLAGS="-L$zlib_lib $LDFLAGS"
+               else
+                  AC_MSG_ERROR(problem with directory specified for zlib library)
+               fi
+            fi
+	    notfound=""
+            dnl MCM -- 11Jul08: Here, we only need zlib to link with hdf5,
+            dnl not to compile anything in Silo. Why we're checking for
+            dnl headers here, I do not know.
+            if test -z "`echo $LIBS | tr ' ' '\n' | grep -x -e '-lz'`"; then
+                AC_CHECK_HEADERS(zlib.h,,notfound="zlib.h")
+                AC_CHECK_LIB(z,compress2,,notfound="$notfound libz.a")
+            fi
+         fi
+         #
+         # If libz was not found, the failure of hdf5 must be something else.
+         #
+         if test -n "$notfound"; then
+            CPPFLAGS="$saved_CPPFLAGS"
+            LDFLAGS="$saved_LDFLAGS"
+            HDF5_DRV=""
+	    if test -n "$hdf5_explicit"; then 
+               AC_MSG_ERROR([
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes.])
+   	    else
+	       AC_MSG_WARN(hdf5 driver disabled)
+	    fi
+         else
+            # we unset these to defeat autoconf's cache
+            unset ac_cv_header_hdf5_h
+            unset ac_cv_lib_hdf5_H5open
+            #
+            # Now, retest for hdf5 with zlib
+            #
+            if test -n "$hdf5_inc"; then
+               CPPFLAGS="-I$hdf5_inc $CPPFLAGS"
+            fi
+            if test -n "$hdf5_lib"; then
+               if test -n "$szlib_lib"; then
+                  LDFLAGS="-L$hdf5_lib -L$szlib_lib $LDFLAGS"
+               else
+                  LDFLAGS="-L$hdf5_lib $LDFLAGS"
+               fi
+            fi
+	    notfound=""
+            AC_CHECK_HEADERS(hdf5.h,,notfound="hdf5.h")
+            tmp_LIBS="$LIBS"
+            AC_CHECK_LIB(hdf5,H5open,,notfound="$notfound libhdf5.a")
+            if test "$notfound" = ""; then
+               if test -n "$szlib_lib"; then
+###               LIBS="$hdf5_lib/libhdf5.a $tmp_LIBS"
+                  LIBS="-lhdf5 -lsz $tmp_LIBS"
+               else
+                  LIBS="-lhdf5 $tmp_LIBS"
+               fi
+            fi
+            if test -n "$notfound"; then
+               CPPFLAGS="$saved_CPPFLAGS"
+               LDFLAGS="$saved_LDFLAGS"
+               HDF5_DRV=""
+	       if test -n "$hdf5_explicit"; then 
+                  AC_MSG_ERROR([
+You have made an explicit request for hdf5 with the --with-hdf option
+and $0 is unable to find hdf5 and its supporting libs, if any.
+Please see INSTALL_FAQ for possible causes.])
+	       else
+                  AC_MSG_WARN(hdf5 driver disabled)
+	       fi
+            fi
+         fi # if test -n "$notfound" (for second hdf5 test)
+      fi # if test -n "$notfound" (for zlib)
+   fi # if test "no" = "$withval"
+fi # if test -n "$HDF5_DRV"
+
+# Check to see if the results of the above tests found the HDF5 libraries
+if test -n "$HDF5_DRV"; then
+    # Short-term hack to deal with bogus code above (too complex) 
+    # putting -lsz AHEAD of -lhdf5 in libs
+    if test "$HAVE_SZLIB" = "yes"; then
+        LIBS="$LIBS -lsz"
+    fi
+    AC_DEFINE(HAVE_HDF5_DRIVER,1,[Support for HDF5])
+else
+   LIBS="$saved_LIBS"
+fi
+
+AC_ARG_WITH(pdb-proper,
+    AC_HELP_STRING([--with-pdb-proper],[directory where PDB proper is installed @<:@default=no@:>@]),
+    if test $withval != yes; then
+        PDBP_DRV="pdbp_drv"
+        AC_DEFINE(HAVE_PDBP_DRIVER,1,[Support for PDB Proper])
+        AC_SUBST(PDBP_DRV)
+        CPPFLAGS="-I$withval/include $CPPFLAGS"
+        LDFLAGS="-L$withval/lib $LDFLAGS"
+        LIBS="-lpdb -lpml -lscore $LIBS"
+    else
+        AC_MSG_ERROR(You must specify a directory for PDB proper)
+    fi
+    )
+
+dnl
+READLINE_LIBS=""
+if test "X$detect_readline" = Xyes; then
+# use contributed GNU m4 macro library provided see:
+#   autoconf-archive-2006-06-04/htmldoc/vl_lib_readline.html
+   saved_LIBS="$LIBS"
+   VL_LIB_READLINE
+   # Put only the stuff NOT already in $LIBS into READLINE_LIBS
+   saved_LIBS_grep=$(echo $saved_LIBS | tr -s ' ' | sed 's% %\\|%g')
+   READLINE_LIBS=$(echo $LIBS | tr -s ' ' | tr ' ' '\n' | grep -v -e $saved_LIBS_grep | tr '\n' ' ')
+   LIBS="$saved_LIBS"
+else
+   AC_MSG_CHECKING(for readline)
+   AC_MSG_RESULT(disabled)
+fi
+AC_SUBST(READLINE_LIBS)
+
+AC_ARG_WITH(qt,
+    AC_HELP_STRING([--with-qt],[specify top-level Qt directory @<:@default=yes@:>@]),
+    if test $withval != yes; then
+        QTDIR=$withval
+    fi
+    )
+AC_ARG_WITH(qt-bin,
+    AC_HELP_STRING([--with-qt-bin],[specify Qt bin directory]),
+    if test $withval != yes; then
+        QT_BIN=$withval
+    fi
+    )
+AC_ARG_WITH(qt-include,
+    AC_HELP_STRING([--with-qt-include],[specify Qt include directory]),
+    if test $withval != yes; then
+        QT_INCLUDE=$withval
+    fi
+    )
+AC_ARG_WITH(qt-lib,
+    AC_HELP_STRING([--with-qt-lib],[specify Qt lib directory]),
+    if test $withval != yes; then
+        QT_LIB=$withval
+    fi
+    )
+
+dnl
+dnl If silex is enabled, look for a supported version of Qt.
+dnl This QT logic is taken from VisIt's configure.in.
+dnl
+if test -n "$SILEX"; then
+
+    if test -z "$QT_BIN" || test -z "$QT_INCLUDE" || test -z "$QT_LIB"; then
+        if test -z "QTDIR"; then
+            AC_MSG_WARN([The QT_BIN, QT_INCLUDE and QT_LIB environment variables must be set in order to find Qt. silex is being disabled])
+            SILEX=""
+        else
+            QT_BIN="$QTDIR/bin"
+            QT_INCLUDE="$QTDIR/include"
+            QT_LIB="$QTDIR/lib"
+        fi
+    fi
+    AC_MSG_CHECKING(for supported Qt version)
+    QtVersion=""
+    QtVersion2=""
+    consumeCount=-1
+    toks=`$QT_BIN/qmake --version`
+    for tok in $toks; do
+        if test "$tok" == "Qt"; then
+            consumeCount=2
+        fi
+        if test $consumeCount == 0; then
+            QtVersion2=$tok
+            break
+        else
+            consumeCount=$((consumeCount-1))
+        fi
+    done
+    
+    ## Check for supported versions of Qt.
+    for ver in  4.4.0 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 \
+                4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 \
+                4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 ; do
+       if test "$QtVersion2" == "$ver"; then
+           QtVersion=$ver
+           break
+       fi
+    done
+    
+    if test -z "$QtVersion"; then
+        AC_MSG_WARN([  Sorry, but you need Qt version 4.4.0 or higher to compile Silo's silex tool. silex is being disabled])
+        SILEX=""
+    else
+        AC_MSG_RESULT(Qt $QtVersion in $QT_INCLUDE)
+    fi
+    
+    # Set the Qt bin,include,lib directories
+    AC_SUBST(QT_BIN)
+    AC_SUBST(QT_INCLUDE)
+    AC_SUBST(QT_LIB)
+    
+    # Set platform-specific options
+    if test "$UNAME" = "Darwin"; then
+        QT_LDFLAGS="-F$""(QT_LIB) -L$""(QT_LIB)"
+    
+        QT_CORE=QtCore.framework
+        QT_CORE_LIB="-framework QtCore"
+        
+        QT_GUI=QtGui.framework
+        QT_GUI_LIB="-framework QtGui"
+    
+    else 
+        QT_LDFLAGS="-L$""(QT_LIB)"
+    
+        QT_CORE=libQtCore.so
+        QT_CORE_LIB=-lQtCore
+    
+        QT_GUI=libQtGui.so
+        QT_GUI_LIB=-lQtGui
+    
+    fi
+    AC_SUBST(QT_LDFLAGS)
+    
+    # Qt libraries
+    QT_LIBS="$""(QT_CORE_LIB) $""(QT_GUI_LIB)"
+    AC_SUBST(QT_LIBS)
+    AC_SUBST(QT_CORE)
+    AC_SUBST(QT_CORE_LIB)
+    AC_SUBST(QT_GUI)
+    AC_SUBST(QT_GUI_LIB)
+    
+    # Include path
+    QT_CXXFLAGS="-I$""(QT_INCLUDE) -I$""(QT_INCLUDE)/Qt -I$""(QT_INCLUDE)/QtCore -I$""(QT_INCLUDE)/QtGui"
+    AC_SUBST(QT_CXXFLAGS)
+    
+    # Path to moc
+    QT_MOC="$""(QT_BIN)/moc"
+    AC_SUBST(QT_MOC)
+
+fi dnl if test -n "$SILEX"; then
+
+dnl
+dnl Check for a python installation using the Automake 
+dnl provided macro, which will generate the following
+dnl variables: python_PYTHON, pkgpython_PYTHON, 
+dnl pyexecdir_PYTHON, and pkgpyexecdir_PYTHON.
+dnl
+if test -n "$PYTHONMODULE"; then
+   AM_PATH_PYTHON(2.1,, :)
+# Check for Python include path
+#
+   AC_MSG_CHECKING([for Python include path])
+   if test -z "$PYTHON_CPPFLAGS"; then
+      python_path=`$PYTHON -c "import distutils.sysconfig; \
+         print distutils.sysconfig.get_python_inc();"`
+      if test -n "${python_path}"; then
+         python_path="-I$python_path"
+      fi
+      PYTHON_CPPFLAGS=$python_path
+   fi
+   AC_MSG_RESULT([$PYTHON_CPPFLAGS])
+   AC_SUBST([PYTHON_CPPFLAGS])
+fi
+
+dnl Determine how to compile MPI
+# skip for now
+#ACX_MPI
+
+# Create a bundle target for Darwin
+BUNDLE_TARGET=""
+case $host_os in
+  darwin*)
+    BUNDLE_TARGET="silo.app"
+    ;;
+esac
+AC_SUBST(BUNDLE_TARGET)
+
+AC_CACHE_SAVE
+
+dnl
+AM_CONDITIONAL(NETCDF_NEEDED, test -n "$NETCDF")
+AM_CONDITIONAL(PDB_DRV_NEEDED, test -n "$PDB_DRV")
+AM_CONDITIONAL(PDBP_DRV_NEEDED, test -n "$PDBP_DRV")
+AM_CONDITIONAL(TAURUS_NEEDED, test -n "$TAURUS")
+AM_CONDITIONAL(HDF5_DRV_NEEDED, test -n "$HDF5_DRV")
+AM_CONDITIONAL(BROWSER_NEEDED, test -n "$BROWSER")
+AM_CONDITIONAL(PYTHON_NEEDED, test -n "$PYTHONMODULE")
+AM_CONDITIONAL(FORTRAN_NEEDED, test -n "$FORTRAN")
+AM_CONDITIONAL(SILEX_NEEDED, test -n "$SILEX")
+AM_CONDITIONAL(HZIP_NEEDED, test -n "$HZIP")
+AM_CONDITIONAL(FPZIP_NEEDED, test -n "$FPZIP")
+AM_CONDITIONAL(ZLIB_AVAILABLE, test -n "$ZLIB")
+AM_CONDITIONAL(CXX_LINK_NEEDED, test "$enable_shared" = "no" -a \( -n "$FPZIP" -o -n "$HZIP" \))
+AC_CONFIG_FILES([
+            Makefile
+            SiloWindows/Makefile
+            svn_bin/Makefile
+            config/Makefile
+            config-site/Makefile
+            docs/Makefile
+            src/Makefile
+            src/score/Makefile
+            src/pdb/Makefile
+	    src/silo/Makefile
+	    src/silo/silo.h
+            src/debug/Makefile
+            src/netcdf/Makefile
+            src/pdb_drv/Makefile
+            src/pdbp_drv/Makefile
+            src/hdf5_drv/Makefile
+            src/taurus/Makefile
+            src/unknown/Makefile
+            src/filters/Makefile
+            tests/Makefile
+            tools/Makefile
+            tools/browser/Makefile
+            tools/python/Makefile
+            tools/silex/Makefile
+            tools/silock/Makefile])
+if test -n "$HZIP"; then
+  AC_CONFIG_FILES([src/hzip/Makefile])
+fi
+if test -n "$FPZIP"; then
+  AC_CONFIG_FILES([src/fpzip/Makefile])
+fi
+if test -n "$HDF5_DRV"; then
+  AC_CONFIG_FILES([src/libsiloh5.settings])
+else
+  AC_CONFIG_FILES([src/libsilo.settings])
+fi
+CC_FULLPATH=""
+if test -n "$CC"; then
+    CC_FULLPATH=`which $CC`
+fi
+CXX_FULLPATH=""
+if test -n "$CXX"; then
+    CXX_FULLPATH=`which $CXX`
+fi
+FC_FULLPATH=""
+if test -n "$FC"; then
+    FC_FULLPATH=`which $FC`
+fi
+AC_SUBST(CC_FULLPATH)
+AC_SUBST(CXX_FULLPATH)
+AC_SUBST(FC_FULLPATH)
+AC_OUTPUT
+dnl ----------------------------------------------------------------------
+dnl Print out a summary of what we are going to build.
+dnl   
+echo;echo
+if test -n "$HDF5_DRV"; then
+  cat src/libsiloh5.settings | sed 's|\\n||' | sed 's|"||g'
+else
+  cat src/libsilo.settings | sed 's|\\n||' | sed 's|"||g'
+fi
diff --git a/docs/Chapter1.fm b/docs/Chapter1.fm
new file mode 100644
index 0000000..e2a0432
Binary files /dev/null and b/docs/Chapter1.fm differ
diff --git a/docs/Chapter2-man_pages.fm b/docs/Chapter2-man_pages.fm
new file mode 100644
index 0000000..5130628
Binary files /dev/null and b/docs/Chapter2-man_pages.fm differ
diff --git a/docs/Chapter2-start.fm b/docs/Chapter2-start.fm
new file mode 100644
index 0000000..8a11c16
Binary files /dev/null and b/docs/Chapter2-start.fm differ
diff --git a/docs/Cover.fm b/docs/Cover.fm
new file mode 100644
index 0000000..7eb3e4f
Binary files /dev/null and b/docs/Cover.fm differ
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..a319957
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,65 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+ 
+EXTRA_DIST = \
+ Makefile.am \
+ Silo.book.fm \
+ Cover.fm \
+ Chapter1.fm \
+ Chapter2-start.fm \
+ Silo.bookLOP.fm \
+ Chapter2-man_pages.fm \
+ silo.h.fm \
+ Silo.book.pdf
diff --git a/docs/Makefile.in b/docs/Makefile.in
new file mode 100644
index 0000000..c8c58ee
--- /dev/null
+++ b/docs/Makefile.in
@@ -0,0 +1,439 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = docs
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ Makefile.am \
+ Silo.book.fm \
+ Cover.fm \
+ Chapter1.fm \
+ Chapter2-start.fm \
+ Silo.bookLOP.fm \
+ Chapter2-man_pages.fm \
+ silo.h.fm \
+ Silo.book.pdf
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  docs/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  docs/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# 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/docs/Silo.book.fm b/docs/Silo.book.fm
new file mode 100644
index 0000000..b850461
Binary files /dev/null and b/docs/Silo.book.fm differ
diff --git a/docs/Silo.book.pdf b/docs/Silo.book.pdf
new file mode 100644
index 0000000..d2b0fca
Binary files /dev/null and b/docs/Silo.book.pdf differ
diff --git a/docs/Silo.bookLOP.fm b/docs/Silo.bookLOP.fm
new file mode 100644
index 0000000..3bba510
Binary files /dev/null and b/docs/Silo.bookLOP.fm differ
diff --git a/docs/silo.h.fm b/docs/silo.h.fm
new file mode 100644
index 0000000..b9f48aa
Binary files /dev/null and b/docs/silo.h.fm differ
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..7fb8f71
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,146 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+DRIVER_DIRS =
+DRIVER_LIBS =
+if NETCDF_NEEDED
+DRIVER_DIRS += netcdf
+DRIVER_LIBS += netcdf/libsilo_netcdf.la
+endif
+if PDB_DRV_NEEDED
+DRIVER_DIRS += pdb_drv
+DRIVER_LIBS += pdb_drv/libsilo_pdb_drv.la
+endif
+if PDBP_DRV_NEEDED
+DRIVER_DIRS += pdbp_drv
+DRIVER_LIBS += pdbp_drv/libsilo_pdbp_drv.la
+endif
+if HDF5_DRV_NEEDED
+DRIVER_DIRS += hdf5_drv
+DRIVER_LIBS += hdf5_drv/libsilo_hdf5_drv.la
+endif
+if TAURUS_NEEDED
+DRIVER_DIRS += taurus
+DRIVER_LIBS += taurus/libsilo_taurus.la
+endif
+if HZIP_NEEDED
+DRIVER_DIRS += hzip
+DRIVER_LIBS += hzip/libsilo_hzip.la
+endif
+if FPZIP_NEEDED
+DRIVER_DIRS += fpzip
+DRIVER_LIBS += fpzip/libsilo_fpzip.la
+endif
+SUBDIRS = score pdb silo debug \
+$(DRIVER_DIRS) unknown filters .
+DIST_SUBDIRS = . debug filters hdf5_drv hzip fpzip netcdf \
+pdb pdb_drv pdbp_drv score silo taurus unknown
+MAKESETTINGS = make.settings
+
+if HDF5_DRV_NEEDED
+  SETTINGSFILE=libsiloh5.settings
+  lib_LTLIBRARIES = libsiloh5.la
+  libsiloh5_la_SOURCES = siloh5_version.c
+  libsiloh5_la_LIBADD = \
+   score/libsilo_score.la \
+   pdb/libsilo_pdb.la \
+   silo/libsilo_silo.la \
+   debug/libsilo_debug.la \
+   $(DRIVER_LIBS) \
+   unknown/libsilo_unknown.la \
+   filters/libsilo_filters.la 
+  libsiloh5_la_LDFLAGS = -avoid-version
+else
+  SETTINGSFILE=libsilo.settings
+  lib_LTLIBRARIES = libsilo.la
+  libsilo_la_SOURCES = silo_version.c
+  libsilo_la_LIBADD = \
+   score/libsilo_score.la \
+   pdb/libsilo_pdb.la \
+   silo/libsilo_silo.la \
+   debug/libsilo_debug.la \
+   $(DRIVER_LIBS) \
+   unknown/libsilo_unknown.la \
+   filters/libsilo_filters.la 
+  libsilo_la_LDFLAGS = -avoid-version
+endif
+
+BUILT_SOURCES = $(MAKESETTINGS)
+$(MAKESETTINGS): Makefile
+	@echo "\"Makefile Summary\\\\n\"" | \
+		sed 's|\\\\|\\|'> $(MAKESETTINGS); \
+	echo "\"Compile command:         $(COMPILE) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS); \
+	echo "\"Libtool command:         $(LTCOMPILE) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS);\
+	echo "\"Link command:            $(LINK) $(LIBS) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS); \
+	if test -f $(SETTINGSFILE); then \
+	  cat $(MAKESETTINGS) >> $(SETTINGSFILE); fi
+
+install-data-local:
+	@test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"; \
+	if test -f $(SETTINGSFILE); then \
+	  cat $(SETTINGSFILE) | sed 's|\\n||' | \
+		sed 's|"||g' > $(SETTINGSFILE).tmp; \
+	  $(INSTALL) $(SETTINGSFILE).tmp $(DESTDIR)$(libdir)/$(SETTINGSFILE); \
+          rm -f $(SETTINGSFILE).tmp; \
+        fi
+
+uninstall-local:
+	@rm -f $(DESTDIR)$(libdir)/$(SETTINGSFILE)
+
+clean-local:
+	-rm -f $(MAKESETTINGS)
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..dfcbb04
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,797 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at NETCDF_NEEDED_TRUE@am__append_1 = netcdf
+ at NETCDF_NEEDED_TRUE@am__append_2 = netcdf/libsilo_netcdf.la
+ at PDB_DRV_NEEDED_TRUE@am__append_3 = pdb_drv
+ at PDB_DRV_NEEDED_TRUE@am__append_4 = pdb_drv/libsilo_pdb_drv.la
+ at PDBP_DRV_NEEDED_TRUE@am__append_5 = pdbp_drv
+ at PDBP_DRV_NEEDED_TRUE@am__append_6 = pdbp_drv/libsilo_pdbp_drv.la
+ at HDF5_DRV_NEEDED_TRUE@am__append_7 = hdf5_drv
+ at HDF5_DRV_NEEDED_TRUE@am__append_8 = hdf5_drv/libsilo_hdf5_drv.la
+ at TAURUS_NEEDED_TRUE@am__append_9 = taurus
+ at TAURUS_NEEDED_TRUE@am__append_10 = taurus/libsilo_taurus.la
+ at HZIP_NEEDED_TRUE@am__append_11 = hzip
+ at HZIP_NEEDED_TRUE@am__append_12 = hzip/libsilo_hzip.la
+ at FPZIP_NEEDED_TRUE@am__append_13 = fpzip
+ at FPZIP_NEEDED_TRUE@am__append_14 = fpzip/libsilo_fpzip.la
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/libsilo.settings.in $(srcdir)/libsiloh5.settings.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = libsiloh5.settings libsilo.settings
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+ at HDF5_DRV_NEEDED_FALSE@libsilo_la_DEPENDENCIES =  \
+ at HDF5_DRV_NEEDED_FALSE@	score/libsilo_score.la \
+ at HDF5_DRV_NEEDED_FALSE@	pdb/libsilo_pdb.la silo/libsilo_silo.la \
+ at HDF5_DRV_NEEDED_FALSE@	debug/libsilo_debug.la $(DRIVER_LIBS) \
+ at HDF5_DRV_NEEDED_FALSE@	unknown/libsilo_unknown.la \
+ at HDF5_DRV_NEEDED_FALSE@	filters/libsilo_filters.la
+am__libsilo_la_SOURCES_DIST = silo_version.c
+ at HDF5_DRV_NEEDED_FALSE@am_libsilo_la_OBJECTS = silo_version.lo
+libsilo_la_OBJECTS = $(am_libsilo_la_OBJECTS)
+libsilo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(libsilo_la_LDFLAGS) $(LDFLAGS) -o $@
+ at HDF5_DRV_NEEDED_FALSE@am_libsilo_la_rpath = -rpath $(libdir)
+ at HDF5_DRV_NEEDED_TRUE@libsiloh5_la_DEPENDENCIES =  \
+ at HDF5_DRV_NEEDED_TRUE@	score/libsilo_score.la \
+ at HDF5_DRV_NEEDED_TRUE@	pdb/libsilo_pdb.la silo/libsilo_silo.la \
+ at HDF5_DRV_NEEDED_TRUE@	debug/libsilo_debug.la $(DRIVER_LIBS) \
+ at HDF5_DRV_NEEDED_TRUE@	unknown/libsilo_unknown.la \
+ at HDF5_DRV_NEEDED_TRUE@	filters/libsilo_filters.la
+am__libsiloh5_la_SOURCES_DIST = siloh5_version.c
+ at HDF5_DRV_NEEDED_TRUE@am_libsiloh5_la_OBJECTS = siloh5_version.lo
+libsiloh5_la_OBJECTS = $(am_libsiloh5_la_OBJECTS)
+libsiloh5_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(libsiloh5_la_LDFLAGS) $(LDFLAGS) -o $@
+ at HDF5_DRV_NEEDED_TRUE@am_libsiloh5_la_rpath = -rpath $(libdir)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_la_SOURCES) $(libsiloh5_la_SOURCES)
+DIST_SOURCES = $(am__libsilo_la_SOURCES_DIST) \
+	$(am__libsiloh5_la_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+DRIVER_DIRS = $(am__append_1) $(am__append_3) $(am__append_5) \
+	$(am__append_7) $(am__append_9) $(am__append_11) \
+	$(am__append_13)
+DRIVER_LIBS = $(am__append_2) $(am__append_4) $(am__append_6) \
+	$(am__append_8) $(am__append_10) $(am__append_12) \
+	$(am__append_14)
+SUBDIRS = score pdb silo debug \
+$(DRIVER_DIRS) unknown filters .
+
+DIST_SUBDIRS = . debug filters hdf5_drv hzip fpzip netcdf \
+pdb pdb_drv pdbp_drv score silo taurus unknown
+
+MAKESETTINGS = make.settings
+ at HDF5_DRV_NEEDED_FALSE@SETTINGSFILE = libsilo.settings
+ at HDF5_DRV_NEEDED_TRUE@SETTINGSFILE = libsiloh5.settings
+ at HDF5_DRV_NEEDED_FALSE@lib_LTLIBRARIES = libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@lib_LTLIBRARIES = libsiloh5.la
+ at HDF5_DRV_NEEDED_TRUE@libsiloh5_la_SOURCES = siloh5_version.c
+ at HDF5_DRV_NEEDED_TRUE@libsiloh5_la_LIBADD = \
+ at HDF5_DRV_NEEDED_TRUE@   score/libsilo_score.la \
+ at HDF5_DRV_NEEDED_TRUE@   pdb/libsilo_pdb.la \
+ at HDF5_DRV_NEEDED_TRUE@   silo/libsilo_silo.la \
+ at HDF5_DRV_NEEDED_TRUE@   debug/libsilo_debug.la \
+ at HDF5_DRV_NEEDED_TRUE@   $(DRIVER_LIBS) \
+ at HDF5_DRV_NEEDED_TRUE@   unknown/libsilo_unknown.la \
+ at HDF5_DRV_NEEDED_TRUE@   filters/libsilo_filters.la 
+
+ at HDF5_DRV_NEEDED_TRUE@libsiloh5_la_LDFLAGS = -avoid-version
+ at HDF5_DRV_NEEDED_FALSE@libsilo_la_SOURCES = silo_version.c
+ at HDF5_DRV_NEEDED_FALSE@libsilo_la_LIBADD = \
+ at HDF5_DRV_NEEDED_FALSE@   score/libsilo_score.la \
+ at HDF5_DRV_NEEDED_FALSE@   pdb/libsilo_pdb.la \
+ at HDF5_DRV_NEEDED_FALSE@   silo/libsilo_silo.la \
+ at HDF5_DRV_NEEDED_FALSE@   debug/libsilo_debug.la \
+ at HDF5_DRV_NEEDED_FALSE@   $(DRIVER_LIBS) \
+ at HDF5_DRV_NEEDED_FALSE@   unknown/libsilo_unknown.la \
+ at HDF5_DRV_NEEDED_FALSE@   filters/libsilo_filters.la 
+
+ at HDF5_DRV_NEEDED_FALSE@libsilo_la_LDFLAGS = -avoid-version
+BUILT_SOURCES = $(MAKESETTINGS)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+libsiloh5.settings: $(top_builddir)/config.status $(srcdir)/libsiloh5.settings.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+libsilo.settings: $(top_builddir)/config.status $(srcdir)/libsilo.settings.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo.la: $(libsilo_la_OBJECTS) $(libsilo_la_DEPENDENCIES) 
+	$(libsilo_la_LINK) $(am_libsilo_la_rpath) $(libsilo_la_OBJECTS) $(libsilo_la_LIBADD) $(LIBS)
+libsiloh5.la: $(libsiloh5_la_OBJECTS) $(libsiloh5_la_DEPENDENCIES) 
+	$(libsiloh5_la_LINK) $(am_libsiloh5_la_rpath) $(libsiloh5_la_OBJECTS) $(libsiloh5_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_version.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/siloh5_version.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-local
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-local ctags \
+	ctags-recursive distclean distclean-compile distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-data-local install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-recursive uninstall uninstall-am \
+	uninstall-libLTLIBRARIES uninstall-local
+
+$(MAKESETTINGS): Makefile
+	@echo "\"Makefile Summary\\\\n\"" | \
+		sed 's|\\\\|\\|'> $(MAKESETTINGS); \
+	echo "\"Compile command:         $(COMPILE) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS); \
+	echo "\"Libtool command:         $(LTCOMPILE) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS);\
+	echo "\"Link command:            $(LINK) $(LIBS) \\\\n\"" | \
+		sed 's|\\\\|\\|'>> $(MAKESETTINGS); \
+	if test -f $(SETTINGSFILE); then \
+	  cat $(MAKESETTINGS) >> $(SETTINGSFILE); fi
+
+install-data-local:
+	@test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"; \
+	if test -f $(SETTINGSFILE); then \
+	  cat $(SETTINGSFILE) | sed 's|\\n||' | \
+		sed 's|"||g' > $(SETTINGSFILE).tmp; \
+	  $(INSTALL) $(SETTINGSFILE).tmp $(DESTDIR)$(libdir)/$(SETTINGSFILE); \
+          rm -f $(SETTINGSFILE).tmp; \
+        fi
+
+uninstall-local:
+	@rm -f $(DESTDIR)$(libdir)/$(SETTINGSFILE)
+
+clean-local:
+	-rm -f $(MAKESETTINGS)
+# 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/src/debug/Makefile.am b/src/debug/Makefile.am
new file mode 100644
index 0000000..68ee5db
--- /dev/null
+++ b/src/debug/Makefile.am
@@ -0,0 +1,63 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_debug.la
+libsilo_debug_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+
+noinst_HEADERS = \
+ silo_debug_private.h
+FILES = \
+ silo_debug.c
diff --git a/src/debug/Makefile.in b/src/debug/Makefile.in
new file mode 100644
index 0000000..4d6a83c
--- /dev/null
+++ b/src/debug/Makefile.in
@@ -0,0 +1,550 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/debug
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_debug_la_LIBADD =
+am__objects_1 = silo_debug.lo
+am_libsilo_debug_la_OBJECTS = $(am__objects_1)
+libsilo_debug_la_OBJECTS = $(am_libsilo_debug_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_debug_la_SOURCES)
+DIST_SOURCES = $(libsilo_debug_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_debug.la
+libsilo_debug_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+noinst_HEADERS = \
+ silo_debug_private.h
+
+FILES = \
+ silo_debug.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/debug/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/debug/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_debug.la: $(libsilo_debug_la_OBJECTS) $(libsilo_debug_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_debug_la_OBJECTS) $(libsilo_debug_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_debug.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/debug/silo_debug.c b/src/debug/silo_debug.c
new file mode 100644
index 0000000..6caf1d2
--- /dev/null
+++ b/src/debug/silo_debug.c
@@ -0,0 +1,272 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * Debug device driver just for debugging.  Output is to a text file and
+ * is not meant to be re-read.  Most routines return an error status.
+ */
+#include "silo_debug_private.h"
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_close
+ *
+ * Purpose:     Close a debug file
+ *
+ * Return:      Success:        NULL
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 12:46:12 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Feb 27 15:59:34 PST 1995
+ *    I changed the return value to be an integer instead of a pointer
+ *    to a DBfile.
+ *
+ *    Eric Brugger, Wed Mar  1 07:57:56 PST 1995
+ *    I changed the function declaration to not use prototypes.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_debug_close(DBfile *_dbfile)
+{
+
+    DBfile_debug  *dbfile = (DBfile_debug *) _dbfile;
+
+    if (dbfile) {
+        fprintf(dbfile->file, "Closed.\n");
+        fclose(dbfile->file);
+        silo_db_close(_dbfile);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_create
+ *
+ * Purpose:     Open a text file that will get debugging information.
+ *              If the output name is "stdout" or "stderr" then output
+ *              is sent to either standard output or standard error
+ *              stream.
+ *
+ * Return:      Success:        pointer to new data file
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 12:43:21 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Mar  1 07:57:56 PST 1995
+ *    I changed the function declaration to not use prototypes.
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+INTERNAL DBfile *
+db_debug_create(char *name, int mode, int target, int subtype, char *finfo)
+{
+
+    char          *me = "db_debug_create";
+    DBfile_debug  *dbfile;
+
+    if (NULL == (dbfile = ALLOC(DBfile_debug))) {
+        db_perror(name, E_NOMEM, me);
+        return NULL;
+    }
+    if (STR_EQUAL(name, "stdout")) {
+        dbfile->file = stdout;
+    }
+    else if (STR_EQUAL(name, "stderr")) {
+        dbfile->file = stderr;
+    }
+    else if (NULL == (dbfile->file = fopen(name, "w"))) {
+        db_perror(name, E_NOFILE, me);
+        FREE(dbfile);
+        return NULL;
+    }
+    fprintf(dbfile->file, "Opened %s: %s\n", name, finfo);
+
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_DEBUG;
+
+    dbfile->pub.close = db_debug_close;
+    dbfile->pub.g_ca = db_debug_GetCompoundarray;
+    dbfile->pub.p_ca = db_debug_PutCompoundarray;
+    dbfile->pub.module = db_debug_Filters;
+
+    return (DBfile *) dbfile;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_open
+ *
+ * Purpose:     Open an existing file
+ *
+ * Return:      Success:        never succeeds
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 13:05:42 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Mar  1 07:57:56 PST 1995
+ *    I changed the function declaration to not use prototypes.
+ *
+ *    Sean Ahern, Mon Jan  8 17:42:19 PST 1996
+ *    Added the mode parameter.
+ *
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+INTERNAL DBfile *
+db_debug_open(char *name, int mode, int subtype)
+{
+
+    db_perror("Use DBCreate() instead", E_NOTIMP, "db_debug_open");
+    return NULL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_Filters
+ *
+ * Purpose:     Print the name of this device driver.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:16:22 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK int
+db_debug_Filters(DBfile *dbfile, FILE *stream)
+{
+    fprintf(stream, "Debug Device Driver\n");
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_GetCompoundarray
+ *
+ * Purpose:     Read a compound array object from a file.
+ *
+ * Return:      Success:        never succeeds
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 13:07:37 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Mar  1 07:57:56 PST 1995
+ *    I changed the function declaration to not use prototypes.
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK DBcompoundarray *
+db_debug_GetCompoundarray(DBfile *_file, char *name)
+{
+
+    db_perror("Debug device driver", E_NOTIMP, "db_debug_GetCompoundarray");
+    return NULL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_debug_PutCompoundarray
+ *
+ * Purpose:     Put a compound array object into a debug file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 13:09:45 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Mar  1 07:57:56 PST 1995
+ *    I changed the function declaration to not use prototypes.
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK int
+db_debug_PutCompoundarray(DBfile *_dbfile, char *array_name, char **elemnames,
+                          int *elemlengths, int nelems, void *values,
+                          int nvalues, int datatype, DBoptlist *optlist)
+{
+
+    DBfile_debug  *dbfile = (DBfile_debug *) _dbfile;
+
+    fprintf(dbfile->file, "DBPutCompoundarray:\n");
+    fprintf(dbfile->file, "  name ........................ %s\n",
+            array_name);
+    fprintf(dbfile->file, "  number of simple arrays ..... %d\n",
+            nelems);
+    fprintf(dbfile->file, "  number of values ............ %d\n",
+            nvalues);
+    fprintf(dbfile->file, "  data type ................... %s\n",
+            db_GetDatatypeString(datatype));
+
+    return 0;
+}
diff --git a/src/debug/silo_debug_private.h b/src/debug/silo_debug_private.h
new file mode 100644
index 0000000..492538b
--- /dev/null
+++ b/src/debug/silo_debug_private.h
@@ -0,0 +1,82 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef DEBUG_PRIVATE_H
+#define DEBUG_PRIVATE_H
+
+
+/*
+ * SILO DEBUG Private header file
+ *
+ * This header file is included by all silo-debug source files and
+ * contains constants and prototypes that should be visible to
+ * SILO-DEBUG source files, but not to the application.
+ */
+
+#include "silo_private.h"
+
+typedef struct DBfile_debug {
+    DBfile_pub     pub;
+    FILE          *file;
+} DBfile_debug;
+
+SILO_CALLBACK int db_debug_close(DBfile *);
+SILO_CALLBACK DBcompoundarray *db_debug_GetCompoundarray(DBfile *, char *);
+SILO_CALLBACK int db_debug_Filters(DBfile *, FILE *);
+SILO_CALLBACK int db_debug_PutCompoundarray(DBfile *, char *, char **, int *,
+                                       int, void *, int, int, DBoptlist *);
+
+INTERNAL DBfile *db_debug_create(char *, int, int, int, char *);
+INTERNAL DBfile *db_debug_open(char *, int, int);
+
+#endif /* !DEBUG_PRIVATE_H */
diff --git a/src/filters/Makefile.am b/src/filters/Makefile.am
new file mode 100644
index 0000000..e327d22
--- /dev/null
+++ b/src/filters/Makefile.am
@@ -0,0 +1,65 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+noinst_LTLIBRARIES = libsilo_filters.la
+libsilo_filters_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+
+noinst_HEADERS = \
+ filter.h
+FILES = \
+ f_ale3d.c \
+ f_sample.c
diff --git a/src/filters/Makefile.in b/src/filters/Makefile.in
new file mode 100644
index 0000000..65aa064
--- /dev/null
+++ b/src/filters/Makefile.in
@@ -0,0 +1,552 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/filters
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_filters_la_LIBADD =
+am__objects_1 = f_ale3d.lo f_sample.lo
+am_libsilo_filters_la_OBJECTS = $(am__objects_1)
+libsilo_filters_la_OBJECTS = $(am_libsilo_filters_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_filters_la_SOURCES)
+DIST_SOURCES = $(libsilo_filters_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_filters.la
+libsilo_filters_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+noinst_HEADERS = \
+ filter.h
+
+FILES = \
+ f_ale3d.c \
+ f_sample.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/filters/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/filters/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_filters.la: $(libsilo_filters_la_OBJECTS) $(libsilo_filters_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_filters_la_OBJECTS) $(libsilo_filters_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/f_ale3d.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/f_sample.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/filters/f_ale3d.c b/src/filters/f_ale3d.c
new file mode 100644
index 0000000..368aae0
--- /dev/null
+++ b/src/filters/f_ale3d.c
@@ -0,0 +1,2308 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * ALE-3d filter.
+ */
+#include <assert.h>
+#include <math.h>
+#include "silo_private.h"
+#include "filter.h"
+
+#if 0
+#define MAXBUF          100000
+#else
+#define MAXBUF          1000            /*for testing */
+#endif
+
+#define false           0
+#define true            1
+#define TTPI            2.09439510239319549230842892219  /* 2pi/3 */
+#define FTPI            4.18879020478639098461685784436  /* 4pi/3 */
+#define SQR(X)          ((X)*(X))
+
+#define DIR_ROOT          0            /* /               */
+#define DIR_NODE          1            /* /node           */
+#define DIR_BRICK         2            /* /brick          */
+#define DIR_SHELL         3            /* /shell          */
+#define DIR_BRICK_HYDRO   4            /* /brick/hydro    */
+#define DIR_BRICK_STRESS  5            /* /brick/stress   */
+#define DIR_SHELL_LOWER   6            /* /shell/lower    */
+#define DIR_SHELL_MIDDLE  7            /* /shell/middle   */
+#define DIR_SHELL_UPPER   8            /* /shell/upper    */
+#define DIR_SHELL_OTHER   9            /* /shell/other    */
+#define DIR_OTHER        10            /* /other          */
+
+static char   *f_ale3d_name[DB_NFILES];
+static DBfile_pub f_ale3d_cb[DB_NFILES];
+
+/*-------------------------------------------------------------------------
+ *
+ * Equations used in this file.
+ *
+ * Definitions:
+ *    sx  = xx total stress
+ *    sy  = yy total stress
+ *    sz  = zz total stress
+ *    txy = xy total stress
+ *    tyz = yz total stress
+ *    tzx = zx total stress
+ *    dev_sx  = xx deviatoric stress
+ *    dev_sy  = yy deviatoric stress
+ *    dev_sz  = zz deviatoric stress
+ *    dev_txy = xy deviatoric stress
+ *    dev_tyz = yz deviatoric stress
+ *    dev_tzx = zx deviatoric stress
+ *
+ *    TTPI = 2/3 pi
+ *    FTPI = 4/3 pi
+ *
+ * Equations:
+ *    twoj = sqrt (2.*sqr(sx)  + 2.*sqr(sy)  + 2.*sqr(sz) +
+ *                 2.*sqr(txy) + 2.*sqr(tyz) + 2.*sqr(tzx))
+ *
+ *    pressure = -(sx + sy + sz) / 3.0
+ *    dev_sx  = sx  + pressure
+ *    dev_sy  = sy  + pressure
+ *    dev_sz  = sz  + pressure
+ *    dev_txy = txy + pressure
+ *    dev_tyz = tyz + pressure
+ *    dev_tzx = tzx + pressure
+ *    von_mises = sqrt (3. * fabs(sqr(txy) + sqr(tyz) + sqr(tzx) -
+ *                dev_sx*dev_sy - dev_sy*dev_sz - dev_sz*dev_sx))
+ *
+ *    aa = sqr(txy) + sqr(tyz) + sqr(tzx) -
+ *         dev_sx*dev_sy - dev_sy*dev_sz - dev_sz*dev_sx
+ *
+ *    bb = dev_sx*sqr(tyz) + dev_sy*sqr(tzx) + dev_sz*sqr(txy) -
+ *         dev_sx*dev_syz*dev_szx - txy * tyz * tzx * 2.0
+ *
+ *    cc = -sqrt (27.0 / aa) * bb * 0.5 / aa
+ *
+ *    angp = acos(cc) / 3.0
+ *
+ *    princ_dev_stress_1 =  2.0 * sqrt(aa / 3.0) * cos(angp)
+ *    princ_dev_stress_2 =  2.0 * sqrt(aa / 3.0) * cos(angp+FTPI)
+ *    princ_dev_stress_3 =  2.0 * sqrt(aa / 3.0) * cos(angp+TTPI)
+ *    princ_tot_stress_1 = princ_dev_stress_1 - pressure
+ *    princ_tot_stress_2 = princ_dev_stress_2 - pressure
+ *    princ_tot_stress_3 = princ_dev_stress_3 - pressure
+ *    max_shear_stress   = 2.0 * sqrt (aa / 3.0) * (cos(angp) - cos(angp+TTPI))
+ *
+ *    surface_stress_1 = n_xx_normal / thickness + 6.0 *
+ *                       m_xx_bending / sqr(thickness)
+ *    surface_stress_2 = n_xx_normal / thickness - 6.0 *
+ *                       m_xx_bending / sqr(thickness)
+ *    surface_stress_3 = n_yy_normal / thickness + 6.0 *
+ *                       m_yy_bending / sqr(thickness)
+ *    surface_stress_4 = n_yy_normal / thickness - 6.0 *
+ *                       m_yy_bending / sqr(thickness)
+ *    surface_stress_5 = n_xy_normal / thickness + 6.0 *
+ *                       m_xy_bending / sqr(thickness)
+ *    surface_stress_6 = n_xy_normal / thickness - 6.0 *
+ *                       m_xy_bending / sqr(thickness)
+ *    eff_upper_stress = sqrt (sqr(surface_stress_1) +
+ *                       (surface_stress_1 * surface_stress_3) +
+ *                       sqr(surface_stress_3) + 3.0 * sqr(surface_stress_5)
+ *    eff_lower_stress = sqrt (sqr(surface_stress_2) +
+ *                       (surface_stress_2 * surface_stress_4) +
+ *                       sqr(surface_stress_4) + 3.0 * sqr(surface_stress_6)
+ *    eff_max_stress   = max (eff_lower_stress, eff_upper_stress)
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*-------------------------------------------------------------------------
+ * This structure records dependency information about UCD variables supplied
+ * by this filter (virtual variables) and the real UCD variables appearing in
+ * the database.
+ *
+ * The `v' field is the virtual variable name.  The `r' field is a colon-
+ * separated list of real variable names.  If there is only one dependency
+ * in `r' then the variable is simply a change-of-name.
+ *
+ * The `r' field may contain more than one dependency list.  Each dependency
+ * list is terminated with a null character.  The final dependency list
+ * must be terminated with two null characters (the C compiler will
+ * supply one automatically).  If a variable has an alias, then that
+ * one-item dependency should be listed first.
+ *-------------------------------------------------------------------------
+ */
+#define BRICK_TOT_STRESS_XX         0
+#define BRICK_TOT_STRESS_YY         1
+#define BRICK_TOT_STRESS_ZZ         2
+#define BRICK_VON_MISES             3
+#define BRICK_MAX_SHEAR_STRESS      4
+#define BRICK_PRINC_DEV_STRESS_1    5
+#define BRICK_PRINC_DEV_STRESS_2    6
+#define BRICK_PRINC_DEV_STRESS_3    7
+#define BRICK_PRINC_TOT_STRESS_1    8
+#define BRICK_PRINC_TOT_STRESS_2    9
+#define BRICK_PRINC_TOT_STRESS_3   10
+
+#define SHELL_PRESSURE            0
+#define SHELL_VON_MISES           1
+#define SHELL_MAX_SHEAR_STRESS    2
+#define SHELL_PRINC_DEV_STRESS_1  3
+#define SHELL_PRINC_DEV_STRESS_2  4
+#define SHELL_PRINC_DEV_STRESS_3  5
+#define SHELL_PRINC_TOT_STRESS_1  6
+#define SHELL_PRINC_TOT_STRESS_2  7
+#define SHELL_PRINC_TOT_STRESS_3  8
+
+#define SHELL_SURFACE_STRESS_1  0
+#define SHELL_SURFACE_STRESS_2  1
+#define SHELL_SURFACE_STRESS_3  2
+#define SHELL_SURFACE_STRESS_4  3
+#define SHELL_SURFACE_STRESS_5  4
+#define SHELL_SURFACE_STRESS_6  5
+#define SHELL_EFF_UPPER_STRESS  6
+#define SHELL_EFF_LOWER_STRESS  7
+#define SHELL_EFF_MAX_STRESS    8
+
+static void calc_magnitude (float *result, float **data, int length, int extra);
+static void calc_j2 (float *result, float **data, int length, int extra);
+static void calc_brick (float *result, float **data, int length, int extra);
+static void calc_shell (float *result, float **data, int length, int extra);
+static void calc_shell_other (float *result, float **data, int length,
+    int extra);
+
+static struct {                 /*Variable we are intercepting  */
+    char          *v;           /*Virtual (new) name   */
+    char          *r;           /*Real dependencies   */
+    int           dir;          /*Directory that the variable is in */
+    void          (*f) (float *, float **, int, int);  /*Calc routine */
+    int           extra;        /*fourth arg to `f'   */
+} Intercept[] = {
+
+    {
+        "acc_x", "acc_x\0", DIR_NODE, NULL, 0
+    },
+    {
+        "acc_y", "acc_y\0", DIR_NODE, NULL, 0
+    },
+    {
+        "acc_z", "acc_z\0", DIR_NODE, NULL, 0
+    },
+    {
+        "acc_magnitude", "acc_x:acc_y:acc_z\0", DIR_NODE, calc_magnitude, 0
+    },
+    {
+        "disp_x", "disp_x\0", DIR_NODE, NULL, 0
+    },
+    {
+        "disp_y", "disp_y\0", DIR_NODE, NULL, 0
+    },
+    {
+        "disp_z", "disp_z\0", DIR_NODE, NULL, 0
+    },
+    {
+        "disp_magnitude", "disp_x:disp_y:disp_z\0", DIR_NODE, calc_magnitude, 0
+    },
+    {
+        "heatflux_x", "heatflux_x\0", DIR_NODE, NULL, 0
+    },
+    {
+        "heatflux_y", "heatflux_y\0", DIR_NODE, NULL, 0
+    },
+    {
+        "heatflux_z", "heatflux_z\0", DIR_NODE, NULL, 0
+    },
+    {
+        "temperature", "heatflux_x:heatflux_y:heatflux_z\0", DIR_NODE,
+        calc_magnitude, 0
+    },
+    {
+        "vel_x", "vel_x\0", DIR_NODE, NULL, 0
+    },
+    {
+        "vel_y", "vel_y\0", DIR_NODE, NULL, 0
+    },
+    {
+        "vel_z", "vel_z\0", DIR_NODE, NULL, 0
+    },
+    {
+        "vel_magnitude", "vel_x:vel_y:vel_z\0", DIR_NODE, calc_magnitude, 0
+    },
+
+    /*
+     * /brick/hydro.
+     */
+    {
+        "density", "density\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "equivalent_plastic_strain", "equivalent_plastic_strain\0",
+        DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "energy", "energy\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "lighting_time", "lighting_time\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "pressure", "pressure\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "relative_volume", "relative_volume\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "shear_modulus", "shear_modulus\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "shock_viscosity", "shock_viscosity\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "sigmts", "sigtmts\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "twoj", "dev_stress_xx:dev_stress_yy:dev_stress_zz:dev_stress_xy"
+        ":dev_stress_xz:dev_stress_yz\0", DIR_BRICK_HYDRO, calc_j2, 0
+    },
+    {
+        "yield", "yield\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+    {
+        "zonal_temperature", "zonal_temperature\0", DIR_BRICK_HYDRO, NULL, 0
+    },
+
+    /*
+     * /brick/stress.
+     */
+    {
+        "dev_stress_xx", "dev_stress_xx\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "dev_stress_yy", "dev_stress_yy\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "dev_stress_zz", "dev_stress_zz\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "max_shear_stress", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_MAX_SHEAR_STRESS
+    },
+    {
+        "princ_dev_stress_1", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_PRINC_DEV_STRESS_1
+    },
+    {
+        "princ_dev_stress_2", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_PRINC_DEV_STRESS_2
+    },
+    {
+        "princ_dev_stress_3", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_PRINC_DEV_STRESS_3
+    },
+    {
+        "princ_tot_stress_1", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz:pressure\0",
+        DIR_BRICK_STRESS, calc_brick, BRICK_PRINC_TOT_STRESS_1
+    },
+    {
+        "princ_tot_stress_2", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz:pressure\0",
+        DIR_BRICK_STRESS, calc_brick, BRICK_PRINC_TOT_STRESS_2
+    },
+    {
+        "princ_tot_stress_3", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz:pressure\0",
+        DIR_BRICK_STRESS, calc_brick, BRICK_PRINC_TOT_STRESS_3
+    },
+    {
+        "tot_stress_xx", "dev_stress_xx:pressure\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_TOT_STRESS_XX
+    },
+    {
+        "tot_stress_yy", "dev_stress_yy:pressure\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_TOT_STRESS_YY
+    },
+    {
+        "tot_stress_zz", "dev_stress_zz:pressure\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_TOT_STRESS_ZZ
+    },
+    {
+        "tot_stress_xy", "dev_stress_xy\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "tot_stress_yz", "dev_stress_yz\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "tot_stress_zx", "dev_stress_xz\0", DIR_BRICK_STRESS, NULL, 0
+    },
+    {
+        "von_mises", "dev_stress_xx:dev_stress_yy:dev_stress_zz"
+        ":dev_stress_xy:dev_stress_yz:dev_stress_xz\0", DIR_BRICK_STRESS,
+        calc_brick, BRICK_VON_MISES
+    },
+
+    /*
+     * /shell/lower.
+     */
+    {
+        "equivalent_plastic_strain", "low_equivalent_plastic_strain\0",
+        DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "max_shear_stress", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_MAX_SHEAR_STRESS
+    },
+    {
+        "pressure", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRESSURE
+    },
+    {
+        "princ_dev_stress_1", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_1
+    },
+    {
+        "princ_dev_stress_2", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_2
+    },
+    {
+        "princ_dev_stress_3", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_3
+    },
+    {
+        "princ_tot_stress_1", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_1
+    },
+    {
+        "princ_tot_stress_2", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_2
+    },
+    {
+        "princ_tot_stress_3", "low_tot_stress_xx:low_tot_stress_yy"
+        ":low_tot_stress_zz:low_tot_stress_xy:low_tot_stress_yz"
+        ":low_tot_stress_zx\0", DIR_SHELL_LOWER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_3
+    },
+    {
+        "strain_xx", "low_strain_xx\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "strain_yy", "low_strain_yy\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "strain_zz", "low_strain_zz\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "strain_xy", "low_strain_xy\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "strain_yz", "low_strain_yz\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "strain_zx", "low_strain_zx\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_xx", "low_tot_stress_xx\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_yy", "low_tot_stress_yy\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_zz", "low_tot_stress_zz\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_xy", "low_tot_stress_xy\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_yz", "low_tot_stress_yz\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "tot_stress_zx", "low_tot_stress_zx\0", DIR_SHELL_LOWER, NULL, 0
+    },
+    {
+        "von_mises", "low_tot_stress_xx:low_tot_stress_yy:low_tot_stress_zz"
+        ":low_tot_stress_xy:low_tot_stress_yz:low_tot_stress_zx\0",
+        DIR_SHELL_LOWER, calc_shell, SHELL_VON_MISES
+    },
+
+    /*
+     * /shell/middle.
+     */
+    {
+        "equivalent_plastic_strain", "mid_equivalent_plastic_strain\0",
+        DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "max_shear_stress", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_MAX_SHEAR_STRESS
+    },
+    {
+        "pressure", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRESSURE
+    },
+    {
+        "princ_dev_stress_1", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_DEV_STRESS_1
+    },
+    {
+        "princ_dev_stress_2", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_DEV_STRESS_2
+    },
+    {
+        "princ_dev_stress_3", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_DEV_STRESS_3
+    },
+    {
+        "princ_tot_stress_1", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_TOT_STRESS_1
+    },
+    {
+        "princ_tot_stress_2", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_TOT_STRESS_2
+    },
+    {
+        "princ_tot_stress_3", "mid_tot_stress_xx:mid_tot_stress_yy"
+        ":mid_tot_stress_zz:mid_tot_stress_xy:mid_tot_stress_yz"
+        ":mid_tot_stress_zx\0", DIR_SHELL_MIDDLE,
+        calc_shell, SHELL_PRINC_TOT_STRESS_3
+    },
+    {
+        "strain_xx", "mid_strain_xx\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "strain_yy", "mid_strain_yy\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "strain_zz", "mid_strain_zz\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "strain_xy", "mid_strain_xy\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "strain_yz", "mid_strain_yz\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "strain_zx", "mid_strain_zx\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_xx", "mid_tot_stress_xx\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_yy", "mid_tot_stress_yy\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_zz", "mid_tot_stress_zz\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_xy", "mid_tot_stress_xy\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_yz", "mid_tot_stress_yz\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "tot_stress_zx", "mid_tot_stress_zx\0", DIR_SHELL_MIDDLE, NULL, 0
+    },
+    {
+        "von_mises", "mid_tot_stress_xx:mid_tot_stress_yy:mid_tot_stress_zz"
+        ":mid_tot_stress_xy:mid_tot_stress_yz:mid_tot_stress_zx\0",
+        DIR_SHELL_MIDDLE, calc_shell, SHELL_VON_MISES
+    },
+
+    /*
+     * /shell/upper.
+     */
+    {
+        "equivalent_plastic_strain", "upp_equivalent_plastic_strain\0",
+        DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "max_shear_stress", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_MAX_SHEAR_STRESS
+    },
+    {
+        "pressure", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRESSURE
+    },
+    {
+        "princ_dev_stress_1", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_1
+    },
+    {
+        "princ_dev_stress_2", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_2
+    },
+    {
+        "princ_dev_stress_3", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_DEV_STRESS_3
+    },
+    {
+        "princ_tot_stress_1", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_1
+    },
+    {
+        "princ_tot_stress_2", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_2
+    },
+    {
+        "princ_tot_stress_3", "upp_tot_stress_xx:upp_tot_stress_yy"
+        ":upp_tot_stress_zz:upp_tot_stress_xy:upp_tot_stress_yz"
+        ":upp_tot_stress_zx\0", DIR_SHELL_UPPER,
+        calc_shell, SHELL_PRINC_TOT_STRESS_3
+    },
+    {
+        "strain_xx", "upp_strain_xx\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "strain_yy", "upp_strain_yy\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "strain_zz", "upp_strain_zz\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "strain_xy", "upp_strain_xy\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "strain_yz", "upp_strain_yz\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "strain_zx", "upp_strain_zx\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_xx", "upp_tot_stress_xx\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_yy", "upp_tot_stress_yy\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_zz", "upp_tot_stress_zz\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_xy", "upp_tot_stress_xy\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_yz", "upp_tot_stress_yz\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "tot_stress_zx", "upp_tot_stress_zx\0", DIR_SHELL_UPPER, NULL, 0
+    },
+    {
+        "von_mises", "upp_tot_stress_xx:upp_tot_stress_yy:upp_tot_stress_zz"
+        ":upp_tot_stress_xy:upp_tot_stress_yz:upp_tot_stress_zx\0",
+        DIR_SHELL_UPPER, calc_shell, SHELL_VON_MISES
+    },
+
+    /*
+     * /shell/other.
+     */
+    {
+        "eff_lower_stress", "m_xx_bending:m_yy_bending:m_xy_bending"
+        ":n_xx_normal:n_yy_normal:n_xy_normal:thickness\0", DIR_SHELL_OTHER,
+        calc_shell_other, SHELL_EFF_LOWER_STRESS
+    },
+    {
+        "eff_max_stress", "m_xx_bending:m_yy_bending:m_xy_bending"
+        ":mn_xx_normal:n_yy_normal:n_xy_normal:thickness\0", DIR_SHELL_OTHER,
+        calc_shell_other, SHELL_EFF_MAX_STRESS
+    },
+    {
+        "eff_upper_stress", "m_xx_bending:m_yy_bending:m_xy_bending"
+        ":n_xx_normal:n_yy_normal:n_xy_normal:thickness\0", DIR_SHELL_OTHER,
+        calc_shell_other, SHELL_EFF_UPPER_STRESS
+    },
+    {
+        "internal_energy", "internal_energy\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "m_xx_bending", "m_xx_bending\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "m_yy_bending", "m_yy_bending\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "m_xy_bending", "m_xy_bending\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "n_xx_normal", "n_xx_normal\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "n_yy_normal", "n_yy_normal\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "n_xy_normal", "n_xy_normal\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "q_xx_shear", "q_xx_shear\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "q_yy_shear", "q_yy_shear\0", DIR_SHELL_OTHER, NULL, 0
+    },
+    {
+        "surface_stress_1", "m_xx_bending:n_xx_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_1
+    },
+    {
+        "surface_stress_2", "m_xx_bending:n_xx_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_2
+    },
+    {
+        "surface_stress_3", "m_yy_bending:n_yy_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_3
+    },
+    {
+        "surface_stress_4", "m_yy_bending:n_yy_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_4
+    },
+    {
+        "surface_stress_5", "m_xy_bending:n_xy_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_5
+    },
+    {
+        "surface_stress_6", "m_xy_bending:n_xy_normal:thickness\0",
+        DIR_SHELL_OTHER, calc_shell_other, SHELL_SURFACE_STRESS_6
+    },
+    {
+        "thickness", "thickness\0", DIR_SHELL_OTHER, NULL, 0
+    },
+
+};
+
+/*-------------------------------------------------------------------------
+ * Function:    satisfied
+ *
+ * Purpose:     Given a database ID and a virtual name, determine if all
+ *              of the real dependencies exist.
+ *
+ * Return:      Success:        0=no, >0=yes
+ *
+ *              Failure:        -1 (shouldn't ever happen)
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 20:22:44 EST 1995
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, Thu Mar 16 12:29:55 EST 1995
+ *      Changed to support the multiple dependency lists.  Each dep list
+ *      is terminated with a null character.  The final list is terminated
+ *      with two null terminators.
+ *
+ *      Robb Matzke, Thu Mar 16 12:52:16 EST 1995
+ *      The dependency list where all the items are satisfied is saved
+ *      in the parameter `deplist' if not the null pointer.  If no
+ *      dependency list was completely satisfied or if `name' was not
+ *      found, then deplist[0]=='\0'.  If `slotno' is non-null, then it
+ *      will be initialized with the Intercept slot number, or -1 if
+ *      name is not found in any slot.
+ *
+ *      Jim Reus, 23 Apr 97
+ *      Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+satisfied ( int id, char *name, char *deplist, int *slotno)
+{
+    char          *me = "satisfied";
+    DBtoc         *real_toc;
+    int            slot, listno, found, i;
+    char          *list, _work[256], *work, *item;
+
+    if (!f_ale3d_cb[id].toc) {
+        return db_perror("missing table of contents", E_INTERNAL, me);
+    }
+    real_toc = f_ale3d_cb[id].toc;
+
+    /*
+     * Search the entire Intercept table until we find the requested
+     * virtual variable.  Only one entry in the table will match `name',
+     * so we use the first on that we find.
+     */
+    for (slot = 0; slot < NELMTS(Intercept); slot++) {
+        if (!strcmp(Intercept[slot].v, name))
+            break;
+    }
+    if (slot >= NELMTS(Intercept)) {
+        if (deplist)
+            deplist[0] = '\0';
+        if (slotno)
+            *slotno = -1;
+        return false;
+    }
+    if (slotno)
+        *slotno = slot;
+
+    /*
+     * Look at each dependency list until we find one where all of the
+     * dependencies in that list are satisfied.  Return the 1-origin
+     * list number whose dependencies were all satisfied.
+     */
+    for (listno = 1, list = Intercept[slot].r;
+         list && *list;
+         listno++, list += strlen(list) + 1) {
+        strcpy(_work, list);
+        work = _work;
+        if (deplist)
+            strcpy(deplist, list);
+
+        /*
+         * Check each dependency item.
+         */
+        for (work = _work, found = true;
+             found && (item = strtok(work, ":"));
+             work = NULL) {
+            for (i = found = 0; !found && i < real_toc->nucdvar; i++) {
+                found = !strcmp(item, real_toc->ucdvar_names[i]);
+            }
+        }
+
+        /*
+         * If every item in this dependency list was found, return
+         * the 1-origin list number.
+         */
+        if (found)
+            return listno;
+    }
+
+    if (deplist)
+        deplist[0] = '\0';
+    return false;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    v_exists
+ *
+ * Purpose:     Determine if `name' is a UCD variable in the specified
+ *              table of contents.
+ *
+ * Return:      Success:        0=no, 1=yes
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Wed Mar  8 18:16:32 EST 1995
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+v_exists ( DBtoc *toc, char *name)
+{
+    int            i;
+
+    if (!toc)
+        return false;
+    for (i = 0; i < toc->nucdvar; i++) {
+        if (!strcmp(name, toc->ucdvar_names[i]))
+            return true;
+    }
+    return false;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_Uninstall
+ *
+ * Purpose:     Removes the filter from the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Thu Mar 16 10:37:18 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_Uninstall(dbfile)
+    DBfile        *dbfile;
+{
+    int            id;
+    char          *me = "f_ale3d_Uninstall";
+
+    if ((id = FILTER_ID(dbfile, me)))
+        return -1;
+
+    /*
+     * Copy old public fields back onto file.
+     */
+    db_FreeToc(dbfile);
+    memcpy(&(dbfile->pub), f_ale3d_cb + id, sizeof(DBfile_pub));
+    free(f_ale3d_name[id]);
+    f_ale3d_name[id] = NULL;
+    return DBNewToc(dbfile);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_Filters
+ *
+ * Purpose:     Print the filter names to the specified stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:06:17 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_Filters(dbfile, stream)
+    DBfile        *dbfile;
+    FILE          *stream;
+{
+    int            id;
+    char          *me = "f_ale3d_Filters";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    fprintf(stream, "%s [ALE-3d filter]\n", f_ale3d_name[id]);
+    return FILTER_CALL(f_ale3d_cb[id].module, (dbfile, stream), -1, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_close
+ *
+ * Purpose:     Close the database.  Clear entry in filter tables.
+ *
+ * Return:      Value of device driver
+ *
+ * Programmer:  robb at cloud
+ *              Mon Mar  6 18:03:00 EST 1995
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 14 May 1996
+ *      Fixed the return value to be -1 on error.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_Close(dbfile)
+    DBfile        *dbfile;
+{
+    int            retval;
+    char          *me = "f_ale3d_close";
+    int            id;
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1 ;
+    retval = FILTER_CALL(f_ale3d_cb[id].close, (dbfile), (int)0, me);
+    free(f_ale3d_name[id]);
+    f_ale3d_name[id] = NULL;
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_NewToc
+ *
+ * Purpose:     After the device driver builds the table of contents,
+ *              we should store it away and build our own which contains
+ *              only those items that are visible to the user.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 10:20:23 EST 1995
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 14 May 1996
+ *      Fixed an assert() so as not to cause a compiler warning.
+ *
+ *      Eric Brugger, Mon Nov 11 09:14:13 PST 1996
+ *      I modified the routine to use the new intercept data structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_NewToc(dbfile)
+    DBfile        *dbfile;
+{
+    int            id, nvars, i, j;
+    char          *me = "f_ale3d_NewToc";
+    DBtoc         *toc, *real_toc;
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+
+    /*
+     * If we haven't gotten a true table of contents yet, we should
+     * do that now.  The true table of contents should never change
+     * since ALE-3d files don't have directories.
+     */
+    if (NULL == f_ale3d_cb[id].toc) {
+        if (FILTER_CALL(f_ale3d_cb[id].newtoc, (dbfile), -1, me) < 0)
+            return -1;
+        f_ale3d_cb[id].toc = dbfile->pub.toc;
+        dbfile->pub.toc = NULL;
+    }
+    real_toc = f_ale3d_cb[id].toc;
+
+    /*
+     * Depending on which directory is current (by directory ID) we
+     * should build a fake table of contents.
+     */
+    db_FreeToc(dbfile);
+    toc = dbfile->pub.toc = db_AllocToc();
+    switch (dbfile->pub.dirid) {
+        case DIR_ROOT:
+            toc->nucdmesh = 5;
+            toc->ucdmesh_names = ALLOC_N(char *, toc->nucdmesh);
+
+            toc->ucdmesh_names[0] = STRDUP("beam_mesh");
+            toc->ucdmesh_names[1] = STRDUP("hex_mesh");
+            toc->ucdmesh_names[2] = STRDUP("hs_mesh");
+            toc->ucdmesh_names[3] = STRDUP("mesh1");
+            toc->ucdmesh_names[4] = STRDUP("shell_mesh");
+
+            toc->nmat = 1;
+            toc->mat_names = ALLOC_N(char *, toc->nmat);
+
+            toc->mat_names[0] = STRDUP("mat1");
+
+            toc->ndir = 4;
+            toc->dir_names = ALLOC_N(char *, toc->ndir);
+
+            toc->dir_names[0] = STRDUP("brick");
+            toc->dir_names[1] = STRDUP("node");
+            toc->dir_names[2] = STRDUP("other");
+            toc->dir_names[3] = STRDUP("shell");
+            break;
+
+        case DIR_BRICK:
+            toc->ndir = 2;
+            toc->dir_names = ALLOC_N(char *, toc->ndir);
+
+            toc->dir_names[0] = STRDUP("hydro");
+            toc->dir_names[1] = STRDUP("stress");
+
+            break;
+
+        case DIR_SHELL:
+            toc->ndir = 4;
+            toc->dir_names = ALLOC_N(char *, toc->ndir);
+
+            toc->dir_names[0] = STRDUP("lower");
+            toc->dir_names[1] = STRDUP("middle");
+            toc->dir_names[2] = STRDUP("other");
+            toc->dir_names[3] = STRDUP("upper");
+
+            break;
+
+        case DIR_NODE:
+        case DIR_BRICK_HYDRO:
+        case DIR_BRICK_STRESS:
+        case DIR_SHELL_LOWER:
+        case DIR_SHELL_MIDDLE:
+        case DIR_SHELL_UPPER:
+        case DIR_SHELL_OTHER:
+            /*
+             * Skip over the portion of the list that doesn't
+             * apply to this directory.  This logic assumes that
+             * the list is sorted in increasing order of "dir".
+             */
+            for (i = 0; Intercept[i].dir < dbfile->pub.dirid; i++)
+                /* do nothing */;
+
+            /*
+             * Form the list of variables in the current directory.
+             * This coding assumes that none of the directories
+             * contain more than 24 variables.
+             */
+            toc->ucdvar_names = ALLOC_N(char *, 24);
+
+            toc->nucdvar = nvars = 0;
+            for (; Intercept[i].dir == dbfile->pub.dirid; i++) {
+                if (satisfied(id, Intercept[i].v, NULL, NULL)) {
+                    toc->ucdvar_names[nvars++] = STRDUP(Intercept[i].v);
+                }
+            }
+            toc->nucdvar = nvars;
+            break;
+
+        case DIR_OTHER:
+            /*
+             * All UCD variables that don't have aliases.  If a virtual variable
+             * has an alias, the real variable will be listed first in the
+             * dependency lists.
+             */
+            toc->ucdvar_names = ALLOC_N(char *, real_toc->nucdvar);
+
+            nvars = toc->nucdvar = 0;
+            for (i = 0; i < real_toc->nucdvar; i++) {
+                for (j = 0; j < NELMTS(Intercept); j++) {
+                    if (strchr(Intercept[j].r, ':'))
+                        continue;
+                    if (!strcmp(real_toc->ucdvar_names[i], Intercept[j].r)) {
+                        break;
+                    }
+                }
+                if (j >= NELMTS(Intercept)) {
+                    toc->ucdvar_names[nvars++] =
+                        STRDUP(real_toc->ucdvar_names[i]);
+                }
+            }
+            toc->nucdvar = nvars;
+            break;
+
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_SetDir
+ *
+ * Purpose:     The underlying file does not have directories.  This filter
+ *              supports virtual directories by modifying the table of
+ *              contents based on which virtual directory is current.
+ *              Directories look like UNIX directories.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 12:40:44 EST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Nov 11 09:14:13 PST 1996
+ *    I modified the routine to match the new directory structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_SetDir(dbfile, path)
+    DBfile        *dbfile;
+    char          *path;
+{
+    int            dirid;
+    char          *me = "f_ale3d_SetDir";
+    char          *s, *t, work[1024];
+
+    if (FILTER_ID(dbfile, me) < 0)
+        return -1;
+
+    strncpy(work, path, sizeof(work));
+    work[sizeof(work) - 1] = '\0';
+    if ('/' == work[0]) {
+        dirid = DIR_ROOT;
+        s = work + 1;
+    }
+    else {
+        dirid = dbfile->pub.dirid;
+        s = work;
+    }
+
+    for ( /*void */ ; (t = strtok(s, "/")); s = NULL) {
+        if (!strcmp(t, ".")) {
+            /*nothing */
+        }
+        else if (!strcmp(t, "..")) {
+            switch (dirid) {
+                case DIR_ROOT:
+                case DIR_NODE:
+                case DIR_BRICK:
+                case DIR_SHELL:
+                case DIR_OTHER:
+                    dirid = DIR_ROOT;
+                    break;
+                case DIR_BRICK_HYDRO:
+                case DIR_BRICK_STRESS:
+                    dirid = DIR_BRICK;
+                    break;
+                case DIR_SHELL_LOWER:
+                case DIR_SHELL_MIDDLE:
+                case DIR_SHELL_UPPER:
+                case DIR_SHELL_OTHER:
+                    dirid = DIR_SHELL;
+                    break;
+            }
+        }
+        else if (!strcmp(t, "node")) {
+            if (DIR_ROOT != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_NODE;
+        }
+        else if (!strcmp(t, "brick")) {
+            if (DIR_ROOT != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_BRICK;
+        }
+        else if (!strcmp(t, "shell")) {
+            if (DIR_ROOT != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_SHELL;
+        }
+        else if (!strcmp(t, "other")) {
+            if (DIR_ROOT == dirid) {
+                dirid = DIR_OTHER;
+            }
+            else if (DIR_SHELL == dirid) {
+                dirid = DIR_SHELL_OTHER;
+            }
+            else {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+        }
+        else if (!strcmp(t, "hydro")) {
+            if (DIR_BRICK != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_BRICK_HYDRO;
+        }
+        else if (!strcmp(t, "stress")) {
+            if (DIR_BRICK != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_BRICK_STRESS;
+        }
+        else if (!strcmp(t, "lower")) {
+            if (DIR_SHELL != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_SHELL_LOWER;
+        }
+        else if (!strcmp(t, "middle")) {
+            if (DIR_SHELL != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_SHELL_MIDDLE;
+        }
+        else if (!strcmp(t, "upper")) {
+            if (DIR_SHELL != dirid) {
+                db_perror(path, E_NOTDIR, me);
+                return -1;
+            }
+            dirid = DIR_SHELL_UPPER;
+        }
+        else {
+            db_perror(path, E_NOTDIR, me);
+            return -1;
+        }
+    }
+    dbfile->pub.dirid = dirid;
+    return DBNewToc(dbfile);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_SetDirID
+ *
+ * Purpose:     Set the current virtual directory based on the specified
+ *              directory ID number.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 12:55:28 EST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Nov 11 09:14:13 PST 1996
+ *    I modified the routine to match the new directory structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_SetDirID(dbfile, dirid)
+    DBfile        *dbfile;
+    int            dirid;
+{
+    char          *me = "f_ale3d_SetDirID";
+
+    if (FILTER_ID(dbfile, me) < 0)
+        return -1;
+    switch (dirid) {
+        case DIR_ROOT:
+        case DIR_NODE:
+        case DIR_BRICK:
+        case DIR_SHELL:
+        case DIR_BRICK_HYDRO:
+        case DIR_BRICK_STRESS:
+        case DIR_SHELL_LOWER:
+        case DIR_SHELL_MIDDLE:
+        case DIR_SHELL_UPPER:
+        case DIR_OTHER:
+            if (dbfile->pub.dirid != dirid) {
+                dbfile->pub.dirid = dirid;
+                DBNewToc(dbfile);
+            }
+            else {
+                dbfile->pub.dirid = dirid;
+            }
+            break;
+        default:
+            return db_perror(NULL, E_NOTDIR, me);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_GetDir
+ *
+ * Purpose:     Return the name of the current virtual directory in a
+ *              user-supplied buffer of at least 16 bytes.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 13:02:08 EST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Nov 11 09:14:13 PST 1996
+ *    I modified the routine to match the new directory structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_GetDir(dbfile, path)
+    DBfile        *dbfile;
+    char          *path;        /*output */
+{
+    char          *me = "f_ale3d_GetDir";
+
+    if (FILTER_ID(dbfile, me) < 0)
+        return -1;
+    switch (dbfile->pub.dirid) {
+        case DIR_ROOT:
+            strcpy(path, "/");
+            break;
+        case DIR_NODE:
+            strcpy(path, "/node");
+            break;
+        case DIR_BRICK:
+            strcpy(path, "/brick");
+            break;
+        case DIR_SHELL:
+            strcpy(path, "/shell");
+            break;
+        case DIR_OTHER:
+            strcpy(path, "/other");
+            break;
+        case DIR_BRICK_HYDRO:
+            strcpy(path, "/brick/hydro");
+            break;
+        case DIR_BRICK_STRESS:
+            strcpy(path, "/brick/hydro");
+            break;
+        case DIR_SHELL_LOWER:
+            strcpy(path, "/shell/lower");
+            break;
+        case DIR_SHELL_MIDDLE:
+            strcpy(path, "/shell/middle");
+            break;
+        case DIR_SHELL_UPPER:
+            strcpy(path, "/shell/upper");
+            break;
+        case DIR_SHELL_OTHER:
+            strcpy(path, "/shell/other");
+            break;
+        default:
+            return db_perror("internal directory error", E_NOTDIR, me);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    calc_magnitude
+ *
+ * Purpose:     Given the data for the three components of a vector in the
+ *              `data' parameter, calculate the magnitude for the indicated
+ *              number of items.
+ *
+ * Return:      void
+ *
+ * Programmer:  brugger at kickit
+ *              Thu Mar 13 11:12:45 PST 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:51:22 PST 1999
+ *    Changed to ANSI-style prototype.
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+static void
+calc_magnitude(float *result, float **data, int length, int extra)
+{
+    int            i;
+
+    for (i = 0; i < length; i++) {
+        result[i] = sqrt(data[0][i] * data[0][i] +
+                         data[1][i] * data[1][i] +
+                         data[2][i] * data[2][i]);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    calc_j2
+ *
+ * Purpose:     Given the data for sx, sy, sz, txy, tyz, tzx in the `data'
+ *              parameter, calculate j2 for the indicated number of items.
+ *
+ * Return:      void
+ *
+ * Programmer:  brugger at kickit
+ *              Thu Mar 13 11:12:45 PST 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:51:22 PST 1999
+ *    Changed to ANSI-style prototype.
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+static void
+calc_j2(float *result, float **data, int length, int extra)
+{
+    int            i;
+
+    /*
+     * data[0] = dev_stress_xx
+     * data[1] = dev_stress_yy
+     * data[2] = dev_stress_zz
+     * data[3] = tot_stress_xy
+     * data[4] = tot_stress_yz
+     * data[5] = tot_stress_zx
+     */
+    for (i = 0; i < length; i++) {
+        result[i] = sqrt(2.0 * data[0][i] * data[0][i] +
+                         2.0 * data[1][i] * data[1][i] +
+                         2.0 * data[2][i] * data[2][i] +
+                         2.0 * data[3][i] * data[3][i] +
+                         2.0 * data[4][i] * data[4][i] +
+                         2.0 * data[5][i] * data[5][i]);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    calc_brick
+ *
+ * Purpose:     Given the data required to calculate a given brick
+ *              variable in the `data' parameter, calculate the variable
+ *              for the indicated number of items.
+ *
+ * Return:      void
+ *
+ * Programmer:  brugger at kickit
+ *              Fri Mar 14 11:55:03 PST 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+calc_brick(float *result, float **data, int length, int extra)
+{
+    int            i;
+    double         aa, bb, cc, dd, angp;
+
+    switch (extra) {
+        case BRICK_TOT_STRESS_XX:
+        case BRICK_TOT_STRESS_YY:
+        case BRICK_TOT_STRESS_ZZ:
+            /*
+             * data[0] = dev_stress_xx
+             * data[1] = pressure
+             */
+            for (i = 0; i < length; i++) {
+                result[i] = data[0][i] - data[1][i];
+            }
+            break;
+        case BRICK_VON_MISES:
+            /*
+             * data[0] = dev_stress_xx
+             * data[1] = dev_stress_yy
+             * data[2] = dev_stress_zz
+             * data[3] = tot_stress_xy
+             * data[4] = tot_stress_yz
+             * data[5] = tot_stress_zx
+             */
+            for (i = 0; i < length; i++) {
+                result[i] = sqrt(3.0 * fabs(data[3][i] * data[3][i] +
+                                            data[4][i] * data[4][i] +
+                                            data[5][i] * data[5][i] -
+                                            data[0][i] * data[1][i] -
+                                            data[1][i] * data[2][i] -
+                                            data[2][i] * data[0][i]));
+            }
+            break;
+        default:
+            /*
+             * data[0] = dev_stress_xx
+             * data[1] = dev_stress_yy
+             * data[2] = dev_stress_zz
+             * data[3] = tot_stress_xy
+             * data[4] = tot_stress_yz
+             * data[5] = tot_stress_zx
+             * data[6] = pressure
+             */
+            for (i = 0; i < length; i++) {
+                aa = SQR(data[3][i])
+                    + SQR(data[4][i])
+                    + SQR(data[5][i])
+                    - data[0][i] * data[1][i]
+                    - data[1][i] * data[2][i]
+                    - data[2][i] * data[0][i];
+                bb = data[0][i] * SQR(data[4][i])
+                    + data[1][i] * SQR(data[5][i])
+                    + data[2][i] * SQR(data[3][i])
+                    - data[0][i] * data[1][i] * data[2][i]
+                    - data[3][i] * data[4][i] * data[5][i] * 2.0;
+
+                if (aa < 1.0e-25) {
+                    result[i] = 0.0;
+                }
+                else {
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    switch (extra) {
+                        case BRICK_PRINC_DEV_STRESS_1:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp);
+                            break;
+                        case BRICK_PRINC_DEV_STRESS_2:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + FTPI);
+                            break;
+                        case BRICK_PRINC_DEV_STRESS_3:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + TTPI);
+                            break;
+                        case BRICK_PRINC_TOT_STRESS_1:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp) - data[6][i];
+                            break;
+                        case BRICK_PRINC_TOT_STRESS_2:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + FTPI) - data[6][i];
+                            break;
+                        case BRICK_PRINC_TOT_STRESS_3:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + TTPI) - data[6][i];
+                            break;
+                        case BRICK_MAX_SHEAR_STRESS:
+                            dd = sqrt(aa / 3.0);
+                            result[i] = dd * (cos(angp) - cos(angp + TTPI));
+                            break;
+                    }
+                }
+            }
+            break;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    calc_shell
+ *
+ * Purpose:     Given the data required to calculate a given shell
+ *              variable in the `data' parameter, calculate the variable
+ *              for the indicated number of items.
+ *
+ * Return:      void
+ *
+ * Programmer:  brugger at kickit
+ *              Fri Mar 14 12:46:11 PST 1997
+ *
+ * Modifications:
+ *    Sam Wookey, Mon Jun  8 13:39:53 PDT 1998
+ *    Added a loop to the pressure and von_mises sections.
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+calc_shell(float *result, float **data, int length, int extra)
+{
+    int            i;
+    double         pr, aa, bb, cc, dd, angp;
+
+    switch (extra) {
+        case SHELL_PRESSURE:
+            /*
+             * data[0] = tot_stress_xx
+             * data[1] = tot_stress_yy
+             * data[2] = tot_stress_zz
+             */
+            for(i = 0; i < length; ++i)
+            {
+                result[i] = - (data[0][i] + data[1][i] + data[2][i]) / 3.0;
+            }
+            break;
+        case SHELL_VON_MISES:
+            /*
+             * data[0] = tot_stress_xx
+             * data[1] = tot_stress_yy
+             * data[2] = tot_stress_zz
+             * data[3] = tot_stress_xy
+             * data[4] = tot_stress_yz
+             * data[5] = tot_stress_zx
+             */
+            for(i = 0; i < length; ++i)
+            {
+                pr = - (data[0][i] + data[1][i] + data[2][i]) / 3.0;
+                data[0][i] += pr;
+                data[1][i] += pr;
+                data[2][i] += pr;
+                result[i] = sqrt(3 * fabs(data[3][i] * data[3][i] +
+                                          data[4][i] * data[4][i] +
+                                          data[5][i] * data[5][i] -
+                                          data[0][i] * data[1][i] -
+                                          data[1][i] * data[2][i] -
+                                          data[2][i] * data[0][i]));
+            }
+            break;
+        default:
+            /*
+             * data[0] = tot_stress_xx
+             * data[1] = tot_stress_yy
+             * data[2] = tot_stress_zz
+             * data[3] = tot_stress_xy
+             * data[4] = tot_stress_yz
+             * data[5] = tot_stress_zx
+             */
+            for (i = 0; i < length; i++) {
+                pr = (data[0][i] + data[1][i] + data[2][i]) / (-3.0);
+                data[0][i] += pr;
+                data[1][i] += pr;
+                data[2][i] += pr;
+                aa = SQR(data[3][i])
+                    + SQR(data[4][i])
+                    + SQR(data[5][i])
+                    - data[0][i] * data[1][i]
+                    - data[1][i] * data[2][i]
+                    - data[2][i] * data[0][i];
+                bb = data[0][i] * SQR(data[4][i])
+                    + data[1][i] * SQR(data[5][i])
+                    + data[2][i] * SQR(data[3][i])
+                    - data[0][i] * data[1][i] * data[2][i]
+                    - data[3][i] * data[4][i] * data[5][i] * 2.0;
+
+                if (aa < 1.0e-25) {
+                    result[i] = 0.0;
+                }
+                else {
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    switch (extra) {
+                        case SHELL_PRINC_DEV_STRESS_1:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp);
+                            break;
+                        case SHELL_PRINC_DEV_STRESS_2:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + FTPI);
+                            break;
+                        case SHELL_PRINC_DEV_STRESS_3:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + TTPI);
+                            break;
+                        case SHELL_PRINC_TOT_STRESS_1:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp) - pr;
+                            break;
+                        case SHELL_PRINC_TOT_STRESS_2:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + FTPI) - pr;
+                            break;
+                        case SHELL_PRINC_TOT_STRESS_3:
+                            dd = 2.0 * sqrt(aa / 3.0);
+                            result[i] = dd * cos(angp + TTPI) - pr;
+                            break;
+                        case SHELL_MAX_SHEAR_STRESS:
+                            dd = sqrt(aa / 3.0);
+                            result[i] = dd * (cos(angp) - cos(angp + TTPI));
+                            break;
+                    }
+                }
+            }
+            break;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    calc_shell_other
+ *
+ * Purpose:     Given the data required to calculate a given shell/other
+ *              variable in the `data' parameter, calculate the variable
+ *              for the indicated number of items.
+ *
+ * Return:      void
+ *
+ * Programmer:  brugger at kickit
+ *              Thu Mar 13 11:12:45 PST 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+calc_shell_other(float *result, float **data, int length, int extra)
+{
+    int            i;
+    double         t1, t2, t3, t4, t5;
+
+    switch (extra)
+    {
+        case SHELL_SURFACE_STRESS_1:
+        case SHELL_SURFACE_STRESS_3:
+        case SHELL_SURFACE_STRESS_5:
+            /*
+             * data[0] = m_xx_bending, m_yy_bending, m_xy_bending
+             * data[1] = n_xx_normal, n_yy_normal, n_xy_normal
+             * data[2] = thickness
+             */
+            for (i = 0; i < length; i++) {
+                result[i] = (data[1][i] / data[2][i]) + 6.0 *
+                    (data[0][i] / (data[2][i] * data[2][i]));
+                i++;
+            }
+            break;
+        case SHELL_SURFACE_STRESS_2:
+        case SHELL_SURFACE_STRESS_4:
+        case SHELL_SURFACE_STRESS_6:
+            /*
+             * data[0] = m_xx_bending, m_yy_bending, m_xy_bending
+             * data[1] = n_xx_normal, n_yy_normal, n_xy_normal
+             * data[2] = thickness
+             */
+            for (i = 0; i < length; i++) {
+                result[i] = (data[1][i] / data[2][i]) - 6.0 *
+                    (data[0][i] / (data[2][i] * data[2][i]));
+                i++;
+            }
+            break;
+        case SHELL_EFF_UPPER_STRESS:
+            /*
+             * data[0] = m_xx_bending
+             * data[1] = m_yy_bending
+             * data[2] = m_xy_bending
+             * data[3] = n_xx_normal
+             * data[4] = n_yy_normal
+             * data[5] = n_xy_normal
+             * data[6] = thickness
+             */
+            for (i = 0; i < length; i++) {
+                t1 = (data[3][i] / data[6][i]) + 6.0 *
+                    (data[0][i] / (data[6][i] * data[6][i]));
+                t2 = (data[4][i] / data[6][i]) + 6.0 *
+                    (data[1][i] / (data[6][i] * data[6][i]));
+                t3 = (data[5][i] / data[5][i]) + 6.0 *
+                    (data[2][i] / (data[6][i] * data[6][i]));
+                result[i] = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                i++;
+            }
+            break;
+        case SHELL_EFF_LOWER_STRESS:
+            /*
+             * data[0] = m_xx_bending
+             * data[1] = m_yy_bending
+             * data[2] = m_xy_bending
+             * data[3] = n_xx_normal
+             * data[4] = n_yy_normal
+             * data[5] = n_xy_normal
+             * data[6] = thickness
+             */
+            for (i = 0; i < length; i++) {
+                t1 = (data[3][i] / data[6][i]) - 6.0 *
+                    (data[0][i] / (data[6][i] * data[6][i]));
+                t2 = (data[4][i] / data[6][i]) - 6.0 *
+                    (data[1][i] / (data[6][i] * data[6][i]));
+                t3 = (data[5][i] / data[6][i]) - 6.0 *
+                    (data[2][i] / (data[6][i] * data[6][i]));
+                result[i] = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                i++;
+            }
+            break;
+        case SHELL_EFF_MAX_STRESS:
+            /*
+             * data[0] = m_xx_bending
+             * data[1] = m_yy_bending
+             * data[2] = m_xy_bending
+             * data[3] = n_xx_normal
+             * data[4] = n_yy_normal
+             * data[5] = n_xy_normal
+             * data[6] = thickness
+             */
+            for (i = 0; i < length; i++) {
+                t1 = (data[3][i] / data[6][i]) + 6.0 *
+                    (data[0][i] / (data[6][i] * data[6][i]));
+                t2 = (data[4][i] / data[6][i]) + 6.0 *
+                    (data[1][i] / (data[6][i] * data[6][i]));
+                t3 = (data[5][i] / data[6][i]) + 6.0 *
+                    (data[2][i] / (data[6][i] * data[6][i]));
+                t4 = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                t1 = (data[3][i] / data[6][i]) - 6.0 *
+                    (data[0][i] / (data[6][i] * data[6][i]));
+                t2 = (data[4][i] / data[6][i]) - 6.0 *
+                    (data[1][i] / (data[6][i] * data[6][i]));
+                t3 = (data[5][i] / data[6][i]) - 6.0 *
+                    (data[2][i] / (data[6][i] * data[6][i]));
+                t5 = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                result[i] = MAX(t4, t5);
+                i++;
+            }
+            break;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_GetUcdvar
+ *
+ * Purpose:     Read a UCD variable.  There are three ways to read
+ *              a variable.
+ *
+ *              (1) If the variable is not a virtual variable then it
+ *              must be a real variable.  We simply call the underlying
+ *              g_qv callback.
+ *
+ *              (2) If the variable is a virtual variable and the real
+ *              dependency list contains only one item (ie, no `:') then
+ *              the virtual name is just an alias for the real name.
+ *
+ *              (3) If the variable is a virtual variable and the
+ *              real dependency list contains more than one item (ie, a `:'
+ *              appears in the real name) then some calculations need
+ *              to be performed in a manner similar to the Taurus driver.
+ *
+ * Return:      Success:        ptr to a new variable.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Wed Mar  8 17:54:34 EST 1995
+ *
+ * Modifications:
+ *    Robb Matzke, Thu Mar 16 13:10:29 EST 1995
+ *    We call `satisfied' to determine which (if any) dependency list
+ *    is being used for the specified virtual variable.
+ *
+ *    Eric Brugger, Fri Jun  2 08:10:43 PDT 1995
+ *    I made several modifications so that the sun compiler liked it.
+ *
+ *    Robb Matzke, Tue May 14 11:15:00 EST 1996
+ *    Fixed an assert() so as not to cause a compiler warning.
+ *
+ *    Eric Brugger, Thu Mar 13 13:12:30 PST 1997
+ *    I modified the routine to read dtime instead of time, since dtime
+ *    is always written out by ale3d.  I also modified the routine to
+ *    set the centering based on the directory, not always nodal as had
+ *    been done before.
+ *
+ *-------------------------------------------------------------------------
+ */
+static DBucdvar *
+f_ale3d_GetUcdvar(dbfile, name)
+    DBfile        *dbfile;
+    char          *name;
+{
+    static int     sequence = 0;
+    int            id, inter, ndeps, i, j, size, offset, slice_size, stride;
+    int            slice_stride = MAXBUF, type, *types;
+    char          *s, *t, *s_data[16], work[256];
+    char          *me = "f_ale3d_GetUcdvar";
+    DBucdvar      *uv;
+    float        **data, *result;
+    double        *temp_doubles = NULL;
+
+#if 1
+    dbfile->pub.r_varslice = NULL;
+#endif
+
+    /*
+     * Is this one that we should handle?  If not, do things
+     * the normal way.  We should also make sure that the variable
+     * is in the current virtual directory.
+     */
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return NULL;
+    if (!v_exists(dbfile->pub.toc, name)) {
+        db_perror(name, E_NOTFOUND, me);
+        return NULL;
+    }
+    if (!satisfied(id, name, work, &inter)) {
+        return FILTER_CALL(f_ale3d_cb[id].g_uv, (dbfile, name),
+                           (DBucdvar *) NULL, me);
+    }
+
+    /*
+     * If it is found and it is simply another name for a real variable,
+     * read the real variable instead.
+     */
+    if (!strchr(work, ':')) {
+        uv = FILTER_CALL(f_ale3d_cb[id].g_uv, (dbfile, work),
+                         (DBucdvar *) NULL, me);
+        if (uv) {
+            FREE(uv->name);
+            uv->name = STRDUP(name);
+        }
+        return uv;
+    }
+
+    /*
+     * Otherwise we must do some calculations.  We calculate in chunks so
+     * we don't use so much memory.  The data for dependency variables are
+     * stored as miscellaneous variables with the name `%s_data'
+     */
+    if (!Intercept[inter].f) {
+        db_perror("no calculation function defined", E_INTERNAL, me);
+        return NULL;
+    }
+
+    /*
+     * Count the number of dependency (real) variables.
+     */
+    for (ndeps = 0, s = work; s; s = strchr(s + 1, ':'))
+        ndeps++;
+    if (ndeps > NELMTS(s_data)) {
+        db_perror("too many dependencies", E_INTERNAL, me);
+        return NULL;
+    }
+
+    /*
+     * Compute the names "%s_data" of the variables and make sure they
+     * are DB_FLOAT or DB_DOUBLE.  Also make sure they are all the same size.
+     */
+    types = ALLOC_N(int, ndeps);
+    for (i = 0, s = work; i < ndeps; i++, s = NULL) {
+        int ale3d_filter_internal_error = 1;
+        t = strtok(s, ":");
+        assert(ale3d_filter_internal_error && t != NULL);
+        s_data[i] = ALLOC_N(char, strlen(t) + 6);
+
+        sprintf(s_data[i], "%s_data", t);
+    }
+    for (i = 0, size = (-1); i < ndeps; i++) {
+        if (DB_FLOAT != (type = DBGetVarType(dbfile, s_data[i])) &&
+            DB_DOUBLE != type) {
+            char           mesg[64];
+
+            sprintf(mesg, "expecting a DB_FLOAT (%d) or DB_DOUBLE (%d) type for `%s' (got %d)",
+                    DB_FLOAT, DB_DOUBLE, s_data[i], type);
+            db_perror(mesg, E_INTERNAL, me);
+            return NULL;
+        }
+        types[i] = type;
+        if (size < 0) {
+            size = DBGetVarLength(dbfile, s_data[i]);
+        }
+        else if (size != DBGetVarLength(dbfile, s_data[i])) {
+            db_perror("mismatched variable sizes", E_INTERNAL, me);
+            return NULL;
+        }
+    }
+
+    /*
+     * Build the UCD variable structure and initialize it.
+     */
+    uv = DBAllocUcdvar();
+    uv->id = sequence++;
+    uv->meshid = sequence++;
+    uv->name = STRDUP(name);
+    uv->units = NULL;
+    uv->label = NULL;
+    uv->vals = ALLOC_N(void *, 1);
+    uv->nels = size;
+    uv->datatype = DB_FLOAT;
+    uv->nvals = 1;
+    uv->ndims = 3;
+    uv->origin = 0;
+    if (Intercept[inter].dir == DIR_NODE)
+        uv->centering = DB_NODECENT;
+    else
+        uv->centering = DB_ZONECENT;
+    DBReadVar(dbfile, "cycle", &(uv->cycle));
+    DBReadVar(dbfile, "dtime", &(uv->time));
+
+    /*
+     * Allocate work space for holding slices of the variables as well as
+     * the entire final result.  If the r_varslice callback is not defined
+     * then we can't be efficient about memory.  We will just read the
+     * whole darn thing at once with DBReadVar.
+     */
+    if (!dbfile->pub.r_varslice)
+        slice_stride = size;
+    data = ALLOC_N(float *, ndeps);
+
+    for (i = 0; i < ndeps; i++)
+        data[i] = ALLOC_N(float, slice_stride);
+    uv->vals[0] = result = ALLOC_N(float, size);
+
+    /*
+     * Do the calculations slice by slice.  A particular slice is `slice_size'
+     * elements long while slices in general (all but the last) are
+     * `slice_stride' elements.  Watch out! Some variables might be DB_DOUBLE
+     * and should be converted to DB_FLOAT.
+     */
+    for (offset = 0; offset < size; offset += slice_stride) {
+        slice_size = MIN(size - offset, slice_stride);
+        stride = 1;
+        for (i = 0; i < ndeps; i++) {
+            if (dbfile->pub.r_varslice) {
+                if (DB_DOUBLE == types[i]) {
+                    /*
+                     * Double values must be read as doubles and then
+                     * converted to single.
+                     */
+                    if (!temp_doubles) {
+                        temp_doubles = ALLOC_N(double, slice_stride);
+                    }
+                    if (DBReadVarSlice(dbfile, s_data[i], &offset,
+                                       &slice_size, &stride, 1,
+                                       temp_doubles) < 0) {
+                        return NULL;
+                    }
+                    for (j = 0; j < slice_size; j++) {
+                        data[i][j] = temp_doubles[j];
+                    }
+                }
+                else if (DBReadVarSlice(dbfile, s_data[i], &offset,
+                                        &slice_size, &stride, 1,
+                                        data[i]) < 0) {
+                    return NULL;
+                }
+            }
+            else if (DB_DOUBLE == types[i]) {
+                /*
+                 * Double values must be read as doubles and then
+                 * converted to single.
+                 */
+                if (!temp_doubles) {
+                    temp_doubles = ALLOC_N(double, slice_stride);
+                }
+                if (DBReadVar(dbfile, s_data[i], temp_doubles) < 0) {
+                    return NULL;
+                }
+                for (j = 0; j < slice_size; j++) {
+                    data[i][j] = temp_doubles[j];
+                }
+            }
+            else if (DBReadVar(dbfile, s_data[i], data[i]) < 0) {
+                return NULL;
+            }
+        }
+        (Intercept[inter].f) (result + offset, data, slice_size,
+                              Intercept[inter].extra);
+    }
+
+    /*
+     * Free work space.
+     */
+    for (i = 0; i < ndeps; i++)
+        FREE(data[i]);
+    FREE(data);
+    FREE(temp_doubles);
+
+    return uv;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_InqMeshType
+ *
+ * Purpose:     Returns the mesh type of the specified mesh.
+ *
+ * Return:      Success:        mesh type
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Apr 20 10:57:42 PDT 1995
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 14 May 1996
+ *      Returns -1 on failure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_InqMeshType(dbfile, name)
+    DBfile        *dbfile;
+    char          *name;
+{
+    int            id, inter;
+    char          *me = "f_ale3d_InqMeshType";
+    char           work[256], *s;
+
+    /*
+     * Is this one that we should handle?  If not, do things
+     * the normal way.  We should also make sure that the variable
+     * is in the current virtual directory.
+     */
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1 ;
+    if (!v_exists(dbfile->pub.toc, name) ||
+        !satisfied(id, name, work, &inter)) {
+        return FILTER_CALL(f_ale3d_cb[id].i_meshtype, (dbfile, name), -1, me);
+    }
+
+    /*
+     * If it is found and it is simply another name for a real variable,
+     * return the mesh type of the real variable instead.
+     */
+    if (!strchr(work, ':')) {
+        return FILTER_CALL(f_ale3d_cb[id].i_meshtype, (dbfile, work), -1, me);
+    }
+
+    /*
+     * Otherwise, just use the first variable from the dependency list.
+     */
+    s = strtok(work, ":");
+    return FILTER_CALL(f_ale3d_cb[id].i_meshtype, (dbfile, s), -1, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_InqMeshName
+ *
+ * Purpose:     Returns the mesh name associated with a variable.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Apr 20 10:57:42 PDT 1995
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 14 May 1996
+ *      Fixed the return type so as not to get a compiler warning.  Also
+ *      fixed error return values to -1.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_ale3d_InqMeshName(dbfile, name, meshname)
+    DBfile        *dbfile;
+    char          *name;
+    char          *meshname;    /*OUTPUT */
+{
+    int            id, inter;
+    char          *me = "f_ale3d_InqMeshName";
+    char           work[256], *s;
+
+    /*
+     * Is this one that we should handle?  If not, do things
+     * the normal way.  We should also make sure that the variable
+     * is in the current virtual directory.
+     */
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1 ;
+
+    if (!v_exists(dbfile->pub.toc, name) ||
+        !satisfied(id, name, work, &inter)) {
+        return FILTER_CALL(f_ale3d_cb[id].i_meshname, (dbfile, name, meshname),
+                           -1, me);
+    }
+
+    /*
+     * If it is found and it is simply another name for a real variable,
+     * return the mesh type of the real variable instead.
+     */
+    if (!strchr(work, ':')) {
+        return FILTER_CALL(f_ale3d_cb[id].i_meshname, (dbfile, work, meshname),
+                           -1, me);
+    }
+
+    /*
+     * Otherwise, just use the first variable from the dependency list.
+     */
+    s = strtok(work, ":");
+    return FILTER_CALL(f_ale3d_cb[id].i_meshname, (dbfile, s, meshname), -1, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_ale3d_Open
+ *
+ * Purpose:     Install the ALE3D filter for the specified database and
+ *              initialize local table entries.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Mon Mar  6 18:05:42 EST 1995
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+f_ale3d_Open(dbfile, filter_name)
+    DBfile        *dbfile;
+    char          *filter_name;
+{
+    int            id;
+    char          *me = "f_ale3d_open";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    if (!filter_name || !*filter_name)
+        filter_name = "ALE3D-FILTER";
+    if (f_ale3d_name[id]) {
+        char           mesg[1024];
+
+        sprintf(mesg,
+                "filter `%s' inserted into database `%s' more than once",
+                filter_name, dbfile->pub.name);
+        db_perror(mesg, E_NOTIMP, me);
+        return -1;
+    }
+
+    f_ale3d_name[id] = safe_strdup(filter_name);
+    memcpy(f_ale3d_cb + id, &(dbfile->pub), sizeof(DBfile_pub));
+    f_ale3d_cb[id].toc = NULL;
+
+    /*
+     * Install conditional filters.  They are only installed
+     * if that functionality previously existed.
+     */
+    FILTER_CB(module, f_ale3d_Filters);
+    FILTER_CB(close, f_ale3d_Close);
+    FILTER_CB(newtoc, f_ale3d_NewToc);
+    FILTER_CB(cd, f_ale3d_SetDir);
+    FILTER_CB(cdid, f_ale3d_SetDirID);
+    FILTER_CB(g_dir, f_ale3d_GetDir);
+    FILTER_CB(g_uv, f_ale3d_GetUcdvar);
+    FILTER_CB(i_meshtype, f_ale3d_InqMeshType);
+    FILTER_CB(i_meshname, f_ale3d_InqMeshName);
+
+    /*
+     * Install unconditional filters.
+     */
+    dbfile->pub.uninstall = f_ale3d_Uninstall;
+
+    /*
+     * Initialize the directory and table of contents.
+     */
+    DBNewToc(dbfile);
+    DBSetDir(dbfile, "/");
+
+    return 0;
+}
diff --git a/src/filters/f_sample.c b/src/filters/f_sample.c
new file mode 100644
index 0000000..beb2eb0
--- /dev/null
+++ b/src/filters/f_sample.c
@@ -0,0 +1,622 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * This is a sample filter provided to help filter writers design new
+ * filters.  Its sole purpose is to print debugging information.
+ * To use this filter, the application should link with
+ * the objects produced by compiling this file and the application should
+ * have a statement similar to one of these:
+ *
+ *  DBFilterRegistration ("debug", f_debug_Open, NULL) ;
+ * DBFilterRegistration ("debug", NULL, f_debug_Open) ;
+ *
+ * The first example installs this filter for every database that is opened
+ * while the second example installs this filter only for those databases
+ * that request it through their `_filters' variable.
+ *
+ * This filter maintains two tables both indexed by file id number stored
+ * in the DBfile structure and maintained by SILO.  The `f_debug_cb'
+ * stores the callbacks that were in effect for the file before this
+ * filter was inserted.  The filter should not access the other fields--use
+ * the DBfile structure passed in from SILO instead.
+ *
+ * The other table, `f_debug_name' is used to store the name of this
+ * filter.  This is recommended for three reasons: (1) The application may
+ * register this filter using any name; (2) This filter may be known by
+ * more than one name; (3) The name of the filter can change while the
+ * database is open.  We would like to be able to issue error messages that
+ * contain the name of the filter as known at the time that the database
+ * was opened.
+ *
+ * This filter cannot be inserted into a database more than once,
+ * because the second insertion would overwrite the callbacks stored
+ * by the first insertion in `f_debug_cb' and the entry points to the
+ * device driver would be forever lost.  We can check for multiple insertions
+ * by insuring that `f_debug_name[id]' is non-null if and only if this
+ * filter is installed for the file.
+ *
+ * NOTE: We currently do not support recursive filters.
+ *
+ * The functions in filter source code should be private (declared `static')
+ * except for the functions that can be used as the `init' and `open'
+ * arguments for DBFilterRegistration().  Generally, each filter will be
+ * contained in one source file which includes low level SILO declarations
+ * (silo_private.h) and filter support (filter.h).  The filter may contain
+ * certain public functions which control the behaviour of the filter.
+ */
+
+#include "silo_private.h"       /*low-level SILO programming support */
+#include "filter.h"             /*filter programming support  */
+
+static char   *f_debug_name[DB_NFILES];  /*saved filter names */
+static DBfile_pub f_debug_cb[DB_NFILES];  /*only callback fields used */
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_Filters
+ *
+ * Purpose:     Print the name of this filter and a short description
+ *              to the specified stream.  Every filter and device driver
+ *              is required to have one of these routines.  They are
+ *              used mostly for debugging.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:02:27 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_Filters(dbfile, stream)
+    DBfile        *dbfile;
+    FILE          *stream;
+{
+    int            id;
+    char          *me = "f_debug_Filters";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    fprintf(stream, "%s [debugging filter]\n", f_debug_name[id]);
+    return FILTER_CALL(f_debug_cb[id].module, (dbfile, stream), -1, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_Uninstall
+ *
+ * Purpose:     Removes the filter from the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Thu Mar 16 10:37:18 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_Uninstall(dbfile)
+    DBfile        *dbfile;
+{
+    int            id;
+    char          *me = "f_debug_Uninstall";
+    DBtoc         *toc;
+
+    if ((id = FILTER_ID(dbfile, me)))
+        return -1;
+
+    printf("%s: DBUninstall (dbfile=0x%lx)\n",
+           f_debug_name[id], (unsigned long)dbfile);
+
+    /*
+     * Copy old public fields back onto file.
+     */
+    toc = dbfile->pub.toc;
+    memcpy(&(dbfile->pub), f_debug_cb + id, sizeof(DBfile_pub));
+    free(f_debug_name[id]);
+    f_debug_name[id] = NULL;
+    dbfile->pub.toc = toc;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_Close
+ *
+ * Purpose:     Print debugging information about closing files.  Zero
+ *              the f_debug_cb entry so that we know it isn't used
+ *              anymore.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 28 12:54:06 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_Close(dbfile)
+    DBfile        *dbfile;
+{
+    int            retval;
+    char          *me = "f_debug_Close";
+    int            id;
+
+    /*
+     * Get file id number.
+     */
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return 0;            /*raise error and fail */
+
+    /*
+     * Pre-processing of arguments.
+     */
+    printf("%s: DBClose(dbfile=0x%lx \"%s\")\n",
+           f_debug_name[id],
+           (unsigned long)dbfile,
+           dbfile ? dbfile->pub.name : "");
+
+    /*
+     * Call device driver (or next filter).
+     */
+    retval = FILTER_CALL(f_debug_cb[id].close, (dbfile), 0, me);
+
+    /*
+     * Post processing of return value.
+     */
+    printf("%s: DBClose=0x%lx\n",
+           f_debug_name[id], (unsigned long)dbfile);
+
+    /*
+     * Zero name slot so we know that this file isn't used.  Refer to
+     * f_debug_Open() for details.
+     */
+    free(f_debug_name[id]);
+    f_debug_name[id] = NULL;
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_SetDir
+ *
+ * Purpose:     Print debug information about changing directories.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 13:13:10 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_SetDir(dbfile, path)
+    DBfile        *dbfile;
+    char          *path;
+{
+    int            id, retval;
+    char          *me = "f_debug_SetDir";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    printf("%s: DBSetDir (dbfile=0x%lx, path=0x%lx \"%s\")\n",
+           f_debug_name[id], (unsigned long)dbfile,
+           (unsigned long)path, path);
+
+    retval = FILTER_CALL(f_debug_cb[id].cd, (dbfile, path), -1, me);
+
+    printf("%s: DBSetDir=%d\n",
+           f_debug_name[id], retval);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_SetDirID
+ *
+ * Purpose:     Print debug info for DBSetDirID.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 13:18:36 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_SetDirID(dbfile, dirid)
+    DBfile        *dbfile;
+    int            dirid;
+{
+    int            id, retval;
+    char          *me = "f_debug_SetDirID";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    printf("%s: DBSetDirID (dbfile=0x%lx, dirid=%d)\n",
+           f_debug_name[id], (unsigned long)dbfile, dirid);
+
+    retval = FILTER_CALL(f_debug_cb[id].cdid, (dbfile, dirid), -1, me);
+
+    printf("%s: DBSetDirID=%d\n",
+           f_debug_name[id], retval);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_GetDir
+ *
+ * Purpose:     Print debugging information about DBGetDir.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 13:21:07 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_GetDir(dbfile, path)
+    DBfile        *dbfile;
+    char          *path;        /*output */
+{
+    int            id, retval;
+    char          *me = "f_debug_GetDirID";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    printf("%s: DBGetDir (dbfile=0x%lx, out path=0x%lx)\n",
+           f_debug_name[id], (unsigned long)dbfile, (unsigned long)path);
+
+    retval = FILTER_CALL(f_debug_cb[id].g_dir, (dbfile, path), -1, me);
+
+    printf("%s: DBGetDir=%d, path=0x%lx \"%s\"\n",
+           f_debug_name[id], retval, (unsigned long)path, path);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_NewToc
+ *
+ * Purpose:     Print debugging information about the new table of contents.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 13:24:07 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_NewToc(dbfile)
+    DBfile        *dbfile;
+{
+    int            id, retval;
+    char          *me = "f_debug_NewToc";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+    printf("%s: DBNewToc (dbfile=0x%lx)\n",
+           f_debug_name[id], (unsigned long)dbfile);
+    printf("%*s: dbfile->pub.toc = 0x%lx\n",
+           (int)strlen(f_debug_name[id]), "",
+           (unsigned long)(dbfile->pub.toc));
+
+    retval = FILTER_CALL(f_debug_cb[id].newtoc, (dbfile), -1, me);
+
+    printf("%s: DBNewToc=%d\n",
+           f_debug_name[id], retval);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_GetUcdvar
+ *
+ * Purpose:     Print debug info for DBGetUcdvar.
+ *
+ * Return:      Success:        ptr to variable
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Wed Mar  8 18:36:07 EST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jun  2 08:08:04 PDT 1995
+ *    I modified the FILTER_CALL call so that the sun compiler liked it.
+ *
+ *-------------------------------------------------------------------------
+ */
+static DBucdvar *
+f_debug_GetUcdvar(dbfile, name)
+    DBfile        *dbfile;
+    char          *name;
+{
+    int            id;
+    char          *me = "f_debug_GetUcdvar";
+    DBucdvar      *retval;
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return NULL;
+    printf("%s: DBGetUcdvar (dbfile=0x%lx, name=0x%lx \"%s\")\n",
+           f_debug_name[id], (unsigned long)dbfile,
+           (unsigned long)name, name);
+
+    retval = FILTER_CALL(f_debug_cb[id].g_uv, (dbfile, name),
+                         (DBucdvar *) NULL, me);
+
+    printf("%s: DBGetUcdvar=0x%lx\n",
+           f_debug_name[id], (unsigned long)retval);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_InqMeshType
+ *
+ * Purpose:     Debug intercept for the DBInqMeshType function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Apr 20 15:06:47 PDT 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_InqMeshType(dbfile, name)
+    DBfile        *dbfile;
+    char          *name;
+{
+    int            id, retval;
+    char          *me = "f_debug_InqMeshType";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return 0;
+    printf("%s: DBInqMeshType (dbfile=0x%lx, name=0x%lx \"%s\")\n",
+           f_debug_name[id], (unsigned long)dbfile,
+           (unsigned long)name, name);
+
+    retval = FILTER_CALL(f_debug_cb[id].i_meshtype, (dbfile, name),
+                         -1, me);
+
+    printf("%s: DBInqMeshType=%d\n",
+           f_debug_name[id], retval);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_InqMeshName
+ *
+ * Purpose:     Debug intercept for the DBInqMeshName function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Apr 20 15:10:08 PDT 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jun  2 08:08:04 PDT 1995
+ *    I modified the string that was split accross lines to be in a single
+ *    line so that the sun compiler liked it.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+f_debug_InqMeshName(dbfile, name, meshname)
+    DBfile        *dbfile;
+    char          *name;
+    char          *meshname;    /*OUTPUT */
+{
+    int            id, retval;
+    char          *me = "f_debug_InqMeshName";
+
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return 0;
+    printf("%s: DBInqMeshType (dbfile=0x%lx, name=0x%lx \"%s\", meshname=0x%lx)\n",
+           f_debug_name[id], (unsigned long)dbfile,
+           (unsigned long)name, name,
+           (unsigned long)meshname);
+
+    retval = FILTER_CALL(f_debug_cb[id].i_meshname, (dbfile, name, meshname),
+                         -1, me);
+
+    printf("%s: DBInqMeshName=%d, meshname=0x%lx \"%s\"\n",
+           f_debug_name[id], retval, (unsigned long)meshname, meshname);
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    f_debug_Open
+ *
+ * Purpose:     Add this filter to the specified file.  The old file
+ *              callbacks are copied to the global table which is indexed
+ *              by file ID number.  New callbacks are installed in the
+ *              dbfile for those routines that we want to debug.
+ *
+ *              The filter `init' function is special in that there is no
+ *              device driver callback for DBOpen().  This filter is called
+ *              automatically by SILO just after the database is opened.
+ *              If this function was specified as the `open' argument to
+ *              DBFilterRegistration() then this routine is called after
+ *              the database is opened and after the `_filters' variable
+ *              is read by the device driver if `_filters' contained the
+ *              name of this filter.  Filters appearing earlier in the
+ *              `_filters' list will have already been initialized.
+ *
+ *              We will use the `f_debug_name' entry to insure that
+ *              this filter isn't invoked more than once for the same
+ *              file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 28 12:48:47 EST 1995
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+f_debug_Open(dbfile, filter_name)
+    DBfile        *dbfile;
+    char          *filter_name;
+{
+    int            id;
+    char          *me = "f_debug_Open";
+
+    /*
+     * Get file id number or fail
+     */
+    if ((id = FILTER_ID(dbfile, me)) < 0)
+        return -1;
+
+    /*
+     * This is a simple filter that doesn't allow multiple insertions
+     * into one database file.  The reason is that `f_debug_cb' can
+     * only remember one set of callbacks per file.  We will use the
+     * `f_debug_name' pointer to check for multiple insertions, so we
+     * should be sure to zero it when the file is closed.
+     */
+    if (!filter_name || !*filter_name)
+        filter_name = "DEBUG-FILTER";
+    if (f_debug_name[id]) {
+        char           mesg[1024];
+
+        sprintf(mesg,
+                "filter `%s' inserted into database `%s' more than once",
+                filter_name, dbfile->pub.name);
+        db_perror(mesg, E_NOTIMP, me);
+        return -1;
+    }
+
+    /*
+     * Print debug information for filter installation.
+     */
+    printf("Filter `%s' installed for database `%s'\n",
+           filter_name, dbfile->pub.name);
+
+    /*
+     * `Filter_name' is the name the application used when
+     * registering this filter.  We will want to save that name with
+     * each file since filter errors should use a name that is
+     * familiar to the application.
+     */
+    if (f_debug_name[id])
+        free(f_debug_name[id]);
+    f_debug_name[id] = safe_strdup(filter_name);
+
+    /*
+     * Save old callbacks.
+     */
+    memcpy(f_debug_cb + id, &(dbfile->pub), sizeof(DBfile_pub));
+
+    /*
+     * Install new callbacks.  Callbacks are installed conditionally
+     * since they typically depend on the driver already having that
+     * functionality.
+     */
+    FILTER_CB(module, f_debug_Filters);
+    FILTER_CB(close, f_debug_Close);
+    FILTER_CB(cd, f_debug_SetDir);
+    FILTER_CB(cdid, f_debug_SetDirID);
+    FILTER_CB(g_dir, f_debug_GetDir);
+    FILTER_CB(newtoc, f_debug_NewToc);
+    FILTER_CB(g_uv, f_debug_GetUcdvar);
+    FILTER_CB(i_meshtype, f_debug_InqMeshType);
+    FILTER_CB(i_meshname, f_debug_InqMeshName);
+
+    /*
+     * Install unconditional callbacks.
+     */
+    dbfile->pub.uninstall = f_debug_Uninstall;
+
+    return 0;
+}
diff --git a/src/filters/filter.h b/src/filters/filter.h
new file mode 100644
index 0000000..d05b827
--- /dev/null
+++ b/src/filters/filter.h
@@ -0,0 +1,120 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef _FILTER_H
+#define _FILTER_H
+
+
+/*
+ * Support for writing filters.
+ */
+
+#include "silo_private.h"
+
+/*-------------------------------------------------------------------------
+ * Obtain the file id number to be used as an index into local filter tables.
+ * If the file is the null pointer, then we should immediately raise an
+ * error.
+ *      F:      A pointer (possibly NULL) to a DBfile
+ *      M:      Character pointer to filter function name (`me')
+ *
+ * This macro evaluates to the fileid on success, -1 on failure.
+ *
+ * Typical use:
+ *      if ((id=FILTER_ID(dbfile,me))<0) return NULL ;
+ *
+ *-------------------------------------------------------------------------
+ */
+#define FILTER_ID(F,M)  (!(F)||(F)->pub.fileid<0||(F)->pub.fileid>=DB_NFILES?\
+                         db_perror(NULL,E_NOFILE,(M)):                  \
+                         (F)->pub.fileid)
+
+/*-------------------------------------------------------------------------
+ * Filters should be careful when calling the next filter or device driver
+ * since the function might not be supported by the device driver.  This
+ * routine conditionally calls the device driver or returns the specified
+ * default value.
+ *      CB:             Ptr to the device driver function (possibly NULL).
+ *      ARGS:           An argument list for the device driver function.
+ *      DFLT:           Default value if CB is NULL.
+ *      ME:             Name of current filter function.
+ *
+ * Typical use:
+ *      retval = FILTER_CALL (f_debug_cb[id].pub.mkdir,(dbfile,name),
+ *                            -1, me) ;
+ *
+ * Notes:
+ *      The type of `DFLT' must be the same as the device driver routine
+ *      return type.
+ *-------------------------------------------------------------------------
+ */
+#define FILTER_CALL(CB,ARGS,DFLT,ME)                                    \
+                        ((CB)?(CB)ARGS:                                 \
+                        (db_perror(NULL,E_NOTIMP,(ME)),DFLT))
+
+/*-------------------------------------------------------------------------
+ * Filter callbacks should usually be inserted into the DBfile structure
+ * only if the underlying filter or driver already supports the operation.
+ *      NM:             Name of the callback field in DBfile_pub.
+ *      CB:             The filter callback routine for this functionality.
+ *
+ * Typical use:
+ *      FILTER_CB (close, f_debug_Close) ;
+ *
+ * Notes:
+ *      The DBfile structure must be named `dbfile'
+ *-------------------------------------------------------------------------
+ */
+#define FILTER_CB(NM,CB) (dbfile->pub.NM=(dbfile->pub.NM?(CB):NULL))
+
+#endif /* !_FILTER_H */
diff --git a/src/hdf5_drv/H5FDsilo.c b/src/hdf5_drv/H5FDsilo.c
new file mode 100644
index 0000000..c44c883
--- /dev/null
+++ b/src/hdf5_drv/H5FDsilo.c
@@ -0,0 +1,2305 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/* Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
+   in this file uses version 1.6 of the HDF5 API. This is harmless for
+   versions of HDF5 before 1.8 and ensures correct compilation with
+   version 1.8 and thereafter. When, and if, the HDF5 code in this file
+   is explicitly upgraded to the 1.8 API, this symbol should be removed. */
+#define H5_USE_16_API
+
+#include <config.h>
+#if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5)
+
+#include "hdf5.h"
+
+/* useful macro for comparing HDF5 versions */
+#define HDF5_VERSION_GE(Maj,Min,Rel)  \
+        (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \
+         ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \
+         (H5_VERS_MAJOR>Maj))
+
+#if HDF5_VERSION_GE(1,8,4)
+
+/* The _GNU_SOURCE wrapper logic is to enable the O_DIRECT flag */
+#ifdef __linux__
+#define _GNU_SOURCE
+#endif
+
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h> /* for snprintf */
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+
+#ifdef __linux__
+#undef _GNU_SOURCE
+#endif
+
+/*
+   TO DO:
+
+     *1. Examine file block alignment with HDF5 lib metadata allocations
+      2. On systems that support O_DIRECT, try posix_madvise/posix_memalign
+      3. Support partial last block
+      4. Aggregate multiple blocks
+     *5. allow an 'auto' block count or 'max-N'
+      6. If 5, add DBFreeSomeSiloVFDBlocks
+      7. Compare with sec2 VFD, PDB
+     *8. Pre-empt raw data blocks over meta data blocks
+      9. Move mdc_config from silo_hdf5.c to this file
+    *10. Does mdc_config really matter now?
+     11. Fix skipping truncate (maybe by 3)
+    *12. Sanity check block size on read relative to write.
+     13. Get performance studies on other systems
+     14. Study read performance too.
+     15. Move to DICHOTOMY and write all meta blocks at end of file.
+     16. Write blocks from different MPI tasks to same file. On read
+         back, need to specify which 'task' but should otherwise work.
+     17. Use direct I/O where possible (and appropriate).
+     18. Capture I/O statistics here.
+     19. Set mdc_config to never preempt (chews up memory in lib),
+         all writes for md will come on close.
+     20. Use COMPACT storage mode in driver for small datasets.
+
+*/
+
+/* Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
+   in this file uses version 1.6 of the HDF5 API. This is harmless for
+   versions of HDF5 before 1.8 and ensures correct compilation with
+   version 1.8 and thereafter. When, and if, the HDF5 code in this file
+   is explicitly upgraded to the 1.8 API, this symbol should be removed. */
+#define H5_USE_16_API
+
+#include "hdf5.h"
+#include "H5FDsilo.h"
+
+#ifdef _WIN32
+#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <share.h>
+#endif
+
+#ifdef MAX
+#undef MAX
+#endif
+#define MAX(X,Y)	((X)>(Y)?(X):(Y))
+
+/* File operations */
+#define OP_UNKNOWN      0
+#define OP_READ         1
+#define OP_WRITE        2
+
+#define EXACT		0
+#define CLOSEST		1
+
+#define SILO_BLKSZ_PROPNAME "silo_block_size"
+#define SILO_BLKCNT_PROPNAME "silo_block_count"
+#define SILO_LOGSTS_PROPNAME "silo_log_stats"
+#define SILO_USEDIR_PROPNAME "silo_use_direct"
+
+/* definitions related to the file stat utilities.
+ * For Unix, if off_t is not 64bit big, try use the pseudo-standard
+ * xxx64 versions if available.
+ */
+#if !defined(HDfstat) || !defined(HDstat)
+    #if H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64)
+        #ifndef HDfstat
+            #define HDfstat(F,B)        fstat64(F,B)
+        #endif /* HDfstat */
+        #ifndef HDstat
+            #define HDstat(S,B)         stat64(S,B)
+        #endif /* HDstat */
+        typedef struct stat64       h5_stat_t;
+        typedef off64_t             h5_stat_size_t;
+        #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF64_T
+    #else /* H5_SIZEOF_OFF_T!=8 && ... */
+        #ifndef HDfstat
+            #define HDfstat(F,B)        fstat(F,B)
+        #endif /* HDfstat */
+        #ifndef HDstat
+            #define HDstat(S,B)         stat(S,B)
+        #endif /* HDstat */
+        typedef struct stat         h5_stat_t;
+        typedef off_t               h5_stat_size_t;
+        #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T
+    #endif /* H5_SIZEOF_OFF_T!=8 && ... */
+#endif /* !defined(HDfstat) || !defined(HDstat) */
+#ifndef HDlseek
+    #ifdef H5_HAVE_LSEEK64
+       #define HDlseek(F,O,W)   lseek64(F,O,W)
+    #else
+       #define HDlseek(F,O,W)   lseek(F,O,W)
+    #endif
+#endif /* HDlseek */
+#ifndef HDassert
+    #define HDassert(X)         assert(X)
+#endif /* HDassert */
+#ifndef HDopen
+    #ifdef _WIN32
+        typedef int mode_t;
+        #define HDopen(S,F,M)           my_sopen_s(S,F,M)
+    #else
+        #ifdef _O_BINARY
+            #define HDopen(S,F,M)       open(S,F|_O_BINARY,M)
+        #else
+            #define HDopen(S,F,M)       open(S,F,M)
+        #endif
+    #endif
+#endif /* HDopen */
+#ifndef HDread
+    #define HDread(F,M,Z)               read(F,M,Z)
+#endif /* HDread */
+#ifndef HDwrite
+    #define HDwrite(F,M,Z)              write(F,M,Z)
+#endif /* HDwrite */
+#ifndef HDftruncate
+  #ifdef H5_HAVE_FTRUNCATE64
+    #define HDftruncate(F,L)        ftruncate64(F,L)
+  #else
+    #define HDftruncate(F,L)        ftruncate(F,L)
+  #endif
+#endif /* HDftruncate */
+#ifndef HDmemset
+    #define HDmemset(X,C,Z)             memset(X,C,Z)
+#endif /* HDmemset */
+#define H5F_addr_eq(X,Y)        ((X)!=HADDR_UNDEF &&                          \
+                                 (X)==(Y))
+
+static const char *flavors(H5F_mem_t m)
+{
+    static char tmp[32];
+
+    if (m == H5FD_MEM_DEFAULT)
+        return "H5FD_MEM_DEFAULT";
+    if (m == H5FD_MEM_SUPER)
+        return "H5FD_MEM_SUPER";
+    if (m == H5FD_MEM_BTREE)
+        return "H5FD_MEM_BTREE";
+    if (m == H5FD_MEM_DRAW)
+        return "H5FD_MEM_DRAW";
+    if (m == H5FD_MEM_GHEAP)
+        return "H5FD_MEM_GHEAP";
+    if (m == H5FD_MEM_LHEAP)
+        return "H5FD_MEM_LHEAP";
+    if (m == H5FD_MEM_OHDR)
+        return "H5FD_MEM_OHDR";
+
+    sprintf(tmp, "Unknown (%d)", (int) m);
+    return tmp;
+}
+
+
+#ifdef H5_HAVE_SNPRINTF
+#define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno)			\
+{									\
+    char msg[256];							\
+    if (Errno != 0)							\
+        snprintf(msg, sizeof(msg), Msg "(errno=%d, \"%s\")",	\
+            Errno, strerror(Errno));					\
+    ret_value = Ret;							\
+    H5Epush_ret(Func, Cls, Maj, Min, msg, Ret)				\
+}
+#else
+#define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno)			\
+{									\
+    ret_value = Ret;							\
+    H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret)				\
+}
+#endif
+
+typedef struct silo_vfd_hot_block_stats_t_
+{
+    hsize_t id;
+    hsize_t num_block_writes;
+    hsize_t num_block_reads;
+    float raw_frac;
+} silo_vfd_hot_block_stats_t;
+
+typedef struct silo_vfd_stats_t_
+{
+    /* statistics for this VFD's interaction with the filesystem */
+    hsize_t max_block_id;
+    hsize_t max_blocks_in_mem;
+
+    hsize_t total_seeks;
+
+    hsize_t num_multiblock_writes;
+    hsize_t num_multiblock_reads;
+
+    hsize_t num_blocks_majority_md;
+    hsize_t num_blocks_majority_raw;
+
+    hsize_t total_write_count;
+    hsize_t total_write_bytes;
+
+    hsize_t total_block_raw_writes;
+    hsize_t total_block_raw_re_writes;
+    double total_time_in_raw_writes;
+
+    hsize_t total_block_md_writes;
+    hsize_t total_block_md_re_writes;
+    double total_time_in_md_writes;
+
+    hsize_t total_read_count;
+    hsize_t total_read_bytes;
+
+    hsize_t total_block_reads;
+    hsize_t total_block_re_reads;
+    double total_time_in_reads;
+
+    int num_hot_blocks;
+    int max_hot_blocks;
+    silo_vfd_hot_block_stats_t *hot_block_list;
+
+    double timestamp_open_started;
+    double timestamp_close_finished;
+
+    /* Statistics for HDF5 lib's interaction with this VFD */
+    hsize_t total_vfd_raw_write_count;
+    hsize_t total_vfd_raw_write_bytes;
+    hsize_t vfd_raw_write_count_hist[32];
+    hsize_t vfd_raw_write_bytes_hist[32];
+
+    hsize_t total_vfd_md_write_count;
+    hsize_t total_vfd_md_write_bytes;
+    hsize_t vfd_md_write_count_hist[32];
+    hsize_t vfd_md_write_bytes_hist[32];
+
+    hsize_t total_vfd_raw_read_count;
+    hsize_t total_vfd_raw_read_bytes;
+    hsize_t vfd_raw_read_count_hist[32];
+    hsize_t vfd_raw_read_bytes_hist[32];
+
+    hsize_t total_vfd_md_read_count;
+    hsize_t total_vfd_md_read_bytes;
+    hsize_t vfd_md_read_count_hist[32];
+    hsize_t vfd_md_read_bytes_hist[32];
+
+    hsize_t max_hdf5_cache_size;
+
+} silo_vfd_stats_t;
+
+typedef struct silo_vfd_block_bitmap_t_
+{
+    unsigned char *bitmap;
+    hsize_t nbytes;
+} silo_vfd_block_bitmap_t;
+
+typedef struct silo_vfd_relevant_blocks_t_
+{
+    hsize_t  id0,  id1;
+    int     off0, off1;
+} silo_vfd_relevant_blocks_t;
+
+typedef struct silo_vfd_block_t_
+{
+    hsize_t id;
+    hsize_t age;
+    void *buf;
+    unsigned dirty;
+    hsize_t minmoff, maxmoff;
+    hsize_t minroff, maxroff;
+} silo_vfd_block_t;
+
+typedef struct silo_vfd_pair_t_ 
+{
+    int i;
+    hsize_t id;
+} silo_vfd_pair_t;
+
+static int compare_silo_vfd_pairs(const void *a, const void *b)
+{
+    silo_vfd_pair_t *paira = (silo_vfd_pair_t*)a;
+    silo_vfd_pair_t *pairb = (silo_vfd_pair_t*)b;
+    if (paira->id < pairb->id) return -1;
+    if (paira->id > pairb->id) return 1;
+    return 0;
+}
+
+/* The driver identification number, initialized at runtime */
+static hid_t H5FD_SILO_g = 0;
+
+/*
+ * The description of a file belonging to this driver. The `eoa' and `eof'
+ * determine the amount of hdf5 address space in use and the high-water mark
+ * of the file (the current size of the underlying Unix file). The `pos'
+ * value is used to eliminate file position updates when they would be a
+ * no-op. Unfortunately we've found systems that use separate file position
+ * indicators for reading and writing so the lseek can only be eliminated if
+ * the current operation is the same as the previous operation.  When opening
+ * a file the `eof' will be set to the current file size, `eoa' will be set
+ * to zero, `pos' will be set to H5F_ADDR_UNDEF (as it is when an error
+ * occurs), and `op' will be set to H5F_OP_UNKNOWN.
+ */
+typedef struct H5FD_silo_t {
+    H5FD_t	pub;			/*public stuff, must be first	*/
+    int         fd;			/* file descriptor */
+    haddr_t	eoa;			/*end of allocated region	*/
+    haddr_t	eof;			/*end of file; current file size*/
+    haddr_t     file_eof;
+    haddr_t	pos;			/*current file I/O position	*/
+    int         op;			/*last operation		*/
+    unsigned    write_access;  		/* Flag to indicate the file was opened with write access */
+    hsize_t     block_size;
+    hsize_t     op_counter;
+    silo_vfd_block_t *block_list;
+    int         max_blocks;
+    int         num_blocks;
+    int         log_stats;
+    char       *log_name;
+    int         use_direct;
+    silo_vfd_block_bitmap_t was_written_map;
+    silo_vfd_block_bitmap_t was_in_mem_map;
+    silo_vfd_stats_t stats;
+#ifndef _WIN32
+    /*
+     * On most systems the combination of device and i-node number uniquely
+     * identify a file.
+     */
+    dev_t	device;			/*file device number		*/
+#ifdef H5_VMS
+    ino_t       inode[3];               /*file i-node number            */
+#else
+    ino_t       inode;                  /*file i-node number            */
+#endif /*H5_VMS*/
+#else
+    /*
+     * On _WIN32 the low-order word of a unique identifier associated with the
+     * file and the volume serial number uniquely identify a file. This number
+     * (which, both? -rpm) may change when the system is restarted or when the
+     * file is opened. After a process opens a file, the identifier is
+     * constant until the file is closed. An application can use this
+     * identifier and the volume serial number to determine whether two
+     * handles refer to the same file.
+     */
+    DWORD fileindexlo;
+    DWORD fileindexhi;
+#endif
+    /* Information from properties set by 'h5repart' tool */
+    hbool_t     fam_to_sec2;    /* Whether to eliminate the family driver info
+                                 * and convert this file to a single file */
+} H5FD_silo_t;
+
+#ifdef H5_HAVE_LSEEK64
+#   define file_offset_t        off64_t
+#elif defined (_WIN32) && !defined(__MWERKS__)
+# /*MSVC*/
+#   define file_offset_t        __int64
+#else
+#   define file_offset_t        off_t
+#endif
+
+/*
+ * These macros check for overflow of various quantities.  These macros
+ * assume that file_offset_t is signed and haddr_t and size_t are unsigned.
+ *
+ * ADDR_OVERFLOW:	Checks whether a file address of type `haddr_t'
+ *			is too large to be represented by the second argument
+ *			of the file seek function.
+ *
+ * SIZE_OVERFLOW:	Checks whether a buffer size of type `hsize_t' is too
+ *			large to be represented by the `size_t' type.
+ *
+ * REGION_OVERFLOW:	Checks whether an address and size pair describe data
+ *			which can be addressed entirely by the second
+ *			argument of the file seek function.
+ */
+/* adding for windows NT filesystem support. */
+#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
+#define ADDR_OVERFLOW(A)	(HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z)	((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z)	(ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+    HADDR_UNDEF==(A)+(Z) || (file_offset_t)((A)+(Z))<(file_offset_t)(A))
+#define H5_CHECK_OVERFLOW(var, vartype, casttype) \
+{                                                 \
+    casttype _tmp_overflow = (casttype)(var);     \
+    assert((var) == (vartype)_tmp_overflow);      \
+}
+
+
+/* Prototypes */
+static hsize_t H5FD_silo_sb_size(H5FD_t *file);
+static herr_t H5FD_silo_sb_encode(H5FD_t *file, char *name/*out*/,
+                                   unsigned char *buf/*out*/);
+static herr_t H5FD_silo_sb_decode(H5FD_t *file, const char *name,
+                                   const unsigned char *buf);
+static H5FD_t *H5FD_silo_open(const char *name, unsigned flags,
+                 hid_t fapl_id, haddr_t maxaddr);
+static herr_t H5FD_silo_close(H5FD_t *lf);
+static int H5FD_silo_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_silo_query(const H5FD_t *_f1, unsigned long *flags);
+static haddr_t H5FD_silo_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
+static herr_t H5FD_silo_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static haddr_t H5FD_silo_get_eof(const H5FD_t *_file);
+static herr_t  H5FD_silo_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
+static herr_t H5FD_silo_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+                size_t size, void *buf);
+static herr_t H5FD_silo_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
+                size_t size, const void *buf);
+static herr_t H5FD_silo_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
+
+static const H5FD_class_t H5FD_silo_g = {
+    "silo",				        /*name			*/
+    MAXADDR,				        /*maxaddr		*/
+    H5F_CLOSE_WEAK,				/* fc_degree		*/
+    H5FD_silo_sb_size,                          /*sb_size               */
+    H5FD_silo_sb_encode,                        /*sb_encode             */
+    H5FD_silo_sb_decode,                        /*sb_decode             */
+    0, 						/*fapl_size		*/
+    NULL,					/*fapl_get		*/
+    NULL,					/*fapl_copy		*/
+    NULL, 					/*fapl_free		*/
+    0,						/*dxpl_size		*/
+    NULL,					/*dxpl_copy		*/
+    NULL,					/*dxpl_free		*/
+    H5FD_silo_open,		                /*open			*/
+    H5FD_silo_close,		                /*close			*/
+    H5FD_silo_cmp,			        /*cmp			*/
+    H5FD_silo_query,		                /*query			*/
+    NULL,					/*get_type_map		*/
+    NULL,					/*alloc			*/
+    NULL,					/*free			*/
+    H5FD_silo_get_eoa,		                /*get_eoa		*/
+    H5FD_silo_set_eoa, 	                	/*set_eoa		*/
+    H5FD_silo_get_eof,		                /*get_eof		*/
+    H5FD_silo_get_handle,                       /*get_handle            */
+    H5FD_silo_read,		                /*read			*/
+    H5FD_silo_write,		                /*write			*/
+    NULL,		                	/*flush			*/
+    H5FD_silo_truncate,				/*truncate		*/
+    NULL,                                       /*lock                  */
+    NULL,                                       /*unlock                */
+    H5FD_FLMAP_SINGLE				/*fl_map		*/
+};
+
+#ifdef _WIN32
+static int my_sopen_s(const char *name, int flags, mode_t mode)
+{
+    int fd;
+    errno_t r = _sopen_s(&fd, name, flags, _SH_DENYNO, mode);
+    if (r != 0) fd = -1;
+    return fd;
+}
+#endif
+
+static void update_hotblock_stats(H5FD_silo_t *file, hsize_t id, int dir, float raw_frac)
+{
+    int bot = 0, top = file->stats.num_hot_blocks - 1, mid=-1;
+    silo_vfd_hot_block_stats_t *hbl = file->stats.hot_block_list;
+    int haveIt = 0;
+
+    while (bot <= top)
+    {
+        mid = (bot + top) >> 1;
+        if (id > hbl[mid].id)
+	{
+            if (mid == file->stats.num_hot_blocks-1) break;
+            if (id < hbl[mid+1].id) break;
+            bot = mid + 1;
+	}
+        else if (id < hbl[mid].id)
+	{
+            if (mid == 0 || id > hbl[mid-1].id) {mid--; break; }
+            top = mid - 1;
+	}
+        else
+        {
+            haveIt = 1;
+            break;
+        }
+    }
+
+    if (!haveIt)
+    {
+        int i;
+        if (file->stats.num_hot_blocks == file->stats.max_hot_blocks)
+        {
+            int new_max = file->stats.max_hot_blocks * 2 + 1;
+            hbl = realloc(file->stats.hot_block_list, sizeof(silo_vfd_hot_block_stats_t)*new_max);
+            file->stats.max_hot_blocks = new_max;
+            file->stats.hot_block_list = hbl;
+        }
+        mid++;
+        for (i = file->stats.num_hot_blocks; i > mid; i--)
+            hbl[i] = hbl[i-1];
+        memset(&hbl[mid], 0, sizeof(silo_vfd_hot_block_stats_t));
+        file->stats.num_hot_blocks++;
+        hbl[mid].id = id;
+    }
+
+    HDassert(id == hbl[mid].id);
+
+    if (dir == OP_WRITE)
+    {
+        hbl[mid].num_block_writes++;
+        if (raw_frac>0.5)
+            file->stats.total_block_raw_re_writes++;
+        else
+            file->stats.total_block_md_re_writes++;
+    }
+    else
+    {
+        hbl[mid].num_block_reads++;
+        file->stats.total_block_re_reads++;
+    }
+    hbl[mid].raw_frac = raw_frac;
+}
+
+static void set_block_bitmap_by_id(silo_vfd_block_bitmap_t *bbm, hsize_t id)
+{
+    hsize_t byte_offset = id / (hsize_t) 8;
+    int bit_offset = id % (hsize_t) 8;
+    int mask = 1<<bit_offset;
+    if (byte_offset >= bbm->nbytes)
+    {
+        bbm->bitmap = (unsigned char *) realloc(bbm->bitmap, (byte_offset+1)*2);
+        memset(bbm->bitmap+bbm->nbytes, 0, (byte_offset+1)*2 - bbm->nbytes);
+        bbm->nbytes = (byte_offset+1)*2;
+    }
+    bbm->bitmap[byte_offset] |= mask;
+}
+
+static int get_block_bitmap_by_id(silo_vfd_block_bitmap_t *bbm, hsize_t id)
+{
+    hsize_t byte_offset = id / (hsize_t) 8;
+    int bit_offset = id % (hsize_t) 8;
+    if (byte_offset < bbm->nbytes)
+    {
+        int mask = 1<<bit_offset;
+        unsigned int val = (unsigned int) bbm->bitmap[byte_offset];
+        return val & mask;
+    }
+    return 0;
+}
+
+static silo_vfd_relevant_blocks_t
+relevant_blocks(hsize_t block_size, haddr_t addr, hsize_t size)
+{
+    silo_vfd_relevant_blocks_t ret_value;
+
+    /* first address of first block, inclusive */
+    ret_value.id0 = addr / block_size;
+    ret_value.off0 = addr % block_size;
+
+    /* last address of last block, inclusive */
+    ret_value.id1 = (addr + size - 1) / block_size;
+    ret_value.off1 = (addr + size - 1) % block_size;
+
+    return(ret_value);
+}
+
+static int find_block_by_id(H5FD_silo_t *file, hsize_t id, unsigned leq)
+{
+    int bot = 0, top = file->num_blocks - 1, mid;
+    silo_vfd_block_t *bl = file->block_list;
+    while (bot <= top)
+    {
+        mid = (bot + top) >> 1;
+
+        if (id > bl[mid].id)
+	{
+            if (leq)
+            {
+                if (mid == file->num_blocks-1) return mid;
+                if (id < bl[mid+1].id) return mid;
+            }
+            bot = mid + 1;
+	}
+        else if (id < bl[mid].id)
+	{
+            if (leq)
+            {
+                if (mid == 0) return -1;
+                if (id > bl[mid-1].id) return mid-1;
+            }
+            top = mid - 1;
+	}
+        else
+            return mid;
+    }
+    return -1; 
+}
+
+static int find_block_to_preempt(H5FD_silo_t *file)
+{
+    int i;
+    int min_midx = -1;
+    int min_ridx = -1;
+    silo_vfd_block_t *bl = file->block_list;
+    hsize_t min_mage = file->op_counter;
+    hsize_t min_rage = file->op_counter;
+    for (i = 1; i < file->num_blocks; i++)
+    {
+#if 1
+        int msize = bl[i].maxmoff - bl[i].minmoff;
+        int rsize = bl[i].maxroff - bl[i].minroff;
+
+        if (msize > rsize)
+        {
+            if (bl[i].age < min_mage)
+            {
+                min_mage = bl[i].age;
+                min_midx = i;
+            }
+        }
+        else
+        {
+            if (bl[i].age < min_rage)
+            {
+                min_rage = bl[i].age;
+                min_ridx = i;
+            }
+        }
+#else
+        if (bl[i].age < min_rage)
+        {
+            min_rage = bl[i].age;
+            min_ridx = i;
+        }
+#endif
+    }
+
+    if (min_ridx == -1)
+        return min_midx;
+    return min_ridx;
+}
+
+static herr_t put_data_to_block_by_index(H5FD_silo_t *file, H5FD_mem_t type, const void *srcbuf, hsize_t size,
+    int blidx, int off)
+{
+    silo_vfd_block_t *block;
+    haddr_t addr;
+
+    HDassert(blidx < file->num_blocks);
+    block = &(file->block_list[blidx]);
+
+    HDassert(block->buf);
+
+    HDassert((hsize_t)off+size<=file->block_size);
+    memcpy((char*)block->buf+off, srcbuf, size);
+
+    block->dirty = 1;
+    block->age = file->op_counter++;
+
+    if (type == H5FD_MEM_DRAW)
+    {
+        if (off < block->minroff) block->minroff = off;
+        if (off+size-1 > block->maxroff) block->maxroff = off+size-1;
+    }
+    else
+    {
+        if (off < block->minmoff) block->minmoff = off;
+        if (off+size-1 > block->maxmoff) block->maxmoff = off+size-1;
+    }
+
+    addr = block->id * file->block_size + off + size;
+    if (addr > file->eof) file->eof = addr;
+
+    return 0;
+}
+
+static herr_t get_data_from_block_by_index(H5FD_silo_t *file, H5FD_mem_t type, void *dstbuf, hsize_t size,
+    int blidx, int off)
+{
+    silo_vfd_block_t *block;
+
+    HDassert(blidx < file->num_blocks);
+    block = &(file->block_list[blidx]);
+
+    HDassert(block->buf);
+    
+    HDassert((hsize_t)off+size<=file->block_size);
+    memcpy(dstbuf, (char*)block->buf+off, size);
+
+    block->age = file->op_counter++;
+
+    if (type == H5FD_MEM_DRAW)
+    {
+        if (off < block->minroff) block->minroff = off;
+        if (off+size-1 > block->maxroff) block->maxroff = off+size-1;
+    }
+    else
+    {
+        if (off < block->minmoff) block->minmoff = off;
+        if (off+size-1 > block->maxmoff) block->maxmoff = off+size-1;
+    }
+
+    return 0;
+}
+
+static herr_t file_write(H5FD_silo_t *file, haddr_t addr, size_t size, const void *buf)
+{
+    static const char  *func = "file_write";
+    ssize_t		nbytes;
+    herr_t              ret_value = 0;
+
+    HDassert(file && file->pub.cls);
+    HDassert(buf);
+
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Check for overflow conditions */
+    if (HADDR_UNDEF==addr)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "addr undefined", -1, -1)
+    if (REGION_OVERFLOW(addr, size))
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "addr overflow", -1, -1)
+
+    /* Seek to the correct location */
+    if (addr != file->pos || OP_WRITE != file->op)
+    {
+        if (HDlseek(file->fd, (file_offset_t)addr, SEEK_SET) < 0)
+            H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "HDlseek failed", -1, errno)
+        file->stats.total_seeks++;
+    }
+
+    /* Write data, being careful of interrupted system calls and partial results */
+    while(size > 0) {
+        do {
+            nbytes = HDwrite(file->fd, buf, size);
+            file->stats.total_write_count++;
+            file->stats.total_write_bytes += nbytes;
+        } while(-1 == nbytes && EINTR == errno);
+        if(-1 == nbytes) /* error */
+            H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "HDwrite failed", -1, errno)
+        HDassert(nbytes > 0);
+        HDassert((size_t)nbytes <= size);
+        H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
+        size -= (size_t)nbytes;
+        H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
+        addr += (haddr_t)nbytes;
+        buf = (const char *)buf + nbytes;
+    }
+
+    if (ret_value < 0)
+    {
+        file->pos = HADDR_UNDEF;
+        file->op = OP_UNKNOWN;
+    }
+    else
+    {
+        file->pos = addr;
+        file->op = OP_WRITE;
+        if (file->pos > file->file_eof)
+            file->file_eof = file->pos;
+    }
+
+    return(ret_value);
+}
+
+static herr_t file_read(H5FD_silo_t *file, haddr_t addr, size_t size, void *buf)
+{
+    static const char  *func = "file_read";
+    ssize_t		nbytes;
+    herr_t              ret_value = 0;
+
+    HDassert(file && file->pub.cls);
+    HDassert(buf);
+
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Check for overflow conditions */
+    if (HADDR_UNDEF==addr)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "addr undefined", -1, -1)
+    if (REGION_OVERFLOW(addr, size))
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "addr overflow", -1, -1)
+
+    /* Seek to the correct location */
+    if (addr != file->pos || OP_READ != file->op)
+    {
+        if (HDlseek(file->fd, (file_offset_t)addr, SEEK_SET) < 0)
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "HDlseek failed", -1, errno)
+        file->stats.total_seeks++;
+    }
+
+    /* Read data, careful of interrupted system calls, partial results and eof */
+    while(size > 0) {
+        do {
+            nbytes = HDread(file->fd, buf, size);
+            file->stats.total_read_count++;
+            file->stats.total_read_bytes += nbytes;
+        } while(-1 == nbytes && EINTR == errno);
+        if(-1 == nbytes) /* error */
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "HDread failed", -1, errno)
+        if(0 == nbytes) {
+            /* end of file but not end of format address space */
+            HDmemset(buf, 0, size);
+            break;
+        } /* end if */
+        HDassert(nbytes >= 0);
+        HDassert((size_t)nbytes <= size);
+        H5_CHECK_OVERFLOW(nbytes, ssize_t, size_t);
+        size -= (size_t)nbytes;
+        H5_CHECK_OVERFLOW(nbytes, ssize_t, haddr_t);
+        addr += (haddr_t)nbytes;
+        buf = (char *)buf + nbytes;
+    }
+
+    if (ret_value < 0)
+    {
+        file->pos = HADDR_UNDEF;
+        file->op = OP_UNKNOWN;
+    }
+    else
+    {
+        file->pos = addr;
+        file->op = OP_READ;
+    }
+
+    return(ret_value);
+}
+
+static herr_t file_write_block(H5FD_silo_t *file, int blidx)
+{
+    static const char  *func = "file_write_block";
+    silo_vfd_block_t *b = &(file->block_list[blidx]);
+    herr_t ret_value = 0;
+    haddr_t addr;
+
+    HDassert(b->dirty);
+    HDassert(b->buf);
+
+    H5Eclear2(H5E_DEFAULT);
+
+    addr = b->id * file->block_size;
+
+    if (file_write(file, addr, file->block_size, b->buf) < 0)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "file_write_block failed", -1, -1)
+
+    if (file->log_stats)
+    {
+        int msize = 0, rsize = 0;
+        if (b->maxmoff > b->minmoff)
+            msize = b->maxmoff - b->minmoff;
+        if (b->maxroff > b->minroff)
+            rsize = b->maxroff - b->minroff;
+
+        if (rsize >= msize)
+            file->stats.total_block_raw_writes++;
+        else
+            file->stats.total_block_md_writes++;
+
+        if (get_block_bitmap_by_id(&(file->was_written_map), b->id))
+            update_hotblock_stats(file, b->id, OP_WRITE, (rsize+msize)?(float)rsize/(msize+rsize):(float)0);
+
+        set_block_bitmap_by_id(&(file->was_written_map), b->id);
+    }
+
+    if (ret_value == 0)
+        b->dirty = 0;
+
+    return(ret_value);
+}
+
+static herr_t file_read_block(H5FD_silo_t *file, int blidx)
+{
+    static const char  *func = "file_read_block";
+    silo_vfd_block_t *b = &(file->block_list[blidx]);
+    herr_t ret_value = 0;
+    haddr_t addr;
+
+    HDassert(b->buf);
+
+    H5Eclear2(H5E_DEFAULT);
+
+    addr = b->id * file->block_size;
+
+    if (file_read(file, addr, file->block_size, b->buf) < 0)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "file_read_block failed", -1, -1)
+    file->stats.total_block_reads++;
+
+    /* check if the block was ever in memory before */
+    if (file->log_stats)
+    {
+        if (get_block_bitmap_by_id(&(file->was_in_mem_map), b->id))
+            update_hotblock_stats(file, b->id, OP_READ, 0);
+    }
+
+    if (ret_value == 0)
+        b->dirty = 0;
+
+    return(ret_value);
+}
+
+static herr_t remove_block_by_index(H5FD_silo_t *file, int blidx)
+{
+    int i;
+    silo_vfd_block_t *bl = file->block_list;
+    silo_vfd_block_t *b = &file->block_list[blidx];
+
+    HDassert(file->num_blocks>0);
+
+    if (file->log_stats)
+    {
+        int msize = b->maxmoff - b->minmoff;
+        int rsize = b->maxroff - b->minroff;
+
+        if (rsize >= msize)
+            file->stats.num_blocks_majority_raw++;
+        else
+            file->stats.num_blocks_majority_md++;
+    }
+
+    for (i = blidx; i < file->num_blocks-1; i++)
+        bl[i] = bl[i+1];
+
+    file->num_blocks--;
+
+    return 0;
+}
+
+/* blidx refers to the block in the list JUST BEFORE the block we're inserting */ 
+/* a -1 implies it comes JUST BEFORE the 0th block */
+static herr_t insert_block_by_index(H5FD_silo_t *file, int blidx)
+{
+    int i;
+    silo_vfd_block_t *bl = file->block_list;
+
+    HDassert(file->num_blocks<file->max_blocks);
+
+    for (i = file->num_blocks; i > blidx+1; i--)
+        bl[i] = bl[i-1];
+    memset(&bl[blidx+1], 0, sizeof(silo_vfd_block_t));
+
+    file->num_blocks++;
+
+    if (file->log_stats)
+    {
+        if (file->num_blocks > file->stats.max_blocks_in_mem)
+            file->stats.max_blocks_in_mem = file->num_blocks;
+    }
+
+    return 0;
+}
+
+static int alloc_block_by_id(H5FD_silo_t *file, hsize_t id)
+{
+    haddr_t addr0 = id * file->block_size;
+    silo_vfd_block_t *b;
+    int blidx = find_block_by_id(file, id, CLOSEST);
+
+    /* blidx refers to the block in the list JUST BEFORE the block we're inserting */ 
+    insert_block_by_index(file, blidx);
+
+    /* update blidx to point to the block we're inserting */
+    blidx++;
+
+    b = &(file->block_list[blidx]);
+
+    b->buf = malloc(file->block_size);
+    b->id = id;
+    b->age = file->op_counter++;
+    b->minmoff = file->block_size;
+    b->maxmoff = 0;
+    b->minroff = file->block_size;
+    b->maxroff = 0;
+
+    if (addr0<file->file_eof)
+        file_read_block(file, blidx);
+
+    if (file->log_stats)
+    {
+        set_block_bitmap_by_id(&(file->was_in_mem_map), id);
+        if (id > file->stats.max_block_id) file->stats.max_block_id = id;
+    }
+
+    return blidx;
+}
+
+static herr_t free_block_by_index(H5FD_silo_t *file, int blidx)
+{
+    silo_vfd_block_t *b;
+    
+    HDassert(blidx<file->num_blocks);
+
+    b = &(file->block_list[blidx]);
+
+    HDassert(b->buf);
+
+    if (b->dirty)
+        file_write_block(file, blidx);
+
+    free(b->buf);
+
+    remove_block_by_index(file, blidx);
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_init
+ *
+ * Purpose:	Initialize this driver by registering the driver with the
+ *		library.
+ *
+ * Return:	Success:	The driver ID for the silo driver.
+ *
+ *		Failure:	Negative.
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, July 29, 1999
+ *
+ * Modifications:
+ *      Stolen from the sec2 driver - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5FD_silo_init(void)
+{
+    static const char *func="H5FD_silo_init";
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    if (H5I_VFL!=H5Iget_type(H5FD_SILO_g))
+        H5FD_SILO_g = H5FDregister(&H5FD_silo_g);
+
+    return(H5FD_SILO_g);
+}
+
+/*---------------------------------------------------------------------------
+ * Function:	H5FD_silo_term
+ *
+ * Purpose:	Shut down the VFD
+ *
+ * Return:	<none>
+ *
+ * Programmer:  Quincey Koziol
+ *              Friday, Jan 30, 2004
+ *
+ * Modification:
+ *
+ *---------------------------------------------------------------------------
+ */
+void
+H5FD_silo_term(void)
+{
+    /* Reset VFL ID */
+    H5FD_SILO_g=0;
+
+} /* end H5FD_silo_term() */
+
+/*-------------------------------------------------------------------------
+ * Function:	H5Pset_fapl_silo
+ *
+ * Purpose:	Modify the file access property list to use the H5FD_SILO
+ *		driver defined in this source file.  There are no driver
+ *		specific properties.
+ *
+ * Return:	Non-negative on success/Negative on failure
+ *
+ * Programmer:	Robb Matzke
+ *		Thursday, February 19, 1998
+ *
+ * Modifications:
+ *      Stolen from the sec2 driver - QAK, 10/18/99
+ *      Ditto, Mark C. Miller, Febuary, 2010
+ *
+ *   Mark C. Miller, Wed Jul 14 20:59:15 PDT 2010
+ *   Added support for direct I/O option. Made default values macro
+ *   constants.
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_fapl_silo(hid_t fapl_id)
+{
+    static const char *func = "H5FDset_fapl_silo"; 
+    herr_t ret_value = 0;
+    hsize_t default_block_size = H5FD_SILO_DEFAULT_BLOCK_SIZE;
+    H5AC_cache_config_t mdc_config;
+    int default_block_count = H5FD_SILO_DEFAULT_BLOCK_COUNT;
+    int default_log_stats = H5FD_SILO_DEFAULT_LOG_STATS;
+    int default_use_direct = H5FD_SILO_DEFAULT_USE_DIRECT;
+    hid_t default_fapl;
+
+    H5Eclear2(H5E_DEFAULT);
+
+    if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1, -1)
+
+    if (H5Pinsert(fapl_id, SILO_BLKSZ_PROPNAME, sizeof(hsize_t), &default_block_size, 0, 0, 0, 0, 0) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert " SILO_BLKSZ_PROPNAME, -1, -1)
+    if (H5Pinsert(fapl_id, SILO_BLKCNT_PROPNAME, sizeof(int), &default_block_count, 0, 0, 0, 0, 0) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert " SILO_BLKCNT_PROPNAME, -1, -1)
+    if (H5Pinsert(fapl_id, SILO_LOGSTS_PROPNAME, sizeof(int), &default_log_stats, 0, 0, 0, 0, 0) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert " SILO_LOGSTS_PROPNAME, -1, -1)
+    if (H5Pinsert(fapl_id, SILO_USEDIR_PROPNAME, sizeof(int), &default_use_direct, 0, 0, 0, 0, 0) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTINSERT, "can't insert " SILO_USEDIR_PROPNAME, -1, -1)
+
+    if (H5Pset(fapl_id, SILO_BLKSZ_PROPNAME, &default_block_size) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set " SILO_BLKSZ_PROPNAME, -1, -1)
+    if (H5Pset(fapl_id, SILO_BLKCNT_PROPNAME, &default_block_count) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set " SILO_BLKCNT_PROPNAME, -1, -1)
+    if (H5Pset(fapl_id, SILO_LOGSTS_PROPNAME, &default_log_stats) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set " SILO_LOGSTS_PROPNAME, -1, -1)
+    if (H5Pset(fapl_id, SILO_USEDIR_PROPNAME, &default_use_direct) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set " SILO_USEDIR_PROPNAME, -1, -1)
+
+    return H5Pset_driver(fapl_id, H5FD_SILO, NULL);
+}
+
+herr_t
+H5Pset_silo_block_size_and_count(hid_t fapl_id, hsize_t block_size, int max_blocks_in_mem)
+{
+    static const char *func="H5FDset_silo_block_size_and_count";
+    herr_t ret_value = 0;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1, -1)
+    if (H5Pset(fapl_id, SILO_BLKSZ_PROPNAME, &block_size) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set silo_block_size", -1, -1)
+    if (H5Pset(fapl_id, SILO_BLKCNT_PROPNAME, &max_blocks_in_mem) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set silo_block_count", -1, -1)
+
+    return ret_value;
+}
+
+herr_t
+H5Pset_silo_log_stats(hid_t fapl_id, int log)
+{
+    static const char *func="H5Pset_silo_log_stats";
+    herr_t ret_value = 0;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1, -1)
+    if (H5Pset(fapl_id, SILO_LOGSTS_PROPNAME, &log) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set silo_log_stats", -1, -1)
+
+    return ret_value;
+}
+
+herr_t
+H5Pset_silo_use_direct(hid_t fapl_id, int used)
+{
+    static const char *func="H5Pset_silo_use_direct";
+    herr_t ret_value = 0;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    if(0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1, -1)
+    if (H5Pset(fapl_id, SILO_USEDIR_PROPNAME, &used) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTSET, "can't set " SILO_USEDIR_PROPNAME, -1, -1)
+
+    return ret_value;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_sb_size
+ *
+ * Purpose:	Returns the size of the private information to be stored in
+ *		the superblock.
+ *
+ * Return:	Success:	The super block driver data size.
+ *
+ *		Failure:	never fails
+ *
+ * Programmer:	Robb Matzke
+ *              Monday, August 16, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static hsize_t
+H5FD_silo_sb_size(H5FD_t *_file)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+    unsigned		nseen = 0;
+    hsize_t		nbytes = 8; /*size of "LLNLsilo" header*/
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* block size for file */
+    nbytes += 8;
+
+/*    return 1024-100-nbytes;*/
+    return nbytes;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_sb_encode
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	-1
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_sb_encode(H5FD_t *_file, char *name/*out*/,
+		     unsigned char *buf/*out*/)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+    unsigned char	*p;
+    static const char *func = "H5FD_silo_sb_encode";
+
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Name and version number */
+    strncpy(name, "LLNLsilo", (size_t)8);
+    name[8] = '\0';
+
+    /* Encode block size into sb */
+    p = buf+8;
+    assert(sizeof(hsize_t)<=8);
+    memcpy(p, &file->block_size, sizeof(hsize_t));
+    if (H5Tconvert(H5T_NATIVE_HSIZE, H5T_STD_U64LE, 1, buf+8, NULL, H5P_DEFAULT)<0)
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_sb_decode
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	-1
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+    char	       x[8];
+    hsize_t           *ap;
+    static const char *func = "H5FD_silo_sb_decode";
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Make sure the name/version number is correct */
+    if (strcmp(name, "LLNLsilo"))
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1)
+
+    buf += 8;
+    /* Decode block size */
+    assert(sizeof(hsize_t)<=8);
+    memcpy(x, buf, 8);
+    if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HSIZE, 1, x, NULL, H5P_DEFAULT)<0)
+        H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
+    ap = (hsize_t*)x;
+    /*file->block_size = *ap; ignore stored value for now */
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_open
+ *
+ * Purpose:	Create and/or opens a Standard C file as an HDF5 file.
+ *
+ * Bugs:	H5F_ACC_EXCL has a race condition. (? -QAK)
+ *
+ * Errors:
+ *		IO	  CANTOPENFILE	File doesn't exist and CREAT wasn't
+ *					specified.
+ *		IO	  CANTOPENFILE	Fopen failed.
+ *		IO	  FILEEXISTS	File exists but CREAT and EXCL were
+ *					specified.
+ *
+ * Return:	Success:	A pointer to a new file data structure. The
+ *				public fields will be initialized by the
+ *				caller, which is always H5FD_open().
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Robb Matzke
+ *		Wednesday, October 22, 1997
+ *
+ * Modifications:
+ *      Ported to VFL/H5FD layer - QAK, 10/18/99
+ *
+ *   Mark C. Miller, Wed Jul 14 21:00:13 PDT 2010
+ *   Added direct I/O flag.
+ *
+ *   Kathleen Bonnell, Thu Jul 29 09:52:10 PDT 2010
+ *   Added mode ivar so that correct mode setting could be set for Windows.
+ *-------------------------------------------------------------------------
+ */
+static H5FD_t *
+H5FD_silo_open( const char *name, unsigned flags, hid_t fapl_id,
+    haddr_t maxaddr)
+{
+    int         o_flags;
+    int         fd = -1;
+    unsigned    write_access = 0;     /* File opened with write access? */
+    H5FD_silo_t	*file = NULL;
+    h5_stat_t   sb;
+    static const char *func = "H5FD_silo_open";  /* Function Name for error reporting */
+    int silo_block_count = H5FD_SILO_DEFAULT_BLOCK_COUNT;
+    hsize_t silo_block_size = H5FD_SILO_DEFAULT_BLOCK_SIZE;
+    hsize_t meta_block_size;
+    hsize_t small_data_block_size;
+    size_t  sieve_buf_size;
+    int     silo_log_stats = H5FD_SILO_DEFAULT_LOG_STATS;
+    int     silo_use_direct = H5FD_SILO_DEFAULT_USE_DIRECT;
+    H5FD_t *ret_value = 0;
+    mode_t mode;
+
+    /* Sanity check on file offsets */
+    assert(sizeof(file_offset_t)>=sizeof(size_t));
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Check arguments */
+    if (!name || !*name)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL, -1)
+    if (0==maxaddr || HADDR_UNDEF==maxaddr)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL, -1)
+    if (ADDR_OVERFLOW(maxaddr))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL, -1)
+
+    /* get some properties and sanity check them */
+    if (H5Pget(fapl_id, SILO_BLKSZ_PROPNAME, &silo_block_size) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get " SILO_BLKSZ_PROPNAME, 0, -1)
+
+    if (H5Pget(fapl_id, SILO_BLKCNT_PROPNAME, &silo_block_count) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get " SILO_BLKCNT_PROPNAME, 0, -1)
+    if (silo_block_count < 1)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "silo_block_count<1", 0, -1)
+
+    if (H5Pget(fapl_id, SILO_LOGSTS_PROPNAME, &silo_log_stats) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get " SILO_LOGSTS_PROPNAME, 0, -1)
+    if (H5Pget(fapl_id, SILO_USEDIR_PROPNAME, &silo_use_direct) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_PLIST, H5E_CANTGET, "can't get " SILO_USEDIR_PROPNAME, 0, -1)
+
+    /* Build the open flags */
+    o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
+    if (H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
+    if (H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
+    if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
+#ifdef O_DIRECT
+    if (silo_use_direct) o_flags |= O_DIRECT;
+#endif
+#ifdef _WIN32
+    mode = _S_IWRITE | _S_IREAD;
+#else
+    mode = 0666;
+#endif
+
+    errno = 0;
+    if ((fd = HDopen(name, o_flags, mode)) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "HDopen failed", NULL, errno)
+
+    if (HDfstat(fd, &sb)<0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "HDfstat failed", NULL, errno)
+
+    if (flags & H5F_ACC_RDWR)
+        write_access = 1;
+
+    /* Build the return value */
+    if(NULL == (file = (H5FD_silo_t *)calloc((size_t)1, sizeof(H5FD_silo_t))))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "calloc failed", NULL, errno)
+    if(NULL == (file->block_list = (silo_vfd_block_t *)calloc((size_t)silo_block_count, sizeof(silo_vfd_block_t))))
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "calloc failed", NULL, errno)
+
+    file->fd = fd;
+    file->file_eof = (haddr_t)sb.st_size;
+    file->eof = (haddr_t)sb.st_size;
+    file->pos = HADDR_UNDEF;
+    file->op = OP_UNKNOWN;
+    file->write_access = write_access;
+    file->block_size = silo_block_size;
+    file->max_blocks = silo_block_count;
+    file->log_stats = silo_log_stats;
+    if (silo_log_stats)
+    {
+        const char *ext = "-h5-vfd-log";
+        if (NULL == (file->log_name = (char*) malloc(strlen(name)+strlen(ext)+1)))
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "malloc failed", NULL, errno)
+        sprintf(file->log_name, "%s%s", name, ext);
+    }
+
+    /* The unique key */
+    {
+#ifdef _WIN32
+	struct _BY_HANDLE_FILE_INFORMATION fileinfo;
+        (void)GetFileInformationByHandle((HANDLE)_get_osfhandle(file->fd), &fileinfo);
+        file->fileindexhi = fileinfo.nFileIndexHigh;
+        file->fileindexlo = fileinfo.nFileIndexLow;
+#else
+        file->device = sb.st_dev;
+#ifdef H5_VMS
+        file->inode[0] = sb.st_ino[0];
+        file->inode[1] = sb.st_ino[1];
+        file->inode[2] = sb.st_ino[2];
+#else
+        file->inode = sb.st_ino;
+#endif /*H5_VMS*/
+
+#endif
+    }
+
+    return((H5FD_t*)file);
+}   /* end H5FD_silo_open() */
+
+/*-------------------------------------------------------------------------
+ * Function:	H5F_silo_close
+ *
+ * Purpose:	Closes a file.
+ *
+ * Errors:
+ *		IO	  CLOSEERROR	Fclose failed.
+ *
+ * Return:	Non-negative on success/Negative on failure
+ *
+ * Programmer:	Robb Matzke
+ *		Wednesday, October 22, 1997
+ *
+ * Modifications:
+ *      Ported to VFL/H5FD layer - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_close(H5FD_t *_file)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+    static const char *func="H5FD_silo_close";  /* Function Name for error reporting */
+    herr_t ret_value = 0;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* write any dirty blocks to file */
+    if (file->write_access)
+    {
+        int i;
+
+        /* sort blocks by increasing block id */
+        silo_vfd_pair_t *sorted_pairs = (silo_vfd_pair_t*) malloc(file->num_blocks*sizeof(silo_vfd_pair_t));
+        for (i = 0; i < file->num_blocks; i++)
+        {
+            sorted_pairs[i].i = i;
+            sorted_pairs[i].id = file->block_list[i].id; 
+        }
+        qsort(sorted_pairs, file->num_blocks, sizeof(silo_vfd_pair_t), compare_silo_vfd_pairs);
+
+        /* write the blocks, freeing as we go along */
+        for (i = 0; i < file->num_blocks; i++)
+        {
+            silo_vfd_block_t *b = &(file->block_list[sorted_pairs[i].i]);
+            if (!(b->buf)) continue;
+            if (b->dirty) file_write_block(file, sorted_pairs[i].i);
+            free(b->buf);
+        }
+        free(sorted_pairs);
+    }
+
+    errno = 0;
+    if (close(file->fd) < 0)
+        H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "close failed", -1, errno)
+
+    if (file->log_stats)
+    {
+        int i, first;
+        hsize_t cum_raw_count, cum_raw_bytes, cum_md_count, cum_md_bytes;
+        hsize_t tot_raw_count, tot_raw_bytes, tot_md_count, tot_md_bytes;
+        FILE* logf = fopen(file->log_name, "w");
+        fprintf(logf, "======== Interactions between the VFD and the filesystem ========\n");
+        fprintf(logf, "block size = %llu\n", file->block_size);
+        fprintf(logf, "block count = %d\n", file->max_blocks);
+        fprintf(logf, "\n");
+        fprintf(logf, "max block id = %llu\n", file->stats.max_block_id);
+        fprintf(logf, "max blocks in mem = %llu\n", file->stats.max_blocks_in_mem);
+        fprintf(logf, "\n");
+        fprintf(logf, "total seeks = %llu\n", file->stats.total_seeks);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of multi-block writes = %llu\n", file->stats.num_multiblock_writes);
+        fprintf(logf, "number of multi-block reads = %llu\n", file->stats.num_multiblock_reads);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of blocks majority md = %llu\n", file->stats.num_blocks_majority_md);
+        fprintf(logf, "number of blocks majority raw = %llu\n", file->stats.num_blocks_majority_raw);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of writes = %llu\n", file->stats.total_write_count);
+        fprintf(logf, "number of bytes written = %llu\n", file->stats.total_write_bytes);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of times a raw block was written = %llu\n", file->stats.total_block_raw_writes);
+        fprintf(logf, "number of times a raw block was written more than once = %llu\n", file->stats.total_block_raw_re_writes);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of times an md block was written = %llu\n", file->stats.total_block_md_writes);
+        fprintf(logf, "number of times an md block was written more than once = %llu\n", file->stats.total_block_md_re_writes);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of reads = %llu\n", file->stats.total_read_count);
+        fprintf(logf, "number of bytes read = %llu\n", file->stats.total_read_bytes);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of times a block was read = %llu\n", file->stats.total_block_reads);
+        fprintf(logf, "number of times a block was read more than once = %llu\n", file->stats.total_block_re_reads);
+        fprintf(logf, "\n");
+        fprintf(logf, "number of hot blocks %llu\n", file->stats.num_hot_blocks);
+        fprintf(logf, "hot blocks...\n");
+        for (i = 0; i < file->stats.num_hot_blocks; i++)
+        {
+            silo_vfd_hot_block_stats_t *hb = &(file->stats.hot_block_list[i]); 
+            fprintf(logf,"    %8llu: %4s (%f), #writes=%8llu, #reads=%8llu\n",
+                hb->id, (hb->raw_frac>0.5?"raw":"meta"), hb->raw_frac, hb->num_block_writes+1, hb->num_block_reads+1);
+        }
+        if (file->stats.hot_block_list) free(file->stats.hot_block_list);
+        if (file->was_written_map.bitmap) free(file->was_written_map.bitmap);
+        if (file->was_in_mem_map.bitmap) free(file->was_in_mem_map.bitmap);
+        fprintf(logf, "\n");
+        fprintf(logf, "\n");
+        fprintf(logf, "\n");
+        fprintf(logf, "======== Interactions between HDF5 library and the VFD ========\n");
+        fprintf(logf, "number raw writes = %llu\n", file->stats.total_vfd_raw_write_count);
+        fprintf(logf, "number raw bytes written = %llu\n", file->stats.total_vfd_raw_write_bytes);
+        fprintf(logf, "number md writes = %llu\n", file->stats.total_vfd_md_write_count);
+        fprintf(logf, "number md bytes written = %llu\n", file->stats.total_vfd_md_write_bytes);
+        fprintf(logf, "histogram...\n");
+        cum_raw_count = 0;
+        cum_raw_bytes = 0;
+        cum_md_count = 0;
+        cum_md_bytes = 0;
+        tot_raw_count = file->stats.total_vfd_raw_write_count;
+        if (tot_raw_count < 1) tot_raw_count = 1;
+        tot_raw_bytes = file->stats.total_vfd_raw_write_bytes;
+        if (tot_raw_bytes < 1) tot_raw_bytes = 1;
+        tot_md_count = file->stats.total_vfd_md_write_count;
+        if (tot_md_count < 1) tot_md_count = 1;
+        tot_md_bytes = file->stats.total_vfd_md_write_bytes;
+        if (tot_md_bytes < 1) tot_md_bytes = 1;
+        for (i = 0, first = 1; i < 32; i++)
+        {
+            cum_raw_count += file->stats.vfd_raw_write_count_hist[i];
+            cum_raw_bytes += file->stats.vfd_raw_write_bytes_hist[i];
+            cum_md_count += file->stats.vfd_md_write_count_hist[i];
+            cum_md_bytes += file->stats.vfd_md_write_bytes_hist[i];
+
+            if (file->stats.vfd_raw_write_count_hist[i] == 0 &&
+                file->stats.vfd_md_write_count_hist[i] == 0)
+                continue;
+
+            if (first)
+            {
+                first = 0;
+                fprintf(logf,"                                              WRITES                                        \n");
+                fprintf(logf,"------------------------------------------------|-------------------------------------------\n");
+                fprintf(logf,"                    RAW DATA                    |                   META DATA               \n");
+                fprintf(logf,"    #reqs      Tot   Cum  #byts      Tot   Cum  | #reqs      Tot   Cum  #byts      Tot   Cum\n");
+            }
+
+            fprintf(logf,"%2d: %8llu (%3d%%, %3d%%) %8llu (%3d%%, %3d%%) | "
+                              "%8llu (%3d%%, %3d%%) %8llu (%3d%%, %3d%%)\n", i,
+                file->stats.vfd_raw_write_count_hist[i],
+                (int) (100.0 * file->stats.vfd_raw_write_count_hist[i] / tot_raw_count),
+                (int) (100.0 * cum_raw_count / tot_raw_count),
+                file->stats.vfd_raw_write_bytes_hist[i],
+                (int) (100.0 * file->stats.vfd_raw_write_bytes_hist[i] / tot_raw_bytes),
+                (int) (100.0 * cum_raw_bytes / tot_raw_bytes),
+                file->stats.vfd_md_write_count_hist[i],
+                (int) (100.0 * file->stats.vfd_md_write_count_hist[i] / tot_md_count),
+                (int) (100.0 * cum_md_count / tot_md_count),
+                file->stats.vfd_md_write_bytes_hist[i],
+                (int) (100.0 * file->stats.vfd_md_write_bytes_hist[i] / tot_md_bytes),
+                (int) (100.0 * cum_md_bytes / tot_md_bytes));
+        }
+        cum_raw_count = 0;
+        cum_raw_bytes = 0;
+        cum_md_count = 0;
+        cum_md_bytes = 0;
+        tot_raw_count = file->stats.total_vfd_raw_read_count;
+        if (tot_raw_count < 1) tot_raw_count = 1;
+        tot_raw_bytes = file->stats.total_vfd_raw_read_bytes;
+        if (tot_raw_bytes < 1) tot_raw_bytes = 1;
+        tot_md_count = file->stats.total_vfd_md_read_count;
+        if (tot_md_count < 1) tot_md_count = 1;
+        tot_md_bytes = file->stats.total_vfd_md_read_bytes;
+        if (tot_md_bytes < 1) tot_md_bytes = 1;
+        for (i = 0, first = 1; i < 32; i++)
+        {
+            cum_raw_count += file->stats.vfd_raw_write_count_hist[i];
+            cum_raw_bytes += file->stats.vfd_raw_write_bytes_hist[i];
+            cum_md_count += file->stats.vfd_md_write_count_hist[i];
+            cum_md_bytes += file->stats.vfd_md_write_bytes_hist[i];
+
+            if (file->stats.vfd_raw_read_count_hist[i] == 0 &&
+                file->stats.vfd_md_read_count_hist[i] == 0)
+                continue;
+
+            if (first)
+            {
+                first = 0;
+                fprintf(logf,"                                              READS                                         \n");
+                fprintf(logf,"------------------------------------------------|-------------------------------------------\n");
+                fprintf(logf,"                    RAW DATA                    |                   META DATA               \n");
+                fprintf(logf,"    #reqs      Tot   Cum  #byts      Tot   Cum  | #reqs      Tot   Cum  #byts      Tot   Cum\n");
+            }
+
+            fprintf(logf,"%2d: %8llu (%3d%%, %3d%%) %8llu (%3d%%, %3d%%) | "
+                              "%8llu (%3d%%, %3d%%) %8llu (%3d%%, %3d%%)\n", i,
+                file->stats.vfd_raw_read_count_hist[i],
+                (int) (100.0 * file->stats.vfd_raw_read_count_hist[i] / tot_raw_count),
+                (int) (100.0 * cum_raw_count / tot_raw_count),
+                file->stats.vfd_raw_read_bytes_hist[i],
+                (int) (100.0 * file->stats.vfd_raw_read_bytes_hist[i] / tot_raw_bytes),
+                (int) (100.0 * cum_raw_bytes / tot_raw_bytes),
+                file->stats.vfd_md_read_count_hist[i],
+                (int) (100.0 * file->stats.vfd_md_read_count_hist[i] / tot_md_count),
+                (int) (100.0 * cum_md_count / tot_md_count),
+                file->stats.vfd_md_read_bytes_hist[i],
+                (int) (100.0 * file->stats.vfd_md_read_bytes_hist[i] / tot_md_bytes),
+                (int) (100.0 * cum_md_bytes / tot_md_bytes));
+        }
+
+        fclose(logf);
+        free(file->log_name);
+    }
+
+    free(file->block_list);
+    free(file);
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_cmp
+ *
+ * Purpose:	Compares two files belonging to this driver using an
+ *		arbitrary (but consistent) ordering.
+ *
+ * Return:	Success:	A value like strcmp()
+ *
+ *		Failure:	never fails (arguments were checked by the
+ *				caller).
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, July 29, 1999
+ *
+ * Modifications:
+ *      Stolen from the sec2 driver - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+H5FD_silo_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+{
+    const H5FD_silo_t	*f1 = (const H5FD_silo_t*)_f1;
+    const H5FD_silo_t	*f2 = (const H5FD_silo_t*)_f2;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+#ifdef _WIN32
+    if (f1->fileindexhi < f2->fileindexhi) return -1;
+    if (f1->fileindexhi > f2->fileindexhi) return 1;
+
+    if (f1->fileindexlo < f2->fileindexlo) return -1;
+    if (f1->fileindexlo > f2->fileindexlo) return 1;
+
+#else
+#ifdef H5_DEV_T_IS_SCALAR
+    if (f1->device < f2->device) return -1;
+    if (f1->device > f2->device) return 1;
+#else /* H5_DEV_T_IS_SCALAR */
+    /* If dev_t isn't a scalar value on this system, just use memcmp to
+     * determine if the values are the same or not.  The actual return value
+     * shouldn't really matter...
+     */
+    if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) return -1;
+    if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) return 1;
+#endif /* H5_DEV_T_IS_SCALAR */
+
+#ifndef H5_VMS
+    if (f1->inode < f2->inode) return -1;
+    if (f1->inode > f2->inode) return 1;
+#else
+    if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) return -1;
+    if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) return 1;
+#endif /*H5_VMS*/
+
+#endif
+
+    return 0;
+
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_query
+ *
+ * Purpose:	Set the flags that this VFL driver is capable of supporting.
+ *              (listed in H5FDpublic.h)
+ *
+ * Return:	Success:	non-negative
+ *
+ *		Failure:	negative
+ *
+ * Programmer:	Quincey Koziol
+ *              Friday, August 25, 2000
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_query(const H5FD_t *_f, unsigned long *flags /* out */)
+{
+    /* Shut compiler up */
+    _f=_f;
+
+    /* Set the VFL feature flags that this driver supports */
+    if(flags) {
+        *flags = 0;
+        *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+        *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+        *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
+        *flags|=H5FD_FEAT_DATA_SIEVE;       /* OK to perform data sieving for faster raw data reads & writes */
+    }
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_get_eoa
+ *
+ * Purpose:	Gets the end-of-address marker for the file. The EOA marker
+ *		is the first address past the last byte allocated in the
+ *		format address space.
+ *
+ * Return:	Success:	The end-of-address marker.
+ *
+ *		Failure:	HADDR_UNDEF
+ *
+ * Programmer:	Robb Matzke
+ *              Monday, August  2, 1999
+ *
+ * Modifications:
+ *              Stolen from the sec2 driver - QAK, 10/18/99
+ *
+ *              Raymond Lu
+ *              21 Dec. 2006
+ *              Added the parameter TYPE.  It's only used for MULTI driver.
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_silo_get_eoa(const H5FD_t *_file, H5FD_mem_t /*unused*/ type)
+{
+    const H5FD_silo_t	*file = (const H5FD_silo_t *)_file;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Shut compiler up */
+    type = type;
+
+    return(file->eoa);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_set_eoa
+ *
+ * Purpose:	Set the end-of-address marker for the file. This function is
+ *		called shortly after an existing HDF5 file is opened in order
+ *		to tell the driver where the end of the HDF5 data is located.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	-1
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, July 29, 1999
+ *
+ * Modifications:
+ *              Stolen from the sec2 driver - QAK, 10/18/99
+ *
+ *              Raymond Lu
+ *              21 Dec. 2006
+ *              Added the parameter TYPE.  It's only used for MULTI driver.
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Shut compiler up */
+    type = type;
+
+    file->eoa = addr;
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5FD_silo_get_eof
+ *
+ * Purpose:	Returns the end-of-file marker, which is the greater of
+ *		either the Unix end-of-file or the HDF5 end-of-address
+ *		markers.
+ *
+ * Return:	Success:	End of file address, the first address past
+ *				the end of the "file", either the Unix file
+ *				or the HDF5 file.
+ *
+ *		Failure:	HADDR_UNDEF
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, July 29, 1999
+ *
+ * Modifications:
+ *      Stolen from the sec2 driver - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+static haddr_t
+H5FD_silo_get_eof(const H5FD_t *_file)
+{
+    const H5FD_silo_t	*file = (const H5FD_silo_t *)_file;
+
+    return(MAX(file->eof, file->eoa));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:       H5FD_silo_get_handle
+ *
+ * Purpose:        Returns the file handle of silo file driver.
+ *
+ * Returns:        Non-negative if succeed or negative if fails.
+ *
+ * Programmer:     Raymond Lu
+ *                 Sept. 16, 2002
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
+{
+    H5FD_silo_t       *file = (H5FD_silo_t *)_file;
+    static const char  *func="H5FD_silo_get_handle";  /* Function Name for error reporting */
+
+    /* Shut compiler up */
+    fapl=fapl;
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    if (file_handle)
+        *file_handle = &(file->fd);
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5F_silo_read
+ *
+ * Purpose:	Reads SIZE bytes beginning at address ADDR in file LF and
+ *		places them in buffer BUF.  Reading past the logical or
+ *		physical end of file returns zeros instead of failing.
+ *
+ * Errors:
+ *		IO	  READERROR	Fread failed.
+ *		IO	  SEEKERROR	Fseek failed.
+ *
+ * Return:	Non-negative on success/Negative on failure
+ *
+ * Programmer:	Robb Matzke
+ *		Wednesday, October 22, 1997
+ *
+ * Modifications:
+ *		June 2, 1998	Albert Cheng
+ *		Added xfer_mode argument
+ *
+ *      Ported to VFL/H5FD layer - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
+    void *buf/*out*/)
+{
+    H5FD_silo_t		*file = (H5FD_silo_t*)_file;
+    static const char *func="H5FD_silo_read";  /* Function Name for error reporting */
+    herr_t ret_value = 0;
+    silo_vfd_block_t *bl;
+    silo_vfd_relevant_blocks_t rb;
+    hsize_t id, nbytes;
+    int blidx, bufoff;
+
+    /* Shut compiler up */
+    type=type;
+    dxpl_id=dxpl_id;
+
+    HDassert(file && file->pub.cls);
+    HDassert(buf);
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Check for overflow */
+    if (HADDR_UNDEF==addr)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+    if (REGION_OVERFLOW(addr, size))
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+    if ((addr+size)>file->eoa)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+
+    if (size == 0)
+        return 0;
+
+    rb = relevant_blocks(file->block_size, addr, size);
+    blidx = -1; 
+    bl = file->block_list;
+    bufoff = 0;
+    for (id = rb.id0; id <= rb.id1; id++)
+    {
+        /* look for the block in the list */
+        if (blidx < 0 || blidx >= file->num_blocks-1)
+            blidx = find_block_by_id(file, id, EXACT); 
+        else if (bl[blidx+1].id != id)
+            blidx = find_block_by_id(file, id, EXACT); 
+        else
+            blidx++;
+
+        if (blidx < 0)
+        {
+            if (file->num_blocks == file->max_blocks)
+            {
+                int tmpblidx = find_block_to_preempt(file);
+                free_block_by_index(file, tmpblidx);
+            }
+            blidx = alloc_block_by_id(file, id);
+        }
+
+        /* put the data in the block */
+	if (id == rb.id0 && id == rb.id1)
+	{
+	    get_data_from_block_by_index(file, type, buf, size, blidx, rb.off0);
+	    bufoff += size;
+	}
+        else if (id == rb.id0)
+	{
+	    nbytes = file->block_size - rb.off0;
+	    get_data_from_block_by_index(file, type, (char*)buf+bufoff, nbytes, blidx, rb.off0);
+	    bufoff += nbytes;
+	}
+	else if (id == rb.id1)
+	{
+	    nbytes = rb.off1+1;
+	    get_data_from_block_by_index(file, type, (char*)buf+bufoff, nbytes, blidx, 0);
+	    bufoff += nbytes;
+	}
+	else
+	{
+	    get_data_from_block_by_index(file, type, (char*)buf+bufoff, file->block_size, blidx, 0);
+	    bufoff += file->block_size;
+	}
+    }
+
+    if (file->log_stats)
+    {
+        int n;
+        hsize_t tmpsize = size;
+        for (n = 0; tmpsize; n++, tmpsize=(tmpsize>>1));
+        if (type == H5FD_MEM_DRAW)
+        {
+            file->stats.total_vfd_raw_read_count++;
+            file->stats.total_vfd_raw_read_bytes += size;
+            file->stats.vfd_raw_read_count_hist[n]++;
+            file->stats.vfd_raw_read_bytes_hist[n] += size;
+        }
+        else
+        {
+            file->stats.total_vfd_md_read_count++;
+            file->stats.total_vfd_md_read_bytes += size;
+            file->stats.vfd_md_read_count_hist[n]++;
+            file->stats.vfd_md_read_bytes_hist[n] += size;
+        }
+        if (rb.id1 > rb.id0+1)
+            file->stats.num_multiblock_reads++;
+    }
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5F_silo_write
+ *
+ * Purpose:	Writes SIZE bytes from the beginning of BUF into file LF at
+ *		file address ADDR.
+ *
+ * Errors:
+ *		IO	  SEEKERROR	Fseek failed.
+ *		IO	  WRITEERROR	Fwrite failed.
+ *
+ * Return:	Non-negative on success/Negative on failure
+ *
+ * Programmer:	Robb Matzke
+ *		Wednesday, October 22, 1997
+ *
+ * Modifications:
+ *		June 2, 1998	Albert Cheng
+ *		Added xfer_mode argument
+ *
+ *      Ported to VFL/H5FD layer - QAK, 10/18/99
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
+		size_t size, const void *buf)
+{
+    H5FD_silo_t		*file = (H5FD_silo_t*)_file;
+    static const char *func="H5FD_silo_write";  /* Function Name for error reporting */
+    herr_t ret_value = 0;
+    silo_vfd_block_t *bl;
+    silo_vfd_relevant_blocks_t rb;
+    hsize_t id, nbytes;
+    int blidx, bufoff;
+
+    /* Shut compiler up */
+    dxpl_id=dxpl_id;
+    type=type;
+
+    HDassert(file && file->pub.cls);
+    HDassert(buf);
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Check for overflow conditions */
+    if (HADDR_UNDEF==addr)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+    if (REGION_OVERFLOW(addr, size))
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+    if (addr+size>file->eoa)
+        H5E_PUSH_HELPER (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1, -1)
+
+    if (size == 0)
+        return 0;
+
+    rb = relevant_blocks(file->block_size, addr, size);
+    blidx = -1; 
+    bl = file->block_list;
+    bufoff = 0;
+    for (id = rb.id0; id <= rb.id1; id++)
+    {
+        /* look for the block in the list */
+        if (blidx < 0 || blidx >= file->num_blocks-1)
+            blidx = find_block_by_id(file, id, EXACT); 
+        else if (bl[blidx+1].id != id)
+            blidx = find_block_by_id(file, id, EXACT); 
+        else
+            blidx++;
+
+        if (blidx < 0)
+        {
+            if (file->num_blocks == file->max_blocks)
+            {
+                int tmpblidx = find_block_to_preempt(file);
+                free_block_by_index(file, tmpblidx);
+            }
+            blidx = alloc_block_by_id(file, id);
+        }
+
+        /* put the data in the block */
+	if (id == rb.id0 && id == rb.id1)
+	{
+	    put_data_to_block_by_index(file, type, buf, size, blidx, rb.off0);
+	    bufoff += size;
+	}
+        else if (id == rb.id0)
+	{
+	    nbytes = file->block_size - rb.off0;
+	    put_data_to_block_by_index(file, type, (const char*)buf+bufoff, nbytes, blidx, rb.off0);
+	    bufoff += nbytes;
+	}
+	else if (id == rb.id1)
+	{
+	    nbytes = rb.off1+1;
+	    put_data_to_block_by_index(file, type, (const char*)buf+bufoff, nbytes, blidx, 0);
+	    bufoff += nbytes;
+	}
+	else
+	{
+	    put_data_to_block_by_index(file, type, (const char*)buf+bufoff, file->block_size, blidx, 0);
+	    bufoff += file->block_size;
+	}
+    }
+
+    if (file->log_stats)
+    {
+        int n;
+        hsize_t tmpsize = size;
+        for (n = 0; tmpsize; n++, tmpsize=(tmpsize>>1));
+        if (type == H5FD_MEM_DRAW)
+        {
+            file->stats.total_vfd_raw_write_count++;
+            file->stats.total_vfd_raw_write_bytes += size;
+            file->stats.vfd_raw_write_count_hist[n]++;
+            file->stats.vfd_raw_write_bytes_hist[n] += size;
+        }
+        else
+        {
+            file->stats.total_vfd_md_write_count++;
+            file->stats.total_vfd_md_write_bytes += size;
+            file->stats.vfd_md_write_count_hist[n]++;
+            file->stats.vfd_md_write_bytes_hist[n] += size;
+        }
+        if (rb.id1 > rb.id0+1)
+            file->stats.num_multiblock_writes++;
+    }
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	H5F_silo_truncate
+ *
+ * Purpose:	Makes sure that the true file size is the same (or larger)
+ *		than the end-of-address.
+ *
+ * Errors:
+ *		IO	  SEEKERROR     fseek failed.
+ *		IO	  WRITEERROR    fflush or fwrite failed.
+ *
+ * Return:	Non-negative on success/Negative on failure
+ *
+ * Programmer:	Quincey Koziol
+ *		Thursday, January 31, 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_silo_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
+{
+    H5FD_silo_t	*file = (H5FD_silo_t*)_file;
+    static const char *func = "H5FD_silo_truncate";  /* Function Name for error reporting */
+    herr_t ret_value = 0;
+
+    /* Just skip the truncate */
+    return 0;
+
+    /* Shut compiler up */
+    dxpl_id = dxpl_id;
+    closing = closing;
+
+    HDassert(file);
+
+    /* Clear the error stack */
+    H5Eclear2(H5E_DEFAULT);
+
+    /* Extend the file to make sure it's large enough */
+    if(file->write_access && !H5F_addr_eq(file->eoa, file->eof)) {
+#ifdef _WIN32
+        HFILE filehandle;   /* Windows file handle */
+        LARGE_INTEGER li;   /* 64-bit integer for SetFilePointer() call */
+
+        /* Map the posix file handle to a Windows file handle */
+        filehandle = _get_osfhandle(file->fd);
+
+        /* Translate 64-bit integers into form Windows wants */
+        /* [This algorithm is from the Windows documentation for SetFilePointer()] */
+        li.QuadPart = (LONGLONG)file->eoa;
+        (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN);
+        if(SetEndOfFile((HANDLE)filehandle) == 0)
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to extend file properly", -1, -1)
+#else /* _WIN32 */
+#ifdef H5_VMS
+        /* Reset seek offset to the beginning of the file, so that the file isn't 
+         * re-extended later.  This may happen on Open VMS. */
+        if(-1 == HDlseek(file->fd, (file_offset_t)0, SEEK_SET))
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "HDlseek failed", -1, errno)
+#endif
+
+        if(-1 == HDftruncate(file->fd, (file_offset_t)file->eoa))
+            H5E_PUSH_HELPER(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "HDftruncate failed", -1, errno)
+#endif /* _WIN32 */
+
+        /* Update the eof value */
+        file->file_eof = file->eoa;
+
+        /* Reset last file I/O information */
+        file->pos = HADDR_UNDEF;
+        file->op = OP_UNKNOWN;
+    } /* end if */
+
+    return(0);
+} /* end H5FD_silo_truncate() */
+
+#ifdef _H5private_H
+/*
+ * This is not related to the functionality of the driver code.
+ * It is added here to trigger warning if HDF5 private definitions are included
+ * by mistake.  The code should use only HDF5 public API and definitions.
+ */
+#error "Do not use HDF5 private definitions"
+#endif
+
+#endif /* #if HDF5_VERSION_GE(1,8,4) */
+#endif /* #if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5) */
diff --git a/src/hdf5_drv/H5FDsilo.h b/src/hdf5_drv/H5FDsilo.h
new file mode 100644
index 0000000..e56a311
--- /dev/null
+++ b/src/hdf5_drv/H5FDsilo.h
@@ -0,0 +1,118 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * Programmer:  Mark C. Miller  (plagerized greatly from HDF5 source's
+ *                               sec2 driver)
+ *              Febuary, 2010
+ *
+ * Purpose:	The public header file for the sec2 driver.
+ *
+ * Modifications
+ *
+ *   Mark C. Miller, Wed Jul 14 20:46:11 PDT 2010
+ *   Added macro definitions for defualts.
+ *   Added support for direct I/O.
+ *
+ *   Mark C. Miller, Wed Jul 21 22:02:53 PDT 2010
+ *   Set larger defaults for BG/P and BG/L systems.
+ */
+#ifndef H5FDsilo_H
+#define H5FDsilo_H
+
+#if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5)
+
+#include "hdf5.h"
+
+/* useful macro for comparing HDF5 versions */
+#define HDF5_VERSION_GE(Maj,Min,Rel)  \
+        (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \
+         ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \
+         (H5_VERS_MAJOR>Maj))
+
+#if HDF5_VERSION_GE(1,8,4)
+
+#include "H5Ipublic.h"
+
+#define H5FD_SILO	(H5FD_silo_init())
+
+/* Set larger default values for BG architectures */
+/* These CPP symbols are defined only for bg... compilers */
+#if defined(__bgp__) || defined(__bgl__)
+#define H5FD_SILO_DEFAULT_BLOCK_COUNT 32 
+#define H5FD_SILO_DEFAULT_BLOCK_SIZE (1<<20) 
+#else
+#define H5FD_SILO_DEFAULT_BLOCK_COUNT 16
+#define H5FD_SILO_DEFAULT_BLOCK_SIZE 16384
+#endif
+#define H5FD_SILO_DEFAULT_LOG_STATS 0
+#define H5FD_SILO_DEFAULT_USE_DIRECT 0
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+hid_t H5FD_silo_init(void);
+void H5FD_silo_term(void);
+herr_t H5Pset_fapl_silo(hid_t fapl_id);
+herr_t H5Pset_silo_block_size_and_count(hid_t fapl_id, hsize_t block_size, int max_blocks_in_mem);
+herr_t H5Pset_silo_log_stats(hid_t fapl_id, int log);
+herr_t H5Pset_silo_use_direct(hid_t fapl_id, int used);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #if HDF5_VERSION_GE */
+#endif /* #if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5) */
+#endif /* #ifndef H5FDsilo_H */
diff --git a/src/hdf5_drv/Makefile.am b/src/hdf5_drv/Makefile.am
new file mode 100644
index 0000000..79d1db4
--- /dev/null
+++ b/src/hdf5_drv/Makefile.am
@@ -0,0 +1,72 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_hdf5_drv.la
+libsilo_hdf5_drv_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+
+if HZIP_NEEDED
+AM_CPPFLAGS += -I$(srcdir)/../hzip
+endif
+
+if FPZIP_NEEDED
+AM_CPPFLAGS += -I$(srcdir)/../fpzip 
+endif
+
+noinst_HEADERS = \
+ silo_hdf5_private.h \
+ H5FDsilo.h
+FILES = \
+ silo_hdf5.c \
+ H5FDsilo.c
diff --git a/src/hdf5_drv/Makefile.in b/src/hdf5_drv/Makefile.in
new file mode 100644
index 0000000..6e6dbc1
--- /dev/null
+++ b/src/hdf5_drv/Makefile.in
@@ -0,0 +1,556 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at HZIP_NEEDED_TRUE@am__append_1 = -I$(srcdir)/../hzip
+ at FPZIP_NEEDED_TRUE@am__append_2 = -I$(srcdir)/../fpzip 
+subdir = src/hdf5_drv
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_hdf5_drv_la_LIBADD =
+am__objects_1 = silo_hdf5.lo H5FDsilo.lo
+am_libsilo_hdf5_drv_la_OBJECTS = $(am__objects_1)
+libsilo_hdf5_drv_la_OBJECTS = $(am_libsilo_hdf5_drv_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_hdf5_drv_la_SOURCES)
+DIST_SOURCES = $(libsilo_hdf5_drv_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_hdf5_drv.la
+libsilo_hdf5_drv_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo \
+	$(am__append_1) $(am__append_2)
+noinst_HEADERS = \
+ silo_hdf5_private.h \
+ H5FDsilo.h
+
+FILES = \
+ silo_hdf5.c \
+ H5FDsilo.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/hdf5_drv/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/hdf5_drv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_hdf5_drv.la: $(libsilo_hdf5_drv_la_OBJECTS) $(libsilo_hdf5_drv_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_hdf5_drv_la_OBJECTS) $(libsilo_hdf5_drv_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/H5FDsilo.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_hdf5.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/hdf5_drv/silo_hdf5.c b/src/hdf5_drv/silo_hdf5.c
new file mode 100644
index 0000000..f9fca3d
--- /dev/null
+++ b/src/hdf5_drv/silo_hdf5.c
@@ -0,0 +1,15040 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/* Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
+   in this file uses version 1.6 of the HDF5 API. This is harmless for
+   versions of HDF5 before 1.8 and ensures correct compilation with
+   version 1.8 and thereafter. When, and if, the HDF5 code in this file
+   is explicitly upgraded to the 1.8 API, this symbol should be removed. */
+#define H5_USE_16_API
+
+#include <errno.h>
+#include <assert.h>
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_STDLIB_H
+#include <stdlib.h> /*missing from silo header files*/
+#endif
+#include <stdio.h>
+#include "silo_hdf5_private.h"
+#include "H5FDsilo.h"
+#if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5)
+
+/* HZIP node order permuation vector construction.
+   To construct a permutation vector, work backwards
+   from the highest numbered node on the canonical
+   element, finding its cooresponding node number on
+   the source element. Put the resulting number in
+   the highest nibble of the unsigned word for the
+   permutation vector. Then, move to the next highest
+   numbered node on the canonical element, repeating
+   all these steps to arrive at a value for the next
+   highest order nibble in the word. 3D example...
+  
+       3-------2       2-------3
+      /|      /|      /|      /|
+     4-------5 |     6-------7 |
+     | |     | | --> | |     | |
+     | 0-----|-1     | 0-----|-1
+     |/      |/      |/      |/
+     7-------6       4-------5
+  
+     source data     canonical
+     ordering        ordering
+
+             0x54672310
+
+   2D example...
+       (Note the zone on the left is also Silo/VisIt
+        node order for a quad)
+
+       1-------2       2-------3
+       |       |       |       |
+       |       |       |       |
+       |       | -->   |       |
+       0-------3       0-------1
+
+            0x00002130
+
+  HZIP Compression integration overview...
+
+  HZIP is a unique among compression algorithms in that it is 
+  capabable of exploiting mesh structure in order to improve
+  performance. However, this means that the compressor needs 
+  to maintain information on the mesh connectivity in order to
+  compress any variables defined on the mesh. Other compressors
+  operate either on raw byte streams or, maybe, multidimensional
+  integer and floating point arrays. FPZIP does that for example.
+  But, to use HZIP, Silo needs to maintain a cache of recently
+  used nodelists. Since Silo imposes no order on how objects are
+  written or read, if the writer doen't write in the correct order,
+  things will fail. During read, however, the silo library can
+  ensure tha all information necessary to decompress is available
+  when necessary. 
+
+  The design here attempts to localize as much of the compression
+  know how to an HDF5 'filter.' It is best if the compressor is
+  properly integrated with HDF5 using HDF5's filter architecture.
+  This is substantially easier for generic compressors because
+  there isn't any information other than the data stream required
+  to compress or decompress. That is not true for HZIP compression.
+  The HDF5 filter that implements HZIP compression,
+  db_hdf5_hzip_filter_op, must exploit a lot of information apart
+  from the actual data stream it is compressing or decompressing.
+  This extra information is managed in db_hdf5_hzip_params. In
+  a handful of places in the driver, we've had to add code to
+  manage HZIP compression information so that the compressor will
+  have all the information it needs. These places are the
+  PrepareForXXXCompression|Decompression methods.
+
+  There are a number of issues...
+  a) HZIP compresses only node-centered data, not zone-centerd.
+  b) HZIP compresses only 2D quad meshes or 3D hex meshes.
+  c) HZIP is designed for unstructured grid. To use it on structured
+     grid, we create a fictitious nodelist at will.
+  d) The silo client must call DBFreeResources (which happens
+     automatically on DBClose) to free up stored nodelists
+     used by HZIP. It is best if the client operate in such a
+     way that reads or writes for all variables of a mesh
+     occur shortly after the mesh itself and that the client
+     does not iterate through a slew of meshes and then the
+     variables for those meshes.
+  e) To use HZIP, you need to give it a buffer to place the
+     compressed result it. But, you can't allocate such a 
+     buffer without knowing size. So, we take the approach
+     of having a min. compression ratio and allocating a
+     (possibly too large) buffer for HZIP to compress into.
+     If HZIP cannot compress into this size, it fails and
+     we skip the compression. If it can, HDF5 ultimately
+     writes only the compressed bytes. Same is true for FPZIP.
+  f) To use HDF5 filters, the datasets must be 'chunked.'
+     With chunked datasets, HDF5 essentially makes a copy
+     of the data on write effecting performance and memory
+     usage.
+  g) Silo supports data read masks. If you attempt to read
+     a mesh without reading its zonelist and the zonelist
+     (and mesh) are compressed, then the result will fail
+     (presently in unpredictable ways) because HZIP needs
+     the nodelist in order to decompress.
+  h) In integrating compression, we have to take care that
+     new calls introduced to support compression that ALWAYS
+     happen (whether we are compressing or not) do not 
+     negatively affect performance of the 'old' Silo.
+     An example is in PrepareForUcdvarDecompression.
+  f) Silex cannot browse HZIP compressed objects because it
+     does not operate at the correct level of abstraction. 
+     It uses DBGetObject calls only. 
+
+*/
+
+/* For Lindstrom compression libs */
+#define DB_HDF5_HZIP_ID (H5Z_FILTER_RESERVED+1)
+#define DB_HDF5_FPZIP_ID (H5Z_FILTER_RESERVED+2)
+#ifdef HAVE_HZIP
+#include <hzip.h>
+#ifdef HAVE_LIBZ
+static struct HZMCODECzlib db_hdf5_hzip_zlib_codec_params;
+#endif
+static struct HZMCODECbase db_hdf5_hzip_base_codec_params;
+static const unsigned SILO_HZIP_PERMUTATION[4] = {0,0,((unsigned) (0x00002130)), ((unsigned) (0x65217430))};
+#endif
+#ifdef HAVE_FPZIP
+#include <fpzip.h>
+#endif
+
+/* Defining these to check overhead of PROTECT */
+#if 0
+#   define PROTECT      if(1)
+#   define CLEANUP      else
+#   define END_PROTECT  /*void*/
+#   define UNWIND()     ; 
+#endif
+
+#define COMPRESSION_ERRMODE_FALLBACK 0
+#define COMPRESSION_ERRMODE_FAIL     1
+#define ALLOW_MESH_COMPRESSION 0x00000001
+
+#define FALSE           0
+#define TRUE            1
+
+#define LINKGRP         "/.silo/"       /*name of link group            */
+#define MAX_VARS        8               /*max vars per DB*var object    */
+#define OPTDUP(S)       ((S)&&*(S)?strdup(S):NULL)
+#define BASEDUP(S)       ((S)&&*(S)?db_FullName2BaseName(S):NULL)
+#define ALIGN(ADDR,N)   (((ADDR)+(N)-1)&~((N)-1))
+
+/* useful macro for comparing HDF5 versions */
+#define HDF5_VERSION_GE(Maj,Min,Rel)  \
+        (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \
+         ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \
+         (H5_VERS_MAJOR>Maj))
+
+/* to encode the version of the hdf5 library in any silo executable */
+char SILO_built_with_H5_lib_vers_info_g[] = "SILO built with "
+#if HDF5_VERSION_GE(1,4,2)
+H5_VERS_INFO;
+#else
+"HDF5 library: Version 1.4.1 or earlier";
+#endif
+
+/* some necessary forward declarations */
+PRIVATE int db_hdf5_fullname(DBfile_hdf5 *dbfile, char *name, char *full);
+PRIVATE int hdf2silo_type(hid_t type);
+
+/* Symbolic constants used in calls to db_StringListToStringArray
+   to indicate behavior. A '!' in front means to not perform the
+   associated action. For HDF5 driver, we handle the slash swap
+   on the 'names' member of multi-block objects only and we
+   never skip first semicolon. */
+static const int        handleSlashSwap = 1;
+static const int        skipFirstSemicolon = 0;
+
+/* Use `float' for all memory floating point values? */
+static int              force_single_g;
+
+/* used to control behavior of GetZonelist */
+static const char      *calledFromGetUcdmesh = 0;
+
+/* Struct used when building the CWD name */
+typedef struct silo_hdf5_comp_t {
+    char                *name;
+    unsigned long       objno[2];
+} silo_hdf5_comp_t;
+
+/* Attributes for various types of objects */
+typedef struct DBcurve_mt {
+    int                 npts;
+    int                 guihide;
+    char                xvarname[256];
+    char                yvarname[256];
+    char                label[256];
+    char                xlabel[256];
+    char                ylabel[256];
+    char                xunits[256];
+    char                yunits[256];
+    char                reference[256];
+} DBcurve_mt;
+static hid_t DBcurve_mt5 = -1;
+
+typedef struct DBcsgmesh_mt {
+    int            block_no;
+    int            group_no;
+    int            cycle;
+    int            nbounds;
+    int            lcoeffs;
+    float          time;
+    double         dtime;
+    int            ndims;
+    int            origin;
+    int            guihide;
+    double         min_extents[3];
+    double         max_extents[3];
+    char           units[3][256];
+    char           labels[3][256];
+    char           name[256];
+    char           typeflags[256];
+    char           bndids[256];
+    char           coeffs[256];
+    char           zonel_name[256];
+    char           bndnames[256];
+    char           mrgtree_name[256];
+    int            tv_connectivity;
+    int            disjoint_mode;
+} DBcsgmesh_mt;
+static hid_t DBcsgmesh_mt5;
+
+typedef struct DBcsgvar_mt {
+    int            cycle;
+    float          time;
+    double         dtime;
+    int            datatype;
+    int            nels;
+    int            nvals;
+    int            centering;
+    int            use_specmf;
+    int            ascii_labels;
+    int            guihide;
+    char           name[256];
+    char           units[256];
+    char           label[256];
+    char           vals[MAX_VARS][256];
+    char           meshname[256];
+    char           region_pnames[256];
+    int            conserved;
+    int            extensive;
+} DBcsgvar_mt;
+static hid_t DBcsgvar_mt5;
+
+typedef struct DBcsgzonelist_mt {
+    int            nregs;
+    int            origin;
+    int            lxform;
+    int            datatype;
+    int            nzones;
+    int            min_index;
+    int            max_index;
+    char           typeflags[256];
+    char           leftids[256];
+    char           rightids[256];
+    char           xform[256];
+    char           zonelist[256];
+    char           regnames[256];
+    char           zonenames[256];
+} DBcsgzonelist_mt;
+static hid_t DBcsgzonelist_mt5;
+
+typedef struct DBdefvars_mt {
+    int            ndefs;
+    char           names[256];
+    char           types[256];
+    char           defns[256];
+    char           guihides[256];
+} DBdefvars_mt;
+static hid_t DBdefvars_mt5;
+
+typedef struct DBquadmesh_mt {
+    char                coord[3][256];
+    double              min_extents[3];
+    double              max_extents[3];
+    int                 ndims;
+    int                 coordtype;
+    int                 nspace;
+    int                 nnodes;
+    int                 facetype;
+    int                 major_order;
+    int                 cycle;
+    int                 coord_sys;
+    int                 planar;
+    int                 origin;
+    int                 group_no;
+    int                 dims[3];
+    int                 min_index[3];
+    int                 max_index[3];
+    int                 baseindex[3];
+    float               time;
+    double              dtime;
+    int                 guihide;
+    char                label[3][256];
+    char                units[3][256];
+    char                mrgtree_name[256];
+} DBquadmesh_mt;
+static hid_t DBquadmesh_mt5;
+
+typedef struct DBquadvar_mt {
+    char                value[MAX_VARS][256];
+    char                mixed_value[MAX_VARS][256];
+    char                meshid[256];
+    int                 ndims;
+    int                 nvals;
+    int                 nels;
+    int                 origin;
+    int                 mixlen;
+    int                 major_order;
+    int                 datatype;
+    int                 cycle;
+    float               time;
+    double              dtime;
+    int                 use_specmf;
+    int                 ascii_labels;
+    int                 dims[3];
+    int                 zones[3];
+    int                 min_index[3];
+    int                 max_index[3];
+    float               align[3];
+    int                 guihide;
+    char                label[256];
+    char                units[256];
+    char                region_pnames[256];
+    int                 conserved;
+    int                 extensive;
+    int                 centering;
+} DBquadvar_mt;
+static hid_t    DBquadvar_mt5;
+
+typedef struct DBucdmesh_mt {
+    char                coord[3][256];
+    int                 ndims;
+    int                 nnodes;
+    int                 nzones;
+    int                 facetype;
+    int                 cycle;
+    int                 coord_sys;
+    int                 topo_dim;
+    int                 planar;
+    int                 origin;
+    int                 group_no;
+    float               time;
+    double              dtime;
+    int                 guihide;
+    char                facelist[256];
+    char                zonelist[256];
+    char                gnodeno[256];
+    double              min_extents[3];
+    double              max_extents[3];
+    char                label[3][256];
+    char                units[3][256];
+    char                phzonelist[256];
+    char                mrgtree_name[256];
+    int                 tv_connectivity;
+    int                 disjoint_mode;
+    int                 gnznodtype;
+} DBucdmesh_mt;
+static hid_t    DBucdmesh_mt5;
+
+typedef struct DBucdvar_mt {
+    char                value[MAX_VARS][256];
+    char                mixed_value[MAX_VARS][256];
+    char                meshid[256];
+    int                 ndims;
+    int                 nvals;
+    int                 nels;
+    int                 centering;
+    int                 origin;
+    int                 mixlen;
+    int                 datatype;
+    int                 cycle;
+    int                 use_specmf;
+    int                 ascii_labels;
+    float               time;
+    double              dtime;
+    int                 lo_offset;
+    int                 hi_offset;
+    int                 guihide;
+    char                label[256];
+    char                units[256];
+    char                region_pnames[256];
+    int                 conserved;
+    int                 extensive;
+} DBucdvar_mt;
+static hid_t    DBucdvar_mt5;
+
+typedef struct DBfacelist_mt {
+    int                 ndims;
+    int                 nfaces;
+    int                 nshapes;
+    int                 ntypes;
+    int                 lnodelist;
+    int                 origin;
+    char                nodelist[256];
+    char                shapecnt[256];
+    char                shapesize[256];
+    char                typelist[256];
+    char                types[256];
+    char                zoneno[256];
+} DBfacelist_mt;
+static hid_t    DBfacelist_mt5;
+
+typedef struct DBzonelist_mt {
+    int                 ndims;
+    int                 nzones;
+    int                 nshapes;
+    int                 lnodelist;
+    int                 origin;
+    int                 lo_offset;
+    int                 hi_offset;
+    char                nodelist[256];
+    char                shapecnt[256];
+    char                shapesize[256];
+    char                shapetype[256];
+    char                gzoneno[256];
+    int                 gnznodtype;
+} DBzonelist_mt;
+static hid_t    DBzonelist_mt5;
+
+typedef struct DBphzonelist_mt {
+    int                 nfaces;
+    int                 lnodelist;
+    int                 nzones;
+    int                 lfacelist;
+    int                 origin;
+    int                 lo_offset;
+    int                 hi_offset;
+    char                nodecnt[256];
+    char                nodelist[256];
+    char                extface[256];
+    char                facecnt[256];
+    char                facelist[256];
+    char                gzoneno[256];
+    int                 gnznodtype;
+} DBphzonelist_mt;
+static hid_t    DBphzonelist_mt5;
+
+typedef struct DBmaterial_mt {
+    int                 ndims;
+    int                 nmat;
+    int                 mixlen;
+    int                 origin;
+    int                 major_order;
+    int                 datatype;
+    int                 dims[3];
+    int                 allowmat0;
+    int                 guihide;
+    char                meshid[256];
+    char                matlist[256];
+    char                matnos[256];
+    char                mix_vf[256];
+    char                mix_next[256];
+    char                mix_mat[256];
+    char                mix_zone[256];
+    char                matnames[256];
+    char                matcolors[256];
+} DBmaterial_mt;
+static hid_t    DBmaterial_mt5;
+
+typedef struct DBmultimesh_mt {
+    int                 nblocks;
+    int                 cycle;
+    int                 ngroups;
+    int                 blockorigin;
+    int                 grouporigin;
+    float               time;
+    double              dtime;
+    int                 guihide;
+    int                 extentssize;
+    char                meshtypes[256];
+    char                meshnames[256];
+    char                extents[256];
+    char                zonecounts[256];
+    char                has_external_zones[256];
+    int                 lgroupings;
+    char                groupings[256];
+    char                groupnames[256];
+    char                mrgtree_name[256];
+    int                 tv_connectivity;
+    int                 disjoint_mode;
+    int                 topo_dim;
+    char                file_ns_name[256];
+    char                block_ns_name[256];
+    int                 block_type;
+    char                empty_list[256];
+    int                 empty_cnt;
+} DBmultimesh_mt;
+static hid_t    DBmultimesh_mt5;
+
+typedef struct DBmultimeshadj_mt {
+    int                 nblocks;
+    int                 blockorigin;
+    int                 lneighbors;
+    int                 totlnodelists;
+    int                 totlzonelists;
+    char                meshtypes[256];
+    char                nneighbors[256];
+    char                neighbors[256];
+    char                back[256];
+    char                lnodelists[256];
+    char                nodelists[256];
+    char                lzonelists[256];
+    char                zonelists[256];
+} DBmultimeshadj_mt;
+static hid_t DBmultimeshadj_mt5;
+
+typedef struct DBmultivar_mt {
+    int                 nvars;
+    int                 cycle;
+    int                 ngroups;
+    int                 blockorigin;
+    int                 grouporigin;
+    float               time;
+    double              dtime;
+    int                 extentssize;
+    int                 guihide;
+    char                vartypes[256];
+    char                varnames[256];
+    char                extents[256];
+    char                region_pnames[256];
+    char                mmesh_name[256];
+    int                 tensor_rank;
+    int                 conserved;
+    int                 extensive;
+    char                file_ns_name[256];
+    char                block_ns_name[256];
+    int                 block_type;
+    char                empty_list[256];
+    int                 empty_cnt;
+} DBmultivar_mt;
+static hid_t    DBmultivar_mt5;
+
+typedef struct DBmultimat_mt {
+    int                 nmats;
+    int                 cycle;
+    int                 ngroups;
+    int                 blockorigin;
+    int                 grouporigin;
+    float               time;
+    double              dtime;
+    int                 allowmat0;
+    int                 guihide;
+    char                matnames[256];
+    char                matnos[256];
+    char                mixlens[256];
+    char                matcounts[256];
+    char                matlists[256];
+    int                 nmatnos;
+    char                material_names[256];
+    char                mat_colors[256];
+    char                mmesh_name[256];
+    char                file_ns_name[256];
+    char                block_ns_name[256];
+    char                empty_list[256];
+    int                 empty_cnt;
+} DBmultimat_mt;
+static hid_t    DBmultimat_mt5;
+
+typedef struct DBmultimatspecies_mt {
+    int                 nspec;
+    int                 nmat;
+    int                 cycle;
+    int                 ngroups;
+    int                 blockorigin;
+    int                 grouporigin;
+    float               time;
+    double              dtime;
+    int                 guihide;
+    char                specnames[256];
+    char                nmatspec[256];
+    char                matname[256];
+    char                species_names[256];
+    char                speccolors[256];
+    char                file_ns_name[256];
+    char                block_ns_name[256];
+    char                empty_list[256];
+    int                 empty_cnt;
+} DBmultimatspecies_mt;
+static hid_t    DBmultimatspecies_mt5;
+
+typedef struct DBmatspecies_mt {
+    int                 ndims;
+    int                 nmat;
+    int                 nspecies_mf;
+    int                 mixlen;
+    int                 major_order;
+    int                 datatype;
+    int                 dims[3];
+    int                 guihide;
+    char                matname[256];
+    char                speclist[256];
+    char                nmatspec[256];
+    char                species_mf[256];
+    char                mix_speclist[256];
+    char                specnames[256];
+    char                speccolors[256];
+} DBmatspecies_mt;
+static hid_t    DBmatspecies_mt5;
+
+typedef struct DBpointmesh_mt {
+    int                 ndims;
+    int                 nspace;
+    int                 nels;
+    int                 cycle;
+    int                 group_no;
+    float               time;
+    double              dtime;
+    int                 origin;
+    int                 min_index;
+    int                 max_index;
+    double              min_extents[3];
+    double              max_extents[3];
+    int                 guihide;
+    char                coord[3][256];
+    char                label[3][256];
+    char                units[3][256];
+    char                gnodeno[256];
+    char                mrgtree_name[256];
+    int                 gnznodtype;
+} DBpointmesh_mt;
+static hid_t    DBpointmesh_mt5;
+
+typedef struct DBpointvar_mt {
+    int                 nvals;
+    int                 nels;
+    int                 nspace;
+    int                 origin;
+    int                 min_index;
+    int                 max_index;
+    int                 datatype;
+    int                 cycle;
+    float               time;
+    double              dtime;
+    int                 guihide;
+    int                 ascii_labels;
+    char                meshid[256];
+    char                label[256];
+    char                units[256];
+    char                data[MAX_VARS][256];
+    char                region_pnames[256];
+    int                 conserved;
+    int                 extensive;
+} DBpointvar_mt;
+static hid_t    DBpointvar_mt5;
+
+typedef struct DBcompoundarray_mt {
+    int                 nelems;
+    int                 nvalues;
+    int                 datatype;
+    char                values[256];
+    char                elemnames[256];
+    char                elemlengths[256];
+} DBcompoundarray_mt;
+static hid_t    DBcompoundarray_mt5;
+
+typedef struct DBsil_mt {
+    char           tails[256];
+    char           heads[256];
+    int            nedges;
+
+    char           setnames[256];
+    int            nsets;
+} DBsil_mt;
+static hid_t    DBsil_mt5;
+
+typedef struct DBmrgtree_mt {
+    /* from the DBmrgtree header struct */
+    int            src_mesh_type;
+    int            type_info_bits;
+    int            num_nodes;
+    int            root;
+    char           src_mesh_name[256];
+
+    /* contents of tree from the DBmrgtnode struct */
+    char           n_scalars[256]; /* scalar data for a node */
+    char           n_name[256];
+    char           n_names[256];
+    char           n_maps_name[256];
+    char           n_seg_ids[256];
+    char           n_seg_lens[256];
+    char           n_seg_types[256];
+    char           n_children[256];
+
+    char           mrgvar_onames[256];
+    char           mrgvar_rnames[256];
+} DBmrgtree_mt;
+static hid_t   DBmrgtree_mt5;
+
+typedef struct DBgroupelmap_mt {
+    int            num_segments;
+    int            fracs_data_type;
+    char           groupel_types[256];
+    char           segment_lengths[256];
+    char           segment_ids[256];
+    char           segment_data[256];
+    char           frac_lengths[256];
+    char           segment_fracs[256]; 
+} DBgroupelmap_mt;
+static hid_t DBgroupelmap_mt5;
+
+typedef struct DBmrgvar {
+    int nregns;
+    int ncomps;
+    int datatype;
+    char mrgt_name[256];
+    char reg_pnames[256];
+    char compnames[256];
+    char data[MAX_VARS][256];
+} DBmrgvar_mt;
+static hid_t DBmrgvar_mt5;
+
+static hid_t    T_char = -1;
+static hid_t    T_short = -1;
+static hid_t    T_int = -1;
+static hid_t    T_long = -1;
+static hid_t    T_llong = -1;
+static hid_t    T_float = -1;
+static hid_t    T_double = -1;
+static hid_t    T_str256 = -1;
+static hid_t    SCALAR = -1;
+static hid_t    P_crprops = -1;
+static hid_t    P_ckcrprops = -1;
+static hid_t    P_rdprops = -1;
+static hid_t    P_ckrdprops = -1;
+
+#define OPT(V)          ((V)?(V):"")
+#define OFFSET(P,F)     ((char*)&((P).F)-(char*)&(P))
+#define ENDOF(S)        ((S)+strlen(S))
+
+/*
+ * Use these macros to define compound data types. The following form defines
+ * an hdf5 data type called `DBcurve_mt5' which describes the C data type
+ * `DBcurve_mt'.
+ *
+ *      STRUCT(DBcurve) {
+ *          MEMBER(int,         npts);
+ *          MEMBER(int,         datatype);
+ *          MEMBER(str256,      label);
+ *      } DEFINE;
+ *
+ * The following construct creates a temporary hdf5 data type `_mt' that
+ * which is based on the C data type `DBcurve_mt' but which has minimal sizes
+ * for character strings and may be missing character string fields which are
+ * empty.
+ *
+ *      DBcurve_mt m;
+ *      STRUCT(DBcurve) {
+ *          MEMBER(int,         npts);
+ *          m.npts = npts;
+ *          MEMBER(int,         datatype);
+ *          m.datatype = dtype;
+ *          MEMBER(str(xname),  xvarname);
+ *          strcpy(m.xvarname, OPT(xname));
+ *      } OUTPUT(dbfile, DB_CURVE, "objname", &m);
+ */
+#define STRUCT(S) {                                                           \
+    int         _i, _j=0;       /*counters*/                                  \
+    hsize_t     _size;          /*number of repeated components*/             \
+    size_t      _f_off=0;       /*offset into file data type*/                \
+    DBfile_hdf5 *_f=NULL;       /*file for target types*/                     \
+    S##_mt      _m;             /*temp to calculate offsets*/                 \
+    hid_t       _tmp_m, _tmp_f; /*memory and file temporaries*/               \
+    hid_t       _mt=-1, _ft=-1; /*memory and file data types*/                \
+    char        _fullname[256]; /*name for repeated members*/                 \
+                                                                              \
+    for (_i=0; _i<3; _i++) {                                                  \
+        switch (_i) {                                                         \
+        case 0:                                                               \
+            /*                                                                \
+             * Fall through to pick up closing arguments. Touch local         \
+             * variables so compiler doesn't complain about them not being    \
+             * used.                                                          \
+             */                                                               \
+            _size = sprintf(_fullname, "%d", _j);                             \
+            break;                                                            \
+                                                                              \
+        case 2:                                                               \
+            /* Define global DB*_mt5 data type for memory */                  \
+            S##_mt5 = _mt;                                                    \
+            break;                                                            \
+                                                                              \
+        case 1:                                                               \
+            /* Build data types, file multiplier is arbitrary */              \
+            _mt = H5Tcreate(H5T_COMPOUND, sizeof _m);                         \
+            if (_f) _ft = H5Tcreate(H5T_COMPOUND, 3*sizeof _m);               \
+            /* MEMBER DEFINITIONS HERE... */
+
+#define MEMBER_S(TYPE,NAME) {                                                 \
+    _tmp_m = T_##TYPE; /*possible function call*/                             \
+    if (_tmp_m>=0) {                                                          \
+        db_hdf5_put_cmemb(_mt, #NAME, OFFSET(_m, NAME), 0, NULL, _tmp_m);     \
+        if (_f && (_tmp_f=_f->T_##TYPE)>=0) {                                 \
+            db_hdf5_put_cmemb(_ft, #NAME, _f_off, 0, NULL, _tmp_f);           \
+            _f_off += H5Tget_size(_tmp_f);                                    \
+        }                                                                     \
+    }                                                                         \
+}
+
+#if H5_VERS_MAJOR>=1 && H5_VERS_MINOR>=4
+#define MEMBER_3(TYPE,NAME) {                                                 \
+    _tmp_m = T_##TYPE; /*possible function call*/                             \
+    if (_tmp_m>=0) {                                                          \
+        hid_t _m_ary;                                                         \
+        _size = 3;                                                            \
+        _m_ary = H5Tarray_create(_tmp_m, 1, &_size, NULL);                    \
+        db_hdf5_put_cmemb(_mt, #NAME, OFFSET(_m, NAME), 0, NULL, _m_ary);     \
+        if (_f && (_tmp_f=_f->T_##TYPE)>=0) {                                 \
+            hid_t _f_ary = H5Tarray_create(_tmp_f, 1, &_size, NULL);          \
+            db_hdf5_put_cmemb(_ft, #NAME, _f_off, 0, NULL, _f_ary);           \
+            _f_off += 3*H5Tget_size(_f_ary);                                  \
+        }                                                                     \
+    }                                                                         \
+}
+#else
+#define MEMBER_3(TYPE,NAME) {                                                 \
+    _tmp_m = T_##TYPE; /*possible function call*/                             \
+    if (_tmp_m>=0) {                                                          \
+        _size = 3;                                                            \
+        db_hdf5_put_cmemb(_mt, #NAME, OFFSET(_m, NAME), 1, &_size, _tmp_m);   \
+        if (_f && (_tmp_f=_f->T_##TYPE)>=0) {                                 \
+            db_hdf5_put_cmemb(_ft, #NAME, _f_off, 1, &_size, _tmp_f);         \
+            _f_off += 3*H5Tget_size(_tmp_f);                                  \
+        }                                                                     \
+    }                                                                         \
+}
+#endif
+
+#define MEMBER_R(TYPE,NAME,N) {                                               \
+    for (_j=0; _j<N; _j++) {                                                  \
+        _tmp_m = T_##TYPE; /*possible function call*/                         \
+        if (_tmp_m>=0) {                                                      \
+            sprintf(_fullname, "%s%d", #NAME, _j);                            \
+            db_hdf5_put_cmemb(_mt, _fullname, OFFSET(_m, NAME[_j]), 0, NULL,  \
+                              _tmp_m);                                        \
+            if (_f && (_tmp_f=_f->T_##TYPE)>=0) {                             \
+                db_hdf5_put_cmemb(_ft, _fullname, _f_off, 0, NULL, _tmp_f);   \
+                _f_off += H5Tget_size(_tmp_f);                                \
+            }                                                                 \
+        }                                                                     \
+    }                                                                         \
+}
+ 
+#define OUTPUT(DBFILE,DBTYPE,NAME,MEM)                                        \
+            break;                                                            \
+        }                                                                     \
+        if (0==_i) _f=(DBFILE);                                               \
+        else if (1==_i) break;                                                \
+    }                                                                         \
+    H5Tpack(_ft);                                                             \
+    db_hdf5_hdrwr(DBFILE, (char*)NAME, _mt, _ft, MEM, DBTYPE);                \
+    H5Tclose(_mt);                                                            \
+    H5Tclose(_ft);                                                            \
+    suppress_set_but_not_used_warning(&_size);                                \
+}
+
+#define DEFINE                                                                \
+            break;                                                            \
+        }                                                                     \
+    }                                                                         \
+    suppress_set_but_not_used_warning(&_size);                                \
+}
+
+/*ARGSUSED*/
+INTERNAL void
+suppress_set_but_not_used_warning(const void *ptr)
+{}
+
+#ifdef HAVE_FPZIP
+
+/* The following section of code are HDF5 filters to implement FPZIP
+   compression algorithms
+
+   Programmer: Mark C. Miller
+   Created:    July, 2008
+*/
+
+typedef struct db_hdf5_fpzip_params_t {
+    int                 loss; /* set by client call to DBSetCompression() */
+    int                 isfp;
+    int                 dp;
+    int                 totsize1d;
+    int                 ndims;
+    int                 dims[10];
+} db_hdf5_fpzip_params_t;
+static db_hdf5_fpzip_params_t db_hdf5_fpzip_params;
+
+static herr_t
+db_hdf5_fpzip_can_apply(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+{
+    return 1;
+#if 0
+    /* This code should work but HDF5 doesn't like being told '0'
+     * for certain cases. So, let it pass and handle it in the
+     * actual filter operation by skipping non-float data there. */
+    if (H5Tget_class(type_id) != H5T_FLOAT)
+        return 0;
+    return 1;
+#endif
+}
+
+static herr_t
+db_hdf5_fpzip_set_local(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+{
+    int i;
+    hsize_t dims[10] = {1,1,1,1,1,1,1,1,1,1}, maxdims[10];
+    db_hdf5_fpzip_params.dp = H5Tget_size(type_id) > sizeof(float) ? 1 : 0;
+    db_hdf5_fpzip_params.totsize1d = (int) H5Sget_simple_extent_npoints(space_id);
+    db_hdf5_fpzip_params.isfp = H5Tget_class(type_id) == H5T_FLOAT;
+    db_hdf5_fpzip_params.ndims = H5Sget_simple_extent_ndims(space_id);
+    H5Sget_simple_extent_dims(space_id, dims, maxdims);
+    for (i = 0; i < db_hdf5_fpzip_params.ndims; i++)
+        db_hdf5_fpzip_params.dims[i] = (int) dims[i];
+    return 1;
+}
+
+static size_t
+db_hdf5_fpzip_filter_op(unsigned int flags, size_t cd_nelmts,
+    const unsigned int cd_values[], size_t nbytes,
+    size_t *buf_size, void **buf)
+{
+    size_t early_retval = 0;
+
+    if (flags & H5Z_FLAG_REVERSE) /* read case */
+    {
+        int prec, dp;
+        unsigned nx, ny, nz, nf;
+        int new_buf_size;
+        void *uncbuf;
+
+        /* first, decode fpzip's header */
+        fpzip_memory_read(*buf, 0, &prec, &dp, &nx, &ny, &nz, &nf); 
+        new_buf_size = nx * ny * nz * nf * (dp ? sizeof(double) : sizeof(float));
+        if (new_buf_size <= 0)
+           return early_retval;
+
+        /* allocate space and do the decompression */
+        uncbuf = malloc(new_buf_size);
+        if (!fpzip_memory_read(*buf, uncbuf, &prec, &dp, &nx, &ny, &nz, &nf))
+        {
+            free(uncbuf);
+            return early_retval;
+        }
+
+        free(*buf);
+        *buf = uncbuf;
+        *buf_size = new_buf_size;
+        return new_buf_size;
+    }
+    else /* write case */
+    {
+        unsigned char *cbuf;
+        int max_outbytes, outbytes, prec;
+
+        /* We'll only compress floating point data here, not integer data */
+        if (!db_hdf5_fpzip_params.isfp)
+            return 0;
+
+        /* We can't operate in place like HDF5 wants. But, thats ok.
+         * Next, we can't easily predict compressed size but we need
+         * to allocate a buffer to compress into. Fortunately, fpzip
+         * will try to compress into any sized buffer we pass and
+         * fail if it cannot. So, we decide here what is the minimum
+         * compression we want, allocate a buffer of that size and
+         * try to compress into it. If it fails, we return the right
+         * stuff to HDF5 and do not compress */
+        
+        max_outbytes = nbytes / SILO_Globals.compressionMinratio;
+        cbuf = (unsigned char *) malloc(max_outbytes);        
+
+        /* full precision */
+        prec = 8 * (db_hdf5_fpzip_params.dp ? sizeof(double) : sizeof(float));
+        
+        /* precision with loss factored in */
+        prec = (prec * (4 - db_hdf5_fpzip_params.loss)) / 4;
+
+        if (db_hdf5_fpzip_params.ndims == 1 || db_hdf5_fpzip_params.ndims > 3)
+        {
+            outbytes = fpzip_memory_write(cbuf, max_outbytes, *buf,
+                    &prec, db_hdf5_fpzip_params.dp,
+                    db_hdf5_fpzip_params.totsize1d, 1, 1, 1);
+        }
+        else if (db_hdf5_fpzip_params.ndims == 2)
+            outbytes = fpzip_memory_write(cbuf, max_outbytes, *buf,
+                    &prec, db_hdf5_fpzip_params.dp,
+                    db_hdf5_fpzip_params.dims[0],
+                    db_hdf5_fpzip_params.dims[1], 1, 1);
+        else
+        {
+            outbytes = fpzip_memory_write(cbuf, max_outbytes, *buf,
+                    &prec, db_hdf5_fpzip_params.dp,
+                    db_hdf5_fpzip_params.dims[0],
+                    db_hdf5_fpzip_params.dims[1],
+                    db_hdf5_fpzip_params.dims[2], 1);
+        }
+
+        /* If fpzip failed in any way, it returns zero */
+        if (outbytes == 0)
+        {
+            free(cbuf);
+            return early_retval;
+        }
+
+        /* We had a success. So, free old buffer and return new values */
+        free(*buf);
+        *buf = cbuf;
+        *buf_size = max_outbytes;
+        return outbytes;
+    }
+}
+static H5Z_class_t db_hdf5_fpzip_class;
+#endif
+
+#ifndef HAVE_HZIP
+/*ARGSUSED*/
+static void
+FreeNodelists(DBfile_hdf5 *dbfile, const char *meshname) {}
+#else
+
+/* The following section of code is used to mange caching of nodelists
+   to support HZIP compression.
+
+   Programmer: Mark C. Miller
+   Created:    July, 2008
+*/
+
+#define MAX_NODELIST_INFOS 32 
+typedef struct _zlInfo {
+    DBfile_hdf5 *db5file;
+    char *meshname;
+    char *zlname;
+    DBzonelist *zl;
+} zlInfo_t;
+static zlInfo_t keptNodelistInfos[MAX_NODELIST_INFOS];
+
+/*
+   We can lookup a nodelist either by its name or the name of the mesh that
+   uses it. The preference is to use the name of the zonelist itself.
+*/
+static const DBzonelist*
+LookupNodelist(DBfile_hdf5 *dbfile, const char *zlname, const char *meshname)
+{
+    int i;
+    char fullmname[256];
+    char fullzlname[256];
+    if (zlname)
+        db_hdf5_fullname(dbfile, (char*) zlname, fullzlname);
+    if (meshname)
+        db_hdf5_fullname(dbfile, (char*) meshname, fullmname);
+    for (i = 0; i < MAX_NODELIST_INFOS; i++)
+    {
+        if (keptNodelistInfos[i].zl && (keptNodelistInfos[i].db5file == dbfile))
+        {
+            if (zlname && keptNodelistInfos[i].zlname &&
+                (strcmp(fullzlname, keptNodelistInfos[i].zlname) == 0))
+            {
+                if (meshname && !keptNodelistInfos[i].meshname)
+                    keptNodelistInfos[i].meshname = STRDUP(fullmname);
+                return keptNodelistInfos[i].zl;
+            }
+            if (meshname && keptNodelistInfos[i].meshname &&
+                (strcmp(fullmname, keptNodelistInfos[i].meshname) == 0))
+            {
+                if (zlname && !keptNodelistInfos[i].zlname)
+                    keptNodelistInfos[i].zlname = STRDUP(fullzlname);
+                return keptNodelistInfos[i].zl;
+            }
+        }
+    }
+    return 0;
+}
+
+/*
+ Part of registering a nodelist is to first check to see if we don't already
+ have one. So, we call LookupNodelist as a first step.
+*/
+static void 
+RegisterNodelist(DBfile_hdf5 *dbfile, const char *zlname, const char *meshname,
+    int ntopodims, int nzones, int origin, const int *nodelist)
+{
+    DBzonelist *zl = DBAllocZonelist();
+    int i;
+    int lnodelist = (1<<ntopodims) * nzones;
+    int snodelist = lnodelist * sizeof(int);
+    char fullname[256], fullmname[256];
+
+    if (LookupNodelist(dbfile, zlname, meshname))
+        return;
+
+    if (zlname)
+        db_hdf5_fullname(dbfile, (char*) zlname, fullname);
+    if (meshname)
+        db_hdf5_fullname(dbfile, (char*) meshname, fullmname);
+
+    zl->ndims = ntopodims;
+    zl->nzones = nzones;
+    zl->nshapes = 1;
+    zl->origin = origin;
+    zl->shapecnt = malloc(sizeof(int));
+    zl->shapecnt[0] = nzones;
+    zl->shapetype = malloc(sizeof(int));
+    zl->shapetype[0] = ntopodims == 2 ? DB_ZONETYPE_QUAD : DB_ZONETYPE_HEX;
+    zl->shapesize = malloc(sizeof(int));
+    zl->shapesize[0] = (1 << ntopodims); 
+    zl->lnodelist = lnodelist;
+    zl->nodelist = malloc(snodelist);
+    memcpy(zl->nodelist, nodelist, snodelist);
+
+    for (i = 0; i < MAX_NODELIST_INFOS; i++)
+    {
+        if (keptNodelistInfos[i].zl == 0)
+            break;
+    }
+    if (i == MAX_NODELIST_INFOS)
+        return;
+
+    keptNodelistInfos[i].db5file = dbfile;
+    if (zlname)
+        keptNodelistInfos[i].zlname = STRDUP(fullname);
+    if (meshname)
+        keptNodelistInfos[i].meshname = STRDUP(fullmname);
+    keptNodelistInfos[i].zl = zl;
+}
+
+static void
+AddMeshnameToNodelist(DBfile_hdf5 *dbfile, const char *zlname, const char *meshname)
+{
+    int i;
+    char fullmname[256];
+    char fullzlname[256];
+
+    db_hdf5_fullname(dbfile, (char*) zlname, fullzlname);
+    db_hdf5_fullname(dbfile, (char*) meshname, fullmname);
+
+    for (i = 0; i < MAX_NODELIST_INFOS; i++)
+    {
+        if (keptNodelistInfos[i].zl && (keptNodelistInfos[i].db5file == dbfile))
+        {
+            if (keptNodelistInfos[i].zlname && !keptNodelistInfos[i].meshname &&
+                strcmp(fullzlname, keptNodelistInfos[i].zlname) == 0)
+            {
+                keptNodelistInfos[i].meshname = STRDUP(fullmname);
+                break;
+            }
+        }
+    }
+}
+
+static void
+FreeNodelists(DBfile_hdf5 *dbfile, const char *meshname)
+{
+    int i;
+    if (dbfile) /* clear all for a given file */
+    {
+        for (i = 0; i < MAX_NODELIST_INFOS; i++)
+        {
+            if (keptNodelistInfos[i].zl && (keptNodelistInfos[i].db5file == dbfile))
+            {
+                FREE(keptNodelistInfos[i].meshname);
+                FREE(keptNodelistInfos[i].zlname);
+                DBFreeZonelist(keptNodelistInfos[i].zl);
+                memset(&keptNodelistInfos[i], 0x0, sizeof(keptNodelistInfos[i]));
+            }
+        }
+    }
+    else if (meshname) /* clear all for a given mesh */
+    {
+        char fullmname[256];
+        db_hdf5_fullname(dbfile, (char*) meshname, fullmname);
+
+        for (i = 0; i < MAX_NODELIST_INFOS; i++)
+        {
+            if (keptNodelistInfos[i].zl && keptNodelistInfos[i].meshname &&
+                (strcmp(fullmname, keptNodelistInfos[i].meshname) == 0))
+            {
+                FREE(keptNodelistInfos[i].meshname);
+                FREE(keptNodelistInfos[i].zlname);
+                DBFreeZonelist(keptNodelistInfos[i].zl);
+                memset(&keptNodelistInfos[i], 0x0, sizeof(keptNodelistInfos[i]));
+            }
+        }
+    }
+    else /* clear everything that is non-empty */
+    {
+        for (i = 0; i < MAX_NODELIST_INFOS; i++)
+        {
+            if (keptNodelistInfos[i].zl)
+            {
+                FREE(keptNodelistInfos[i].meshname);
+                FREE(keptNodelistInfos[i].zlname);
+                DBFreeZonelist(keptNodelistInfos[i].zl);
+                memset(&keptNodelistInfos[i], 0x0, sizeof(keptNodelistInfos[i]));
+            }
+        }
+    }
+}
+
+/* The following section of code are HDF5 filters to implement FPZIP
+   compression algorithms
+
+   Programmer: Mark C. Miller
+   Created:    July, 2008
+
+   Modifications:
+     Mark C. Miller, Thu Feb  4 20:02:00 PST 2010
+     Corrected type for hztype local variable from int to HZtype.
+
+*/
+
+static HZtype silo2hztype(int silo_type)
+{
+    switch (silo_type)
+    {
+        case DB_CHAR: return hzUCHAR;
+        case DB_SHORT: return hzUSHORT;
+        case DB_INT: return hzINT;
+        case DB_FLOAT: return hzFLOAT;
+        case DB_DOUBLE: return hzDOUBLE;
+    }
+    return hzUCHAR;
+}
+
+static int hztype2silo(HZtype hztype)
+{
+    switch (hztype)
+    {
+        case hzUCHAR: return DB_CHAR;
+        case hzUSHORT: return DB_SHORT;
+        case hzINT: return DB_INT;
+        case hzFLOAT: return DB_FLOAT;
+        case hzDOUBLE: return DB_DOUBLE;
+    }
+    return DB_CHAR;
+}
+
+static int sizeof_hztype(HZtype hztype)
+{
+    switch (hztype)
+    {
+        case hzUCHAR: return sizeof(unsigned char);
+        case hzUSHORT: return sizeof(unsigned short);
+        case hzINT: return sizeof(int);
+        case hzFLOAT: return sizeof(float);
+        case hzDOUBLE: return sizeof(double);
+    }
+    return sizeof(double);
+}
+
+typedef struct db_hdf5_hzip_params_t {
+    /* these items set DBSetCompression call */
+    unsigned            codec;
+    const void         *params;
+
+    /* these items set by hdf5 driver as needed. */
+    int                 iszl;
+    const char         *zlname;
+    const char         *meshname;
+    DBfile_hdf5        *dbfile;
+    int                 zlorigin;
+    int                 isquad;
+
+    /* these items set by hdf5 filter's set_local method */
+    int                 totsize1d;
+    int                 ndims;
+    int                 dims[10];
+    HZtype              hztype;
+} db_hdf5_hzip_params_t;
+static db_hdf5_hzip_params_t db_hdf5_hzip_params;
+
+static void
+db_hdf5_hzip_clear_params()
+{
+    unsigned tmpcodec = db_hdf5_hzip_params.codec;
+    const void *tmpparams = db_hdf5_hzip_params.params;
+    memset(&db_hdf5_hzip_params, 0, sizeof(db_hdf5_hzip_params));
+    db_hdf5_hzip_params.codec = tmpcodec;
+    db_hdf5_hzip_params.params = tmpparams;
+}
+
+static herr_t
+db_hdf5_hzip_can_apply(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+{
+    /* see not above regarding fpzip */
+    return 1;
+}
+
+static herr_t
+db_hdf5_hzip_set_local(hid_t dcpl_id, hid_t type_id, hid_t space_id)
+{
+    int i;
+    hsize_t dims[10] = {1,1,1,1,1,1,1,1,1,1}, maxdims[10];
+    db_hdf5_hzip_params.hztype = silo2hztype(hdf2silo_type(type_id));
+    db_hdf5_hzip_params.totsize1d = (int) H5Sget_simple_extent_npoints(space_id);
+    db_hdf5_hzip_params.ndims = H5Sget_simple_extent_ndims(space_id);
+    H5Sget_simple_extent_dims(space_id, dims, maxdims);
+    for (i = 0; i < db_hdf5_hzip_params.ndims; i++)
+        db_hdf5_hzip_params.dims[i] = (int) dims[i];
+    return 1;
+}
+
+static size_t
+db_hdf5_hzip_filter_op(unsigned int flags, size_t cd_nelmts,
+    const unsigned int cd_values[], size_t nbytes,
+    size_t *buf_size, void **buf)
+{
+    int early_retval = 0;
+
+    if (flags & H5Z_FLAG_REVERSE) /* read case */
+    {
+        if (db_hdf5_hzip_params.iszl) /* ucd mesh zonelist */
+        {
+            HZMstream *stream;
+            int ndims = 0, nzones = 0, nread;
+            int *nodelist = 0;
+            int new_buf_size;
+
+            /* To query stream for ndims, we need to specify a permutation
+               which may be wrong. So, we open, query, close and re-open. */
+            stream = hzip_mesh_open_mem(*buf, nbytes, 0);
+            if (stream == 0) return early_retval;
+
+            ndims = hzip_mesh_dimensions(stream);
+            if (ndims < 2 || ndims > 3) return early_retval;
+            hzip_mesh_close(stream);
+
+            /* Ok, no re-open the stream with correct permutation */
+            stream = hzip_mesh_open_mem(*buf, nbytes, SILO_HZIP_PERMUTATION[ndims]);
+            if (stream == 0) return early_retval;
+
+            ndims = hzip_mesh_dimensions(stream);
+            if (ndims < 2 || ndims > 3) return early_retval;
+
+            nzones = hzip_mesh_cells(stream);
+            if (nzones < 0) return early_retval;
+
+            new_buf_size = (1<<ndims) * nzones * sizeof(int);
+            nodelist = (int *) malloc(new_buf_size);
+            if (nodelist == 0) return early_retval;
+
+            nread = hzip_mesh_read(stream, nodelist, nzones);
+            if (nread != nzones)
+            {
+                free(nodelist);
+                return early_retval;
+            }
+            hzip_mesh_close(stream);
+
+            RegisterNodelist(db_hdf5_hzip_params.dbfile, db_hdf5_hzip_params.zlname,
+                db_hdf5_hzip_params.meshname, ndims, nzones,
+                db_hdf5_hzip_params.zlorigin, nodelist);
+
+            free(*buf);
+            *buf = (void*) nodelist;
+            *buf_size = new_buf_size; 
+            return new_buf_size;
+        }
+        else /* ucd or quad mesh node-centered (not zone-centered) variables */
+        {
+            HZNstream *stream;
+            int i, ndims, nnodes, nread, nzones;
+            void *var = 0;
+            int new_buf_size;
+            HZtype hztype;
+            int *nodelist;
+            int perm, origin;
+
+            /* To query stream for ndims, we need to specify a permutation
+               which may be wrong. So, we open, query, close and re-open. */
+            stream = hzip_node_open_mem(*buf, nbytes, 0, 0);
+            if (stream == 0) return early_retval;
+
+            ndims = hzip_node_dimensions(stream);
+            if (ndims < 2 || ndims > 3) return early_retval;
+            hzip_node_close(stream);
+
+            if (db_hdf5_hzip_params.isquad)
+            {
+                nzones = 1;
+                for (i = 0; i < db_hdf5_hzip_params.ndims; i++)
+                    nzones *= (db_hdf5_hzip_params.dims[i]-1);
+
+                nodelist = (int *) malloc((1<<ndims) * nzones * sizeof(int));
+                if (nodelist == 0) return early_retval;
+                perm = hzip_mesh_construct(nodelist, (unsigned) ndims,
+                    (const unsigned *) db_hdf5_hzip_params.dims, 0);
+
+                origin = 0;
+            }
+            else
+            {
+                const DBzonelist *zl = LookupNodelist(db_hdf5_hzip_params.dbfile,
+                    db_hdf5_hzip_params.zlname, db_hdf5_hzip_params.meshname);
+                if (zl == 0 || zl->nodelist == 0)
+                    return early_retval;
+                nodelist = zl->nodelist;
+                nzones = zl->nzones;
+                origin = zl->origin;
+                perm = SILO_HZIP_PERMUTATION[ndims];
+            }
+
+            /* Ok, now open with correct permutation */
+            stream = hzip_node_open_mem(*buf, nbytes, perm, origin);
+            if (stream == 0) return early_retval;
+
+            ndims = hzip_node_dimensions(stream);
+            if (ndims < 2 || ndims > 3) return early_retval;
+
+            nnodes = hzip_node_count(stream);
+            if (nnodes < 0) return early_retval;
+
+            hztype = hzip_node_type(stream);
+            if (hztype < 0) return early_retval;
+
+            new_buf_size = nnodes * sizeof_hztype(hztype);
+            var = malloc(new_buf_size);
+            if (var == 0) return early_retval;
+
+            nread = hzip_node_read(stream, var, nodelist, nzones);
+            if (nread != nnodes)
+            {
+                if (db_hdf5_hzip_params.isquad)
+                    free(nodelist);
+                free(var);
+                return early_retval;
+            }
+            hzip_node_close(stream);
+
+            if (db_hdf5_hzip_params.isquad)
+                free(nodelist);
+            free(*buf);
+            *buf = var;
+            *buf_size = new_buf_size; 
+            return new_buf_size;
+        }
+    }
+    else /* write case */
+    {
+        if (db_hdf5_hzip_params.iszl) /* ucd mesh zonelist */
+        {
+            int outbytes, ntopo, nzones;
+            size_t max_outbytes;
+            HZMstream* stream;
+            unsigned char *buffer = 0;
+
+            const DBzonelist *zl = LookupNodelist(db_hdf5_hzip_params.dbfile,
+                db_hdf5_hzip_params.zlname, db_hdf5_hzip_params.meshname);
+            if (zl == 0 || zl->nodelist == 0) return early_retval;
+            ntopo = zl->ndims;
+            nzones = zl->nzones;
+
+            max_outbytes = ((1<<ntopo) * nzones * sizeof(int)) / SILO_Globals.compressionMinratio;
+            buffer = (unsigned char *) malloc(max_outbytes);
+            if (buffer == 0) return early_retval;
+
+            stream = hzip_mesh_create_mem(buffer, max_outbytes, SILO_HZIP_PERMUTATION[ntopo],
+                ntopo, nzones, db_hdf5_hzip_params.codec, db_hdf5_hzip_params.params);
+
+            if (stream == 0)
+            {
+                free(buffer); 
+                return early_retval;
+            }
+
+            if (hzip_mesh_write(stream, *buf, nzones) < 0)
+            {
+                hzip_mesh_close(stream);
+                free(buffer); 
+                return early_retval;
+            }
+
+            if ((outbytes = hzip_mesh_close(stream)) < 0)
+            {
+                free(buffer); 
+                return early_retval;
+            }
+
+            free(*buf);
+            *buf = buffer;
+            *buf_size = max_outbytes;
+            return outbytes;
+        }
+        else /* ucd or quad mesh coords or nodal variables */
+        {
+            int i, outbytes;
+            size_t max_outbytes;
+            HZNstream* stream;
+            unsigned char *buffer = 0;
+            int *nodelist;
+            int ndims, origin, nzones, perm;
+
+            /* Find the nodelist for this write */
+            if (db_hdf5_hzip_params.isquad)
+            {
+                ndims = db_hdf5_hzip_params.ndims;
+                origin = 0;
+                nzones = 1;
+                for (i = 0; i < ndims; i++)
+                    nzones *= (db_hdf5_hzip_params.dims[i]-1);
+                nodelist = (int *) malloc((1<<ndims) * nzones * sizeof(int));
+                if (nodelist == 0) return early_retval;
+                perm = hzip_mesh_construct(nodelist, (unsigned) ndims,
+                    (const unsigned int *) db_hdf5_hzip_params.dims, 0);
+            }
+            else
+            {
+                const DBzonelist *zl = LookupNodelist(db_hdf5_hzip_params.dbfile,
+                                          db_hdf5_hzip_params.zlname,
+                                          db_hdf5_hzip_params.meshname);
+                if (zl == 0 || zl->nodelist == 0) return early_retval;
+                nodelist = zl->nodelist;
+                ndims = zl->ndims;
+                origin = zl->origin;
+                nzones = zl->nzones;
+                perm = SILO_HZIP_PERMUTATION[ndims];
+            }
+
+            max_outbytes = (db_hdf5_hzip_params.totsize1d *
+                           sizeof_hztype(db_hdf5_hzip_params.hztype)) / SILO_Globals.compressionMinratio;
+            buffer = (unsigned char *) malloc(max_outbytes);
+            if (buffer == 0) return early_retval;
+
+            stream = hzip_node_create_mem(buffer, max_outbytes, perm,
+                origin, ndims, db_hdf5_hzip_params.totsize1d, db_hdf5_hzip_params.hztype,
+                db_hdf5_hzip_params.codec, 0);
+
+            if (stream == 0)
+            {
+                if (db_hdf5_hzip_params.isquad)
+                    free(nodelist);
+                free(buffer);
+                return early_retval;
+            }
+
+            if (hzip_node_write(stream, *buf, nodelist, nzones) < 0)
+            {
+                hzip_node_close(stream);
+                if (db_hdf5_hzip_params.isquad)
+                    free(nodelist);
+                free(buffer);
+                return early_retval;
+            }
+
+            if ((outbytes = hzip_node_close(stream)) < 0)
+            {
+                if (db_hdf5_hzip_params.isquad)
+                    free(nodelist);
+                free(buffer);
+                return early_retval;
+            }
+
+            /* We had a success. So, free old buffer and return new values */
+            if (db_hdf5_hzip_params.isquad)
+                free(nodelist);
+            free(*buf);
+            *buf = buffer;
+            *buf_size = max_outbytes;
+            return outbytes;
+        }
+    }
+}
+static H5Z_class_t db_hdf5_hzip_class;
+#endif
+
+INTERNAL const char *
+friendly_name(const char *base_name, const char *fmtstr, const void *val)
+{
+    static char retval[1024];
+    static char totfmtstr[1024];
+    char typechar;
+    int i, flen;
+
+    if (SILO_Globals.enableFriendlyHDF5Names == FALSE)
+        return 0;
+
+    if (fmtstr == 0)
+        return base_name;
+
+    sprintf(totfmtstr, "%s%s", base_name, fmtstr);
+    if (val == 0)
+        return totfmtstr;
+
+    flen = strlen(fmtstr);
+    for (i = 0; i < flen; i++)
+    {
+        if (fmtstr[i] == '%')
+           break;
+    }
+    typechar = i+1 < flen ? fmtstr[i+1] : '\0';
+    switch (typechar)
+    {
+        case 'd': sprintf(retval, totfmtstr, *((const int*) val)); break; 
+        case 's': sprintf(retval, totfmtstr, *((const char*) val)); break;
+        case 'f': sprintf(retval, totfmtstr, *((const float*) val)); break;
+        default: return totfmtstr;
+    }
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_file
+ *
+ * Purpose:     Returns the hdf5 file ID associated with the DBfile. The
+ *              hdf5 file is not reopened; the caller should not close the
+ *              file id.
+ *
+ * Return:      Success:        HDF5 file id
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+db_hdf5_file(DBfile *_dbfile)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    return dbfile->fid;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_cwg
+ *
+ * Purpose:     Returns the hdf5 group ID for the current working group of
+ *              the DBfile. The group is not reopened; the caller should not
+ *              close the group ID.
+ *
+ * Return:      Success:        HDF5 current working group ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+db_hdf5_cwg(DBfile *_dbfile)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    return dbfile->cwg;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_get_cmemb
+ *
+ * Purpose:     Returns information about a member of a compound type. If
+ *              the member is an array then it returns information about
+ *              the array instead.
+ *
+ * Return:      Success:        HDF5 datatype of member. The number of
+ *                              items is returned in SIZE.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke, 2001-01-26
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+db_hdf5_get_cmemb(hid_t compound_type, int membno, int *ndims/*out*/,
+                  int size[3]/*out*/)
+{
+    hid_t       type;
+
+    if ((type=H5Tget_member_type(compound_type, membno))<0) return -1;
+    
+#if (H5_VERS_MAJOR==1 && H5_VERS_MINOR>=4) || H5_VERS_MAJOR>1
+    if (H5T_ARRAY==H5Tget_class(type)) {
+        hsize_t bigdims[3];
+        int i;
+        *ndims = H5Tget_array_ndims(type);
+        assert(*ndims<=3);
+        H5Tget_array_dims(type, bigdims, NULL);
+        for (i=0; i<*ndims; i++) size[i] = bigdims[i];
+        type = H5Tget_super(type);
+    } else {
+        *ndims = 0;
+    }
+#else
+    *ndims = H5Tget_member_dims(compound_type, membno, size, NULL);
+#endif
+    return type;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_put_cmemb
+ *
+ * Purpose:     
+ *
+ * Return:      Success:
+ *                      
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke, 2001-01-26
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_put_cmemb(hid_t compound_type, const char *name, size_t offset,
+                  int ndims, const int *dim, hid_t type)
+{
+    int         retval;
+    
+#if (H5_VERS_MAJOR==1 && H5_VERS_MINOR>=4) || H5_VERS_MAJOR>1
+    if (ndims) {
+        hsize_t bigdims[16];
+        int i;
+        for (i=0; i<ndims; i++) bigdims[i] = dim[i];
+        type = H5Tarray_create(type, ndims, bigdims, NULL);
+    }
+    retval = H5Tinsert(compound_type, name, offset, type);
+#else
+    retval = H5Tinsert_array(compound_type, name, offset, ndims, dim, NULL,
+                             type);
+#endif
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    T_str
+ *
+ * Purpose:     Returns fixed-length hdf5 string data type which has just
+ *              enough space to store the specified string.
+ *
+ * Return:      Success:        An hdf5 data type which will be closed on the
+ *                              next call to this function.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+T_str(char *s)
+{
+    static hid_t        stype = -1;
+
+    if (!s || !*s) return -1;
+    if (stype>=0) H5Tclose(stype);
+    stype = H5Tcopy(H5T_C_S1);
+    H5Tset_size(stype, strlen(s)+1);
+    return stype;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    silo_walk_cb 
+ *
+ * Purpose:     Error stack walk callback.
+ *              Currently, only detects checksum errors.
+ *
+ * Return:      SUCCESS 
+ *
+ * Programmer:  Mark C. Miller 
+ *              Tuesday, May 2, 2006 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 17 23:11:41 PDT 2008
+ *   Added code to detect compression errors.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE herr_t
+silo_walk_cb(int n, H5E_error_t *err_desc, void *client_data) 
+{
+    int *silo_error_code_p = (int *) client_data;
+
+    /* Note that error code can be overwritten by later strstr
+       comparisons. Where both checksum and compression errors
+       occur, we declare it a compression error. */
+    if (strstr(err_desc->desc, "letcher32") != 0)
+        *silo_error_code_p = E_CHECKSUM;
+    if (strstr(err_desc->desc, "zip") != 0)
+        *silo_error_code_p = E_COMPRESSION;
+    if (strstr(err_desc->desc, "Lindstrom-") != 0)
+        *silo_error_code_p = E_COMPRESSION;
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    hdf5_to_silo_error 
+ *
+ * Purpose:     Convert HDF5 error stack to a silo error code. 
+ *              Currently, only detects checksum errors.
+ *
+ * Return:      SUCCESS 
+ *
+ * Programmer:  Mark C. Miller 
+ *              Tuesday, May 2, 2006 
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+hdf5_to_silo_error(const char *vname, const char *fname)
+{
+    int silo_error_code = E_NOERROR;
+
+    H5Ewalk(H5E_WALK_UPWARD, silo_walk_cb, &silo_error_code);
+
+    if (silo_error_code == E_NOERROR)
+        silo_error_code = E_CALLFAIL;
+
+    db_perror((char*)vname, silo_error_code, (char*)fname);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_init
+ *
+ * Purpose:     One-time initializations for this driver.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, March 22, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Wed Sep  2 16:41:32 PDT 2009
+ *   Made conditional compilation logic for VERSION_GE take into account
+ *   H5_USE_16_API setting.
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *
+ *   Mark C. Miller, Thu Feb 11 09:37:41 PST 2010
+ *   Added logic to set HDF5's error output based on Silo's settings.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+db_hdf5_init(void)
+{
+    static int          ncalls;
+
+    if (ncalls++) return;               /*already initialized*/
+
+    /* Turn off error messages from the hdf5 library */
+    if (SILO_Globals._db_err_level_drvr == DB_ALL)
+        H5Eset_auto((H5E_auto1_t) H5Eprint1, stderr);
+    else
+        H5Eset_auto(NULL, NULL);
+
+    /* Define a scalar data space */
+    SCALAR = H5Screate(H5S_SCALAR);
+
+    /* Define atomic data types */
+    T_char = H5T_NATIVE_UCHAR;
+    T_short = H5T_NATIVE_SHORT;
+    T_int = H5T_NATIVE_INT;
+    T_long = H5T_NATIVE_LONG;
+    T_llong = H5T_NATIVE_LLONG;
+    T_float = H5T_NATIVE_FLOAT;
+    T_double = H5T_NATIVE_DOUBLE;
+    
+    T_str256 = H5Tcopy(H5T_C_S1);       /*this is never freed!*/
+    H5Tset_size(T_str256, 256);
+
+    P_ckcrprops = H5Pcreate(H5P_DATASET_CREATE); /* never freed */
+    if (SILO_Globals.enableChecksums)
+       H5Pset_fletcher32(P_ckcrprops);
+
+    /* for H5Dread calls, H5P_DEFAULT results in *enabled*
+       checksums. So, we build the DISabled version here. */
+    P_ckrdprops = H5Pcreate(H5P_DATASET_XFER);   /* never freed */
+    H5Pset_edc_check(P_ckrdprops, H5Z_DISABLE_EDC);
+
+#ifdef HAVE_FPZIP
+    db_hdf5_fpzip_params.loss = 0;
+#if HDF5_VERSION_GE(1,8,0) && !defined(H5_USE_16_API)
+    db_hdf5_fpzip_class.version = H5Z_CLASS_T_VERS;
+    db_hdf5_fpzip_class.encoder_present = 1;
+    db_hdf5_fpzip_class.decoder_present = 1;
+#endif
+    db_hdf5_fpzip_class.id = DB_HDF5_FPZIP_ID;
+    db_hdf5_fpzip_class.name = "Lindstrom-fpzip";
+    db_hdf5_fpzip_class.can_apply = db_hdf5_fpzip_can_apply;
+    db_hdf5_fpzip_class.set_local = db_hdf5_fpzip_set_local;
+    db_hdf5_fpzip_class.filter = db_hdf5_fpzip_filter_op;
+    H5Zregister(&db_hdf5_fpzip_class);
+#endif
+
+#ifdef HAVE_HZIP
+
+#ifdef HAVE_LIBZ
+    db_hdf5_hzip_zlib_codec_params = hzm_codec_zlib;
+#endif
+    db_hdf5_hzip_base_codec_params = hzm_codec_base;
+
+#ifdef HAVE_LIBZ
+    db_hdf5_hzip_params.codec = HZM_CODEC_ZLIB;
+    db_hdf5_hzip_params.params = &db_hdf5_hzip_zlib_codec_params;
+    ((struct HZMCODECzlib *) db_hdf5_hzip_params.params)->bits = 12;
+#else
+    db_hdf5_hzip_params.codec = HZM_CODEC_BASE;
+    db_hdf5_hzip_params.params = &db_hdf5_hzip_base_codec_params;
+    ((struct HZMCODECbase *) db_hdf5_hzip_params.params)->bits = 12;
+#endif
+
+#if HDF5_VERSION_GE(1,8,0) && !defined(H5_USE_16_API)
+    db_hdf5_hzip_class.version = H5Z_CLASS_T_VERS;
+    db_hdf5_hzip_class.encoder_present = 1;
+    db_hdf5_hzip_class.decoder_present = 1;
+#endif
+    db_hdf5_hzip_class.id = DB_HDF5_HZIP_ID;
+    db_hdf5_hzip_class.name = "Lindstrom-hzip";
+    db_hdf5_hzip_class.can_apply = db_hdf5_hzip_can_apply;
+    db_hdf5_hzip_class.set_local = db_hdf5_hzip_set_local;
+    db_hdf5_hzip_class.filter = db_hdf5_hzip_filter_op;
+
+    H5Zregister(&db_hdf5_hzip_class);
+    /* Initialize support data structures for hzip */
+    memset(keptNodelistInfos, 0x0, sizeof(keptNodelistInfos));
+
+#endif
+
+    /* Define compound data types */
+    STRUCT(DBcurve) {
+        MEMBER_S(int,           npts);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        xvarname);
+        MEMBER_S(str256,        yvarname);
+        MEMBER_S(str256,        label);
+        MEMBER_S(str256,        xlabel);
+        MEMBER_S(str256,        ylabel);
+        MEMBER_S(str256,        xunits);
+        MEMBER_S(str256,        yunits);
+        MEMBER_S(str256,        reference);
+    } DEFINE;
+
+    STRUCT(DBcsgmesh) {
+        MEMBER_S(int,           block_no);
+        MEMBER_S(int,           group_no);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           nbounds);
+        MEMBER_S(int,           lcoeffs);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           origin);
+        MEMBER_3(double,        min_extents);
+        MEMBER_3(double,        max_extents);
+        MEMBER_S(int,           guihide);
+        MEMBER_R(str256,        units, 3);
+        MEMBER_R(str256,        labels, 3);
+        MEMBER_S(str256,        name);
+        MEMBER_S(str256,        typeflags);
+        MEMBER_S(str256,        bndids);
+        MEMBER_S(str256,        coeffs);
+        MEMBER_S(str256,        zonel_name);
+        MEMBER_S(str256,        bndnames);
+        MEMBER_S(str256,        mrgtree_name);
+        MEMBER_S(int,           tv_connectivity);
+        MEMBER_S(int,           disjoint_mode);
+    } DEFINE;
+
+    STRUCT(DBcsgvar) {
+        MEMBER_S(int,           cycle);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(int,           nels);
+        MEMBER_S(int,           nvals);
+        MEMBER_S(int,           centering);
+        MEMBER_S(int,           use_specmf);
+        MEMBER_S(int,           ascii_labels);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        name);
+        MEMBER_S(str256,        units);
+        MEMBER_S(str256,        label);
+        MEMBER_R(str256,        vals,           MAX_VARS);
+        MEMBER_S(str256,        meshname);
+        MEMBER_S(str256,        region_pnames);
+        MEMBER_S(int,           conserved);
+        MEMBER_S(int,           extensive);
+    } DEFINE;
+
+    STRUCT(DBcsgzonelist) {
+        MEMBER_S(int,           nregs);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           lxform);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(int,           nzones);
+        MEMBER_S(int,           min_index);
+        MEMBER_S(int,           max_index);
+        MEMBER_S(str256,        typeflags);
+        MEMBER_S(str256,        leftids);
+        MEMBER_S(str256,        rightids);
+        MEMBER_S(str256,        xform);
+        MEMBER_S(str256,        zonelist);
+        MEMBER_S(str256,        regnames);
+        MEMBER_S(str256,        zonenames);
+    } DEFINE;
+
+    STRUCT(DBdefvars) {
+        MEMBER_S(int,           ndefs);
+        MEMBER_S(str256,        names);
+        MEMBER_S(str256,        types);
+        MEMBER_S(str256,        defns);
+        MEMBER_S(str256,        guihides);
+    } DEFINE;
+
+    STRUCT(DBquadmesh) {
+        MEMBER_R(str256,        coord,          3);
+        MEMBER_3(double,        min_extents);
+        MEMBER_3(double,        max_extents);
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           coordtype);
+        MEMBER_S(int,           nspace);
+        MEMBER_S(int,           nnodes);
+        MEMBER_S(int,           facetype);
+        MEMBER_S(int,           major_order);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           coord_sys);
+        MEMBER_S(int,           planar);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           group_no);
+        MEMBER_3(int,           dims);
+        MEMBER_3(int,           min_index);
+        MEMBER_3(int,           max_index);
+        MEMBER_3(int,           baseindex);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           guihide);
+        MEMBER_R(str256,        label,          3);
+        MEMBER_R(str256,        units,          3);
+        MEMBER_S(str256,        mrgtree_name);
+    } DEFINE;
+    
+    STRUCT(DBquadvar) {
+        MEMBER_R(str256,        value,          MAX_VARS);
+        MEMBER_R(str256,        mixed_value,    MAX_VARS);
+        MEMBER_S(str256,        meshid);
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nvals);
+        MEMBER_S(int,           nels);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           mixlen);
+        MEMBER_S(int,           major_order);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           use_specmf);
+        MEMBER_S(int,           ascii_labels);
+        MEMBER_3(int,           dims);
+        MEMBER_3(int,           zones);
+        MEMBER_3(int,           min_index);
+        MEMBER_3(int,           max_index);
+        MEMBER_3(float,         align);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        label);
+        MEMBER_S(str256,        units);
+        MEMBER_S(str256,        region_pnames);
+        MEMBER_S(int,           conserved);
+        MEMBER_S(int,           extensive);
+        MEMBER_S(int,           centering);
+    } DEFINE;
+
+    STRUCT(DBucdmesh) {
+        MEMBER_R(str256,        coord,          3);
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nnodes);
+        MEMBER_S(int,           nzones);
+        MEMBER_S(int,           facetype);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           coord_sys);
+        MEMBER_S(int,           topo_dim);
+        MEMBER_S(int,           planar);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           group_no);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(str256,        facelist);
+        MEMBER_S(str256,        zonelist);
+        MEMBER_S(str256,        phzonelist);
+        MEMBER_S(str256,        gnodeno);
+        MEMBER_3(double,        min_extents);
+        MEMBER_3(double,        max_extents);
+        MEMBER_S(int,           guihide);
+        MEMBER_R(str256,        label,          3);
+        MEMBER_R(str256,        units,          3);
+        MEMBER_S(str256,        mrgtree_name);
+        MEMBER_S(int,           tv_connectivity);
+        MEMBER_S(int,           disjoint_mode);
+        MEMBER_S(int,           gnznodtype);
+    } DEFINE;
+    
+    STRUCT(DBucdvar) {
+        MEMBER_R(str256,        value,          MAX_VARS);
+        MEMBER_R(str256,        mixed_value,    MAX_VARS);
+        MEMBER_S(str256,        meshid);
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nvals);
+        MEMBER_S(int,           nels);
+        MEMBER_S(int,           centering);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           mixlen);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           use_specmf);
+        MEMBER_S(int,           ascii_labels);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           lo_offset);
+        MEMBER_S(int,           hi_offset);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        label);
+        MEMBER_S(str256,        units);
+        MEMBER_S(str256,        region_pnames);
+        MEMBER_S(int,           conserved);
+        MEMBER_S(int,           extensive);
+    } DEFINE;
+
+    STRUCT(DBfacelist) {
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nfaces);
+        MEMBER_S(int,           nshapes);
+        MEMBER_S(int,           ntypes);
+        MEMBER_S(int,           lnodelist);
+        MEMBER_S(int,           origin);
+        MEMBER_S(str256,        nodelist);
+        MEMBER_S(str256,        shapecnt);
+        MEMBER_S(str256,        shapesize);
+        MEMBER_S(str256,        typelist);
+        MEMBER_S(str256,        types);
+        MEMBER_S(str256,        zoneno);
+    } DEFINE;
+
+    STRUCT(DBzonelist) {
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nzones);
+        MEMBER_S(int,           nshapes);
+        MEMBER_S(int,           lnodelist);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           lo_offset);
+        MEMBER_S(int,           hi_offset);
+        MEMBER_S(str256,        nodelist);
+        MEMBER_S(str256,        shapecnt);
+        MEMBER_S(str256,        shapesize);
+        MEMBER_S(str256,        shapetype);
+        MEMBER_S(str256,        gzoneno);
+        MEMBER_S(int,           gnznodtype);
+    } DEFINE;
+
+    STRUCT(DBphzonelist) {
+        MEMBER_S(int,           nfaces);
+        MEMBER_S(int,           lnodelist);
+        MEMBER_S(int,           nzones);
+        MEMBER_S(int,           lfacelist);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           lo_offset);
+        MEMBER_S(int,           hi_offset);
+        MEMBER_S(str256,        nodecnt);
+        MEMBER_S(str256,        nodelist);
+        MEMBER_S(str256,        extface);
+        MEMBER_S(str256,        facecnt);
+        MEMBER_S(str256,        facelist);
+        MEMBER_S(int,           gnznodtype);
+    } DEFINE;
+
+    STRUCT(DBmaterial) {
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nmat);
+        MEMBER_S(int,           mixlen);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           major_order);
+        MEMBER_S(int,           datatype);
+        MEMBER_3(int,           dims);
+        MEMBER_S(int,           allowmat0);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        meshid);
+        MEMBER_S(str256,        matlist);
+        MEMBER_S(str256,        matnos);
+        MEMBER_S(str256,        mix_vf);
+        MEMBER_S(str256,        mix_next);
+        MEMBER_S(str256,        mix_mat);
+        MEMBER_S(str256,        mix_zone);
+        MEMBER_S(str256,        matnames);
+        MEMBER_S(str256,        matcolors);
+    } DEFINE;
+
+    STRUCT(DBmultimesh) {
+        MEMBER_S(int,           nblocks);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           ngroups);
+        MEMBER_S(int,           blockorigin);
+        MEMBER_S(int,           grouporigin);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           extentssize);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        meshtypes);
+        MEMBER_S(str256,        meshnames);
+        MEMBER_S(str256,        extents);
+        MEMBER_S(str256,        zonecounts);
+        MEMBER_S(str256,        has_external_zones);
+        MEMBER_S(int,           lgroupings);
+        MEMBER_S(str256,        groupings);
+        MEMBER_S(str256,        groupnames);
+        MEMBER_S(str256,        mrgtree_name);
+        MEMBER_S(int,           tv_connectivity);
+        MEMBER_S(int,           disjoint_mode);
+        MEMBER_S(int,           topo_dim);
+        MEMBER_S(str256,        file_ns_name);
+        MEMBER_S(str256,        block_ns_name);
+        MEMBER_S(int,           block_type);
+        MEMBER_S(str256,        empty_list);
+        MEMBER_S(int,           empty_cnt);
+    } DEFINE;
+
+    STRUCT(DBmultimeshadj) {
+        MEMBER_S(int,           nblocks);
+        MEMBER_S(int,           blockorigin);
+        MEMBER_S(int,           lneighbors);
+        MEMBER_S(int,           totlnodelists);
+        MEMBER_S(int,           totlzonelists);
+        MEMBER_S(str256,        meshtypes);
+        MEMBER_S(str256,        nneighbors);
+        MEMBER_S(str256,        neighbors);
+        MEMBER_S(str256,        back);
+        MEMBER_S(str256,        lnodelists);
+        MEMBER_S(str256,        nodelists);
+        MEMBER_S(str256,        lzonelists);
+        MEMBER_S(str256,        zonelists);
+    } DEFINE;
+
+    STRUCT(DBmultivar) {
+        MEMBER_S(int,           nvars);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           ngroups);
+        MEMBER_S(int,           blockorigin);
+        MEMBER_S(int,           grouporigin);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           extentssize);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        vartypes);
+        MEMBER_S(str256,        varnames);
+        MEMBER_S(str256,        extents);
+        MEMBER_S(str256,        region_pnames);
+        MEMBER_S(str256,        mmesh_name);
+        MEMBER_S(int,           tensor_rank);
+        MEMBER_S(int,           conserved);
+        MEMBER_S(int,           extensive);
+        MEMBER_S(str256,        file_ns_name);
+        MEMBER_S(str256,        block_ns_name);
+        MEMBER_S(int,           block_type);
+        MEMBER_S(str256,        empty_list);
+        MEMBER_S(int,           empty_cnt);
+    } DEFINE;
+
+    STRUCT(DBmultimat) {
+        MEMBER_S(int,           nmats);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           ngroups);
+        MEMBER_S(int,           blockorigin);
+        MEMBER_S(int,           grouporigin);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           allowmat0);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        matnames);
+        MEMBER_S(str256,        matnos);
+        MEMBER_S(str256,        mixlens);
+        MEMBER_S(str256,        matcounts);
+        MEMBER_S(str256,        matlists);
+        MEMBER_S(int,           nmatnos);
+        MEMBER_S(str256,        material_names);
+        MEMBER_S(str256,        mat_colors);
+        MEMBER_S(str256,        mmesh_name);
+        MEMBER_S(str256,        file_ns_name);
+        MEMBER_S(str256,        block_ns_name);
+        MEMBER_S(str256,        empty_list);
+        MEMBER_S(int,           empty_cnt);
+    } DEFINE;
+
+    STRUCT(DBmultimatspecies) {
+        MEMBER_S(int,           nspec);
+        MEMBER_S(int,           nmat);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           ngroups);
+        MEMBER_S(int,           blockorigin);
+        MEMBER_S(int,           grouporigin);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        specnames);
+        MEMBER_S(str256,        nmatspec);
+        MEMBER_S(str256,        matname);
+        MEMBER_S(str256,        species_names);
+        MEMBER_S(str256,        speccolors);
+        MEMBER_S(str256,        file_ns_name);
+        MEMBER_S(str256,        block_ns_name);
+        MEMBER_S(str256,        empty_list);
+        MEMBER_S(int,           empty_cnt);
+    } DEFINE;
+
+    STRUCT(DBmatspecies) {
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nmat);
+        MEMBER_S(int,           nspecies_mf);
+        MEMBER_S(int,           mixlen);
+        MEMBER_S(int,           major_order);
+        MEMBER_S(int,           datatype);
+        MEMBER_3(int,           dims);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(str256,        matname);
+        MEMBER_S(str256,        speclist);
+        MEMBER_S(str256,        nmatspec);
+        MEMBER_S(str256,        species_mf);
+        MEMBER_S(str256,        mix_speclist);
+        MEMBER_S(str256,        specnames);
+        MEMBER_S(str256,        speccolors);
+    } DEFINE;
+
+    STRUCT(DBpointmesh) {
+        MEMBER_S(int,           ndims);
+        MEMBER_S(int,           nspace);
+        MEMBER_S(int,           nels);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(int,           group_no);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           min_index);
+        MEMBER_S(int,           max_index);
+        MEMBER_3(double,        min_extents);
+        MEMBER_3(double,        max_extents);
+        MEMBER_S(int,           guihide);
+        MEMBER_R(str256,        coord,          3);
+        MEMBER_R(str256,        label,          3);
+        MEMBER_R(str256,        units,          3);
+        MEMBER_S(str256,        gnodeno);
+        MEMBER_S(str256,        mrgtree_name);
+        MEMBER_S(int,           gnznodtype);
+    } DEFINE;
+
+    STRUCT(DBpointvar) {
+        MEMBER_S(int,           nvals);
+        MEMBER_S(int,           nels);
+        MEMBER_S(int,           nspace);
+        MEMBER_S(int,           origin);
+        MEMBER_S(int,           min_index);
+        MEMBER_S(int,           max_index);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(int,           cycle);
+        MEMBER_S(float,         time);
+        MEMBER_S(double,        dtime);
+        MEMBER_S(int,           guihide);
+        MEMBER_S(int,           ascii_labels);
+        MEMBER_S(str256,        meshid);
+        MEMBER_S(str256,        label);
+        MEMBER_S(str256,        units);
+        MEMBER_R(str256,        data,           MAX_VARS);
+        MEMBER_S(str256,        region_pnames);
+        MEMBER_S(int,           conserved);
+        MEMBER_S(int,           extensive);
+    } DEFINE;
+
+    STRUCT(DBcompoundarray) {
+        MEMBER_S(int,           nelems);
+        MEMBER_S(int,           nvalues);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(str256,        values);
+        MEMBER_S(str256,        elemnames);
+        MEMBER_S(str256,        elemlengths);
+    } DEFINE;
+
+    STRUCT(DBsil) {
+        MEMBER_S(str256,        tails);
+        MEMBER_S(str256,        heads);
+        MEMBER_S(int,           nedges);
+
+        MEMBER_S(str256,        setnames);
+        MEMBER_S(int,           nsets);
+    } DEFINE;
+
+    STRUCT(DBmrgtree) {
+        MEMBER_S(int,           src_mesh_type);
+        MEMBER_S(int,           type_info_bits);
+        MEMBER_S(int,           num_nodes);
+        MEMBER_S(int,           root);
+        MEMBER_S(str256,        src_mesh_name);
+
+        MEMBER_S(str256,        n_scalars);
+        MEMBER_S(str256,        n_name);
+        MEMBER_S(str256,        n_names);
+        MEMBER_S(str256,        n_maps_name);
+        MEMBER_S(str256,        n_seg_ids);
+        MEMBER_S(str256,        n_seg_lens);
+        MEMBER_S(str256,        n_seg_types);
+        MEMBER_S(str256,        n_children);
+
+        MEMBER_S(str256,        mrgvar_onames);
+        MEMBER_S(str256,        mrgvar_rnames);
+    } DEFINE;
+
+    STRUCT(DBgroupelmap) {
+        MEMBER_S(int,           num_segments);
+        MEMBER_S(int,           fracs_data_type);
+        MEMBER_S(str256,        groupel_types);
+        MEMBER_S(str256,        segment_lengths);
+        MEMBER_S(str256,        segment_ids);
+        MEMBER_S(str256,        segment_data);
+        MEMBER_S(str256,        frac_lengths);
+        MEMBER_S(str256,        segment_fracs);
+    } DEFINE;
+
+    STRUCT(DBmrgvar) {
+        MEMBER_S(int,           nregns);
+        MEMBER_S(int,           ncomps);
+        MEMBER_S(int,           datatype);
+        MEMBER_S(str256,        mrgt_name);
+        MEMBER_S(str256,        reg_pnames);
+        MEMBER_S(str256,        compnames);
+        MEMBER_R(str256,        data,          MAX_VARS);
+    } DEFINE;
+
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_InitCallbacks
+ *
+ * Purpose:     Initialize the callbacks in a DBfile structure.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *    Jeremy Meredith, Wed Oct 25 16:16:59 PDT 2000
+ *    Added DB_INTEL so we had a little-endian target.
+ *
+ *    Mark C. Miller, Tue Feb  3 09:47:43 PST 2009
+ *    Changed dbfile arg from public DBfile* to private DBfile_hdf5*
+ *
+ *    Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *    Adding support for long long type.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+db_hdf5_InitCallbacks(DBfile_hdf5 *dbfile, int target)
+{
+    static char         *me = "db_hdf5_InitCallbacks";
+    
+    /* Initialize the driver global data structures */
+    db_hdf5_init();
+
+    /* Target data types */
+    switch (target) {
+    case DB_LOCAL:
+        dbfile->T_char   = T_char;
+        dbfile->T_short  = T_short;
+        dbfile->T_int    = T_int;
+        dbfile->T_long   = T_long;
+        dbfile->T_llong  = T_llong;
+        dbfile->T_float  = T_float;
+        dbfile->T_double = T_double;
+        dbfile->T_str    = T_str;
+        break;
+
+    case DB_SGI:
+    case DB_SUN3:
+    case DB_SUN4:
+    case DB_RS6000:
+        dbfile->T_char   = H5T_STD_I8BE;
+        dbfile->T_short  = H5T_STD_I16BE;
+        dbfile->T_int    = H5T_STD_I32BE;
+        dbfile->T_long   = H5T_STD_I32BE;
+        dbfile->T_llong  = H5T_STD_I64BE;
+        dbfile->T_float  = H5T_IEEE_F32BE;
+        dbfile->T_double = H5T_IEEE_F64BE;
+        dbfile->T_str    = T_str;
+        break;
+
+    case DB_CRAY:
+        dbfile->T_char   = H5T_STD_I8BE;
+        dbfile->T_short  = H5T_STD_I64BE;
+        dbfile->T_int    = H5T_STD_I64BE;
+        dbfile->T_long   = H5T_STD_I64BE;
+        dbfile->T_llong  = H5T_STD_I64BE;
+        dbfile->T_float  = H5T_IEEE_F64BE; /*assuming new cray*/
+        dbfile->T_double = H5T_IEEE_F64BE; /*assuming new cray*/
+        dbfile->T_str    = T_str;
+        break;
+
+    case DB_INTEL:
+        dbfile->T_char   = H5T_STD_I8LE;
+        dbfile->T_short  = H5T_STD_I16LE;
+        dbfile->T_int    = H5T_STD_I32LE;
+        dbfile->T_long   = H5T_STD_I32LE;
+        dbfile->T_llong  = H5T_STD_I64LE;
+        dbfile->T_float  = H5T_IEEE_F32LE;
+        dbfile->T_double = H5T_IEEE_F64LE;
+        dbfile->T_str    = T_str;
+        break;
+
+    default:
+        db_perror("target data type", E_BADARGS, me);
+        return;
+    }
+
+    /* Properties of the driver */
+    dbfile->pub.pathok = TRUE;
+    dbfile->pub.Grab = FALSE;
+
+    /* File operations */
+    dbfile->pub.close = db_hdf5_Close;
+    dbfile->pub.module = db_hdf5_Filters;
+
+    /* Directory operations */
+    dbfile->pub.cd = db_hdf5_SetDir;
+    dbfile->pub.g_dir = db_hdf5_GetDir;
+    dbfile->pub.newtoc = db_hdf5_NewToc;
+    dbfile->pub.cdid = NULL;            /*DBSetDirID() not supported    */
+    dbfile->pub.mkdir = db_hdf5_MkDir;
+    dbfile->pub.cpdir = db_hdf5_CpDir;
+
+    /* Variable inquiries */
+    dbfile->pub.exist = db_hdf5_InqVarExists;
+    dbfile->pub.g_varlen = db_hdf5_GetVarLength;
+    dbfile->pub.g_varbl = db_hdf5_GetVarByteLength;
+    dbfile->pub.g_vartype = db_hdf5_GetVarType;
+    dbfile->pub.g_vardims = db_hdf5_GetVarDims;
+    dbfile->pub.r_var1 = NULL;          /*DBReadVar1() not supported    */
+    dbfile->pub.g_attr = NULL;          /*DBGetAtt() not implemented yet*/
+    dbfile->pub.r_att = NULL;           /*DBReadAtt() not implemented yet*/
+
+    /* Variable I/O operations */
+    dbfile->pub.g_var = db_hdf5_GetVar;
+    dbfile->pub.r_var = db_hdf5_ReadVar;
+    dbfile->pub.r_varslice = db_hdf5_ReadVarSlice;
+    dbfile->pub.write = db_hdf5_Write;
+    dbfile->pub.writeslice = db_hdf5_WriteSlice;
+
+    /* Low-level object functions */
+    dbfile->pub.g_obj = db_hdf5_GetObject;
+    dbfile->pub.inqvartype = db_hdf5_InqVarType;
+    dbfile->pub.i_meshtype = (int (*)(struct DBfile *, char *)) db_hdf5_InqVarType; /*yes, Vartype*/
+    dbfile->pub.i_meshname = db_hdf5_InqMeshName;
+    dbfile->pub.g_comp = db_hdf5_GetComponent;
+    dbfile->pub.g_comptyp = db_hdf5_GetComponentType;
+    dbfile->pub.g_compnames = db_hdf5_GetComponentNames;
+    dbfile->pub.c_obj = db_hdf5_WriteObject; /*DBChangeObject==DBWriteObject*/
+    dbfile->pub.w_obj = db_hdf5_WriteObject;
+    dbfile->pub.w_comp = db_hdf5_WriteComponent;
+    
+    /* Curve functions */
+    dbfile->pub.g_cu = db_hdf5_GetCurve;
+    dbfile->pub.p_cu = db_hdf5_PutCurve;
+
+    /* CSG mesh functions */
+    dbfile->pub.p_csgm = db_hdf5_PutCsgmesh;
+    dbfile->pub.g_csgm = db_hdf5_GetCsgmesh;
+    dbfile->pub.p_csgzl = db_hdf5_PutCSGZonelist;
+    dbfile->pub.g_csgzl = db_hdf5_GetCSGZonelist;
+    dbfile->pub.p_csgv = db_hdf5_PutCsgvar;
+    dbfile->pub.g_csgv = db_hdf5_GetCsgvar;
+
+    /* Defvars functions */
+    dbfile->pub.g_defv = db_hdf5_GetDefvars;
+    dbfile->pub.p_defv = db_hdf5_PutDefvars;
+
+    /* Quadmesh functions */
+    dbfile->pub.g_qm = db_hdf5_GetQuadmesh;
+    dbfile->pub.g_qv = db_hdf5_GetQuadvar;
+    dbfile->pub.p_qm = db_hdf5_PutQuadmesh;
+    dbfile->pub.p_qv = db_hdf5_PutQuadvar;
+
+    /* Unstructured mesh functions */
+    dbfile->pub.g_um = db_hdf5_GetUcdmesh;
+    dbfile->pub.g_uv = db_hdf5_GetUcdvar;
+    dbfile->pub.g_fl = db_hdf5_GetFacelist;
+    dbfile->pub.g_zl = db_hdf5_GetZonelist;
+    dbfile->pub.g_phzl = db_hdf5_GetPHZonelist;
+    dbfile->pub.p_um = db_hdf5_PutUcdmesh;
+    dbfile->pub.p_sm = db_hdf5_PutUcdsubmesh;
+    dbfile->pub.p_uv = db_hdf5_PutUcdvar;
+    dbfile->pub.p_fl = db_hdf5_PutFacelist;
+    dbfile->pub.p_zl = db_hdf5_PutZonelist;
+    dbfile->pub.p_zl2 = db_hdf5_PutZonelist2;
+    dbfile->pub.p_phzl = db_hdf5_PutPHZonelist;
+
+    /* Material functions */
+    dbfile->pub.g_ma = db_hdf5_GetMaterial;
+    dbfile->pub.g_ms = db_hdf5_GetMatspecies;
+    dbfile->pub.p_ma = db_hdf5_PutMaterial;
+    dbfile->pub.p_ms = db_hdf5_PutMatspecies;
+
+    /* Pointmesh functions */
+    dbfile->pub.g_pm = db_hdf5_GetPointmesh;
+    dbfile->pub.g_pv = db_hdf5_GetPointvar;
+    dbfile->pub.p_pm = db_hdf5_PutPointmesh;
+    dbfile->pub.p_pv = db_hdf5_PutPointvar;
+
+    /* Multiblock functions */
+    dbfile->pub.g_mm = db_hdf5_GetMultimesh;
+    dbfile->pub.g_mmadj = db_hdf5_GetMultimeshadj;
+    dbfile->pub.g_mv = db_hdf5_GetMultivar;
+    dbfile->pub.g_mt = db_hdf5_GetMultimat;
+    dbfile->pub.g_mms = db_hdf5_GetMultimatspecies;
+    dbfile->pub.p_mm = db_hdf5_PutMultimesh;
+    dbfile->pub.p_mmadj = db_hdf5_PutMultimeshadj;
+    dbfile->pub.p_mv = db_hdf5_PutMultivar;
+    dbfile->pub.p_mt = db_hdf5_PutMultimat;
+    dbfile->pub.p_mms = db_hdf5_PutMultimatspecies;
+
+    /* Compound arrays */
+    dbfile->pub.g_ca = db_hdf5_GetCompoundarray;
+    dbfile->pub.p_ca = db_hdf5_PutCompoundarray;
+
+    /* Mrgtree functions */
+    dbfile->pub.g_mrgt = db_hdf5_GetMrgtree;
+    dbfile->pub.p_mrgt = db_hdf5_PutMrgtree;
+
+    /* Groupel map functions */
+    dbfile->pub.g_grplm = db_hdf5_GetGroupelmap;
+    dbfile->pub.p_grplm = db_hdf5_PutGroupelmap;
+
+    /* mrgvar functions */
+    dbfile->pub.g_mrgv = db_hdf5_GetMrgvar;
+    dbfile->pub.p_mrgv = db_hdf5_PutMrgvar;
+
+    /* Compression support functions */
+    dbfile->pub.free_z = db_hdf5_FreeCompressionResources;
+
+    dbfile->pub.sort_obo = db_hdf5_SortObjectsByOffset;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    build_fspace
+ *
+ * Purpose:     Build a file data space selection based on the silo OFFSET,
+ *              LENGTH, and STRIDE. The COUNT for hdf5 hyperslabs is the
+ *              number of times to stride whereas the LENGTH argument
+ *              passed in is the number of elements over which we stride.
+ *              An example:
+ *              
+ *                0 1 2 3 4 5 6 7 8 9 10
+ *               +-+-+-+-+-+-+-+-+-+-+-+  Silo: offset=2, stride=2, length=7
+ *               | | |X| |X| |X| |X| | |  HDF5: offset=2, stride=2, count=4
+ *               +-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * Return:      Success:        Data space to be closed later. If SIZE is
+ *                              non-null then the number of elements selected
+ *                              in each dimension is written to that array.
+ *
+ *              Failure:        Negative, SIZE is undefined.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *    Thomas R. Treadway, Wed Mar  7 09:59:27 PST 2007
+ *    Changed hs_offset from hssize_t to hsize_t
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+build_fspace(hid_t dset, int ndims, int *offset, int *length, int *stride,
+             hsize_t *size/*out*/)
+{
+    hid_t       fspace = -1;
+    int         i;
+    hsize_t    hs_offset[H5S_MAX_RANK];
+    hsize_t     hs_count[H5S_MAX_RANK], hs_stride[H5S_MAX_RANK];
+    
+    if (ndims>H5S_MAX_RANK) return -1;
+    for (i=0; i<ndims; i++) {
+        hs_offset[i] = offset[i];
+        hs_stride[i] = stride[i];
+        
+        if (stride[i]) {
+            hs_count[i] = (length[i]+stride[i]-1)/stride[i];
+        } else {
+            hs_count[i] = 1;
+        }
+        if (size) size[i] = hs_count[i];
+    }
+
+    if ((fspace=H5Dget_space(dset))<0) return -1;
+    if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride,
+                            hs_count, NULL)<0) {
+        H5Sclose(fspace);
+        return -1;
+    }
+    return fspace;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    silom2hdfm_type
+ *
+ * Purpose:     Return the hdf5 data type for memory that is equivalent to
+ *              the specified silo memory data type.
+ *
+ * Return:      Success:        An hdf5 data type. Do not close it (well, if
+ *                              you must, but you'll get an error from hdf5).
+ *
+ *              Failure:        Negative
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *
+ *   Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *   Conditionally compile long long support only when its
+ *   different from long.
+ *
+ *   Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *   Made long long support UNconditionally compiled.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+silom2hdfm_type(int datatype)
+{
+    hid_t       mtype = -1;
+
+    switch (datatype) {
+    case DB_INT:
+        mtype = H5T_NATIVE_INT;
+        break;
+    case DB_SHORT:
+        mtype = H5T_NATIVE_SHORT;
+        break;
+    case DB_LONG:
+        mtype = H5T_NATIVE_LONG;
+        break;
+    case DB_LONG_LONG:
+        mtype = H5T_NATIVE_LLONG;
+        break;
+    case DB_FLOAT:
+        mtype = H5T_NATIVE_FLOAT;
+        break;
+    case DB_DOUBLE:
+        mtype = H5T_NATIVE_DOUBLE;
+        break;
+    case DB_CHAR:
+        mtype = H5T_NATIVE_UCHAR;
+        break;
+    }
+    return mtype;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    silof2hdff_type
+ *
+ * Purpose:     Return the hdf5 data type for the file that is equivalent to
+ *              the specified silo file data type.
+ *
+ * Return:      Success:        An hdf5 data type. Do not close this type.
+ *
+ *              Failure:        Negative
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April 15, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *
+ *   Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *   Conditionally compile long long support only when its
+ *   different from long.
+ *
+ *   Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *   Made long long support UNconditionally compiled.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+silof2hdff_type(DBfile_hdf5 *dbfile, int datatype)
+{
+    hid_t       ftype = -1;
+
+    switch (datatype) {
+    case DB_INT:
+        ftype = dbfile->T_int;
+        break;
+    case DB_SHORT:
+        ftype = dbfile->T_short;
+        break;
+    case DB_LONG:
+        ftype = dbfile->T_long;
+        break;
+    case DB_LONG_LONG:
+        ftype = dbfile->T_llong;
+        break;
+    case DB_FLOAT:
+        ftype = dbfile->T_float;
+        break;
+    case DB_DOUBLE:
+        ftype = dbfile->T_double;
+        break;
+    case DB_CHAR:
+        ftype = dbfile->T_char;
+        break;
+    }
+    return ftype;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    hdf2silo_type
+ *
+ * Purpose:     Given an HDF5 file data type return and appropriate memory
+ *              silo data type.
+ *
+ * Return:      Success:        Silo data type
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, April 12, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miler, made it return DB_FLOAT or DB_DOUBLE based on
+ *   data type passed in and NOT on current forceSingle mode
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+hdf2silo_type(hid_t type)
+{
+    size_t      size = H5Tget_size(type);
+    int         retval = -1;
+    
+    switch (H5Tget_class(type)) {
+    case H5T_INTEGER:
+        if (sizeof(char)>=size) {
+            retval = DB_CHAR;
+        } else if (sizeof(int)!=sizeof(short) && sizeof(short)>=size) {
+            retval = DB_SHORT;
+        } else if (sizeof(int)>=size) {
+            retval = DB_INT;
+        } else if (sizeof(long)>=size) {
+            retval = DB_LONG;
+        } else {
+            retval = DB_LONG_LONG;
+        }
+        break;
+
+    case H5T_FLOAT:
+        if (sizeof(double)!=sizeof(float) && sizeof(float)>=size) {
+            retval = DB_FLOAT;
+        } else if (sizeof(double)>=size) {
+            retval = DB_DOUBLE;
+        }
+        break;
+
+    default:
+        /* Silo doesn't handle other types */
+        break;
+    }
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    silo2silo_type
+ *
+ * Purpose:     Translate a file silo data type to a memory silo data type.
+ *              If the file data type is zero then we use either DB_FLOAT or
+ *              DB_DOUBLE.
+ *
+ * Return:      Success:        silo data type
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, April 12, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+silo2silo_type(int datatype)
+{
+    switch (datatype) {
+    case 0: return force_single_g ? DB_FLOAT : DB_DOUBLE;
+    case DB_CHAR: return DB_CHAR;
+    case DB_SHORT: return DB_SHORT;
+    case DB_INT: return DB_INT;
+    case DB_LONG: return DB_LONG;
+    case DB_LONG_LONG: return DB_LONG_LONG;
+    case DB_FLOAT: return DB_FLOAT;
+    case DB_DOUBLE: return force_single_g ? DB_FLOAT : DB_DOUBLE;
+    }
+    return DB_FLOAT;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    hdf2hdf_type
+ *
+ * Purpose:     Given a file data type choose an appropriate memory data
+ *              type.
+ *
+ * Return:      Success:        Memory data type which should not be closed
+ *                              later (well, if you must, but hdf5 will
+ *                              report an error).
+ *
+ *              Failure:        Negative
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   Made it return NATIVE_FLOAT or NATIVE_DOUBLE NOT depending on
+ *   current force_single_g mode
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+hdf2hdf_type(hid_t ftype)
+{
+    hid_t       mtype=-1;
+    
+    switch (H5Tget_class(ftype)) {
+    case H5T_INTEGER:
+        if (sizeof(char)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_UCHAR;
+        } else if (sizeof(short)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_SHORT;
+        } else if (sizeof(int)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_INT;
+        } else if (sizeof(long)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_LONG;
+        } else {
+            mtype = H5T_NATIVE_LLONG;
+        }
+        break;
+    case H5T_FLOAT:
+        if (sizeof(double)!=sizeof(float) && sizeof(float)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_FLOAT;
+        } else if (sizeof(double)>=H5Tget_size(ftype)) {
+            mtype = H5T_NATIVE_DOUBLE;
+        } else {
+            mtype = H5T_NATIVE_FLOAT;
+        }
+        break;
+    default:
+        break;
+    }
+    return mtype;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_set_compression
+ *
+ * Purpose:     Set the HDF5 compression properties.
+ *
+ * Bugs:        
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Thomas R. Treadway, Tue Feb 27 15:27:11 PST 2007
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 17 15:00:46 PDT 2008
+ *   Added globals for minimum compression ratio and error mode.
+ *   Added support for HZIP and FPZIP. Added flags to control whether
+ *   HZIP compression filter gets added or not.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_set_compression(int flags)
+{
+    static char *me = "db_hdf5_set_compression";
+    char *ptr;
+    char chararray[32];
+    char *check;
+    int level, block, nfilters;
+    int nbits, prec;
+    int have_gzip, have_szip, have_fpzip, have_hzip, i;
+    H5Z_filter_t filtn;
+    unsigned int filter_config_flags;
+/* Check what filters already exist */
+    have_gzip = FALSE;
+    have_szip = FALSE;
+    have_fpzip = FALSE;
+    have_hzip = FALSE;
+    if ((nfilters = H5Pget_nfilters(P_ckcrprops))<0)
+    {
+       db_perror("H5Pget_nfilters", E_CALLFAIL, me);
+       return (-1);
+    }
+    for (i=0; i<nfilters; i++) {           
+#if defined H5_USE_16_API || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8)
+            filtn = H5Pget_filter(P_ckcrprops,(unsigned)i,0,0,0,0,0);
+#else
+            filtn = H5Pget_filter(P_ckcrprops,(unsigned)i,0,0,0,0,0,NULL);
+#endif
+        if (H5Z_FILTER_DEFLATE==filtn)     
+            have_gzip = TRUE;
+        if (H5Z_FILTER_SZIP==filtn)     
+            have_szip = TRUE;
+        if (DB_HDF5_FPZIP_ID==filtn)
+            have_fpzip = TRUE;
+        if (DB_HDF5_HZIP_ID==filtn)
+            have_hzip = TRUE;
+    }
+/* Handle some global compression parameters */
+    if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+       "ERRMODE=")) != (char *)NULL) 
+    {
+        (void)strncpy(chararray, ptr+8, 4); 
+        chararray[4] = '\0';
+        if (strcmp(chararray, "FALL") == 0)
+            SILO_Globals.compressionErrmode = COMPRESSION_ERRMODE_FALLBACK;
+        else if (strcmp(chararray, "FAIL") == 0)
+            SILO_Globals.compressionErrmode = COMPRESSION_ERRMODE_FAIL;
+        else
+        {
+            db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+            return (-1);
+        }
+    }
+    if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+       "MINRATIO=")) != (char *)NULL) 
+    {
+        float mcr;
+        (void)strncpy(chararray, ptr+9, 5); 
+        mcr = (float) strtod(chararray, &check);
+        if (mcr > 1.0)
+            SILO_Globals.compressionMinratio = mcr;
+        else
+        {
+            db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+            return (-1);
+        }
+    }
+
+/* Select the compression algorthm */
+    if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+       "METHOD=GZIP")) != (char *)NULL) 
+    {
+       if (have_gzip == FALSE)
+       {
+          if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+             "LEVEL=")) != (char *)NULL)
+          {
+             (void)strncpy(chararray, ptr+6, 1); 
+             level = (int) strtol(chararray, &check, 10);
+             if ((chararray != check) && (level >= 0) && (level <=9))
+             {
+                if (H5Pset_deflate(P_ckcrprops, level) < 0)
+                {
+                   db_perror("H5Pset_deflate", E_CALLFAIL, me);
+                   return (-1);
+                }
+             }
+             else
+             {
+                db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+                return (-1);
+             }
+          }
+          else
+          {
+             if (H5Pset_deflate(P_ckcrprops, 1) < 0)
+             {
+                db_perror("H5Pset_deflate", E_CALLFAIL, me);
+                return (-1);
+             }
+          }
+       }  /* if (have_gzip == FALSE) */
+    }
+#ifdef H5_HAVE_FILTER_SZIP
+    else if ((ptr=(char *)strstr(SILO_Globals.compressionParams,
+       "METHOD=SZIP"))!=(char *)NULL)
+    {
+       if (have_szip == FALSE)
+       {
+          filtn = H5Z_FILTER_SZIP;
+          if (H5Zget_filter_info(filtn, &filter_config_flags)<0)
+          {
+             db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+             return (-1);
+          }
+          if ((filter_config_flags &
+          (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED))==
+          (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED))
+          {
+             if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+                "BLOCK=")) != (char *)NULL)
+             {
+                (void)strncpy(chararray, ptr+6, 2); 
+                block = (int) strtol(chararray, &check, 10);
+                if ((chararray != check) && (block >= 0) && (block <=32))
+                { 
+                   if (strstr(SILO_Globals.compressionParams, 
+                      "MASK=EC") != NULL)
+                   {
+                      if (H5Pset_szip(P_ckcrprops, 
+                         H5_SZIP_EC_OPTION_MASK,block)<0)
+                      {
+                         db_perror("H5Pset_szip", E_CALLFAIL, me);
+                         return (-1);
+                      }
+                   }
+                   else if(strstr(SILO_Globals.compressionParams,
+                      "MASK=NN")!=NULL)
+                   {
+                      if (H5Pset_szip(P_ckcrprops, 
+                         H5_SZIP_NN_OPTION_MASK,block)<0)
+                      {
+                         db_perror("H5Pset_szip", E_CALLFAIL, me);
+                         return (-1);
+                      }
+                   }
+                   else
+                   {
+                      if (H5Pset_szip(P_ckcrprops, 
+                         H5_SZIP_NN_OPTION_MASK, block)<0)
+                      {
+                         db_perror("H5Pset_szip", E_CALLFAIL, me);
+                         return (-1);
+                      }
+                   }
+                }
+                else
+                {
+                   db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+                   return (-1);
+                }
+             }
+             else
+             {
+                if (H5Pset_szip(P_ckcrprops, H5_SZIP_NN_OPTION_MASK, 4) < 0)
+                {
+                   db_perror("H5Pset_szip", E_CALLFAIL, me);
+                   return (-1);
+                }
+             }
+          }  /* if ((filter_config_flags & */
+       }  /* if (have_szip == FALSE) */
+    }
+#endif
+#ifdef HAVE_HZIP
+    else if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+       "METHOD=HZIP")) != (char *)NULL) 
+    {
+       if (have_hzip == FALSE && (flags & ALLOW_MESH_COMPRESSION))
+       {
+           if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+              "CODEC=")) != (char *)NULL)
+           {
+              (void)strncpy(chararray, ptr+6, 4); 
+              chararray[4] = '\0';
+#ifdef HAVE_LIBZ
+              if (strcmp(chararray, "zlib") == 0)
+              {
+                  db_hdf5_hzip_params.codec = HZM_CODEC_ZLIB;
+                  db_hdf5_hzip_params.params = &hzm_codec_zlib;
+              }
+              else
+#endif
+              if (strcmp(chararray, "base") == 0)
+              {
+                  db_hdf5_hzip_params.codec = HZM_CODEC_BASE;
+                  db_hdf5_hzip_params.params = &hzm_codec_base;
+              }
+              else
+              {
+                  db_perror("hzip codec not recongized", E_COMPRESSION, me);
+                  return (-1);
+              }
+           }
+           if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+              "BITS=")) != (char *)NULL)
+           {
+              (void)strncpy(chararray, ptr+5, 2); 
+              nbits = (int) strtol(chararray, &check, 10);
+              if ((chararray != check) && (nbits >= 0) && (nbits <=64))
+              {
+#ifdef HAVE_LIBZ
+                  if (db_hdf5_hzip_params.codec == HZM_CODEC_ZLIB)
+                      ((struct HZMCODECzlib *) db_hdf5_hzip_params.params)->bits = nbits;
+                  else
+#endif
+                  if (db_hdf5_hzip_params.codec == HZM_CODEC_BASE)
+                      ((struct HZMCODECbase *) db_hdf5_hzip_params.params)->bits = nbits;
+              }
+              else
+              {
+                 db_perror("invalid nbits for hzip", E_COMPRESSION, me);
+                 return (-1);
+              }
+           }
+
+           if (H5Pset_filter(P_ckcrprops, DB_HDF5_HZIP_ID,
+                   SILO_Globals.compressionErrmode ? 0 : H5Z_FLAG_OPTIONAL, 0, 0)<0)
+           {
+               db_perror("hzip filter setup", E_CALLFAIL, me);
+               return (-1);
+           }
+       }
+    }
+#endif
+#ifdef HAVE_FPZIP
+    else if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+       "METHOD=FPZIP")) != (char *)NULL) 
+    {
+       if (have_fpzip == FALSE)
+       {
+          if ((ptr=(char *)strstr(SILO_Globals.compressionParams, 
+             "LOSS=")) != (char *)NULL)
+          {
+             (void)strncpy(chararray, ptr+5, 2); 
+             prec = (int) strtol(chararray, &check, 10);
+             if ((chararray != check) && (prec >= 0) && (prec <=3))
+             {
+                db_hdf5_fpzip_params.loss = prec;
+             }
+             else
+             {
+                db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+                return (-1);
+             }
+          }
+
+          if (H5Pset_filter(P_ckcrprops, DB_HDF5_FPZIP_ID,
+                  SILO_Globals.compressionErrmode ? 0 : H5Z_FLAG_OPTIONAL, 0, 0)<0)
+          {
+              db_perror("H5Pset_filter", E_CALLFAIL, me);
+              return (-1);
+          }
+       }
+    }
+#endif
+    else
+    {
+       db_perror(SILO_Globals.compressionParams, E_COMPRESSION, me);
+       return (-1);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_set_properties
+ *
+ * Purpose:     Set the HDF5 properties.
+ *
+ * Bugs:        
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Thomas R. Treadway, Tue Mar  6 14:23:50 PST 2007
+ *
+ * Modifications:
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_set_properties(int rank, hsize_t size[])
+{
+    static char *me = "db_hdf5_set_properties";
+    P_crprops = H5P_DEFAULT;
+    if (SILO_Globals.enableChecksums && 
+        !SILO_Globals.compressionParams)
+    {
+        H5Pset_chunk(P_ckcrprops, rank, size);
+        P_crprops = P_ckcrprops;
+    }
+    else if (SILO_Globals.enableChecksums && 
+        SILO_Globals.compressionParams)
+    {
+        H5Pset_chunk(P_ckcrprops, rank, size);
+        if (db_hdf5_set_compression(0)<0) {
+            db_perror("db_hdf5_set_compression", E_CALLFAIL, me);
+            return(-1);
+        }
+        P_crprops = P_ckcrprops;
+    }
+    else if (SILO_Globals.compressionParams)
+    {
+        H5Pset_chunk(P_ckcrprops, rank, size);
+        if (db_hdf5_set_compression(0)<0) {
+            db_perror("db_hdf5_set_compression", E_CALLFAIL, me);
+            return(-1);
+        }
+        P_crprops = P_ckcrprops;
+    }
+    return 0;
+}
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_get_comp_var 
+ *
+ * Purpose:     Given a file handle and varname containing at least one
+ *              underscore, attempts to get size and, optionally, read
+ *              the corresponding HDF5 datatype name and member
+ *              name pair, if it exists, formed by splitting the given
+ *              varname at the underscore character. If multiple splits
+ *              could possibly match with an HDF5 datatype name and member
+ *              name pair in the file, only the first found is returned.
+ *
+ *              This function is necessary to support the old pdb-ish way
+ *              of permitting a Silo client to request raw data arrays
+ *              for the component of an object by the naming convention
+ *              "<objname>_<compname>"
+ *
+ * Return:      If a valid split exists:                1
+ *
+ *              If a valid split does not exist:        0 
+ *
+ * Programmer:  Mark C. Miller 
+ *              October 11, 2005 
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_get_comp_var(hid_t fileid, const char *name, hsize_t *nelmts,
+    size_t *elsize, hid_t *datatype, void **buf)
+{
+    hid_t typeid = -1, stypeid = -1, attr = -1, comptype, memtype;
+    int membno = -1;
+    int retval = 0;
+    hsize_t numvals;
+    size_t valsize;
+
+    /* loop trying different typename, member name combinations */
+    char *tmpname = STRDUP(name);
+    char *p = strrchr(tmpname, '_');
+    char *typename, *memname;
+    while (p != 0 && *p != '\0')
+    {
+        char *tmpp = p;
+        *p = '\0';
+        typename = tmpname;
+        memname = p+1;
+
+        stypeid = attr = typeid = -1;
+        if ((typeid=H5Topen(fileid, typename))>=0 &&
+            (attr=H5Aopen_name(typeid, "silo"))>=0 &&
+            (stypeid=H5Aget_type(attr))>=0 &&
+            (membno=H5Tget_member_index(stypeid, memname))>=0)
+            retval = 1;
+
+        if (retval == 1) break;
+
+        if (attr != -1) H5Aclose(attr);
+        if (stypeid != -1) H5Tclose(stypeid);
+        if (typeid != -1) H5Tclose(typeid);
+
+        p = strrchr(tmpname, '_');
+        *tmpp = '_';
+    }
+
+    if (retval == 1)
+    {
+        hid_t mbtype = H5Tget_member_type(stypeid, membno);
+        H5T_class_t mbclass = H5Tget_class(mbtype);
+
+        switch (mbclass) {
+            case H5T_INTEGER:
+                numvals = 1;
+                comptype = H5T_NATIVE_INT;
+                break;
+            case H5T_FLOAT:
+                numvals = 1;
+                comptype = H5T_NATIVE_FLOAT;
+                break;
+            case H5T_ARRAY:
+                {
+                    int i, ndims, size[3], len = 1;
+                    comptype = db_hdf5_get_cmemb(stypeid, membno, &ndims, size);
+                    for (i = 0; i < ndims; i++)
+                        len *= size[i];
+                    numvals = len;
+                    break;
+                }
+            case H5T_STRING:
+                numvals = 1;
+                comptype = T_str256; /* it may be an indirect dataset */
+                break;
+            default:
+                numvals = 0;
+                break;
+        }
+        valsize = H5Tget_size(comptype);
+
+        /* note, a comptype of T_str256 means either that the component
+           contains the name of a dataset (indirect) case which we will
+           need to read or the component is some other 256 character
+           string */
+
+        /* read the component data only if caller requested it */
+        if ((numvals && buf) || comptype == T_str256)
+        {
+            char tmp[256];
+
+            if (comptype != T_str256 && *buf == 0)
+                *buf = malloc(*nelmts * *elsize);
+
+            /* create a component type with just one member,
+               the one we're interested in */
+            memtype = H5Tcreate(H5T_COMPOUND, H5Tget_size(comptype));
+            H5Tinsert(memtype, H5Tget_member_name(stypeid, membno), 0, comptype);
+
+            /* read attribute for the silo object data */
+            H5Aread(attr, memtype, comptype==T_str256?tmp:*buf);
+            H5Tclose(memtype);
+
+            /* do the indirection if necessary */
+            if (comptype == T_str256 &&
+                strncmp(tmp,"/.silo/#",8) == 0) /* indirect case */
+            {
+                hid_t d, fspace, ftype, mtype;
+
+                d = H5Dopen(fileid, tmp);
+                fspace = H5Dget_space(d);
+                numvals = H5Sget_simple_extent_npoints(fspace);
+                ftype = H5Dget_type(d);
+                mtype = hdf2hdf_type(ftype);
+                valsize = H5Tget_size(mtype);
+                comptype = mtype;
+                if (buf)
+                {
+                    if (*buf == 0)
+                        *buf = malloc(numvals*H5Tget_size(mtype));
+
+                    P_rdprops = H5P_DEFAULT;
+                    if (!SILO_Globals.enableChecksums)
+                        P_rdprops = P_ckrdprops;
+
+                    if (H5Dread(d, mtype, H5S_ALL, H5S_ALL, P_rdprops, *buf)<0) {
+                        hdf5_to_silo_error(name, "db_hdf5_get_comp_var");
+                        retval = 0;
+                    }
+                }
+                H5Tclose(ftype);
+                H5Dclose(d);
+                H5Sclose(fspace);
+            }
+            else if (comptype == T_str256) /* other string case */
+            {
+                if (buf)
+                {
+                    int n = strlen(tmp)+1;
+                    if (*buf == 0)
+                        *buf = malloc(n);
+                    strncpy(*buf, tmp, n);
+                    valsize = n;
+                }
+            }
+            else
+            {
+                /* any other case, the component's data will have already
+                   been read in to *buf in the H5Aread call, above */
+            }
+        }
+
+        if (retval == 1)
+        {
+            if (nelmts)
+                *nelmts = numvals;
+            if (elsize)
+                *elsize = valsize; 
+            if (datatype)
+                *datatype = comptype;
+        }
+    }
+
+    if (attr != -1)    H5Aclose(attr);
+    if (stypeid != -1) H5Tclose(stypeid);
+    if (typeid != -1)  H5Tclose(typeid);
+
+    FREE(tmpname);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    load_toc
+ *
+ * Purpose:     Add an object to the table of contents
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb  1 13:48:33 PST 2005
+ *   Made it deal with case of QUAD_RECT or QUAD_CURV
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE herr_t
+load_toc(hid_t grp, const char *name, void *_toc)
+{
+    DBtoc               *toc = (DBtoc*)_toc;
+    H5G_stat_t          sb;
+    DBObjectType        objtype = DB_INVALID_OBJECT;
+    int                 n, *nvals=NULL, _objtype;
+    char                ***names=NULL;
+    hid_t               obj=-1, attr=-1;
+
+    if (H5Gget_objinfo(grp, name, TRUE, &sb)<0) return -1;
+    switch (sb.type) {
+    case H5G_GROUP:
+        /*
+         * Any group which has a `..' entry is a silo directory. The `..'
+         * names do not appear in the silo table of contents.
+         */
+        if (!strcmp(name, "..") || (obj=H5Gopen(grp, name))<0) break;
+        H5E_BEGIN_TRY {
+            if (H5Gget_objinfo(obj, "..", FALSE, NULL)>=0) objtype = DB_DIR;
+        } H5E_END_TRY;
+        H5Gclose(obj);
+        break;
+
+    case H5G_TYPE:
+        if ((obj=H5Topen(grp, name))<0) break;
+        if ((attr=H5Aopen_name(obj, "silo_type"))<0) break;
+        if (H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0) break;
+        objtype = (DBObjectType)_objtype;
+        H5Aclose(attr);
+        H5Tclose(obj);
+        break;
+
+    case H5G_DATASET:
+        objtype = DB_VARIABLE;
+        break;
+
+    default:
+        /*ignore*/
+        break;
+    }
+
+    /* What table of contents field does this object belong to? */
+    switch (objtype) {
+    case DB_INVALID_OBJECT:
+        break;
+    case DB_QUADMESH:
+    case DB_QUAD_RECT:
+    case DB_QUAD_CURV:
+        names = &(toc->qmesh_names);
+        nvals = &(toc->nqmesh);
+        break;
+    case DB_QUADVAR:
+        names = &(toc->qvar_names);
+        nvals = &(toc->nqvar);
+        break;
+    case DB_CSGMESH:
+        names = &(toc->csgmesh_names);
+        nvals = &(toc->ncsgmesh);
+        break;
+    case DB_CSGVAR:
+        names = &(toc->csgvar_names);
+        nvals = &(toc->ncsgvar);
+        break;
+    case DB_UCDMESH:
+        names = &(toc->ucdmesh_names);
+        nvals = &(toc->nucdmesh);
+        break;
+    case DB_UCDVAR:
+        names = &(toc->ucdvar_names);
+        nvals = &(toc->nucdvar);
+        break;
+    case DB_MULTIMESH:
+        names = &(toc->multimesh_names);
+        nvals = &(toc->nmultimesh);
+        break;
+    case DB_MULTIMESHADJ:
+        names = &(toc->multimeshadj_names);
+        nvals = &(toc->nmultimeshadj);
+        break;
+    case DB_MULTIVAR:
+        names = &(toc->multivar_names);
+        nvals = &(toc->nmultivar);
+        break;
+    case DB_MULTIMAT:
+        names = &(toc->multimat_names);
+        nvals = &(toc->nmultimat);
+        break;
+    case DB_MULTIMATSPECIES:
+        names = &(toc->multimatspecies_names);
+        nvals = &(toc->nmultimatspecies);
+        break;
+    case DB_MATERIAL:
+        names = &(toc->mat_names);
+        nvals = &(toc->nmat);
+        break;
+    case DB_MATSPECIES:
+        names = &(toc->matspecies_names);
+        nvals = &(toc->nmatspecies);
+        break;
+    case DB_CURVE:
+        names = &(toc->curve_names);
+        nvals = &(toc->ncurve);
+        break;
+    case DB_DEFVARS:
+        names = &(toc->defvars_names);
+        nvals = &(toc->ndefvars);
+        break;
+    case DB_POINTMESH:
+        names = &(toc->ptmesh_names);
+        nvals = &(toc->nptmesh);
+        break;
+    case DB_POINTVAR:
+        names = &(toc->ptvar_names);
+        nvals = &(toc->nptvar);
+        break;
+    case DB_ARRAY:
+        names = &(toc->array_names);
+        nvals = &(toc->narrays);
+        break;
+    case DB_DIR:
+        names = &(toc->dir_names);
+        nvals = &(toc->ndir);
+        break;
+    case DB_VARIABLE:
+        names = &(toc->var_names);
+        nvals = &(toc->nvar);
+        break;
+    case DB_MRGTREE:
+        names = &(toc->mrgtree_names);
+        nvals = &(toc->nmrgtrees);
+        break;
+    case DB_GROUPELMAP:
+        names = &(toc->groupelmap_names);
+        nvals = &(toc->ngroupelmaps);
+        break;
+    case DB_MRGVAR:
+        names = &(toc->mrgvar_names);
+        nvals = &(toc->nmrgvars);
+        break;
+    case DB_USERDEF:  /*fall through*/
+    case DB_FACELIST: /*fall through*/
+    case DB_EDGELIST: /*fall through*/
+    case DB_ZONELIST:
+    case DB_PHZONELIST:
+    case DB_CSGZONELIST:
+        names = &(toc->obj_names);
+        nvals = &(toc->nobj);
+        break;
+    }
+
+    /* Append to table of contents */
+    if (names && nvals) {
+        n = (*nvals)++;
+        *names = realloc(*names, *nvals*sizeof(char*));
+        (*names)[n] = STRDUP(name);
+    }
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    find_objno
+ *
+ * Purpose:     Determines if the specified object has the same object ID as
+ *              what is stored in comp->objno and if so copies NAME to
+ *              comp->name.
+ *
+ * Return:      Success:        1 if objno's are the same
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE herr_t
+find_objno(hid_t grp, const char *name, void *_comp)
+{
+    silo_hdf5_comp_t    *comp = (silo_hdf5_comp_t*)_comp;
+    H5G_stat_t          sb;
+
+    if (H5Gget_objinfo(grp, name, TRUE, &sb)<0) return -1;
+    if (sb.objno[0]!=comp->objno[0] || sb.objno[1]!=comp->objno[1]) return 0;
+    comp->name = STRDUP(name);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_handle_ctdt 
+ *
+ * Purpose:     Handle special logic for cycle, time and dtime optins. 
+ *
+ * Programmer:  Mark C. Miller, Thu Feb  4 08:58:10 PST 2010
+ *
+ * Modifications:
+ * 
+ *  Mark C. Miller, Sat Feb  6 09:54:37 PST 2010
+ *  In hopes that H5Lexists might be faster than attempting to open a
+ *  dataset, added that as initial test for existance.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void 
+db_hdf5_handle_ctdt(DBfile_hdf5 *dbfile, int ts, float t, int dts, double dt, int c)
+{
+    int set[3];
+    void *buf[3];
+    char *names[] = {"time","dtime","cycle"};
+    int types[] = {DB_FLOAT, DB_DOUBLE, DB_INT};
+    hid_t space = -1;
+    int i;
+
+    set[0] = ts;
+    buf[0] = (void*)&t;
+    set[1] = dts;
+    buf[1] = (void*)&dt;
+    set[2] = 1;
+    buf[2] = (void*)&c;
+
+    H5E_BEGIN_TRY
+    {
+        for (i = 0; i < 3; i++)
+        {
+            hid_t dset, mtype, ftype;
+            const hsize_t one = 1;
+            htri_t h5lexists = -1;
+
+            if (!set[i]) continue;
+
+#if HDF5_VERSION_GE(1,8,0)
+            if ((h5lexists = H5Lexists(dbfile->cwg, names[i], H5P_DEFAULT)) == TRUE)
+                continue;
+#endif
+            if (h5lexists != FALSE)
+            {
+                dset = H5Dopen(dbfile->cwg, names[i]);
+                if (!(dset<0))
+                {
+                    H5Dclose(dset);
+                    continue;
+                }
+            }
+
+            mtype = silom2hdfm_type(types[i]);
+            ftype = silof2hdff_type(dbfile, types[i]);
+            if (space == -1)
+                space = H5Screate_simple(1, &one, &one);
+            dset = H5Dcreate(dbfile->cwg, names[i], ftype, space, H5P_DEFAULT);
+            H5Dwrite(dset, mtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[i]);
+            H5Dclose(dset);
+        }
+
+        if (space != -1)
+            H5Sclose(space);
+
+    }
+    H5E_END_TRY;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_compname
+ *
+ * Purpose:     Returns a new name relative to the link directory. The name
+ *              is generated by reading the `nlinks' attribute of the link
+ *              directory, incrementing it, creating a file name, and saving
+ *              it back to the file.
+ *
+ * Return:      Success:        0, A new link name not more than 8 characters
+ *                              long counting the null terminator is returned
+ *                              through the NAME argument.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_compname(DBfile_hdf5 *dbfile, char name[8]/*out*/)
+{
+    static char *me = "db_hdf5_compname";
+    hid_t       attr=-1;
+    int         nlinks;
+
+    PROTECT {
+        /* Open or create the `nlinks' attribute of the link group */
+        H5E_BEGIN_TRY {
+            attr = H5Aopen_name(dbfile->link, "nlinks");
+        } H5E_END_TRY;
+        if (attr<0 && (attr=H5Acreate(dbfile->link, "nlinks", H5T_NATIVE_INT,
+                                      SCALAR, H5P_DEFAULT))<0) {
+            db_perror("nlinks attribute", E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Increment the nlinks value */
+        if (H5Aread(attr, H5T_NATIVE_INT, &nlinks)<0) {
+            db_perror("nlinks attribute", E_CALLFAIL, me);
+            UNWIND();
+        }
+        nlinks++;
+        if (H5Awrite(attr, H5T_NATIVE_INT, &nlinks)<0) {
+            db_perror("nlinks attribute", E_CALLFAIL, me);
+            UNWIND();
+        }
+        H5Aclose(attr);
+
+        /* Create a name */
+        sprintf(name, "#%06d", nlinks);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_compwrz
+ *
+ * Purpose:     Creates a new dataset in the link group.
+ *
+ * Return:      Success:        >=0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver 
+ *
+ *   Mark C. Miller, Thu Sep  8 12:54:39 PDT 2005
+ *   Made it permit buf to be NULL in which case it will only create the
+ *   dataset but not attempt to write to it. Also, made it return hid_t of
+ *   created dataset.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Added support for friendly hdf5 dataset names (as soft links)
+ *
+ *   Mark C. Miller, Tue Jul 15 22:37:31 PDT 2008
+ *   Added 'z' to name and compressionFlags argument to provide control
+ *   over mesh-level compresion algorithms. The older (non-z) method 
+ *   remains as a stub that simply calls this one with zero for flags.
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:00 PST 2009
+ *   Added support for hard links for friendly names too. 
+ *
+ *   Mark C. Miller, Thu Feb  4 11:24:24 PST 2010
+ *   Removed logic specific to support cycle, time and time.
+ *   Mark C. Miller, Wed Jul 14 20:49:21 PDT 2010
+ *
+ *   Added logic to support a different kind of 'friendly-names' mode
+ *   where no datasets are put in the 'LINKGRP' and are instead put
+ *   'next to' the objects they bind with. The intention is to eliminate
+ *   the one, very, very large '/.silo' group.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_compwrz(DBfile_hdf5 *dbfile, int dtype, int rank, int _size[],
+               void *buf, char *name/*in,out*/, const char *fname,
+               int compressionFlags)
+{
+    static char *me = "db_hdf5_compwr";
+    hid_t       dset=-1, mtype=-1, ftype=-1, space=-1;
+    int         i, nels;
+    hsize_t     size[8];
+    int         alloc = 0;
+
+    if (rank < 0)
+    {
+        rank = -rank;
+        alloc = 1;
+    }
+
+    /* Not an error if there is no data */
+    for (i=0, nels=1; i<rank; i++) nels *= _size[i];
+    if ((!buf || !nels) && !alloc) {
+        *name = '\0';
+        return 0;
+    }
+
+    PROTECT {
+        /* Obtain a unique name for the dataset or use the name supplied */
+        if (!*name) {
+            strcpy(name, LINKGRP);
+            if (db_hdf5_compname(dbfile, ENDOF(name)/*out*/)<0) {
+                db_perror("compname", E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+        
+        /* Obtain the memory and file types for the dataset */
+        if ((mtype=silom2hdfm_type(dtype))<0 ||
+            (ftype=silof2hdff_type(dbfile, dtype))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create the dataset and write data */
+        assert(rank>0 && (size_t)rank<=NELMTS(size));
+        for (i=0; i<rank; i++) size[i] = _size[i];
+        if ((space=H5Screate_simple(rank, size, size))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+ 
+        if (db_hdf5_set_properties(rank, size) < 0 ) {
+            db_perror("db_hdf5_set_properties", E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (SILO_Globals.compressionParams && compressionFlags)
+        {
+            if (db_hdf5_set_compression(compressionFlags)<0)
+            {
+                db_perror("db_hdf5_set_compression", E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+
+        if (SILO_Globals.enableFriendlyHDF5Names == 2)
+        {
+            if (fname)
+            {
+                if ((dset=H5Dcreate(dbfile->cwg, fname, ftype, space, P_crprops))<0) {
+                    db_perror(name, E_CALLFAIL, me);
+                    UNWIND();
+                }
+                strcpy(name, fname);
+            }
+            else
+            {
+                if ((dset=H5Dcreate(dbfile->link, name, ftype, space, P_crprops))<0) {
+                    db_perror(name, E_CALLFAIL, me);
+                    UNWIND();
+                }
+            }
+        }
+        else
+        {
+            if ((dset=H5Dcreate(dbfile->link, name, ftype, space, P_crprops))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            if (fname && SILO_Globals.enableFriendlyHDF5Names == 1)
+                H5Glink(dbfile->cwg, H5G_LINK_SOFT, name, fname);
+        }
+
+        if (buf && H5Dwrite(dset, mtype, space, space, H5P_DEFAULT, buf)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Release resources */
+        H5Dclose(dset);
+        H5Sclose(space);
+
+        /* remove any mesh specific filters if we have 'em */
+        if (SILO_Globals.compressionParams && compressionFlags)
+        {
+            int i;
+            for (i=0; i<H5Pget_nfilters(P_crprops); i++)
+            {
+#if defined H5_USE_16_API || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8)
+                if (H5Pget_filter(P_crprops,(unsigned)i,0,0,0,0,0) == DB_HDF5_HZIP_ID)
+#else
+                if (H5Pget_filter(P_crprops,(unsigned)i,0,0,0,0,0,NULL) == DB_HDF5_HZIP_ID)
+#endif
+                {
+                    H5Premove_filter(P_crprops, DB_HDF5_HZIP_ID);
+                    break;
+                }
+            }
+        }
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(dset);
+            H5Sclose(space);
+        } H5E_END_TRY;
+    } END_PROTECT;
+    return dset; 
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_compwr
+ *
+ * Purpose:     Creates a new dataset in the link group without compression.
+ *
+ * Return:      Success:        >=0
+ *
+ *              Failure:        -1
+ *
+ * Created: Mark C. Miller, Thu Jul 17 15:03:55 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_compwr(DBfile_hdf5 *dbfile, int dtype, int rank, int _size[],
+               void *buf, char *name/*in,out*/, const char *fname)
+{
+    return db_hdf5_compwrz(dbfile, dtype, rank, _size, buf, name, fname, 0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_compckz
+ *
+ * Purpose:     Check if a dataset is compressed with HZIP 
+ *
+ * Return:      Success:        >=0
+ *
+ *              Failure:        -1
+ *
+ * Created: Mark C. Miller, Thu Jul 17 15:03:55 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int 
+db_hdf5_compckz(DBfile_hdf5 *dbfile, char *name)
+{
+    int retval = 0;
+    int i;
+    hid_t d, plist;
+    static char *me = "db_hdf5_compzkz";
+
+    PROTECT {
+        if (name && *name) {
+            if ((d=H5Dopen(dbfile->cwg, name))<0) {
+                db_perror(name, E_NOTFOUND, me);
+                UNWIND();
+            }
+            if ((plist=H5Dget_create_plist(d))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            for (i=0; i<H5Pget_nfilters(plist); i++)
+            {
+                char name[256];
+#if defined H5_USE_16_API || (H5_VERS_MAJOR == 1 && H5_VERS_MINOR < 8)
+                H5Pget_filter(plist,(unsigned)i,0,0,0,sizeof(name),name);
+#else
+                H5Pget_filter(plist,(unsigned)i,0,0,0,sizeof(name),name,NULL);
+#endif
+                if (strstr(name, "Lindstrom-hzip"))
+                {
+                    retval = 1;
+                    break;
+                }
+            }
+        }
+        H5Dclose(d);
+        H5Pclose(plist);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(d);
+            H5Pclose(plist);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_comprd
+ *
+ * Purpose:     Reads a dataset from the file into memory.
+ *
+ * Return:      Success:        Pointer to dataset values.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, March 31, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-10-13
+ *              Uses the current working directory instead of the root
+ *              directory.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void *
+db_hdf5_comprd(DBfile_hdf5 *dbfile, char *name, int ignore_force_single)
+{
+    static char *me = "db_hdf5_comprd";
+    void        *buf = NULL;
+    hid_t       d=-1, fspace=-1, ftype=-1, mtype=-1;
+    int         i, nelmts;
+    void       *retval = NULL;
+    
+    PROTECT {
+        if (name && *name) {
+            if ((d=H5Dopen(dbfile->cwg, name))<0) {
+                db_perror(name, E_NOTFOUND, me);
+                UNWIND();
+            }
+            if ((fspace=H5Dget_space(d))<0 || (ftype=H5Dget_type(d))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            nelmts = H5Sget_simple_extent_npoints(fspace);
+
+            /* Choose a memory type based on the file type */
+            mtype = hdf2hdf_type(ftype);
+
+            /* if we decided on a memory type of double but
+             * we are forcing single precision, then select
+             * a memory type of float */
+            if (mtype == H5T_NATIVE_DOUBLE &&
+                force_single_g && !ignore_force_single)
+                mtype = H5T_NATIVE_FLOAT;
+
+            /* Read the data */
+            if (NULL==(buf=malloc(nelmts*H5Tget_size(mtype)))) {
+                db_perror(name, E_NOMEM, me);
+                UNWIND();
+            }
+
+            P_rdprops = H5P_DEFAULT;
+            if (!SILO_Globals.enableChecksums)
+                P_rdprops = P_ckrdprops;
+
+            if (H5Dread(d, mtype, H5S_ALL, H5S_ALL, P_rdprops, buf)<0) {
+                hdf5_to_silo_error(name, me);
+                UNWIND();
+            }
+
+            /* Free resources */
+            H5Dclose(d);
+            H5Tclose(ftype);
+            H5Sclose(fspace);
+
+            /* Setup return value */
+            retval = buf;
+            
+            /* Convert to float if necessary */
+            /* With newer versions of HDF5, this could have been done
+             * automatically in the H5Dread call, above by selecting
+             * the appropriate memory type. However, the current version
+             * of HDF5 does not support conversion from integral types
+             * to float (or double) */
+            if (force_single_g && !ignore_force_single &&
+                mtype != H5T_NATIVE_FLOAT)
+            {
+                float *newbuf;
+
+                /* allocate a new buffer */
+                if (NULL==(newbuf=malloc(nelmts*sizeof(float)))) {
+                    db_perror(name, E_NOMEM, me);
+                    UNWIND();
+                }
+
+                /* do the conversion */
+                if      (mtype == H5T_NATIVE_UCHAR)
+                {
+                    char *cbuf = (char *) buf;
+                    for (i = 0; i < nelmts; i++)
+                        newbuf[i] = (float)(cbuf[i]);
+                }
+                else if (mtype == H5T_NATIVE_SHORT)
+                {
+                    short *sbuf = (short *) buf;
+                    for (i = 0; i < nelmts; i++)
+                        newbuf[i] = (float)(sbuf[i]);
+                }
+                else if (mtype == H5T_NATIVE_INT)
+                {
+                    int *ibuf = (int *) buf;
+                    for (i = 0; i < nelmts; i++)
+                        newbuf[i] = (float)(ibuf[i]);
+                }
+                else if (mtype == H5T_NATIVE_LONG)
+                {
+                    long *lbuf = (long *) buf;
+                    for (i = 0; i < nelmts; i++)
+                        newbuf[i] = (float)(lbuf[i]);
+                }
+                else if (mtype == H5T_NATIVE_LLONG)
+                {
+                    long long *lbuf = (long long *) buf;
+                    for (i = 0; i < nelmts; i++)
+                        newbuf[i] = (float)(lbuf[i]);
+                }
+
+                /* Free old buffer and setup return value */
+                free(buf);
+                retval = newbuf;
+            }
+        }
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(d);
+            H5Tclose(ftype);
+            H5Sclose(fspace);
+        } H5E_END_TRY;
+        FREE(buf);
+    } END_PROTECT;
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_fullname
+ *
+ * Purpose:     Given the current working directory name, the parent object
+ *              name as passed by the Silo library client and the child
+ *              object name as stored in the parent object, determine the
+ *              absolute, full path name of the child object.
+ *
+ * Return:      Success:     fully resolved full path name of child object
+ *
+ *              Failure:     0 
+ *-------------------------------------------------------------------------
+ */
+PRIVATE char * 
+db_hdf5_resolvename(DBfile *_dbfile,
+                    const char *parent_objname,
+                    const char *child_objname)
+{
+    static char cwgname[4096];
+    static char result[4096];
+    char *parent_objdirname;
+    char *parent_fullname;
+    char *child_fullname;
+
+    db_hdf5_GetDir(_dbfile, cwgname);
+    parent_objdirname = db_dirname(parent_objname);
+    parent_fullname = db_join_path(cwgname, parent_objdirname);
+    child_fullname = db_join_path(parent_fullname, child_objname);
+    strcpy(result, child_fullname);
+    free(parent_objdirname);
+    free(parent_fullname);
+    free(child_fullname);
+    return result;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_fullname
+ *
+ * Purpose:     Given a name return the corresponding absolute name. If NAME
+ *              is the empty string then the FULL output value will also be
+ *              the empty string.
+ *
+ * Return:      Success:        0, full name returned through FULL argument.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_fullname(DBfile_hdf5 *dbfile, char *name, char *full/*out*/)
+{
+    if (!name || !*name) {
+        *full = '\0';
+    } else if ('/'==*name) {
+        strcpy(full, name);
+    } else {
+        db_hdf5_GetDir((DBfile*)dbfile, full);
+        if (strcmp(full, "/")) strcat(full, "/");
+        strcat(full, name);
+    }
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_hdrwr
+ *
+ * Purpose:     Writes BUF as the `silo' attribute of an object.  If the
+ *              object does not exist then it is created as a named data type
+ *              (because a named data type has less overhead than an empty
+ *              dataset in hdf5).
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_hdrwr(DBfile_hdf5 *dbfile, char *name, hid_t mtype, hid_t ftype,
+              void *buf, DBObjectType objtype)
+{
+    static char *me = "db_hdf5_hdrwr";
+    hid_t       obj=-1, attr=-1;
+    int         _objtype = (int)objtype;
+    int         created = FALSE;
+    
+    PROTECT {
+        /* Open an existing object or create a named type */
+        H5E_BEGIN_TRY {
+            obj = H5Topen(dbfile->cwg, name);
+        } H5E_END_TRY;
+        if (obj<0) {
+            obj = H5Tcopy(H5T_NATIVE_INT);
+            if (H5Tcommit(dbfile->cwg, name, obj)<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            created = TRUE;
+        }
+
+        /* Open or create the `silo' attribute */
+        if (created) {
+            attr = -1;
+        } else {
+            H5E_BEGIN_TRY {
+                attr = H5Aopen_name(obj, "silo");
+            } H5E_END_TRY;
+        }
+        if (attr<0 && (attr=H5Acreate(obj, "silo", ftype, SCALAR,
+                                      H5P_DEFAULT))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Write data to the attribute */
+        if (H5Awrite(attr, mtype, buf)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        H5Aclose(attr);
+
+        /* Open or create the `silo_type' attribute */
+        if (created) {
+            attr = -1;
+        } else {
+            H5E_BEGIN_TRY {
+                attr = H5Aopen_name(obj, "silo_type");
+            } H5E_END_TRY;
+        }
+        if (attr<0 && (attr=H5Acreate(obj, "silo_type", H5T_NATIVE_INT, SCALAR,
+                                      H5P_DEFAULT))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (H5Awrite(attr, H5T_NATIVE_INT, &_objtype)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        H5Aclose(attr);
+        H5Tclose(obj);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(obj);
+        } H5E_END_TRY;
+    } END_PROTECT;
+    return 0;
+}
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_ForceSingle
+ *
+ * Purpose:     If STATUS is non-zero then all floating point raw data values
+ *              transferred between the application and the silo API will be
+ *              of type `float'; otherwise type `double' is assumed.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, March 22, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+db_hdf5_ForceSingle(int status)
+{
+    force_single_g = status;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_process_file_options
+ *
+ * Purpose:     Laboriously digest a file options set and set up correct
+ *              HDF5 vfd behavior.
+ *
+ * Return:      The constructed file access properties list hid_t
+ * 
+ * Programmer:  Mark C. Miller
+ *              Febuary, 2010 
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Wed Jul 14 20:52:19 PDT 2010
+ *  Moved default silo settings to macro constants in H5FDsilo.h.
+ *  Added support for direct I/O to silo vfd.
+ *
+ *  Mark C. Miller, Wed Aug  4 16:06:41 PDT 2010
+ *  Added conditional compilation logic for silo fapl for HDF5 1.8.4 or
+ *  greater.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t
+db_hdf5_process_file_options(opts_set_id)
+{
+    static char *me = "db_hdf5_process_file_options";
+    hid_t retval = H5Pcreate(H5P_FILE_ACCESS);
+    herr_t h5status = 0;
+
+    /* This property effects how HDF5 deals with objects that are left
+       open when the file containing them is closed. The SEMI setting
+       means that HDF5 will flag it is an error. The STRONG setting
+       means that HDF5 will attempt to close any option objects
+       automatically. That can wind up hiding coding errors in this
+       Silo plugin, so we do that only when user has requested that
+       either top or no errors are reported. */
+    if (SILO_Globals._db_err_level_drvr == DB_ALL)
+        h5status |= H5Pset_fclose_degree(retval, H5F_CLOSE_SEMI);
+    else
+        h5status |= H5Pset_fclose_degree(retval, H5F_CLOSE_STRONG);
+
+    /* Handle cases where we are running on Windows. If a client
+       request anything other than the default driver, we issue
+       a warning message and continue only on windows (default) vfd. */
+#if !defined(_WIN32)
+#warning REMOVED WINDOWS SPECIFIC CHECK
+#endif
+#if 0
+#if defined(_WIN32)
+    if (opts_set_id != DB_FILE_OPTS_H5_DEFAULT_DEFAULT && 
+        opts_set_id < NUM_DEFAULT_FILE_OPTIONS_SETS)
+    {
+        H5Pclose(retval);
+        return db_perror("Non-default HDF5 VFD specified on Windows.", E_CALLFAIL, me);
+    }
+#endif
+#endif
+
+    switch (opts_set_id)
+    {
+        /* Winds up using whatever the default vfd defined by HDF5 library is. */
+        case DB_FILE_OPTS_H5_DEFAULT_DEFAULT:
+            break;
+
+        case DB_FILE_OPTS_H5_DEFAULT_SILO:
+#if HDF5_VERSION_GE(1,8,4)
+            h5status |= H5Pset_fapl_silo(retval);
+#else
+            H5Pclose(retval);
+            return db_perror("Silo block VFD >= HDF5 1.8.4", E_NOTENABLEDINBUILD, me);
+#endif
+            break;
+
+        /* default HDF5 sec2 driver */
+        case DB_FILE_OPTS_H5_DEFAULT_SEC2:
+            h5status |= H5Pset_fapl_sec2(retval);
+            break;
+
+        /* default HDF5 stdio driver */
+        case DB_FILE_OPTS_H5_DEFAULT_STDIO:
+            h5status |= H5Pset_fapl_stdio(retval);
+            /* I tried also having option to set buffer size. But, you need
+               a file handle that has NOT had any I/O occur on it yet and
+               HDF5 can't do that */
+            break;
+
+        /* default HDF5 core driver 1 Meg inc & backing store */
+        case DB_FILE_OPTS_H5_DEFAULT_CORE:
+            h5status |= H5Pset_fapl_core(retval, (1<<20), TRUE);
+            break;
+
+        /* default HDF5 log driver. Should NOT do any actual I/O. */
+        case DB_FILE_OPTS_H5_DEFAULT_LOG:
+            h5status |= H5Pset_fapl_log(retval, "silo_hdf5_log.out",
+                H5FD_LOG_LOC_IO|H5FD_LOG_NUM_IO|
+                H5FD_LOG_TIME_IO|H5FD_LOG_ALLOC, 0);
+            break;
+
+        /* default HDF5 split file driver. */
+        case DB_FILE_OPTS_H5_DEFAULT_SPLIT:
+        {
+            hid_t meta_fapl = db_hdf5_process_file_options(DB_FILE_OPTS_H5_DEFAULT_CORE);
+            hid_t raw_fapl = db_hdf5_process_file_options(DB_FILE_OPTS_H5_DEFAULT_DEFAULT);
+            h5status |= H5Pset_fapl_split(retval, "", meta_fapl, "-raw", raw_fapl);
+            H5Pclose(meta_fapl);
+            H5Pclose(raw_fapl);
+            break;
+        }
+
+        /* default HDF5 direct driver. */
+        case DB_FILE_OPTS_H5_DEFAULT_DIRECT:
+        {
+#ifdef H5_HAVE_DIRECT
+            const int fourkb = (1<<12);
+            h5status |= H5Pset_fapl_direct(retval, fourkb, fourkb, fourkb*256);
+            h5status |= H5Pset_alignment(retval, fourkb/2, fourkb); 
+#else
+            H5Pclose(retval);
+            return db_perror("HDF5 Direct VFD", E_NOTENABLEDINBUILD, me);
+#endif
+            break;
+        }
+
+        /* default HDF5 family driver w/1Gig (2^30) members. */
+        case DB_FILE_OPTS_H5_DEFAULT_FAMILY:
+        {
+            hid_t memb_fapl = db_hdf5_process_file_options(DB_FILE_OPTS_H5_DEFAULT_DEFAULT);
+            h5status |= H5Pset_fapl_family(retval, (1<<30), memb_fapl);
+            H5Pclose(memb_fapl);
+            break;
+        }
+
+        /* default HDF5 mpi drivers */
+        case DB_FILE_OPTS_H5_DEFAULT_MPIP:
+        {
+#ifdef H5_HAVE_PARALLEL
+            h5status |= H5Pset_fapl_mpiposix(retval, MPI_COMM_SELF, TRUE);
+#else
+            H5Pclose(retval);
+            return db_perror("HDF5 MPI VFD", E_NOTENABLEDINBUILD, me);
+#endif
+            break;
+        }
+
+        case DB_FILE_OPTS_H5_DEFAULT_MPIO:
+        {
+#ifdef H5_HAVE_PARALLEL
+            MPI_Info info;
+            MPI_Info_create(&info);
+            h5status |= H5Pset_fapl_mpio(retval, MPI_COMM_SELF, info);
+            MPI_Info_free(&info);
+#else
+            H5Pclose(retval);
+            return db_perror("HDF5 MPI VFD", E_NOTENABLEDINBUILD, me);
+#endif
+            break;
+        }
+
+        /* More complex cases where parameters specified by user
+           registered options sets. */
+        default:
+        {
+            int _opts_set_id = opts_set_id - NUM_DEFAULT_FILE_OPTIONS_SETS;
+            const DBoptlist *opts;
+            void *p; int vfd = DB_H5VFD_DEFAULT;
+
+            if (_opts_set_id >= MAX_FILE_OPTIONS_SETS ||
+                (opts = SILO_Globals.fileOptionsSets[_opts_set_id]) == 0)
+            {
+                H5Pclose(retval);
+                return db_perror("Bad file options set index", E_CALLFAIL, me);
+            }
+
+            /* get the vfd specification */
+            if (p = DBGetOption(opts, DBOPT_H5_VFD))
+            {
+                vfd = *((int*)p);
+            }
+            else if (p = DBGetOption(opts, DBOPT_H5_USER_DRIVER_ID))
+            {
+                int new_driver_id = *((int*)p);
+                p = DBGetOption(opts, DBOPT_H5_USER_DRIVER_INFO);
+                h5status |= H5Pset_driver(retval, new_driver_id, p);
+            }
+
+#if !defined(_WIN32)
+#warning REMOVED WINDOWS SPECIFIC CHECK
+#endif
+#if 0
+#if defined(_WIN32)
+            if (vfd != DB_H5VFD_DEFAULT)
+            {
+                db_perror("Non-default HDF5 VFD specified on Windows.", E_CALLFAIL, me);
+                vfd = DB_H5VFD_DEFAULT;
+            }
+#endif
+#endif
+            
+            switch (vfd)
+            {
+                case DB_H5VFD_DEFAULT:
+                    break;
+                case DB_H5VFD_SEC2:
+                    h5status |= H5Pset_fapl_sec2(retval);
+                    break;
+                case DB_H5VFD_STDIO:
+                    h5status |= H5Pset_fapl_stdio(retval);
+                    break;
+                case DB_H5VFD_SILO:
+                {
+#if HDF5_VERSION_GE(1,8,4)
+                    hsize_t block_size = H5FD_SILO_DEFAULT_BLOCK_SIZE; 
+                    int block_count = H5FD_SILO_DEFAULT_BLOCK_COUNT; 
+                    int log_stats = H5FD_SILO_DEFAULT_LOG_STATS;
+                    int use_direct = H5FD_SILO_DEFAULT_USE_DIRECT;
+
+                    if (p = DBGetOption(opts, DBOPT_H5_SILO_BLOCK_SIZE))
+                        block_size = (hsize_t) (*((int*) p));
+                    if (p = DBGetOption(opts, DBOPT_H5_SILO_BLOCK_COUNT))
+                        block_count = *((int*) p);
+                    if (p = DBGetOption(opts, DBOPT_H5_SILO_LOG_STATS))
+                        log_stats = *((int*) p);
+                    if (p = DBGetOption(opts, DBOPT_H5_SILO_USE_DIRECT))
+                        use_direct = *((int*) p);
+
+                    h5status |= H5Pset_fapl_silo(retval);
+                    h5status |= H5Pset_silo_block_size_and_count(retval, block_size, block_count);
+                    h5status |= H5Pset_silo_log_stats(retval, log_stats);
+                    h5status |= H5Pset_silo_use_direct(retval, use_direct);
+#else
+                    H5Pclose(retval);
+                    return db_perror("Silo block VFD >= HDF5 1.8.4", E_NOTENABLEDINBUILD, me);
+#endif
+                    break;
+                }
+                case DB_H5VFD_LOG:
+                {
+                    int bufsize = 0;
+                    int flags = H5FD_LOG_LOC_IO|H5FD_LOG_NUM_IO|H5FD_LOG_TIME_IO|H5FD_LOG_ALLOC;
+                    char *logname = "silo_hdf5_log.out";
+
+                    if (p = DBGetOption(opts, DBOPT_H5_LOG_NAME))
+                        logname = (char*) p;
+
+                    if (p = DBGetOption(opts, DBOPT_H5_LOG_BUF_SIZE))
+                    {
+                        bufsize = *((int*) p);
+                        flags = H5FD_LOG_ALL;
+                    }
+
+                    h5status |= H5Pset_fapl_log(retval, logname, flags, bufsize);
+                    break;
+                }
+                case DB_H5VFD_CORE:
+                {
+                    int inc = 1<<20; /* default of 1 Meg */
+                    hbool_t bs = TRUE; /* default back store on */
+
+                    /* get core allocation inc */
+                    if (p = DBGetOption(opts, DBOPT_H5_CORE_ALLOC_INC))
+                        inc = *((int*)p);
+
+                    /* get backing store flag */
+                    if (p = DBGetOption(opts, DBOPT_H5_CORE_NO_BACK_STORE))
+                        bs = FALSE;
+
+                    h5status |= H5Pset_fapl_core(retval, inc, bs);
+                    break;
+                }
+                case DB_H5VFD_DIRECT:
+                {
+#ifdef H5_HAVE_DIRECT
+                    int direct_block_size = (1<<12); /* 4 kilobytes (lustre default) */
+                    int direct_alignment, direct_cbuf_size;
+                    int align_min, align_val;
+    
+                    /* get direct block size */ 
+                    if (p = DBGetOption(opts, DBOPT_H5_DIRECT_BLOCK_SIZE))
+                        direct_block_size = *((int*)p);
+
+                    /* get direct alignment */ 
+                    if (p = DBGetOption(opts, DBOPT_H5_DIRECT_MEM_ALIGN))
+                        direct_alignment = *((int*)p);
+                    else
+                        direct_alignment = direct_block_size;
+
+                    /* get direct buffer size */ 
+                    if (p = DBGetOption(opts, DBOPT_H5_DIRECT_BUF_SIZE))
+                        direct_cbuf_size = *((int*)p);
+                    else
+                        direct_cbuf_size = direct_block_size * 256;
+
+                    /* get overall alignment threshold */ 
+                    if (p = DBGetOption(opts, DBOPT_H5_ALIGN_MIN))
+                        align_min = *((int*)p);
+                    else
+                        align_min = direct_block_size / 2;
+
+                    /* get overall alignment value */ 
+                    if (p = DBGetOption(opts, DBOPT_H5_ALIGN_VAL))
+                        align_val = *((int*)p);
+                    else
+                        align_val = direct_block_size;
+
+                    h5status |= H5Pset_fapl_direct(retval, direct_alignment, direct_block_size, direct_cbuf_size);
+                    h5status |= H5Pset_alignment(retval, align_min, align_val); 
+#else
+                    H5Pclose(retval);
+                    return db_perror("HDF5 Direct VFD", E_NOTENABLEDINBUILD, me);
+#endif
+                    break;
+
+                }
+                case DB_H5VFD_SPLIT: 
+                {
+                    int meta_opts_set_id = DB_FILE_OPTS_H5_DEFAULT_CORE;
+                    int raw_opts_set_id = DB_FILE_OPTS_H5_DEFAULT_DEFAULT;
+                    char *mext = "", *rext = "-raw";
+                    hid_t meta_fapl = -1, raw_fapl = -1;
+
+                    /* get meta opts_set_id */
+                    if (p = DBGetOption(opts, DBOPT_H5_META_FILE_OPTS))
+                        meta_opts_set_id = *((int*)p);
+
+                    /* get meta fapl from opts_set_id */
+                    meta_fapl = db_hdf5_process_file_options(meta_opts_set_id);
+
+                    /* get meta extension */
+                    if (p = DBGetOption(opts, DBOPT_H5_META_EXTENSION))
+                        mext = (char *) p;
+
+                    /* get raw opts_set_id */
+                    if (p = DBGetOption(opts, DBOPT_H5_RAW_FILE_OPTS))
+                        raw_opts_set_id = *((int*)p);
+
+                    /* get raw fapl from opts_set_id */
+                    raw_fapl = db_hdf5_process_file_options(raw_opts_set_id);
+
+                    /* get raw extension */
+                    if (p = DBGetOption(opts, DBOPT_H5_RAW_EXTENSION))
+                        rext = (char *) p;
+
+                    /* make sure the exentions are not identical */
+                    if (!strcmp(mext, rext))
+                    {
+                        H5Pclose(retval);
+                        return db_perror("meta & raw extensions must be different", E_CALLFAIL, me);
+                    }
+
+                    h5status |= H5Pset_fapl_split(retval, mext, meta_fapl, rext, raw_fapl);
+                    H5Pclose(meta_fapl);
+                    H5Pclose(raw_fapl);
+                    break;
+                }
+                case DB_H5VFD_MPIO:
+                case DB_H5VFD_MPIP:
+                {
+#ifdef H5_HAVE_PARALLEL
+                    MPI_Comm mpi_comm = MPI_COMM_SELF;
+                    MPI_Info mpi_info; 
+                    int created_info = 0;
+                    hbool_t use_gpfs_hints = TRUE;
+
+                    /* get the communicator */
+                    if (p = DBGetOption(opts, DBOPT_H5_MPIO_COMM))
+                        mpi_comm = *((MPI_Comm *)p);
+
+                    /* get the info */
+                    if (p = DBGetOption(opts, DBOPT_H5_MPIO_INFO))
+                        mpi_info = *((MPI_Info *)p);
+                    else
+                    {
+                        MPI_Info_create(&mpi_info);
+                        created_info = 1;
+                    }
+
+                    /* get use_gpfs_hints flag */
+                    if (p = DBGetOption(opts, DBOPT_H5_MPIP_NO_GPFS_HINTS))
+                        use_gpfs_hints = FALSE;
+
+                    if (vfd == DB_H5VFD_MPIO)
+                    {
+                        h5status |= H5Pset_fapl_mpio(retval, mpi_comm, mpi_info);
+                        if (created_info) MPI_Info_free(&mpi_info);
+                    }
+                    else
+                    {
+                        h5status |= H5Pset_fapl_mpiposix(retval, mpi_comm, use_gpfs_hints);
+                    }
+#else 
+                    H5Pclose(retval);
+                    return db_perror("HDF5 MPI VFD", E_NOTENABLEDINBUILD, me);
+#endif
+                    break;
+                }
+                case DB_H5VFD_FAMILY:
+                {
+                    int memb_size = (1<<30); /* 1 gigabyte */
+                    int memb_opts_set_id = DB_FILE_OPTS_H5_DEFAULT_DEFAULT;
+                    hid_t memb_fapl;
+
+                    /* get size of files in family */
+                    if (p = DBGetOption(opts, DBOPT_H5_FAM_SIZE))
+                        memb_size = *((int*)p);
+
+                    /* get underlying family fapl */
+                    if (p = DBGetOption(opts, DBOPT_H5_FAM_FILE_OPTS))
+                        memb_opts_set_id = *((int*)p);
+
+                    memb_fapl = db_hdf5_process_file_options(memb_opts_set_id);
+                    h5status |= H5Pset_fapl_family(retval, memb_size, memb_fapl);
+                    H5Pclose(memb_fapl);
+                }
+            }
+
+            /* handle overall alignment requests */
+            if (p = DBGetOption(opts, DBOPT_H5_ALIGN_MIN))
+            {
+                int align_min = *((int*)p);
+                int align_val = align_min * 2;
+
+                /* get overall alignment value */ 
+                if (p = DBGetOption(opts, DBOPT_H5_ALIGN_VAL))
+                    align_val = *((int*)p);
+
+                h5status |= H5Pset_alignment(retval, align_min, align_val); 
+            }
+
+            /* handle meta block size */
+            if (p = DBGetOption(opts, DBOPT_H5_META_BLOCK_SIZE))
+            {
+                int size = *((int*)p);
+                h5status |= H5Pset_meta_block_size(retval, size);
+            }
+
+            /* handle raw block size */
+            if (p = DBGetOption(opts, DBOPT_H5_SMALL_RAW_SIZE))
+            {
+                int size = *((int*)p);
+                h5status |= H5Pset_small_data_block_size(retval, size);
+            }
+
+            /* handle sieve buffer size */
+            if (p = DBGetOption(opts, DBOPT_H5_SIEVE_BUF_SIZE))
+            {
+                int size = *((int*)p);
+                h5status |= H5Pset_sieve_buf_size(retval, size);
+            }
+
+            /* handle cache settings */
+            if (p = DBGetOption(opts, DBOPT_H5_CACHE_NELMTS))
+            {
+                int nelmts = *((int*)p);
+                int nbytes = nelmts * sizeof(double);
+                double policy = 1.0;
+
+                /* get size in bytes */
+                if (p = DBGetOption(opts, DBOPT_H5_CACHE_NBYTES))
+                    nbytes = *((int*)p);
+
+                /* get pre-emption policy */
+                if (p = DBGetOption(opts, DBOPT_H5_CACHE_POLICY))
+                    policy = *((double*)p);
+
+                h5status |= H5Pset_cache(retval, 0, nelmts, nbytes, policy);
+            }
+        }
+    }
+
+    if (h5status < 0)
+    {
+        H5Pclose(retval);
+        return db_perror("Problem setting HDF5 VFD options", E_CALLFAIL, me);
+    }
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_file_accprops 
+ *
+ * Purpose:     Create file access property lists 
+ *
+ * Programmer:  Mark C. Miller, Aug 1, 2006 
+ *
+ * Notes: The least significant 4 bits in the 'driver' argument passed to
+ * an open or create call are stripped off and the value shifted 4 to the
+ * right to produce the 'subtype' that is passed into driver's open or
+ * create implementations. So, the 'subtype' arriving here is a 28 bit
+ * number.
+ *
+ * Modifications:
+ *   Mark C. Miller, Thu Feb 11 09:38:32 PST 2010
+ *   Added support for split vfd. Changed how allocation inc for core
+ *   and split vfd's is handled. Changed int values in case to symbolics.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE hid_t 
+db_hdf5_file_accprops(int subtype)
+{
+    int opts_set_id = subtype & 0x0000003F;
+    return db_hdf5_process_file_options(opts_set_id);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_finish_open
+ *
+ * Purpose:     Completes opening of a Silo/HDF5 file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, March 26, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb  3 09:48:23 PST 2009
+ *   Changed dbfile arg from public DBfile* to private DBfile_hdf5*
+ *   Changed return type from int to DBfile*
+ *   Removed PROTECT/UNWIND/END_PROTECT and replaced UNWIND() calls with
+ *   return silo_db_close(). This is because UNWIND was causing it to
+ *   NOT correctly handle the case in which the given filename was NOT
+ *   an HDF5 file and properly RETURNing NULL when necessary.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE DBfile* 
+db_hdf5_finish_open(DBfile_hdf5 *dbfile)
+{
+    static char *me = "db_hdf5_finish_open";
+    hid_t       cwg=-1, link=-1, attr=-1;
+    int         tmp, target=DB_LOCAL;
+    
+    /* Open "/" as current working group */
+    if ((cwg=H5Gopen(dbfile->fid, "/"))<0) {
+        db_perror("root group", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    /*
+     * Open the link directory. If it doesn't exist then create one (it
+     * might not exist in old SAMI files).
+     */
+    H5E_BEGIN_TRY {
+        link = H5Gopen(dbfile->fid, LINKGRP);
+    } H5E_END_TRY;
+    if (link<0 && (link=H5Gcreate(dbfile->fid, LINKGRP, 0))<0) {
+        db_perror("link group", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    /*
+     * Read the targetting information from the `target' attribute
+     * of the link group if there is one, otherwise assume DB_LOCAL
+     */
+    H5E_BEGIN_TRY {
+        attr = H5Aopen_name(link, "target");
+    } H5E_END_TRY;
+    if (attr>=0 &&
+        H5Aread(attr, H5T_NATIVE_INT, &tmp)>=0 &&
+        H5Aclose(attr)>=0) {
+        target = tmp;
+    }
+
+    /*
+     * Initialize the file struct. Use the same target architecture that
+     * was specified when the file was created.
+     */
+    dbfile->cwg = cwg;
+    dbfile->link = link;
+    db_hdf5_InitCallbacks(dbfile, target);
+        
+    return (DBfile*) dbfile;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_finish_create
+ *
+ * Purpose:     Finish creating a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, March 26, 1999
+ *
+ * Modifications:
+ *   Robb Matzke, 1999-08-17
+ *   The file information string is written as a variable in the
+ *   file instead of as a comment on the root group.
+ *
+ *   Mark C. Miller, Tue Feb  3 09:48:23 PST 2009
+ *   Changed dbfile arg from public DBfile* to private DBfile_hdf5*
+ *   Changed return type from int to DBfile*
+ *   Removed PROTECT/UNWIND/END_PROTECT and replaced UNWIND() calls with
+ *   return silo_db_close(). This is because UNWIND was causing it to
+ *   NOT correctly handle the case in which the given filename was NOT
+ *   an HDF5 file and properly RETURNing NULL when necessary.
+ *
+ *   Mark C. Miller, Mon Jun 28 20:19:35 PDT 2010
+ *   Added logic to handle HDF5 header/lib version numbers separately.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE DBfile* 
+db_hdf5_finish_create(DBfile_hdf5 *dbfile, int target, char *finfo)
+{
+    static char *me = "db_hdf5_finish_create";
+    hid_t       attr=-1;
+    int         size;
+    char        hdf5VString[32];
+    unsigned    majno, minno, relno;
+    
+    /* Open root group as CWG */
+    if ((dbfile->cwg=H5Gopen(dbfile->fid, "/"))<0) {
+        db_perror("root group", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    /* Create the link group */
+    if ((dbfile->link=H5Gcreate(dbfile->fid, LINKGRP, 0))<0) {
+        db_perror("link group", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    /* Callbacks */
+    db_hdf5_InitCallbacks(dbfile, target);
+        
+    /*
+     * Write the target architecture into the `target' attribute of the
+     * link group so we can retrieve it later when the file is reopened.
+     */
+    if ((attr=H5Acreate(dbfile->link, "target", dbfile->T_int, SCALAR,
+                        H5P_DEFAULT))<0 ||
+        H5Awrite(attr, H5T_NATIVE_INT, &target)<0 ||
+        H5Aclose(attr)<0) {
+        db_perror("targetinfo", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    if (finfo) {
+        /* Write file info as a variable in the file */
+        size = strlen(finfo)+1;
+        if (db_hdf5_Write((DBfile*)dbfile, "_fileinfo", finfo, &size, 1,
+                          DB_CHAR)<0) {
+            db_perror("fileinfo", E_CALLFAIL, me);
+            return silo_db_close((DBfile*) dbfile);
+        }
+    }
+
+    /*
+     * Write HDF5 library version information to the file 
+     */
+    H5get_libversion(&majno, &minno, &relno);
+    if (majno != H5_VERS_MAJOR || minno != H5_VERS_MINOR || relno != H5_VERS_RELEASE)
+    {
+        /* Since headers and libs don't match, write information about headers first */
+        sprintf(hdf5VString, "hdf5-%d.%d.%d%s%s", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
+            strlen(H5_VERS_SUBRELEASE) ? "-" : "", H5_VERS_SUBRELEASE);
+        size = strlen(hdf5VString)+1;
+        if (db_hdf5_Write((DBfile*)dbfile, "_hdf5incinfo", hdf5VString, &size, 1, DB_CHAR)<0) {
+            db_perror("_hdf5incinfo", E_CALLFAIL, me);
+            return silo_db_close((DBfile*) dbfile);
+        }
+    }
+
+    sprintf(hdf5VString, "hdf5-%d.%d.%d", majno, minno, relno);
+    size = strlen(hdf5VString)+1;
+    if (db_hdf5_Write((DBfile*)dbfile, "_hdf5libinfo", hdf5VString, &size, 1, DB_CHAR)<0) {
+        db_perror("_hdf5libinfo", E_CALLFAIL, me);
+        return silo_db_close((DBfile*) dbfile);
+    }
+
+    return (DBfile*) dbfile;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_initiate_close
+ *
+ * Purpose:     Start closing the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, March 26, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Wed Jul 14 20:53:33 PDT 2010
+ *   Added logic to check for open objects and try to print their names.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_hdf5_initiate_close(DBfile *_dbfile)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_initiate_close";
+    int i;
+
+    /* Close all datasets in the circular buffer */
+    for (i=0; i<NDSETTAB; i++) {
+        FREE(dbfile->dsettab[i]);
+        dbfile->dsettab[i] = NULL;
+    }
+    dbfile->dsettab_ins = dbfile->dsettab_rem = 0;
+    
+    /* Close current working group and link group */
+    if (H5Gclose(dbfile->cwg)<0 || H5Gclose(dbfile->link)<0) {
+        return db_perror("closing", E_CALLFAIL, me);
+    }
+    dbfile->cwg = -1;
+    dbfile->link = -1;
+
+    if (dbfile->cwg_name)
+        free(dbfile->cwg_name);
+    dbfile->cwg_name = NULL;
+
+    /* Check for any open objects in this file */
+#if HDF5_VERSION_GE(1,6,0)
+    if (SILO_Globals._db_err_level_drvr == DB_ALL)
+    {
+        int noo = H5Fget_obj_count(dbfile->fid, H5F_OBJ_LOCAL | H5F_OBJ_ALL);
+        if (noo > 1) /* HDF5 bug, always get 1 for "/" group */
+        {
+            int n;
+            char msg[4096];
+            hid_t *ooids = (hid_t *) malloc(noo * sizeof(hid_t));
+            sprintf(msg, "Internal Silo error: %d objects left open in file: ", noo);
+#if HDF5_VERSION_GE(1,6,5)
+            H5Fget_obj_ids(dbfile->fid, H5F_OBJ_LOCAL | H5F_OBJ_ALL, noo, ooids);
+#else
+            H5Fget_obj_ids(dbfile->fid, H5F_OBJ_ALL, noo, ooids);
+#endif
+            n = strlen(msg);
+            for (i = 0; i < noo && n < sizeof(msg); i++)
+            {
+                char name[256], tmp[260];
+                H5Iget_name(ooids[i], name, sizeof(name));
+                sprintf(tmp, "\"%s\", ", name);
+                strcat(msg, tmp);
+                n += strlen(tmp);
+            }
+            free(ooids);
+
+            return db_perror(dbfile->pub.name, E_CALLFAIL, msg);
+        }
+    }
+#endif
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_Open
+ *
+ * Purpose:     Opens an hdf5 file that already exists.
+ *
+ * Return:      Success:        Ptr to the file struct
+ *
+ *              Failure:        NULL, db_errno set.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb  1 18:13:28 PST 2005
+ *   Added call to H5Eset_auto(). Open can be called outside of init
+ *
+ *   Mark C. Miller, Tue Feb  3 09:48:23 PST 2009
+ *   Removed PROTECT/UNWIND/END_PROTECT and replaced UNWIND() calls with
+ *   return silo_db_close(). This is because UNWIND was causing it to
+ *   NOT correctly handle the case in which the given filename was NOT
+ *   an HDF5 file and properly RETURNing NULL when necessary.
+ *
+ *   Mark C. Miller, Wed Feb 25 09:37:10 PST 2009
+ *   Changed error code for failure to open to indicate better error
+ *   message.
+ *
+ *   Mark C. Miller, Thu Feb 11 09:37:41 PST 2010
+ *   Added logic to set HDF5's error output based on Silo's settings.
+ *-------------------------------------------------------------------------
+ */
+INTERNAL DBfile *
+db_hdf5_Open(char *name, int mode, int opts_set_id)
+{
+    DBfile_hdf5 *dbfile=NULL;
+    hid_t       fid=-1, faprops=-1;
+    hid_t      *fidp = 0;
+    unsigned    hmode;
+    static char *me = "db_hdf5_Open";
+
+    if (SILO_Globals._db_err_level_drvr == DB_ALL)
+        H5Eset_auto((H5E_auto1_t) H5Eprint1, stderr);
+    else
+        H5Eset_auto(NULL, NULL);
+
+    /* File access mode */
+    if (DB_READ==mode) {
+        hmode = H5F_ACC_RDONLY;
+    } else if (DB_APPEND==mode) {
+        hmode = H5F_ACC_RDWR;
+    } else {
+        db_perror("mode", E_INTERNAL, me);
+        return NULL;
+    }
+
+    faprops = db_hdf5_file_accprops(opts_set_id); 
+
+    /* Open existing hdf5 file */
+    if ((fid=H5Fopen(name, hmode, faprops))<0) {
+        H5Pclose(faprops);
+        db_perror(name, E_DRVRCANTOPEN, me);
+        return NULL;
+    }
+    H5Pclose(faprops);
+
+    /* Create silo file struct */
+    if (NULL==(dbfile=calloc(1, sizeof(DBfile_hdf5)))) {
+        db_perror(name, E_NOMEM, me);
+        return NULL;
+    }
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_HDF5;
+    dbfile->pub.Grab = FALSE;
+    fidp = (hid_t *) malloc(sizeof(hid_t));
+    *fidp = fid;
+    dbfile->pub.GrabId = (void*) fidp;
+    dbfile->fid = fid;
+    return db_hdf5_finish_open(dbfile);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_Create
+ *
+ * Purpose:     Creates an hdf5 file and begins the process of writing mesh
+ *              and mesh-related data into that file.
+ *
+ *              The `target' is always assumed to be the local architecture.
+ *
+ * Return:      Success:        Pointer to a new file
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb  1 18:13:28 PST 2005
+ *   Added call to H5Eset_auto(). Create can be called outside of init
+ *
+ *   Mark C. Miller, Tue Feb  3 09:48:23 PST 2009
+ *   Removed PROTECT/UNWIND/END_PROTECT and replaced UNWIND() calls with
+ *   return silo_db_close(). This is because UNWIND was causing it to
+ *   NOT correctly handle the case in which the given filename was NOT
+ *   an HDF5 file and properly RETURNing NULL when necessary.
+ *
+ *   Mark C. Miller, Thu Feb 11 09:37:41 PST 2010
+ *   Added logic to set HDF5's error output based on Silo's settings.
+ *-------------------------------------------------------------------------
+ */
+INTERNAL DBfile *
+db_hdf5_Create(char *name, int mode, int target, int opts_set_id, char *finfo)
+{
+    DBfile_hdf5 *dbfile=NULL;
+    hid_t       fid=-1, faprops=-1;
+    hid_t      *fidp = 0;
+    static char *me = "db_hdf5_Create";
+
+    /* Turn off error messages from the hdf5 library */
+    if (SILO_Globals._db_err_level_drvr == DB_ALL)
+        H5Eset_auto((H5E_auto1_t) H5Eprint1, stderr);
+    else
+        H5Eset_auto(NULL, NULL);
+
+    faprops = db_hdf5_file_accprops(opts_set_id);
+
+        /* Create or open hdf5 file */
+    if (DB_CLOBBER==mode) {
+        /* If we ever use checksumming (which requires chunked datasets),
+         * HDF5's BTree's will effect storage overhead. Since Silo really
+         * doesn't support growing/shrinking datasets, we just use a value
+         * of '1' for istore_k */
+        hid_t fcprops = H5Pcreate(H5P_FILE_CREATE);
+        H5Pset_istore_k(fcprops, 1);
+        fid = H5Fcreate(name, H5F_ACC_TRUNC, fcprops, faprops);
+        H5Pclose(fcprops);
+        H5Glink(fid, H5G_LINK_HARD, "/", ".."); /*don't care if fails*/
+    } else if (DB_NOCLOBBER==mode) {
+        fid = H5Fopen(name, H5F_ACC_RDWR, faprops);
+    } else {
+        H5Pclose(faprops);
+        db_perror("mode", E_BADARGS, me);
+        return NULL;
+    }
+    if (fid<0) {
+        H5Pclose(faprops);
+        db_perror(name, E_NOFILE, me);
+        return NULL;
+    }
+
+    H5Pclose(faprops);
+
+    /* Create silo file struct */
+    if (NULL==(dbfile=calloc(1, sizeof(DBfile_hdf5)))) {
+        db_perror(name, E_NOMEM, me);
+        return NULL;
+    }
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_HDF5;
+    dbfile->pub.Grab = FALSE;
+    fidp = (hid_t *) malloc(sizeof(hid_t));
+    *fidp = fid;
+    dbfile->pub.GrabId = (void*) fidp;
+    dbfile->fid = fid;
+    return db_hdf5_finish_create(dbfile, target, finfo);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_Close
+ *
+ * Purpose:     Closes an hdf5 file and frees memory associated with the
+ *              file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *   Mark C. Miller, Thu Jul 17 15:05:16 PDT 2008
+ *   Added call to FreeNodelists for this file.
+ *
+ *   Mark C. Miller, Tue Feb  3 09:52:51 PST 2009
+ *   Moved code to free pub.GrabId and set Grab related entries to zero to
+ *   silo_db_close() function and then added a call to that function here.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_Close(DBfile *_dbfile)
+{
+    int retval = 0;
+    DBfile_hdf5    *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_Close";
+
+    if (dbfile) {
+
+        PROTECT {
+
+            FreeNodelists(dbfile, 0);
+
+            /* Free the private parts of the file */
+            if (db_hdf5_initiate_close((DBfile*)dbfile)<0 ||
+                H5Fclose(dbfile->fid)<0)
+            {
+                db_perror(dbfile->pub.name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            dbfile->fid = -1;
+
+            /* Free the public parts of the file */
+            silo_db_close(_dbfile);
+        
+        } CLEANUP {
+            retval = -1;
+            dbfile->fid = -1;
+            silo_db_close(_dbfile);
+        } END_PROTECT;
+    }
+
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_Filters
+ *
+ * Purpose:     Output the name of this device driver to the specified stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, March 17, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_Filters(DBfile *_dbfile, FILE *stream)
+{
+    fprintf(stream, "HDF5 Device Driver\n");
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_MkDir
+ *
+ * Purpose:     Create a new directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, February 10, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-10-13
+ *              Uses the current working group instead of the root group when
+ *              adding the `..' entry.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_MkDir(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_MkDir";
+    char        *dotdot = NULL,  *parent=NULL, *t=NULL;
+    hid_t       grp = -1;
+
+    PROTECT {
+        /* Create the new group */
+        if ((grp=H5Gcreate(dbfile->cwg, name, 0))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* What is the name of the parent directory of the new directory? */
+        parent = STRDUP(name);
+        t = parent+strlen(parent);
+        while (t>parent && '/'==t[-1]) *(--t) = '\0';   /*trailing slashes*/
+        while (t>parent && '/'!=t[-1]) *(--t) = '\0';   /*last component*/
+        if (!*parent) strcpy(parent, '/'==*name?"/":".");
+
+        /* What is the name of the `..' entry? */
+        dotdot = malloc(strlen(name)+4);
+        strcpy(dotdot, name);
+        strcat(dotdot, "/..");
+
+        /* Make the `..' point to the parent */
+        if (H5Glink(dbfile->cwg, H5G_LINK_HARD, parent, dotdot)<0) {
+            db_perror(dotdot, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Close everything */
+        H5Gclose(grp);
+        free(dotdot);
+        free(parent);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Gclose(grp);
+        } H5E_END_TRY;
+        if (dotdot) free(dotdot);
+        if (parent) free(parent);
+    } END_PROTECT;
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_SetDir
+ *
+ * Purpose:     Set the current working directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, February 10, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Nov  5 10:55:46 PST 2009
+ *   Added some 'hidden' logic to support view of contents of /.silo dir
+ *   from browser. Its 'hidden' because I have no intention of letting
+ *   users know about it.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_SetDir(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_SetDir";
+    hid_t       newdir = -1;
+    
+    PROTECT {
+        if ((newdir=H5Gopen(dbfile->cwg, name))<0 ||
+            (strcmp(name,"/.silo")!=0 &&
+            H5Gget_objinfo(newdir, "..", FALSE, NULL)<0)) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+
+        H5Gclose(dbfile->cwg);
+        dbfile->cwg = newdir;
+        if (dbfile->cwg_name) {
+            free(dbfile->cwg_name);
+            dbfile->cwg_name = !strcmp(name,"/.silo")?strdup("/.silo"):NULL;
+        }
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Gclose(newdir);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetDir
+ *
+ * Purpose:     Writes the absolute name of the current working directory
+ *              into the NAME argument without checking for overflow (if NAME
+ *              is not large enough then a core dump is likely).
+ *
+ *              The name is computed by following the `..' entries out of
+ *              each directory and then looking for the entry in the parent
+ *              that matches the object id of the current directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetDir(DBfile *_dbfile, char *name/*out*/)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_SetDir";
+    hid_t       cwg = -1, parent = -1;
+    H5G_stat_t  cur_sb, par_sb;
+    int         i, ncomps=0;
+    silo_hdf5_comp_t    comp[100];
+
+    /* Return quickly if name is cached */
+    if (dbfile->cwg_name) {
+        strcpy(name, dbfile->cwg_name);
+        return 0;
+    }
+    
+    PROTECT {
+        memset(comp, 0, sizeof comp);
+        cwg = H5Gopen(dbfile->cwg, ".");
+        if (H5Gget_objinfo(cwg, ".", TRUE, &cur_sb)<0) {
+            db_perror("stat(\".\")", E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        while ((size_t)ncomps<NELMTS(comp)) {
+            /*
+             * Get info about parent. If parent object ID is the same as
+             * current group object ID then we must be at the root.
+             */
+            if (H5Gget_objinfo(cwg, "..", TRUE, &par_sb)<0) {
+                db_perror("stat(\"..\")", E_CALLFAIL, me);
+                UNWIND();
+            }
+            if (cur_sb.objno[0]==par_sb.objno[0] &&
+                cur_sb.objno[1]==par_sb.objno[1]) break;
+
+            /*
+             * Iterate over entries in parent to find first name that has the
+             * same object ID as the current group and use that as the
+             * component of the name
+             */
+            if ((parent=H5Gopen(cwg, ".."))<0) {
+                db_perror("no `..' entry", E_NOTFOUND, me);
+                UNWIND();
+            }
+            comp[ncomps].objno[0] = cur_sb.objno[0];
+            comp[ncomps].objno[1] = cur_sb.objno[1];
+            if (H5Giterate(parent, ".", NULL, find_objno, comp+ncomps)<=0) {
+                db_perror("inconsistent directory structure", E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            /* Move upward in the directory try */
+            H5Gclose(cwg);
+            cwg = parent;
+            parent = -1;
+            cur_sb = par_sb;
+            ncomps++;
+        }
+
+        /* Build the name */
+        if (0==ncomps) {
+            strcpy(name, "/");
+        } else {
+            name[0] = '\0';
+            for (i=ncomps-1; i>=0; --i) {
+                strcat(name, "/");
+                strcat(name, comp[i].name);
+                free(comp[i].name);
+            }
+        }
+
+        /* Close everything */
+        H5Gclose(cwg);
+        if (parent>=0) H5Gclose(parent);
+
+        /* Cache the name for later */
+        if (dbfile->cwg_name)
+            free(dbfile->cwg_name);
+        dbfile->cwg_name = strdup(name);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Gclose(cwg);
+            H5Gclose(parent);
+        } H5E_END_TRY;
+        for (i=0; i<=ncomps && (size_t)i<NELMTS(comp); i++) {
+            if (comp->name) free(comp->name);
+        }
+    } END_PROTECT;
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    copy_dir 
+ *
+ * Purpose:     Support, recursive function, for CpDir using HDF5's
+ *              H5Giterate method.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller, Wed Aug  6 18:29:53 PDT 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+typedef struct copy_dir_data_t {
+    DBfile *dstFile;
+} copy_dir_data_t;
+
+static herr_t 
+copy_dir(hid_t grp, const char *name, void *op_data)
+{
+    static char         *me = "copy_dir";
+#if HDF5_VERSION_GE(1,8,0)
+    H5G_stat_t          sb;
+    hid_t               obj;
+    int                 objtype = -1;
+    copy_dir_data_t *cp_data = (copy_dir_data_t *)op_data;
+    DBfile_hdf5 *dstfile = (DBfile_hdf5*)cp_data->dstFile;
+
+    if (H5Gget_objinfo(grp, name, TRUE, &sb)<0) return -1;
+    switch (sb.type) {
+    case H5G_GROUP:
+        /*
+         * Any group which has a `..' entry is a silo directory. The `..'
+         * names do not appear in the silo table of contents.
+         */
+        if (!strcmp(name, "..") || (obj=H5Gopen(grp, name))<0) break;
+        H5E_BEGIN_TRY {
+            if (H5Gget_objinfo(obj, "..", FALSE, NULL)>=0) objtype = DB_DIR;
+        } H5E_END_TRY;
+        H5Gclose(obj);
+
+        if (objtype == DB_DIR)
+        {
+            db_hdf5_MkDir(cp_data->dstFile, (char*) name);
+            db_hdf5_SetDir(cp_data->dstFile, (char*) name);
+
+            /* recurse on the members of this group */
+            H5Giterate(grp, name, 0, copy_dir, op_data);
+
+            db_hdf5_SetDir(cp_data->dstFile, "..");
+        }
+
+        break;
+
+    case H5G_TYPE:
+    {
+        hid_t       o=-1, attr=-1, atype=-1, s1024=-1;
+        char        *file_value=NULL, *mem_value=NULL, *bkg=NULL;
+        DBObjectType objtype;
+        int         _objtype, nmembs, i;
+        DBobject    *obj=NULL;
+        size_t      asize, nelmts, msize;
+
+        /* Open the object as a named data type */
+        if ((o=H5Topen(grp, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+
+        /* Open the `silo_type' attribute and read it */
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        objtype = (DBObjectType)_objtype;
+        
+        /*
+         * Open the `silo' attribute (all silo objects have one), retrieve
+         * its data type (a single-level H5T_COMPOUND type), and read the
+         * attribute.
+         */
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            (atype=H5Aget_type(attr))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        asize = H5Tget_size(atype);
+        msize = MAX(asize, 3*1024);
+        if (NULL==(file_value=malloc(asize)) ||
+            NULL==(mem_value=malloc(msize)) ||
+            NULL==(bkg=malloc(msize))) {
+            db_perror(name, E_NOMEM, me);
+            UNWIND();
+        }
+        if (H5Aread(attr, atype, file_value)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        nmembs = H5Tget_nmembers(atype);
+
+        s1024 = H5Tcopy(H5T_C_S1);
+        H5Tset_size(s1024, 1024);
+        for (i=0; i<nmembs; i++) {
+            int ndims, j, memb_size[4];
+            hid_t member_type = db_hdf5_get_cmemb(atype, i, &ndims, memb_size);
+            
+            if (H5Tget_class(member_type) == H5T_STRING)
+            {
+                /* build up an in-memory rep that is akin to a struct
+                 * with just this one member */
+                char *memname = H5Tget_member_name(atype, i);
+                size_t offset = H5Tget_member_offset(atype, i);
+                hid_t mtype = H5Tcreate(H5T_COMPOUND, msize);
+                for (nelmts=1, j=0; j<ndims; j++) nelmts *= memb_size[j];
+                db_hdf5_put_cmemb(mtype, memname, 0, ndims, memb_size, s1024);
+
+                /* use hdf5's type conversion func to extract this one member's
+                   data into 'mem_value' */
+                memcpy(mem_value, file_value, H5Tget_size(atype));
+                H5Tconvert(atype, mtype, 1, mem_value, bkg, H5P_DEFAULT);
+
+                /* if its one of the special datasets, copy it and update
+                   the attribute to refer to the copy in the new file */
+                if (strncmp(mem_value, "/.silo/#", 8) == 0)
+                {
+                    /* get unique name for this dataset in dst file */
+                    char cname[8];
+                    db_hdf5_compname(dstfile, cname);
+
+                    /* copy this dataset to /.silo dir in dst file */
+                    H5Ocopy(grp, mem_value, dstfile->link, cname, H5P_DEFAULT, H5P_DEFAULT);
+
+                    /* update this attribute's entry with name for this dataset */
+                    sprintf(file_value+offset, "%s%s", LINKGRP, cname);
+                }
+
+                free(memname);
+                H5Tclose(mtype);
+            }
+
+            /* Release member resources */
+            H5Tclose(member_type);
+        }
+
+        /* write the header for this silo object */
+        db_hdf5_hdrwr(dstfile, (char *)name, atype, atype, file_value, objtype);
+
+        /* Cleanup */
+        H5Tclose(atype);
+        H5Tclose(s1024);
+        H5Aclose(attr);
+        H5Tclose(o);
+        free(file_value);
+        free(mem_value);
+        free(bkg);
+
+        break;
+    }
+
+    case H5G_DATASET:
+        H5Ocopy(grp, name, dstfile->cwg, name, H5P_DEFAULT, H5P_DEFAULT);
+        break;
+
+    default:
+        /*ignore*/
+        break;
+    }
+    return 0;
+#else
+    return db_perror("H5O API for copy", E_NOTENABLEDINBUILD);
+#endif
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_CpDir
+ *
+ * Purpose:     Copy a directory hierarchy from one file to another. 
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller, Wed Aug  6 18:29:53 PDT 2008
+ *
+ * Modifications:
+ *   Mark C. Miller, Thu Feb  4 20:02:53 PST 2010
+ *   Removed unused variable and function call referencing it.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_CpDir(DBfile *_dbfile, const char *srcDir,
+    DBfile *dstFile, const char *dstDir)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    DBfile_hdf5 *dstfile = (DBfile_hdf5*)dstFile;
+    static char *me = "db_hdf5_CpDir";
+    copy_dir_data_t cp_data;
+    char dstcwg[256], srccwg[256];
+
+    srccwg[0] = '\0';
+    dstcwg[0] = '\0';
+
+#if !HDF5_VERSION_GE(1,8,0)
+    db_perror("Requires HDF5-1.8 or later", E_CALLFAIL, me);
+    return -1;
+#endif
+
+    PROTECT {
+
+        /* Save current dirs for both src and dst files */
+        db_hdf5_GetDir(_dbfile, srccwg);
+        db_hdf5_GetDir(dstFile, dstcwg);
+
+        /* Next, make destination directory and cd into it */
+        db_hdf5_MkDir(dstFile, (char*)dstDir);
+        db_hdf5_SetDir(dstFile, (char*)dstDir);
+
+        /* Enter the recursion to make copy the directory */
+        cp_data.dstFile = dstFile;
+        H5Giterate(dbfile->cwg, srcDir, 0, copy_dir, &cp_data);
+
+        /* Restore current dirs for src and dst files */
+        db_hdf5_SetDir(_dbfile, srccwg);
+        db_hdf5_SetDir(dstFile, dstcwg);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            if (srccwg[0] != '\0')
+                db_hdf5_SetDir(_dbfile, srccwg);
+            if (dstcwg[0] != '\0')
+                db_hdf5_SetDir(dstFile, dstcwg);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_NewToc
+ *
+ * Purpose:     Destroy the previous table of contents and replace it with a
+ *              new table of contents for the current working directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_NewToc(DBfile *_dbfile)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    DBtoc       *toc=NULL;
+    
+    db_FreeToc(_dbfile);
+    dbfile->pub.toc = toc = db_AllocToc();
+
+    if (H5Giterate(dbfile->cwg, ".", NULL, load_toc, toc)<0) return -1;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetComponentType
+ *
+ * Purpose:     Return the data type of the component 
+ *
+ * Programmer:  Mark C. Miller
+ *              Wednesday, April 20, 2005
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetComponentType(DBfile *_dbfile, char *objname, char *compname)
+{
+    int datatype = DB_NOTYPE;
+    db_hdf5_GetComponentStuff(_dbfile, objname, compname, &datatype);
+    return datatype;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetComponent
+ *
+ * Purpose:     Reads the component COMPNAME of object OBJNAME, allocates
+ *              memory and copies the value into it to return.
+ *
+ * Warning:     The names of components in an object in an HDF5 file may not
+ *              be the same as the names of components in a PDB file.
+ *
+ * Programmer:  Mark C. Miller
+ *              Wednesday, April 20, 2005
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_hdf5_GetComponent(DBfile *_dbfile, char *objname, char *compname)
+{
+    return db_hdf5_GetComponentStuff(_dbfile, objname, compname, 0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetComponentStuff
+ *
+ * Purpose:     Reads the component COMPNAME of object OBJNAME, allocates
+ *              memory and copies the value into it to return.
+ *
+ * Warning:     The names of components in an object in an HDF5 file may not
+ *              be the same as the names of components in a PDB file.
+ *
+ * Return:      Success:        Pointer to allocated memory which contains
+ *                              the component value. Floating-point
+ *                              components are returned in either single or
+ *                              double precision according to the
+ *                              DBForceSingle() setting.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, August 17, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   This routine had assumed that any string-valued data member was
+ *   specifying the name of a dataset to read. That is not always true.
+ *   I modified it to attempt to read a dataset of the given name or
+ *   just return the string.
+ *
+ *   Mark C. Miller, Wed Apr 20 15:09:41 PDT 2005
+ *   Renamed from db_hdf5_GetComponent. Added just_get_dataype argument
+ *   and logic to just return data type when requested and avoid 
+ *   actual read of data
+ *
+ *   Mark C. Miller, Wed Jan 21 16:03:02 PST 2009
+ *   Added logic to deal with components that are vectors of tuples 
+ *   but where DBGetObject flattens these tuples into groups of related
+ *   scalars with digits appended to their names. This fixes a problem
+ *   in silex displaying these vector-based components.
+ *
+ *   Mark C. Miller, Tue Apr 28 15:57:43 PDT 2009
+ *   Added missing statement to set mnofname = 0 after free'ing it.
+ *
+ *   Mark C. Miller, Tue Oct  6 10:24:01 PDT 2009
+ *   Removed call to free(mnofname) and set it to zero. Added logic
+ *   to free it just prior to STRDUP'ing it.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_hdf5_GetComponentStuff(DBfile *_dbfile, char *objname, char *compname,
+    int *just_get_datatype)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetComponent";
+    hid_t       o=-1, attr=-1, atype=-1, ftype=-1, mtype=-1, dset=-1;
+    int         datatype, mno, n, ndims, i, dim[3], mult, complen, mnof=-1, mnofidx=-1;
+    char        *mnofname=0;
+    void        *retval=NULL;
+    
+    PROTECT {
+        /* Open the object as a named data type */
+        if ((o=H5Topen(dbfile->cwg, objname))<0) {
+            db_perror(objname, E_NOTFOUND, me);
+            UNWIND();
+        }
+
+        /*
+         * Open the `silo' attribute (all silo objects have one), and
+         * retrieve its data type (a single-level H5T_COMPOUND type).
+         */
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            (atype=H5Aget_type(attr))<0) {
+            db_perror(objname, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Scan through the compound type to find the requested component. */
+        n = H5Tget_nmembers(atype);
+        for (mno=0; mno<n; mno++) {
+            char *memb_name = H5Tget_member_name(atype, mno);
+            if (memb_name && !strcmp(memb_name, compname)) {
+                free(memb_name);
+                break;
+            }
+
+            /* If we didn't get a match but the last char is a digit, then
+               it might be a funky component named by adding a digit to an
+               existing component name by a preceding DBGetObject() call */ 
+            complen = strlen(compname);
+            while (57 >= compname[complen-1] && compname[complen-1] >= 48)
+                complen--;
+            if (57 >= compname[complen] && compname[complen] >= 48)
+            {
+                if (memb_name && !strncmp(memb_name, compname, complen))
+                {
+                    mnof = mno;
+                    mnofidx = strtol(&compname[complen], 0, 0) - 1;
+                    if (mnofname) free(mnofname);
+                    mnofname = STRDUP(memb_name);
+                }
+            }
+            if (memb_name) free(memb_name);
+        }
+        if (mno>=n) {
+            if (mnof == -1)
+            {
+                db_perror(compname, E_NOTFOUND, me);
+                UNWIND();
+            }
+            mno = mnof;
+        }
+
+        /* Get the datatype and multiplicity for the component */
+        if ((ftype=db_hdf5_get_cmemb(atype, mno, &ndims, dim))<0) {
+            db_perror(compname, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        if (H5T_STRING==H5Tget_class(ftype)) {
+
+            if (just_get_datatype == 0)
+            {
+                /*
+                 * A string is usually a pointer to some other dataset. So, try
+                 * read that dataset instead.
+                 */
+                char dataset_name[] =
+                    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+                /* Read the dataset name from the attribute */
+                if ((H5Tget_size(ftype)+1<sizeof dataset_name) &&
+                    (mtype=H5Tcreate(H5T_COMPOUND, H5Tget_size(ftype)))>=0 &&
+                    db_hdf5_put_cmemb(mtype, compname, 0, 0, NULL, ftype)>=0 && 
+                    H5Aread(attr, mtype, dataset_name)>=0) {
+                    if ((dset=H5Dopen(dbfile->cwg, dataset_name))>=0) {
+                        retval = db_hdf5_comprd(dbfile, dataset_name, 1);
+                        H5Dclose(dset);
+                    }
+                    else {
+                        retval = STRDUP(dataset_name);
+                    }
+                }
+            }
+            else
+            {
+                *just_get_datatype = DB_VARIABLE;
+            }
+        }
+        else
+        {
+            /* Read a single component of the compound attribute */
+            if ((datatype=hdf2silo_type(ftype))<0) {
+                db_perror(compname, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            if (just_get_datatype == 0)
+            {
+                for (i=0, mult=1; i<ndims; i++) mult *= dim[i];
+
+                /* Allocate the return value */
+                if (NULL==(retval=calloc(mult, db_GetMachDataSize(datatype)))) {
+                    db_perror(compname, E_CALLFAIL, me);
+                    UNWIND();
+                }
+
+                /* Build the hdf5 data type to read */
+                mtype = H5Tcreate(H5T_COMPOUND, mult * db_GetMachDataSize(datatype));
+                if (mnof != -1 && mnofidx != -1 && mnofname != 0)
+                    db_hdf5_put_cmemb(mtype, mnofname, 0, ndims, dim, hdf2hdf_type(ftype));
+                else
+                    db_hdf5_put_cmemb(mtype, compname, 0, ndims, dim, hdf2hdf_type(ftype));
+
+                /* Read the data into the output buffer */
+                if (H5Aread(attr, mtype, retval)<0) {
+                    db_perror(compname, E_CALLFAIL, me);
+                    UNWIND();
+                }
+
+                /* Handle the case where we got a match on member name modulo trailing
+                   digits (which really represent an index into the member) */
+                if (mnof != -1 && mnofidx != -1 && mnofname != 0)
+                {
+                    void *newretval;
+                    char *pretval = (char *) retval + mnofidx * db_GetMachDataSize(datatype);
+                    if (NULL==(newretval=calloc(1, db_GetMachDataSize(datatype)))) {
+                        db_perror(mnofname, E_CALLFAIL, me);
+                        UNWIND();
+                    }
+                    memcpy(newretval, pretval, db_GetMachDataSize(datatype));
+                    free(retval);
+                    retval = newretval;
+                }
+            }
+            else
+            {
+                *just_get_datatype = datatype;
+            }
+        }
+        
+        /* Release objects */
+        if (mnofname) free(mnofname);
+        H5Tclose(o);
+        H5Aclose(attr);
+        H5Tclose(atype);
+        H5Tclose(ftype);
+        H5Tclose(mtype);
+    } CLEANUP {
+        /* Release objects */
+        if (retval) {
+            free(retval);
+            retval = NULL;
+        }
+        if (mnofname) free(mnofname);
+        H5Tclose(o);
+        H5Aclose(attr);
+        H5Tclose(atype);
+        H5Tclose(ftype);
+        H5Tclose(mtype);
+    } END_PROTECT;
+
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetComponentNames
+ *
+ * Purpose:     Returns the component names for the specified object. The
+ *              COMP_NAMES and FILE_NAMES output arguments will point to
+ *              an array of pointers to names. Each name as well as the
+ *              two arrays will be allocated with `malloc'.  This is
+ *              essentially the same as DBGetObject().
+ *
+ * Return:      Success:        Number of components found for the
+ *                              specified object.
+ *
+ *              Failure:        zero
+ *
+ * Programmer:  Robb Matzke, 2001-02-06
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetComponentNames(DBfile *_dbfile, char *objname, char ***comp_names,
+                          char ***file_names)
+{
+    DBobject    *obj;
+    int         n;
+
+    if (NULL==(obj=db_hdf5_GetObject(_dbfile, objname))) return 0;
+    if (comp_names) {
+        *comp_names = obj->comp_names;
+    } else {
+        free(obj->comp_names);
+    }
+    if (file_names) {
+        *file_names = obj->pdb_names;
+    } else {
+        free(obj->pdb_names);
+    }
+    n = obj->ncomponents;
+    obj->ncomponents = 0;
+    DBFreeObject(obj);
+    return n;
+}
+    
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_WriteObject
+ *
+ * Purpose:     Write/overwrite a DBobject into the given file.
+
+ *
+ * Return:      Success:        Non-negative
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke, 2001-02-05
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   I made it support writing a DBZonelist object. I also fixed an
+ *   off-by-one error in indexing of string valued component names
+ *
+ *   Mark C. Miller, Wed Jan 13 14:21:50 PST 2010
+ *   Added condition of flags!=OVERWRITE before erroring on non-user
+ *   defined objects. A user could be using browser to OVERWRITE a
+ *   standard Silo object.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_WriteObject(DBfile *_dbfile,    /*File to write into */
+                    DBobject *obj,      /*Object description to write out */
+                    int flags)          /*1=>free associated memory */
+{
+    DBfile_hdf5         *dbfile=(DBfile_hdf5*)_dbfile;
+    static char         *me="db_hdf5_WriteObject";
+    size_t              msize=0, fsize=0, moffset=0, foffset=0;
+    unsigned char       *object=NULL;
+    hid_t               mtype=-1, ftype=-1;
+    int                 i;
+
+    PROTECT {
+        /* If flags is set then delete any existing object by the same
+         * name, ignoring failures. */
+        if (flags) {
+            H5E_BEGIN_TRY {
+                H5Gunlink(dbfile->cwg, obj->name);
+            } H5E_END_TRY;
+        }
+        
+        /* With the exception of a zonelist object, the HDF5 driver
+         * only handles user-defined objects. Otherwise,
+         * if the user were allowed to use DBMakeObject() to bybass the
+         * normal object creation functions, the user would need to know
+         * implementation details of the driver. Some of the silo
+         * confidence tests think they know implementation details when in
+         * fact they don't -- those tests will fail. */
+        if (!strcmp(obj->type, "zonelist")) {
+
+            /* make sure we recognize every component name in this object */
+            int recognizeComponent = 1;
+            for (i=0; (i<obj->ncomponents) && recognizeComponent; i++)
+            {
+                recognizeComponent = 0;
+                if ((strcmp(obj->comp_names[i], "ndims") == 0) ||
+                    (strcmp(obj->comp_names[i], "nzones") == 0) ||
+                    (strcmp(obj->comp_names[i], "nshapes") == 0) ||
+                    (strcmp(obj->comp_names[i], "lnodelist") == 0) ||
+                    (strcmp(obj->comp_names[i], "origin") == 0) ||
+                    (strcmp(obj->comp_names[i], "lo_offset") == 0) ||
+                    (strcmp(obj->comp_names[i], "hi_offset") == 0) ||
+                    (strcmp(obj->comp_names[i], "nodelist") == 0) ||
+                    (strcmp(obj->comp_names[i], "shapecnt") == 0) ||
+                    (strcmp(obj->comp_names[i], "shapesize") == 0) ||
+                    (strcmp(obj->comp_names[i], "shapetype") == 0) ||
+                    (strcmp(obj->comp_names[i], "gzoneno") == 0))
+                {
+                    recognizeComponent = 1;
+                }
+            }
+
+            if (!recognizeComponent)
+            {
+                char msg[256];
+                sprintf(msg, "Unrecognized component, \"%s\", in zonelist object",
+                    obj->comp_names[i]);
+                db_perror(msg, E_BADARGS, me);
+                UNWIND();
+            }
+
+        } else if (flags != OVER_WRITE && strcmp(obj->type, "unknown")) {
+            db_perror("DBobject is not type DB_USERDEF", E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* How much memory do we need? Align all components */
+        for (i=0, msize=fsize=0; i<obj->ncomponents; i++) {
+            if (!strncmp(obj->pdb_names[i], "'<i>", 4)) {
+                msize = ALIGN(msize, sizeof(int)) + sizeof(int);
+                fsize += H5Tget_size(dbfile->T_int);
+            } else if (!strncmp(obj->pdb_names[i], "'<f>", 4)) {
+                msize = ALIGN(msize, sizeof(float)) + sizeof(float);
+                fsize += H5Tget_size(dbfile->T_float);
+            } else if (!strncmp(obj->pdb_names[i], "'<d>", 4)) {
+                msize = ALIGN(msize, sizeof(double)) + sizeof(double);
+                fsize += H5Tget_size(dbfile->T_double);
+            } else if (!strncmp(obj->pdb_names[i], "'<s>", 4)) {
+                msize += strlen(obj->pdb_names[i]+4);
+                fsize += strlen(obj->pdb_names[i]+4);
+            } else if (obj->pdb_names[i][0]=='\'') {
+                /* variable has invalid name or we don't handle type */
+                db_perror(obj->pdb_names[i], E_INVALIDNAME, me);
+                UNWIND();
+            } else {
+                /* variable added by DBAddVarComponent() */
+                msize += strlen(obj->pdb_names[i]) + 1;
+                fsize += strlen(obj->pdb_names[i]) + 1;
+            }
+        }
+
+        /* Create the object and initialize it */
+        if (NULL==(object=calloc(1, msize))) {
+            db_perror(NULL, E_NOMEM, me);
+            UNWIND();
+        }
+        if ((mtype=H5Tcreate(H5T_COMPOUND, msize))<0 ||
+            (ftype=H5Tcreate(H5T_COMPOUND, fsize))<0) {
+            db_perror("H5Tcreate", E_CALLFAIL, me);
+            UNWIND();
+        }
+        for (i=0, moffset=foffset=0; i<obj->ncomponents; i++) {
+            if (!strncmp(obj->pdb_names[i], "'<i>", 4)) {
+                moffset = ALIGN(moffset, sizeof(int));
+                if (H5Tinsert(mtype, obj->comp_names[i], moffset,
+                              H5T_NATIVE_INT)<0 ||
+                    H5Tinsert(ftype, obj->comp_names[i], foffset,
+                              dbfile->T_int)<0) {
+                    db_perror("H5Tinsert", E_CALLFAIL, me);
+                    UNWIND();
+                }
+                *(int*)(object+moffset) = strtol(obj->pdb_names[i]+4, NULL, 0);
+                moffset += sizeof(int);
+                foffset += H5Tget_size(dbfile->T_int);
+            } else if (!strncmp(obj->pdb_names[i], "'<f>", 4)) {
+                moffset = ALIGN(moffset, sizeof(float));
+                if (H5Tinsert(mtype, obj->comp_names[i], moffset,
+                              H5T_NATIVE_FLOAT)<0 ||
+                    H5Tinsert(ftype, obj->comp_names[i], foffset,
+                              dbfile->T_float)<0) {
+                    db_perror("H5Tinsert", E_CALLFAIL, me);
+                    UNWIND();
+                }
+                *(float*)(object+moffset) = strtod(obj->pdb_names[i]+4, NULL);
+                moffset += sizeof(float);
+                foffset += H5Tget_size(dbfile->T_float);
+            } else if (!strncmp(obj->pdb_names[i], "'<d>", 4)) {
+                moffset = ALIGN(moffset, sizeof(double));
+                if (H5Tinsert(mtype, obj->comp_names[i], moffset,
+                              H5T_NATIVE_DOUBLE)<0 ||
+                    H5Tinsert(ftype, obj->comp_names[i], foffset,
+                              dbfile->T_double)<0) {
+                    db_perror("H5Tinsert", E_CALLFAIL, me);
+                    UNWIND();
+                }
+                *(double*)(object+moffset) = strtod(obj->pdb_names[i]+4, NULL);
+                moffset += sizeof(double);
+                foffset += H5Tget_size(dbfile->T_double);
+            } else if (!strncmp(obj->pdb_names[i], "'<s>", 4)) {
+                size_t len = strlen(obj->pdb_names[i]+4)-1;
+                hid_t str_type = H5Tcopy(H5T_C_S1);
+                H5Tset_size(str_type, len);
+                if (H5Tinsert(mtype, obj->comp_names[i], moffset,
+                              str_type)<0 ||
+                    H5Tinsert(ftype, obj->comp_names[i], foffset,
+                              str_type)<0) {
+                    db_perror("H5Tinsert", E_CALLFAIL, me);
+                    UNWIND();
+                }
+                H5Tclose(str_type);
+                strncpy((char*)(object+moffset), obj->pdb_names[i]+4, len);
+                object[moffset+len] = '\0'; /*overwrite quote*/
+                moffset += len;
+                foffset += len;
+            } else {
+                size_t len = strlen(obj->pdb_names[i])+1;
+                hid_t str_type = H5Tcopy(H5T_C_S1);
+                H5Tset_size(str_type, len);
+                if (H5Tinsert(mtype, obj->comp_names[i], moffset,
+                              str_type)<0 ||
+                    H5Tinsert(ftype, obj->comp_names[i], foffset,
+                              str_type)<0) {
+                    db_perror("H5Tinsert", E_CALLFAIL, me);
+                    UNWIND();
+                }
+                H5Tclose(str_type);
+                strcpy((char*)(object+moffset), obj->pdb_names[i]);
+                moffset += len;
+                foffset += len;
+            }
+        }
+
+        if (db_hdf5_hdrwr(dbfile, obj->name, mtype, ftype, object,
+                          (DBObjectType) DBGetObjtypeTag(obj->type))<0) {
+            UNWIND();
+        }
+        H5Tclose(mtype);
+        H5Tclose(ftype);
+        if (object) free(object);
+    } CLEANUP {
+        H5Tclose(mtype);
+        H5Tclose(ftype);
+        if (object) free(object);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_WriteComponent
+ *
+ * Purpose:     Add a variable component to the given object structure and
+ *              write out the associated data.
+ *
+ * Return:      Success:        non-negative
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke, 2001-02-06
+ *
+ * Modifications:
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_WriteComponent(DBfile *_dbfile, DBobject *obj, char *compname,
+                       char *prefix, char *dataname, const void *data,
+                       int rank, long _size[])
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    int         size[32], i;
+    char        varname[256];
+    int         datatype = db_GetDatatypeID(dataname);
+    
+    for (i=0; i<rank; i++) size[i] = _size[i];
+    db_hdf5_compwr(dbfile, datatype, rank, size, (void*)data, varname,
+        friendly_name(obj->name, varname, 0));
+    DBAddVarComponent(obj, compname, varname);
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_InqVarExists
+ *
+ * Purpose:     Check whether the variable VARNAME exists.
+ *
+ * Return:      Success:        positive if exists, zero otherwise.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   I made it return true or false based on existence of named entity
+ *   only and not that the entity also be a dataset.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_InqVarExists (DBfile *_dbfile, char *varname)
+{
+   DBfile_hdf5  *dbfile = (DBfile_hdf5*)_dbfile;
+   herr_t       status;
+   H5G_stat_t   sb;
+
+   /* Check existence */
+   H5E_BEGIN_TRY {
+       status = H5Gget_objinfo(dbfile->cwg, varname, TRUE, &sb);
+   } H5E_END_TRY;
+   if (status<0)
+       return FALSE;
+   else
+       return TRUE;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetVarLength
+ *
+ * Purpose:     Returns the number of elements in the specified variable.
+ *
+ * Return:      Success:        Number of elements
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetVarLength(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetVarLength";
+    hid_t       dset=-1, space=-1;
+    hsize_t     nelmts=-1;
+
+    PROTECT {
+        if ((dset=H5Dopen(dbfile->cwg, name))>=0) {
+            if ((space=H5Dget_space(dset))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            nelmts = H5Sget_simple_extent_npoints(space);
+            H5Dclose(dset);
+            H5Sclose(space);
+        }
+        else
+        {
+            if (!db_hdf5_get_comp_var(dbfile->cwg, name, &nelmts,
+                 NULL, NULL, NULL)) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(dset);
+            H5Sclose(space);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return nelmts;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetVarByteLength
+ *
+ * Purpose:     Returns the number of bytes needed to store the entire
+ *              variable in memory.
+ *
+ * Return:      Success:        Number of bytes
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, March 17, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetVarByteLength(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetVarByteLength";
+    hid_t       dset=-1, ftype=-1, mtype=-1, space=-1;
+    hsize_t     nbytes_big;
+    int         nbytes_small=-1;
+
+    PROTECT {
+        /* Open the dataset */
+        if ((dset=H5Dopen(dbfile->cwg, name))>=0) {
+        
+            /* Get data type and space */
+            if ((ftype=H5Dget_type(dset))<0 ||
+                (mtype=hdf2hdf_type(ftype))<0 ||
+                (space=H5Dget_space(dset))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            /* Get total size in bytes and check for overflow */
+            nbytes_big = H5Sget_simple_extent_npoints(space) * H5Tget_size(mtype);
+            nbytes_small = (int)nbytes_big;
+            if (nbytes_big!=(hsize_t)nbytes_small) {
+                db_perror("overflow", E_INTERNAL, me);
+                UNWIND();
+            }
+
+            /* Release resources */
+            H5Tclose(ftype);
+            H5Sclose(space);
+            H5Dclose(dset);
+        }
+        else
+        {
+            hsize_t nelmts;
+            size_t elsize;
+            if (!db_hdf5_get_comp_var(dbfile->cwg, name, &nelmts,
+                 &elsize, NULL, NULL)) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            nbytes_small = (int)(nelmts * elsize);
+        }
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Tclose(ftype);
+            H5Sclose(space);
+            H5Dclose(dset);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return nbytes_small;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetVarType
+ *
+ * Purpose:     Query the data type of the variable.
+ *
+ * Return:      Success:        One of the DB_* constants that describes data
+ *                              type. The type is chosen to be at least as
+ *                              large as the type in the file, but using
+ *                              DB_LONG in cases where there is no native
+ *                              type which is large enough.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Sunday, February 14, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   I made it return -1 if name or *name is null.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetVarType(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetVarType";
+    hid_t       dset=-1, ftype=-1;
+    int         silo_type=-1;
+
+    if ((name == 0) || (*name == 0))
+        return -1;
+
+    PROTECT {
+        if ((dset=H5Dopen(dbfile->cwg, name))>=0) {
+            if ((ftype=H5Dget_type(dset))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            silo_type = hdf2silo_type(ftype);
+            H5Dclose(dset);
+            H5Tclose(ftype);
+        }
+        else
+        {
+            if (!db_hdf5_get_comp_var(dbfile->cwg, name, NULL,
+                 NULL, &ftype, NULL)) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            silo_type = hdf2silo_type(ftype);
+        }
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(dset);
+            H5Tclose(ftype);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return silo_type;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetVarDims
+ *
+ * Purpose:     Obtains the size of the dimensions of some variable.
+ *
+ * Return:      Success:        Number of dimensions. At most MAXDIMS values
+ *                              are copied into the DIMS argument.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, February 15, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_GetVarDims(DBfile *_dbfile, char *name, int maxdims, int *dims/*out*/)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetVarDims";
+    hid_t       dset=-1, space=-1;
+    hsize_t     ds_size[H5S_MAX_RANK];
+    int         i, ndims=-1;
+    
+    PROTECT {
+        if ((dset=H5Dopen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((space=H5Dget_space(dset))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if ((ndims=H5Sget_simple_extent_dims(space, ds_size, NULL))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        for (i=0; i<maxdims; i++) dims[i] = ds_size[i];
+        H5Sclose(space);
+        H5Dclose(dset);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Sclose(space);
+            H5Dclose(dset);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return ndims;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetVar
+ *
+ * Purpose:     Same as db_hdf5_ReadVar except it allocates space for the
+ *              result.
+ *
+ * Return:      Success:        Ptr to data read, allocated with malloc()
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb 15 14:53:29 PST 2005
+ *   Forced it to ignore force_single setting 
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_hdf5_GetVar(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetVar";
+    hid_t       dset=-1, ftype=-1, mtype=-1, space=-1;
+    void        *result=NULL;
+
+    PROTECT {
+
+        /* Get dataset, type, and space */
+        if ((dset=H5Dopen(dbfile->cwg, name))>=0) {
+            if ((ftype=H5Dget_type(dset))<0 ||
+                (space=H5Dget_space(dset))<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            /* Choose a memory type based on the file type */
+            if ((mtype=hdf2hdf_type(ftype))<0) {
+                db_perror("data type", E_BADARGS, me);
+                UNWIND();
+            }
+        
+            /* Allocate space for the result */
+            if (NULL==(result=malloc(H5Sget_simple_extent_npoints(space)*
+                                     H5Tget_size(mtype)))) {
+                db_perror(NULL, E_NOMEM, me);
+                UNWIND();
+            }
+
+            P_rdprops = H5P_DEFAULT;
+            if (!SILO_Globals.enableChecksums)
+                P_rdprops = P_ckrdprops;
+
+            /* Read entire variable */
+            if (H5Dread(dset, mtype, H5S_ALL, H5S_ALL, P_rdprops, result)<0) {
+                hdf5_to_silo_error(name, me);
+                UNWIND();
+            }
+
+            /* Close everything */
+            H5Dclose(dset);
+            H5Tclose(ftype);
+            H5Sclose(space);
+        }
+        else
+        {
+            if (!db_hdf5_get_comp_var(dbfile->cwg, name, NULL,
+                 NULL, NULL, &result)) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Dclose(dset);
+            H5Tclose(ftype);
+            H5Sclose(space);
+        } H5E_END_TRY;
+        if (result) free(result);
+    } END_PROTECT;
+
+    return result;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_ReadVar
+ *
+ * Purpose:     Reads a variable into the given space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb 15 14:53:29 PST 2005
+ *   Forced it to ignore force_single setting 
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_ReadVar(DBfile *_dbfile, char *vname, void *result)
+{
+   DBfile_hdf5  *dbfile = (DBfile_hdf5*)_dbfile;
+   static char  *me = "db_hdf5_ReadVar";
+   hid_t        dset=-1, mtype=-1, ftype=-1;
+
+   PROTECT {
+
+       /* Get dataset and data type */
+       if ((dset=H5Dopen(dbfile->cwg, vname))>=0) {
+           if ((ftype=H5Dget_type(dset))<0) {
+               db_perror(vname, E_CALLFAIL, me);
+               UNWIND();
+           }
+
+           /* Memory data type is based on file data type */
+           if ((mtype=hdf2hdf_type(ftype))<0) {
+               db_perror("data type", E_BADARGS, me);
+               UNWIND();
+           }
+
+           P_rdprops = H5P_DEFAULT;
+           if (!SILO_Globals.enableChecksums)
+               P_rdprops = P_ckrdprops;
+
+           /* Read entire variable */
+           if (H5Dread(dset, mtype, H5S_ALL, H5S_ALL, P_rdprops, result)<0) {
+               hdf5_to_silo_error(vname, me);
+               UNWIND();
+           }
+
+           /* Close everything */
+           H5Dclose(dset);
+           H5Tclose(ftype);
+        }
+        else
+        {
+            if (!db_hdf5_get_comp_var(dbfile->cwg, vname, NULL,
+                 NULL, NULL, &result)) {
+                db_perror(vname, E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+
+   } CLEANUP {
+       H5E_BEGIN_TRY {
+           H5Dclose(dset);
+           H5Tclose(ftype);
+       } H5E_END_TRY;
+   } END_PROTECT;
+   
+   return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_ReadVarSlice
+ *
+ * Purpose:     Reads a slice of a variable into the given memory. The slice
+ *              is described with a multi-dimensional offset, length, and
+ *              stride and is translated into an HDF5 hyperslab selection.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_ReadVarSlice(DBfile *_dbfile, char *vname, int *offset, int *length,
+                     int *stride, int ndims, void *result)
+{
+   DBfile_hdf5  *dbfile = (DBfile_hdf5*)_dbfile;
+   static char  *me = "db_hdf5_ReadVarSlice";
+   hid_t        dset=-1, ftype=-1, mtype=-1, mspace=-1, fspace=-1;
+   hsize_t      mem_size[H5S_MAX_RANK];
+
+   PROTECT {
+       /* Get dataset and data type */
+       if ((dset=H5Dopen(dbfile->cwg, vname))<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+       if ((ftype=H5Dget_type(dset))<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       /* Memory data type is based on file data type */
+       if ((mtype=hdf2hdf_type(ftype))<0) {
+           db_perror("data type", E_BADARGS, me);
+           UNWIND();
+       }
+
+       /* Build file selection */
+       if ((fspace=build_fspace(dset, ndims, offset, length, stride,
+                                mem_size))<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+       
+       /* Build the memory space */
+       if ((mspace=H5Screate_simple(ndims, mem_size, NULL))<0) {
+           db_perror("memory data space", E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       P_rdprops = H5P_DEFAULT;
+       if (!SILO_Globals.enableChecksums)
+           P_rdprops = P_ckrdprops;
+
+       /* Read the data */
+       if (H5Dread(dset, mtype, mspace, fspace, P_rdprops, result)<0) {
+           hdf5_to_silo_error(vname, me);
+           UNWIND();
+       }
+   
+       /* Close everything */
+       H5Dclose(dset);
+       H5Tclose(ftype);
+       H5Sclose(fspace);
+       H5Sclose(mspace);
+       
+   } CLEANUP {
+       H5E_BEGIN_TRY {
+           H5Dclose(dset);
+           H5Tclose(ftype);
+           H5Sclose(fspace);
+           H5Sclose(mspace);
+       } H5E_END_TRY;
+   } END_PROTECT;
+   
+   return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_Write
+ *
+ * Purpose:     Writes a single variable into a file. The variable may
+ *              already exist, in which case the NDIMS and DIMS must match
+ *              what has already been defined.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_Write(DBfile *_dbfile, char *vname, void *var,
+              int *dims, int ndims, int datatype)
+{
+   DBfile_hdf5  *dbfile = (DBfile_hdf5*)_dbfile;
+   static char  *me = "db_hdf5_Write";
+   hid_t        mtype=-1, ftype=-1, space=-1, dset=-1, dset_type=-1;
+   hsize_t      ds_size[H5S_MAX_RANK];
+   H5T_class_t  fclass, mclass;
+   int          i;
+
+   PROTECT {
+       /* Create the memory and file data type */
+       if ((mtype=silom2hdfm_type(datatype))<0 ||
+           (ftype=silof2hdff_type(dbfile, datatype))<0) {
+           db_perror("datatype", E_BADARGS, me);
+           UNWIND();
+       }
+
+       /*
+        * If the dataset already exists then make sure that the supplied
+        * NDIMS and DIMS match what's already defined; otherwise create a new
+        * dataset.
+        */
+       H5E_BEGIN_TRY {
+           dset = H5Dopen(dbfile->cwg, vname);
+       } H5E_END_TRY;
+       if (dset>=0) {
+           space = H5Dget_space(dset);
+           if (ndims!=H5Sget_simple_extent_ndims(space)) {
+               db_perror("ndims", E_BADARGS, me);
+               UNWIND();
+           }
+           H5Sget_simple_extent_dims(space, ds_size, NULL);
+           for (i=0; i<ndims; i++) {
+               if (ds_size[i]!=(hsize_t)dims[i]) {
+                   db_perror("dims", E_BADARGS, me);
+                   UNWIND();
+               }
+           }
+       } else {
+           /* Create memory and file data space (both identical) */
+           for (i=0; i<ndims; i++) ds_size[i] = dims[i];
+           if ((space=H5Screate_simple(ndims, ds_size, NULL))<0) {
+               db_perror("data space", E_CALLFAIL, me);
+               UNWIND();
+           }
+
+           if (db_hdf5_set_properties(ndims, ds_size) < 0 ) {
+               db_perror("db_hdf5_set_properties", E_CALLFAIL, me);
+               UNWIND();
+           }
+
+           /* Create dataset if it doesn't already exist */
+           if ((dset=H5Dcreate(dbfile->cwg, vname, ftype, space,
+                               P_crprops))<0) {
+               db_perror(vname, E_CALLFAIL, me);
+               UNWIND();
+           }
+       }
+       
+#if HDF5_VERSION_GE(1,8,0)
+       /* Do an additional explicit check for compatibile data types.
+          This was NOT necessary prior to 1.8. But, 1.8 now permits
+          writes of int data to float dataset, for example. */
+       if ((dset_type = H5Dget_type(dset))<0 ||
+           (fclass = H5Tget_class(dset_type))<0 ||
+           (mclass = H5Tget_class(mtype))<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+       if (mclass != fclass) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+       H5Tclose(dset_type);
+#endif
+
+       /* Write data */
+       if (H5Dwrite(dset, mtype, space, space, H5P_DEFAULT, var)<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       /* Close everything */
+       H5Dclose(dset);
+       H5Sclose(space);
+   } CLEANUP {
+       H5E_BEGIN_TRY {
+           H5Dclose(dset);
+           H5Sclose(space);
+           H5Tclose(dset_type);
+       } H5E_END_TRY;
+   } END_PROTECT;
+   
+   return 0;
+}
+
+

+/*------------------------------------------------------------------------- 
+ * Function:    db_hdf5_WriteSlice
+ *
+ * Purpose:     Similar to db_hdf5_ReadVarSlice() except it writes data
+ *              instead.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_WriteSlice(DBfile *_dbfile, char *vname, void *values, int dtype,
+                   int offset[], int length[], int stride[], int dims[],
+                   int ndims)
+{
+   DBfile_hdf5  *dbfile = (DBfile_hdf5*)_dbfile ;
+   static char  *me = "db_hdf5_WriteSlice" ;
+   hid_t        mtype=-1, ftype=-1, fspace=-1, mspace=-1, dset=-1;
+   hsize_t      ds_size[H5S_MAX_RANK];
+   int          i;
+
+   PROTECT {
+       if ((mtype=silom2hdfm_type(dtype))<0 ||
+           (ftype=silof2hdff_type(dbfile, dtype))<0) {
+           db_perror("datatype", E_BADARGS, me);
+           UNWIND();
+       }
+       
+       /*
+        * If the dataset already exists then make sure that the supplied
+        * NDIMS and DIMS match what's already defined. Otherwise create the
+        * dataset.
+        */
+       H5E_BEGIN_TRY {
+           dset = H5Dopen(dbfile->cwg, vname);
+       } H5E_END_TRY;
+       if (dset>=0) {
+           fspace = H5Dget_space(dset);
+           if (ndims!=H5Sget_simple_extent_ndims(fspace)) {
+               db_perror("ndims", E_BADARGS, me);
+               UNWIND();
+           }
+           H5Sget_simple_extent_dims(fspace, ds_size, NULL);
+           for (i=0; i<ndims; i++) {
+               if (ds_size[i]!=(hsize_t)dims[i]) {
+                   db_perror("dims", E_BADARGS, me);
+                   UNWIND();
+               }
+           }
+           H5Sclose(fspace);
+       } else {
+           for (i=0; i<ndims; i++) ds_size[i] = dims[i];
+           if ((fspace=H5Screate_simple(ndims, ds_size, NULL))<0) {
+               db_perror("data space", E_CALLFAIL, me);
+               UNWIND();
+           }
+
+           if (db_hdf5_set_properties(ndims, ds_size) < 0 ) {
+               db_perror("db_hdf5_set_properties", E_CALLFAIL, me);
+               UNWIND();
+           }
+
+           if ((dset=H5Dcreate(dbfile->cwg, vname, ftype, fspace,
+                               P_crprops))<0) {
+               db_perror(vname, E_CALLFAIL, me);
+               UNWIND();
+           }
+           H5Sclose(fspace);
+       }
+
+       /*
+        * Verify that offset and length are compatible with the supplied
+        * dimensions.
+        */
+       for (i=0; i<ndims; i++) {
+           if (offset[i]<0 || offset[i]>=dims[i]) {
+               db_perror("offset", E_BADARGS, me);
+               UNWIND();
+           }
+           if (length[i]<=0 || length[i]>dims[i]) {
+               db_perror("length", E_BADARGS, me);
+               UNWIND();
+           }
+           if (offset[i]+length[i]>dims[i]) {
+               db_perror("offset+length", E_BADARGS, me);
+               UNWIND();
+           }
+       }
+       
+       /* Build the file space selection */
+       if ((fspace=build_fspace(dset, ndims, offset, length, stride,
+                                ds_size/*out*/))<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       /* Build the memory data space */
+       if ((mspace=H5Screate_simple(ndims, ds_size, NULL))<0) {
+           db_perror("memory data space", E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       /* Write data */
+       if (H5Dwrite(dset, mtype, mspace, fspace, H5P_DEFAULT, values)<0) {
+           db_perror(vname, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       /* Close everything */
+       H5Dclose(dset);
+       H5Sclose(fspace);
+       H5Sclose(mspace);
+   } CLEANUP {
+       H5E_BEGIN_TRY {
+           H5Dclose(dset);
+           H5Sclose(fspace);
+           H5Sclose(mspace);
+       } H5E_END_TRY;
+   } END_PROTECT;
+   
+   return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetObject
+ *
+ * Purpose:     Reads information about a silo object.
+ *
+ * Return:      Success:        Ptr to new object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   I removed the seen_datatype functionality
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBobject *
+db_hdf5_GetObject(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_GetObject";
+    hid_t       o=-1, attr=-1, atype=-1, s1024=-1;
+    char        *file_value=NULL, *mem_value=NULL, *bkg=NULL, bigname[1024];
+    DBObjectType objtype;
+    int         _objtype, nmembs, i, j, memb_size[4];
+    DBobject    *obj=NULL;
+    size_t      asize, nelmts, msize;
+
+    PROTECT {
+        /* Open the object as a named data type */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+
+        /* Open the `silo_type' attribute and read it */
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        objtype = (DBObjectType)_objtype;
+        
+        /*
+         * Open the `silo' attribute (all silo objects have one), retrieve
+         * its data type (a single-level H5T_COMPOUND type), and read the
+         * attribute.
+         */
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            (atype=H5Aget_type(attr))<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        asize = H5Tget_size(atype);
+        msize = MAX(asize, 3*1024);
+        if (NULL==(file_value=malloc(asize)) ||
+            NULL==(mem_value=malloc(msize)) ||
+            NULL==(bkg=malloc(msize))) {
+            db_perror(name, E_NOMEM, me);
+            UNWIND();
+        }
+        if (H5Aread(attr, atype, file_value)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        nmembs = H5Tget_nmembers(atype);
+
+        /* Create the empty DBobject */
+        if (NULL==(obj=DBMakeObject(name, objtype, 3*nmembs))) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Add members to the DBobject */
+        s1024 = H5Tcopy(H5T_C_S1);
+        H5Tset_size(s1024, 1024);
+        for (i=0; i<nmembs; i++) {
+            int ndims;
+            hid_t member_type = db_hdf5_get_cmemb(atype, i, &ndims, memb_size);
+            char *name = H5Tget_member_name(atype, i);
+            hid_t mtype = H5Tcreate(H5T_COMPOUND, msize);
+            for (nelmts=1, j=0; j<ndims; j++) nelmts *= memb_size[j];
+            
+            switch (H5Tget_class(member_type)) {
+            case H5T_INTEGER:
+                db_hdf5_put_cmemb(mtype, name, 0, ndims, memb_size,
+                                  H5T_NATIVE_INT);
+                memcpy(mem_value, file_value, H5Tget_size(atype));
+                H5Tconvert(atype, mtype, 1, mem_value, bkg, H5P_DEFAULT);
+                if (1==nelmts) {
+                    DBAddIntComponent(obj, name, *((int*)mem_value));
+                } else {
+                    for (j=0; (size_t)j<nelmts; j++) {
+                        sprintf(bigname, "%s%d", name, j+1);
+                        DBAddIntComponent(obj, bigname, ((int*)mem_value)[j]);
+                    }
+                }
+                break;
+
+            case H5T_FLOAT:
+                db_hdf5_put_cmemb(mtype, name, 0, ndims, memb_size,
+                                  H5T_NATIVE_DOUBLE);
+                memcpy(mem_value, file_value, H5Tget_size(atype));
+                H5Tconvert(atype, mtype, 1, mem_value, bkg, H5P_DEFAULT);
+                if (1==nelmts) {
+                    DBAddFltComponent(obj, name, *((double*)mem_value));
+                } else {
+                    for (j=0; (size_t)j<nelmts; j++) {
+                        sprintf(bigname, "%s%d", name, j+1);
+                        DBAddFltComponent(obj, bigname,
+                                          ((double*)mem_value)[j]);
+                    }
+                }
+                break;
+
+            case H5T_STRING:
+                db_hdf5_put_cmemb(mtype, name, 0, ndims, memb_size, s1024);
+                memcpy(mem_value, file_value, H5Tget_size(atype));
+                H5Tconvert(atype, mtype, 1, mem_value, bkg, H5P_DEFAULT);
+                if (1==nelmts) {
+                    DBAddStrComponent(obj, name, mem_value);
+                } else {
+                    for (j=0; (size_t)j<nelmts; j++) {
+                        sprintf(bigname, "%s%d", name, j+1);
+                        DBAddStrComponent(obj, bigname,
+                                          mem_value+j*1024);
+                    }
+                }
+                break;
+
+            default:
+                /* Silo doesn't handle other types */
+                break;
+            }
+
+            /* Release member resources */
+            free(name);
+            H5Tclose(mtype);
+            H5Tclose(member_type);
+        }
+
+        /* Cleanup */
+        H5Tclose(atype);
+        H5Tclose(s1024);
+        H5Aclose(attr);
+        H5Tclose(o);
+        free(file_value);
+        free(mem_value);
+        free(bkg);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Tclose(atype);
+            H5Tclose(s1024);
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        if (file_value) free(file_value);
+        if (mem_value) free(mem_value);
+        if (bkg) free(bkg);
+    } END_PROTECT;
+
+    return obj;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutCurve
+ *
+ * Purpose:     Put a curve object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_errno set
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *  Thomas R. Treadway, Fri Jul  7 12:44:38 PDT 2006
+ *  Added support for DBOPT_REFERENCE in Curves
+ *
+ *  Mark C. Miller, Mon Jul 31 17:57:29 PDT 2006
+ *  Eliminated use of db_hdf5_fullname for xvarname and yvarname
+ *
+ *  Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *  Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutCurve(DBfile *_dbfile, char *name, void *xvals, void *yvals,
+                 int dtype, int npts, DBoptlist *opts)
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_PutCurve";
+    DBcurve_mt  m;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Check datatype */
+        if (DB_FLOAT!=dtype && DB_DOUBLE!=dtype) {
+            db_perror("invalid floating-point datatype", E_BADARGS, me);
+            UNWIND();
+        }
+        
+        /* Reset global curve options */
+        memset(&_cu, 0, sizeof _cu);
+        if (0!=db_ProcessOptlist(DB_CURVE, opts)) {
+            db_perror("bad options", E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        if (_cu._reference && (xvals || yvals)) {
+            db_perror("xvals and yvals can not be defined with DBOPT_REFERENCE",
+                      E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* Write X and Y arrays if supplied */
+        if (_cu._varname[0]) {
+            if (db_hdf5_fullname(dbfile, _cu._varname[0],
+                                 m.xvarname/*out*/)<0) {
+                db_perror(_cu._varname[0], E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+        if (xvals) {
+            db_hdf5_compwr(dbfile, dtype, 1, &npts, xvals, m.xvarname/*out*/,
+                friendly_name(name, "_xvals", 0));
+        } else if (!_cu._varname[0] && !_cu._reference) {
+            db_perror("one of xvals or xvarname must be specified",
+                      E_BADARGS, me);
+            UNWIND();
+        }
+
+        if (_cu._varname[1]) {
+            if (db_hdf5_fullname(dbfile, _cu._varname[1],
+                                 m.yvarname/*out*/)<0) {
+                db_perror(_cu._varname[1], E_CALLFAIL, me);
+                UNWIND();
+            }
+        }
+        if (yvals) {
+            db_hdf5_compwr(dbfile, dtype, 1, &npts, yvals, m.yvarname/*out*/,
+                friendly_name(name, "_yvals", 0));
+        } else if (!_cu._varname[1] && !_cu._reference) {
+            db_perror("one of yvals or yvarname must be specified",
+                      E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* Build the curve header in memory */
+        m.npts = npts;
+        m.guihide = _cu._guihide;
+        strcpy(m.label, OPT(_cu._label));
+        strcpy(m.xlabel, OPT(_cu._labels[0]));
+        strcpy(m.ylabel, OPT(_cu._labels[1]));
+        strcpy(m.xunits, OPT(_cu._units[0]));
+        strcpy(m.yunits, OPT(_cu._units[1]));
+        strcpy(m.reference, OPT(_cu._reference));
+
+        /* Write curve header to file */
+        STRUCT(DBcurve) {
+            if (m.npts) MEMBER_S(int, npts);
+            if (m.guihide) MEMBER_S(int, guihide);
+            MEMBER_S(str(_cu._label), label);
+            MEMBER_S(str(m.xvarname), xvarname);
+            MEMBER_S(str(m.yvarname), yvarname);
+            MEMBER_S(str(_cu._labels[0]), xlabel);
+            MEMBER_S(str(_cu._labels[1]), ylabel);
+            MEMBER_S(str(_cu._units[0]), xunits);
+            MEMBER_S(str(_cu._units[1]), yunits);
+            MEMBER_S(str(_cu._reference), reference);
+        } OUTPUT(dbfile, DB_CURVE, name, &m);
+
+    } CLEANUP {
+        /*void*/;
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetCurve
+ *
+ * Purpose:     Read a curve object from a PDB data file.
+ *
+ * Return:      Success:        Pointer to new curve object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, March 25, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set datatype correctly. Added support for dataReadMask
+ *
+ *  Thomas R. Treadway, Fri Jul  7 12:44:38 PDT 2006
+ *  Added support for DBOPT_REFERENCE in Curves
+ *
+ *   Mark C. Miller, Thu Sep  7 10:50:55 PDT 2006
+ *   Added use of db_hdf5_resolvename for retrieval of x-data object
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBcurve *
+db_hdf5_GetCurve(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetCurve";
+    DBcurve             *cu = NULL;
+    DBcurve_mt          m;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+
+    PROTECT {
+        /* Open object and make sure it's a curve */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_CURVE!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read the curve data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBcurve_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a curve object and initialize meta data */
+        if (NULL==(cu=DBAllocCurve())) return NULL;
+        cu->npts = m.npts;
+        cu->guihide = m.guihide;
+        if ((cu->datatype = db_hdf5_GetVarType(_dbfile, 
+                                db_hdf5_resolvename(_dbfile, name, m.xvarname))) < 0)
+            cu->datatype = DB_FLOAT;
+        if (force_single_g) cu->datatype = DB_FLOAT;
+        cu->title = OPTDUP(m.label);
+        cu->xvarname = OPTDUP(m.xvarname);
+        cu->yvarname = OPTDUP(m.yvarname);
+        cu->xlabel = OPTDUP(m.xlabel);
+        cu->ylabel = OPTDUP(m.ylabel);
+        cu->xunits = OPTDUP(m.xunits);
+        cu->yunits = OPTDUP(m.yunits);
+        cu->reference = OPTDUP(m.reference);
+        
+        /* Read X and Y data */
+        if (SILO_Globals.dataReadMask & DBCurveArrays)
+        {
+            if (cu->reference) {
+                cu->x = NULL;
+                cu->y = NULL;
+            } else {
+                cu->x = db_hdf5_comprd(dbfile, m.xvarname, 0);
+                cu->y = db_hdf5_comprd(dbfile, m.yvarname, 0);
+            }
+        }
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeCurve(cu);
+    } END_PROTECT;
+
+    return cu;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutCsgmesh
+ *
+ * Purpose:     Writes a Csgmesh to the silo file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Tuesday, September 6, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Jul 31 17:57:29 PDT 2006
+ *   Eliminated use of db_hdf5_fullname for zonel_name
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutCsgmesh(DBfile *_dbfile, const char *name, int ndims,
+                   int nbounds, const int *typeflags, const int *bndids,
+                   const void *coeffs, int lcoeffs, int datatype,
+                   const double *extents, const char *zonel_name,
+                   DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutCsgmesh";
+    int                 i;
+    DBcsgmesh_mt        m;
+
+    memset(&m, 0, sizeof m); 
+    
+    PROTECT {
+
+        /* Set global options */
+        db_ResetGlobalData_Csgmesh();
+        if (db_ProcessOptlist(DB_CSGMESH, optlist)<0) {
+            db_perror("bad options", E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _csgm._time_set, _csgm._time,
+            _csgm._dtime_set, _csgm._dtime, _csgm._cycle);
+
+        m.min_extents[0] = extents[0];
+        m.min_extents[1] = extents[1];
+        m.min_extents[2] = extents[2];
+        m.max_extents[0] = extents[3];
+        m.max_extents[1] = extents[4];
+        m.max_extents[2] = extents[5];
+
+        db_hdf5_compwr(dbfile,DB_INT,1,&nbounds,(void*)typeflags,m.typeflags/*out*/,
+            friendly_name(name, "_typeflags", 0));
+        if (bndids)
+            db_hdf5_compwr(dbfile,DB_INT,1,&nbounds,(void*)bndids,m.bndids/*out*/,
+                friendly_name(name, "_bndids", 0));
+        db_hdf5_compwr(dbfile,datatype,1,&lcoeffs,(void*)coeffs,m.coeffs/*out*/,
+            friendly_name(name, "_coeffs", 0));
+
+        /* Build csgmesh header in memory */
+        m.ndims = ndims;
+        m.cycle = _csgm._cycle;
+        m.origin = _csgm._origin;
+        m.group_no = _csgm._group_no;
+        m.guihide = _csgm._guihide;
+        strcpy(m.name, name);
+        for (i=0; i<ndims; i++) {
+            strcpy(m.labels[i], OPT(_csgm._labels[i]));
+            strcpy(m.units[i], OPT(_csgm._units[i]));
+        }
+        m.time = _csgm._time_set ? _csgm._time : 0;
+        m.dtime = _csgm._dtime_set ? _csgm._dtime : 0;
+        m.nbounds = nbounds;
+        m.lcoeffs = lcoeffs;
+        m.tv_connectivity = _csgm._tv_connectivity;
+        m.disjoint_mode = _csgm._disjoint_mode;
+        strcpy(m.zonel_name, zonel_name);
+        strcpy(m.mrgtree_name, OPT(_csgm._mrgtree_name));
+
+        /* Build csgmesh header in file */
+        STRUCT(DBcsgmesh) {
+            if (m.group_no)       MEMBER_S(int, group_no);
+            if (m.cycle)          MEMBER_S(int, cycle);
+            if (_csgm._time_set)  MEMBER_S(float, time);
+            if (_csgm._dtime_set) MEMBER_S(double, dtime);
+            if (m.origin)         MEMBER_S(int, origin);
+            if (bndids)           MEMBER_S(str(m.bndids), bndids);
+            if (m.guihide)        MEMBER_S(int, guihide);
+            MEMBER_S(int, lcoeffs);
+            MEMBER_S(int, nbounds);
+            MEMBER_S(int, ndims);
+            MEMBER_3(double, min_extents);
+            MEMBER_3(double, max_extents);
+            MEMBER_R(str(m.units[_j]), units, ndims);
+            MEMBER_R(str(m.labels[_j]), labels, ndims);
+            MEMBER_S(str(m.typeflags), typeflags);
+            MEMBER_S(str(m.coeffs), coeffs);
+            MEMBER_S(str(m.zonel_name), zonel_name);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+            if (m.tv_connectivity) MEMBER_S(int, tv_connectivity);
+            if (m.disjoint_mode)   MEMBER_S(int, disjoint_mode);
+        } OUTPUT(dbfile, DB_CSGMESH, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetCsgmesh
+ *
+ * Purpose:     Reads a CSG mesh object from the file.
+ *
+ * Return:      Success:        Pointer to a new csgmesh.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wednesday, September 7, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Sep  7 10:50:55 PDT 2006
+ *   Added use of db_hdf5_resolvename for retrieval of subobjects
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBcsgmesh *
+db_hdf5_GetCsgmesh(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetCsgmesh";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBcsgmesh_mt        m;
+    DBcsgmesh           *csgm=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a csgmesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror((char*)name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_CSGMESH!=(DBObjectType)_objtype) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read header into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBcsgmesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a ucdmesh object and initialize meta data */
+        if (NULL==(csgm=DBAllocCsgmesh())) return NULL;
+        csgm->name = BASEDUP(name);
+        csgm->cycle = m.cycle;
+        if ((csgm->datatype = db_hdf5_GetVarType(_dbfile, m.coeffs)) < 0)
+            csgm->datatype = DB_FLOAT;
+        if (force_single_g) csgm->datatype = DB_FLOAT;
+        csgm->time = m.time;
+        csgm->dtime = m.dtime;
+        csgm->ndims = m.ndims;
+        csgm->nbounds = m.nbounds;
+        csgm->lcoeffs = m.lcoeffs;
+        csgm->origin = m.origin;
+        csgm->group_no = m.group_no;
+        csgm->guihide = m.guihide;
+        for (i=0; i<m.ndims; i++) {
+            csgm->units[i] = OPTDUP(m.units[i]);
+            csgm->labels[i] = OPTDUP(m.labels[i]);
+            csgm->min_extents[i] = m.min_extents[i];
+            csgm->max_extents[i] = m.max_extents[i];
+        }
+        csgm->mrgtree_name = OPTDUP(m.mrgtree_name);
+        csgm->tv_connectivity = m.tv_connectivity;
+        csgm->disjoint_mode = m.disjoint_mode;
+
+        /* Read the raw data */
+        if ((SILO_Globals.dataReadMask & DBCSGMBoundaryInfo) && (m.nbounds > 0))
+        {
+            csgm->typeflags = db_hdf5_comprd(dbfile, m.typeflags, 1);
+            csgm->bndids = db_hdf5_comprd(dbfile, m.bndids, 1);
+        }
+
+        if ((SILO_Globals.dataReadMask & DBCSGMBoundaryNames) && (m.nbounds > 0))
+        {
+            char *tmpbndnames = db_hdf5_comprd(dbfile, m.bndnames, 1);
+            if (tmpbndnames)
+                csgm->bndnames = DBStringListToStringArray(tmpbndnames, m.nbounds,
+                                     !handleSlashSwap, !skipFirstSemicolon);
+            FREE(tmpbndnames);
+        }
+
+        if ((SILO_Globals.dataReadMask & DBCSGMBoundaryInfo) && (m.lcoeffs > 0))
+            csgm->coeffs = db_hdf5_comprd(dbfile, m.coeffs, 0);
+
+        if ((m.zonel_name[0] && (SILO_Globals.dataReadMask & DBCSGMZonelist)))
+            csgm->zones = db_hdf5_GetCSGZonelist(_dbfile, 
+                              db_hdf5_resolvename(_dbfile, name, m.zonel_name));
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return csgm;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutCsgvar
+ *
+ * Purpose:     Writes CSG variables to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wednesday, September 7, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutCsgvar(DBfile *_dbfile, const char *vname, const char *meshname,
+                  int nvars, char *varnames[], void *vars[],
+                  int nvals, int datatype, int centering, DBoptlist *optlist)
+
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutCsgvar";
+    char                *s = 0;
+    DBcsgvar_mt         m;
+    int                 i; 
+
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+        db_ResetGlobalData_Csgmesh();
+        strcpy(_csgm._meshname, meshname);
+        db_ProcessOptlist(DB_CSGMESH, optlist);
+
+        /* Write variable arrays: vars[] */
+        if (nvars>MAX_VARS) {
+            db_perror("too many variables", E_BADARGS, me);
+            UNWIND();
+        }
+        for (i=0; i<nvars; i++) {
+            db_hdf5_compwr(dbfile, datatype, 1, &nvals, (void*)vars[i],
+                m.vals[i]/*out*/, friendly_name(varnames[i], "_data", 0));
+        }
+
+        /* output mrgtree info if we have it */
+        if (_csgm._region_pnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_csgm._region_pnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.region_pnames/*out*/,
+                friendly_name(vname, "_region_pnames", 0));
+            FREE(s);
+        }
+
+        /* Build header in memory */
+        m.nvals = nvars;
+        m.nels = nvals;
+        m.centering = centering;
+        m.cycle = _csgm._cycle;
+        m.guihide = _csgm._guihide;
+        if (_csgm._time_set)
+            m.time = _csgm._time;
+        if (_csgm._dtime_set)
+            m.dtime = _um._dtime;
+        m.use_specmf = _um._use_specmf;
+        m.datatype = datatype;
+        m.conserved = _csgm._conserved;
+        m.extensive = _csgm._extensive;
+        strcpy(m.meshname, OPT(_csgm._meshname));
+        strcpy(m.label, OPT(_csgm._label));
+        strcpy(m.units, OPT(_csgm._unit));
+
+        /* Write header to file */
+        STRUCT(DBcsgvar) {
+            MEMBER_R(str(m.vals[_j]), vals, nvars);
+            MEMBER_S(str(m.meshname), meshname);
+            MEMBER_S(int, cycle);
+            MEMBER_S(str(m.label), label);
+            MEMBER_S(str(m.units), units);
+            if (m.nvals)        MEMBER_S(int, nvals);
+            if (m.nels)         MEMBER_S(int, nels);
+            if (m.centering)    MEMBER_S(int, centering);
+            if (m.use_specmf)   MEMBER_S(int, use_specmf);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (_csgm._time_set)  MEMBER_S(float, time);
+            if (_csgm._dtime_set) MEMBER_S(double, dtime);
+            if (m.conserved)    MEMBER_S(int, conserved);
+            if (m.extensive)    MEMBER_S(int, extensive);
+            MEMBER_S(str(m.region_pnames), region_pnames);
+        } OUTPUT(dbfile, DB_CSGVAR, vname, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetCsgvar
+ *
+ * Purpose:     Reads a CSG variable object from the file.
+ *
+ * Return:      Success:        Ptr to new CSG variable object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller
+ *              Wednesday, September 7, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBcsgvar *
+db_hdf5_GetCsgvar(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetCsgvar";
+    char                *s = 0;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBcsgvar_mt         m;
+    DBcsgvar           *csgv=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a ucdvar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror((char*)name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_CSGVAR!=(DBObjectType)_objtype) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read ucdvar data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBcsgvar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a ucdvar object and initialize meta data */
+        if (NULL==(csgv=DBAllocCsgvar())) return NULL;
+        csgv->name = BASEDUP(name);
+        csgv->meshname = OPTDUP(m.meshname);
+        csgv->cycle = m.cycle;
+        csgv->units = OPTDUP(m.units);
+        csgv->label = OPTDUP(m.label);
+        csgv->time = m.time;
+        csgv->dtime = m.dtime;
+        if ((csgv->datatype = db_hdf5_GetVarType(_dbfile, m.vals[0])) < 0)
+            csgv->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) csgv->datatype = DB_FLOAT;
+        csgv->nels = m.nels;
+        csgv->nvals = m.nvals;
+        csgv->centering = m.centering;
+        csgv->use_specmf = m.use_specmf;
+        csgv->ascii_labels = m.ascii_labels;
+        csgv->guihide = m.guihide;
+        csgv->conserved = m.conserved;
+        csgv->extensive = m.extensive;
+
+        /* Read the raw data */
+        if (m.nvals>MAX_VARS) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        if (SILO_Globals.dataReadMask & DBCSGVData)
+        {
+            csgv->vals = calloc(m.nvals, sizeof(void*));
+            for (i=0; i<m.nvals; i++) {
+                csgv->vals[i] = db_hdf5_comprd(dbfile, m.vals[i], 0);
+            }
+        }
+
+        s = db_hdf5_comprd(dbfile, m.region_pnames, 1);
+        if (s) csgv->region_pnames = DBStringListToStringArray(s, -1,
+                   !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeCsgvar(csgv);
+    } END_PROTECT;
+
+    return csgv;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutCSGZonelist
+ *
+ * Purpose:     Write a DBcsgzonelist object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wednesday, September 7, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutCSGZonelist(DBfile *_dbfile, const char *name, int nregs,
+                 const int *typeflags,
+                 const int *leftids, const int *rightids,
+                 const void *xforms, int lxforms, int datatype,
+                 int nzones, const int *zonelist, DBoptlist *optlist)
+
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBcsgzonelist_mt     m;
+    static char         *me = "db_hdf5_PutCSGZonelist";
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        memset(&_csgzl, 0, sizeof _csgzl);
+        if (db_ProcessOptlist(DB_CSGZONELIST, optlist)<0) {
+            db_perror("bad options", E_CALLFAIL, me);
+            UNWIND();
+        }
+        
+        /* Write variable arrays */
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nregs, (void*)typeflags,
+            m.typeflags/*out*/, friendly_name(name, "_typeflags",0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nregs, (void*)leftids,
+            m.leftids/*out*/, friendly_name(name, "_leftids",0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nregs, (void*)rightids,
+            m.rightids/*out*/, friendly_name(name, "_rightids",0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nzones, (void*)zonelist,
+            m.zonelist/*out*/, friendly_name(name, "_zonelist",0));
+        if (xforms && lxforms > 0) {
+            db_hdf5_compwr(dbfile, datatype, 1, &lxforms, (void*)xforms,
+                m.xform/*out*/, friendly_name(name, "_xforms",0));
+        }
+
+        if (_csgzl._regnames) {
+            int len; char *tmp;
+            DBStringArrayToStringList(_csgzl._regnames, nregs, &tmp, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                m.regnames/*out*/, friendly_name(name, "_regnames",0));
+            FREE(tmp);
+        }
+
+        if (_csgzl._zonenames) {
+            int len; char *tmp;
+            DBStringArrayToStringList(_csgzl._zonenames, nzones, &tmp, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                m.zonenames/*out*/, friendly_name(name, "_zonenames",0));
+            FREE(tmp);
+        }
+
+        /* Build header in memory */
+        m.nregs = nregs;
+        m.lxform = lxforms;
+        m.nzones = nzones;
+
+        /* Write header to file */
+        STRUCT(DBcsgzonelist) {
+            if (m.nregs)        MEMBER_S(int, nregs);
+            if (m.lxform)       MEMBER_S(int, lxform);
+            if (m.nzones)       MEMBER_S(int, nzones);
+            MEMBER_S(str(m.typeflags), typeflags);
+            MEMBER_S(str(m.leftids), leftids);
+            MEMBER_S(str(m.rightids), rightids);
+            MEMBER_S(str(m.zonelist), zonelist);
+            MEMBER_S(str(m.xform), xform);
+            MEMBER_S(str(m.regnames), regnames);
+            MEMBER_S(str(m.zonenames), zonenames);
+        } OUTPUT(dbfile, DB_CSGZONELIST, name, &m);
+        
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetCSGZonelist
+ *
+ * Purpose:     Reads a CSG zonelist object from the file
+ *
+ * Return:      Success:        Ptr to new CSG zonelist
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wednesday, September 7, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Mar 23 15:31:50 PST 2006
+ *   Fixed case where we were forcing single on an integer array for the
+ *   zonelist.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBcsgzonelist *
+db_hdf5_GetCSGZonelist(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetCSGZonelist";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBcsgzonelist_mt     m;
+    DBcsgzonelist       *zl=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a zonelist */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror((char*)name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_CSGZONELIST!=(DBObjectType)_objtype) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read zonelist data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBcsgzonelist_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a zonelist object and initialize meta data */
+        if (NULL==(zl=DBAllocCSGZonelist())) return NULL;
+        zl->nregs = m.nregs;
+        zl->nzones = m.nzones;
+        zl->lxform = m.lxform;
+        if ((zl->datatype = db_hdf5_GetVarType(_dbfile, m.xform)) < 0)
+            zl->datatype = DB_FLOAT;
+        if (force_single_g) zl->datatype = DB_FLOAT;
+
+        /* Read the raw data */
+        if (SILO_Globals.dataReadMask & DBZonelistInfo)
+        {
+            zl->typeflags = db_hdf5_comprd(dbfile, m.typeflags, 1);
+            zl->leftids = db_hdf5_comprd(dbfile, m.leftids, 1);
+            zl->rightids = db_hdf5_comprd(dbfile, m.rightids, 1);
+            zl->xform = db_hdf5_comprd(dbfile, m.xform, 0);
+            zl->zonelist = db_hdf5_comprd(dbfile, m.zonelist, 1);
+        }
+
+        if (SILO_Globals.dataReadMask & DBCSGZonelistRegNames)
+        {
+            char *tmpnames = db_hdf5_comprd(dbfile, m.regnames, 1);
+            if (tmpnames)
+                zl->regnames = DBStringListToStringArray(tmpnames, m.nregs,
+                    !handleSlashSwap, !skipFirstSemicolon);
+            FREE(tmpnames);
+        }
+
+        if (SILO_Globals.dataReadMask & DBCSGZonelistZoneNames)
+        {
+            char *tmpnames = db_hdf5_comprd(dbfile, m.zonenames, 1);
+            if (tmpnames)
+                zl->zonenames = DBStringListToStringArray(tmpnames, m.nzones,
+                    !handleSlashSwap, !skipFirstSemicolon);
+            FREE(tmpnames);
+        }
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeCSGZonelist(zl);
+    } END_PROTECT;
+
+    return zl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutDefvars
+ *
+ * Purpose:     Put a defvars object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_errno set
+ *
+ * Programmer:  Mark C. Miller 
+ *              Tuesday, September 6, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutDefvars(DBfile *_dbfile, const char *name, int ndefs,
+                   char *names[], const int *types,
+                   char *defns[], DBoptlist *opts[])
+{
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    static char *me = "db_hdf5_PutDefvars";
+    DBdefvars_mt  m;
+    int len;
+    char *s;
+    int *guihide = NULL;
+
+   /*
+    * Optlists are a little funky for this object because we were
+    * concerned about possibly handling things like units, etc. So,
+    * we really have an array of optlists that needs to get serialized.
+    */
+   if (opts)
+   {
+       int i;
+       for (i = 0; i < ndefs; i++)
+       {
+           memset(&_dv, 0, sizeof(_dv)); /* reset global dv data */
+           db_ProcessOptlist (DB_DEFVARS, opts[i]);
+           if (_dv._guihide)
+           {
+               if (guihide == NULL)
+                   guihide = (int *) calloc(ndefs, sizeof(int));
+               guihide[i] = _dv._guihide;
+           }
+       }
+   }
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+
+        DBStringArrayToStringList(names, ndefs, &s, &len);
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.names/*out*/,
+            friendly_name(name, "_names",0));
+        FREE(s);
+
+        db_hdf5_compwr(dbfile, DB_INT, 1, &ndefs, (void*)types, m.types/*out*/,
+            friendly_name(name, "_types",0));
+
+        DBStringArrayToStringList(defns, ndefs, &s, &len);
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.defns/*out*/,
+            friendly_name(name, "_defns",0));
+        FREE(s);
+
+        if (guihide)
+        {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &ndefs, (void*)guihide, m.guihides/*out*/,
+                friendly_name(name, "_guihids",0));
+            free(guihide);
+        }
+
+        /* Build the curve header in memory */
+        m.ndefs = ndefs;
+
+        /* Write curve header to file */
+        STRUCT(DBdefvars) {
+            if (m.ndefs) MEMBER_S(int, ndefs);
+            MEMBER_S(str(m.names), names);
+            MEMBER_S(str(m.types), types);
+            MEMBER_S(str(m.defns), defns);
+            MEMBER_S(str(m.guihides), guihides);
+        } OUTPUT(dbfile, DB_DEFVARS, name, &m);
+
+    } CLEANUP {
+        /*void*/;
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetDefvars
+ *
+ * Purpose:     Read a defvars object from a data file.
+ *
+ * Return:      Success:        Pointer to new defvars object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, March 25, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set datatype correctly. Added support for dataReadMask
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBdefvars*
+db_hdf5_GetDefvars(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetDefvars";
+    DBdefvars           *defv = NULL;
+    DBdefvars_mt         m;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    char               *s;
+
+    PROTECT {
+        /* Open object and make sure it's a curve */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror((char*)name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_DEFVARS!=(DBObjectType)_objtype) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read the data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBdefvars_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a defvars object and initialize meta data */
+        if (NULL==(defv=DBAllocDefvars(0))) return NULL;
+        defv->ndefs = m.ndefs;
+
+        s = db_hdf5_comprd(dbfile, m.names, 1);
+        if (s) defv->names = DBStringListToStringArray(s, defv->ndefs,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        defv->types = db_hdf5_comprd(dbfile, m.types, 1);
+
+        s = db_hdf5_comprd(dbfile, m.defns, 1);
+        if (s) defv->defns = DBStringListToStringArray(s, defv->ndefs, 
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        defv->guihides = db_hdf5_comprd(dbfile, m.guihides, 1);
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeDefvars(defv);
+    } END_PROTECT;
+
+    return defv;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForQuadmeshCompression
+ *
+ * Purpose:     Does some small work to prepare for possible mesh
+ *              compression 
+ *
+ * Return:      Success:        ALLOW_MESH_COMPRESSION 
+ *
+ *              Failure:        0 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static int PrepareForQuadmeshCompression()
+{
+    if (SILO_Globals.compressionParams == 0) return 0;
+
+#ifdef HAVE_HZIP
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.isquad = 1;
+    return ALLOW_MESH_COMPRESSION;
+#endif
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutQuadmesh
+ *
+ * Purpose:     Writes a Quadmesh to the silo file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, March 29, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no' and `baseindex[]' properties to duplicate
+ *              changes made to the PDB driver.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Made it set the correct mesh type
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Jul 17 15:07:49 PDT 2008
+ *   Added call to prepare for mesh compression. Changed call for
+ *   non-collinear coordinate case to use db_hdf5_compwrz to support
+ *   possible compression.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutQuadmesh(DBfile *_dbfile, char *name, char *coordnames[],
+                    DB_DTPTR2 _coords, int dims[], int ndims, int datatype,
+                    int coordtype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutQuadmesh";
+    int                 i;
+    DBquadmesh_mt       m;
+    int                 compressionFlags;
+    DB_DTPTR          **coords = (DB_DTPTR**) _coords;
+
+    FREE(_qm._meshname);
+    memset(&_qm, 0, sizeof _qm);
+    memset(&m, 0, sizeof m); 
+    
+    PROTECT {
+        /* Check datatype */
+        if (DB_FLOAT!=datatype && DB_DOUBLE!=datatype) {
+            db_perror("invalid floating-point datatype", E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* Set global options */
+        _qm._coordsys = DB_OTHER;
+        _qm._facetype = DB_RECTILINEAR;
+        _qm._ndims = ndims;
+        _qm._nspace = ndims;
+        _qm._planar = DB_AREA;
+        _qm._use_specmf = DB_OFF;
+        _qm._group_no = -1;
+        if (db_ProcessOptlist(DB_QUADMESH, optlist)<0) {
+            db_perror("bad options", E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _qm._time_set, _qm._time,
+            _qm._dtime_set, _qm._dtime, _qm._cycle);
+
+        /*
+         * Number of zones and nodes. We have to do this because
+         * _DBQMCalcExtents uses this global information.
+         */
+        for (_qm._nzones=_qm._nnodes=1, i=0; i<ndims; i++) {
+            _qm._nzones *= (dims[i]-1);
+            _qm._nnodes *= dims[i];
+            _qm._dims[i] = dims[i];
+            _qm._zones[i] = dims[i]-1;
+            _qm._minindex[i] = _qm._lo_offset[i];
+            _qm._maxindex_n[i] = dims[i] - _qm._hi_offset[i] - 1;
+            _qm._maxindex_z[i] = _qm._maxindex_n[i] - 1;
+        }
+        
+        /* Calculate extents, stored as DB_DOUBLE */
+        if (DB_DOUBLE==datatype) {
+            _DBQMCalcExtents(coords, datatype, _qm._minindex, _qm._maxindex_n,
+                             dims, ndims, coordtype,
+                             &(m.min_extents)/*out*/,
+                             &(m.max_extents)/*out*/);
+        } else {
+            float       min_extents[3];
+            float       max_extents[3];
+            _DBQMCalcExtents(coords, datatype, _qm._minindex, _qm._maxindex_n,
+                             dims, ndims, coordtype,
+                             min_extents/*out*/, max_extents/*out*/);
+            for (i=0; i<ndims; i++) {
+                m.min_extents[i] = min_extents[i];
+                m.max_extents[i] = max_extents[i];
+            }
+        }
+        for (i=0; i<ndims; i++) {
+            m.min_index[i] = _qm._minindex[i];
+            m.max_index[i] = _qm._maxindex_n[i];
+        }
+
+        compressionFlags = PrepareForQuadmeshCompression();
+        
+        /* Write coordinate arrays */
+        if (DB_COLLINEAR==coordtype) {
+            for (i=0; i<ndims; i++) {
+                db_hdf5_compwr(dbfile, datatype, 1, dims+i, coords[i],
+                    m.coord[i]/*out*/, friendly_name(name, "_coord%d",&i));
+            }
+        } else {
+            for (i=0; i<ndims; i++) {
+                db_hdf5_compwrz(dbfile, datatype, ndims, dims, coords[i],
+                    m.coord[i]/*out*/, friendly_name(name, "_coord%d",&i),
+                    compressionFlags);
+            }
+        }
+        
+        /* Build quadmesh header in memory */
+        m.ndims = ndims;
+        m.coordtype = coordtype;
+        m.nspace = _qm._nspace;
+        m.nnodes = _qm._nnodes;
+        m.facetype = _qm._facetype;
+        m.major_order = _qm._majororder;
+        m.cycle = _qm._cycle;
+        m.coord_sys = _qm._coordsys;
+        m.planar = _qm._planar;
+        m.origin = _qm._origin;
+        m.group_no = _qm._group_no;
+        m.guihide = _qm._guihide;
+        for (i=0; i<ndims; i++) {
+            m.dims[i] = dims[i];
+            m.baseindex[i] = _qm._baseindex[i];
+            strcpy(m.label[i], OPT(_qm._labels[i]));
+            strcpy(m.units[i], OPT(_qm._units[i]));
+        }
+        m.time = _qm._time_set ? _qm._time : 0;
+        m.dtime = _qm._dtime_set ? _qm._dtime : 0;
+        strcpy(m.mrgtree_name, OPT(_qm._mrgtree_name));
+
+        /* Build quadmesh header in file */
+        STRUCT(DBquadmesh) {
+            MEMBER_R(str(m.coord[_j]), coord, ndims);
+            MEMBER_3(double, min_extents);
+            MEMBER_3(double, max_extents);
+            MEMBER_S(int, ndims);
+            MEMBER_S(int, coordtype);
+            MEMBER_S(int, nspace);
+            MEMBER_S(int, nnodes);
+            MEMBER_S(int, facetype);
+            if (m.major_order)  MEMBER_S(int, major_order);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.group_no)     MEMBER_S(int, group_no);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            MEMBER_S(int, coord_sys);
+            MEMBER_S(int, planar);
+            MEMBER_3(int, dims);
+            MEMBER_3(int, min_index);
+            MEMBER_3(int, max_index);
+            MEMBER_3(int, baseindex);
+            if (_qm._time_set) MEMBER_S(float, time);
+            if (_qm._dtime_set) MEMBER_S(double, dtime);
+            MEMBER_R(str(m.label[_j]), label, ndims);
+            MEMBER_R(str(m.units[_j]), units, ndims);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+        } OUTPUT(dbfile, coordtype == DB_COLLINEAR ? DB_QUADRECT : DB_QUADCURV, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForQuadmeshDeompression
+ *
+ * Purpose:     Does some small work to prepare for possible mesh
+ *              decompression 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static void
+PrepareForQuadmeshDecompression(DBfile_hdf5 *dbfile, const char *meshname,
+    const DBquadmesh *qm)
+{
+#ifdef HAVE_HZIP
+    int i;
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.dbfile = dbfile;
+    db_hdf5_hzip_params.isquad = 1;
+    db_hdf5_hzip_params.meshname = meshname;
+    db_hdf5_hzip_params.ndims = qm->ndims;
+    for (i = 0; i < qm->ndims; i++)
+        db_hdf5_hzip_params.dims[i] = qm->dims[i];
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetQuadmesh
+ *
+ * Purpose:     Reads a quadmesh object from the file.
+ *
+ * Return:      Success:        Ptr to new quadmesh
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, March 30, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no' and `baseindex[]' properties to duplicate
+ *              changes made to the PDB driver.
+ *
+ *              Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *              Added support for dataReadMask
+ *
+ *              Mark C. Miller, Thu Jul 17 15:09:51 PDT 2008
+ *              Added call to prepare for mesh decompression.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBquadmesh *
+db_hdf5_GetQuadmesh(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetQuadmesh";
+    DBquadmesh          *qm = NULL;
+    DBquadmesh_mt       m;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, stride, i;
+    
+    PROTECT {
+        /* Open object and make sure it's a quadmesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if ((DB_QUADMESH!=(DBObjectType)_objtype) &&
+            (DB_QUAD_CURV!=(DBObjectType)_objtype) &&
+            (DB_QUAD_RECT!=(DBObjectType)_objtype)) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read quadmesh data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBquadmesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a quadmesh object and initialize meta data */
+        if (NULL==(qm=DBAllocQuadmesh())) return NULL;
+        qm->name = BASEDUP(name);
+        qm->cycle = m.cycle;
+        qm->coord_sys = m.coord_sys;
+        qm->major_order = m.major_order;
+        qm->coordtype = m.coordtype;
+        qm->facetype = m.facetype;
+        qm->planar = m.planar;
+        if ((qm->datatype = db_hdf5_GetVarType(_dbfile, m.coord[0])) < 0)
+            qm->datatype = DB_FLOAT;
+        if (force_single_g) qm->datatype = DB_FLOAT;
+        qm->time = m.time;
+        qm->dtime = m.dtime;
+        qm->ndims = m.ndims;
+        qm->nspace = m.nspace;
+        qm->nnodes = m.nnodes;
+        qm->origin = m.origin;
+        qm->group_no = m.group_no;
+        qm->guihide = m.guihide;
+        qm->mrgtree_name = OPTDUP(m.mrgtree_name);
+
+        for (stride=1, i=0; i<qm->ndims; i++) {
+            if (qm->datatype == DB_DOUBLE)
+            {
+                ((double*)qm->min_extents)[i] = m.min_extents[i];
+                ((double*)qm->max_extents)[i] = m.max_extents[i];
+            }
+            else
+            {
+                qm->min_extents[i] = m.min_extents[i];
+                qm->max_extents[i] = m.max_extents[i];
+            }
+            qm->labels[i] = OPTDUP(m.label[i]);
+            qm->units[i] = OPTDUP(m.units[i]);
+            qm->dims[i] = m.dims[i];
+            qm->min_index[i] = m.min_index[i];
+            qm->max_index[i] = m.max_index[i];
+            qm->base_index[i] = m.baseindex[i];
+            qm->stride[i] = stride;
+            stride *= qm->dims[i];
+        }
+
+        PrepareForQuadmeshDecompression(dbfile, name, qm);
+
+        /* Read coordinate arrays */
+        for (i=0; i<qm->ndims; i++) {
+            if (SILO_Globals.dataReadMask & DBQMCoords)
+                qm->coords[i] = db_hdf5_comprd(dbfile, m.coord[i], 0);
+        }
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeQuadmesh(qm);
+    } END_PROTECT;
+
+    return qm;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForQuadvarCompression
+ *
+ * Purpose:     Does some small work to prepare for possible quadvar 
+ *              compression 
+ *
+ * Return:      Success:        ALLOW_MESH_COMPRESSION 
+ *
+ *              Failure:        0 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static int
+PrepareForQuadvarCompression(int centering, int datatype)
+{
+    if (SILO_Globals.compressionParams == 0) return 0;
+    if (centering == DB_ZONECENT) return 0;
+
+#ifdef HAVE_HZIP
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.isquad = 1;
+    return ALLOW_MESH_COMPRESSION;
+#endif
+    return 0;
+
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutQuadvar
+ *
+ * Purpose:     Write a quadvar object to the file. The VARS and MIXVARS
+ *              arguments should actually be of type `void*[]' because they
+ *              point to either `float' or `double' depending on the value of
+ *              the DATATYPE argument.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, March 31, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Jul 17 15:10:50 PDT 2008
+ *   Added call to prepare for compression. Changed call to write variable
+ *   data to comprdz to support possible comporession. 
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Wed Nov 11 09:18:12 PST 2009
+ *   Fixed support for edge/face centered variables.
+ *
+ *   Mark C. Miller, Wed Jan  6 13:46:45 PST 2010
+ *   Fixed setting of align member based on centering.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutQuadvar(DBfile *_dbfile, char *name, char *meshname, int nvars,
+                   char *varnames[/*nvars*/], DB_DTPTR2 _vars,
+                   int dims[/*ndims*/], int ndims, DB_DTPTR2 _mixvars,
+                   int mixlen, int datatype, int centering, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutQuadvar";
+    char                *s = 0;
+    DBquadvar_mt        m;
+    int                 i, nels;
+    int                 compressionFlags;
+    DB_DTPTR          **vars = (DB_DTPTR**) _vars;
+    DB_DTPTR          **mixvars = (DB_DTPTR**) _mixvars;
+
+    FREE(_qm._meshname);
+    memset(&_qm, 0, sizeof _qm);
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+        /* Set global options */
+        _qm._coordsys = DB_OTHER;
+        _qm._facetype = DB_RECTILINEAR;
+        _qm._ndims = _qm._nspace = ndims;
+        _qm._planar = DB_AREA;
+        _qm._use_specmf = DB_OFF;
+        _qm._group_no = -1;
+        db_ProcessOptlist(DB_QUADMESH, optlist); /*yes, QUADMESH*/
+        _qm._meshname = STRDUP(meshname);
+        _qm._nzones = _qm._nnodes = 1; /*initial value only*/
+        for (nels=1, i=0; i<ndims; i++) {
+            nels *= dims[i];
+            _qm._nzones *= (dims[i]-1);
+            _qm._nnodes *= dims[i];
+            _qm._dims[i] = dims[i];
+            _qm._zones[i] = dims[i]-1;
+            _qm._minindex[i] = _qm._lo_offset[i];
+            _qm._maxindex_n[i] = dims[i] - _qm._hi_offset[i] - 1;
+            _qm._maxindex_z[i] = _qm._maxindex_n[i] - 1;
+        }
+
+        /* adjust things for edge/face centerings */
+        if ((ndims > 1 && centering == DB_EDGECENT) ||
+            (ndims > 2 && centering == DB_FACECENT))
+           nels *= ndims;
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _qm._time_set, _qm._time,
+            _qm._dtime_set, _qm._dtime, _qm._cycle); 
+
+        compressionFlags = PrepareForQuadvarCompression(centering, datatype);
+
+        /* Write variable arrays: vars[] and mixvars[] */
+        if (nvars>MAX_VARS) {
+            db_perror("too many subvariables", E_BADARGS, me);
+            UNWIND();
+        }
+        for (i=0; i<nvars; i++) {
+            /* Handle adjustment for edge/face centerings */
+            if ((ndims > 1 && centering == DB_EDGECENT) ||
+                (ndims > 2 && centering == DB_FACECENT))
+            {
+                int j, tmpndims = ndims+1;
+                int tmpdims[4];
+                for (j = ndims; j > 0; j--)
+                    tmpdims[j] = dims[j-1];
+                tmpdims[0] = ndims;
+                db_hdf5_compwrz(dbfile, datatype, tmpndims, tmpdims, vars[i],
+                    m.value[i]/*out*/, friendly_name(varnames[i], "_data", 0),
+                    compressionFlags);
+            }
+            else
+            {
+                db_hdf5_compwrz(dbfile, datatype, ndims, dims, vars[i],
+                    m.value[i]/*out*/, friendly_name(varnames[i], "_data", 0),
+                    compressionFlags);
+            }
+            if (mixvars && mixvars[i] && mixlen>0) {
+                db_hdf5_compwr(dbfile, datatype, 1, &mixlen, mixvars[i],
+                    m.mixed_value[i]/*out*/, friendly_name(varnames[i], "_mix", 0));
+            }
+        }
+        
+        /* Build quadvar header in memory */
+        m.ndims = ndims;
+        m.nvals = nvars;
+        m.nels = nels;
+        m.origin = _qm._origin;
+        m.mixlen = mixlen;
+        m.major_order = _qm._majororder;
+        m.cycle = _qm._cycle;
+        m.time = _qm._time;
+        m.dtime = _qm._dtime;
+        m.use_specmf = _qm._use_specmf;
+        m.ascii_labels = _qm._ascii_labels;
+        m.guihide = _qm._guihide;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+        m.conserved = _qm._conserved;
+        m.extensive = _qm._extensive;
+        m.centering = centering;
+        strcpy(m.label, OPT(_qm._label));
+        strcpy(m.units, OPT(_qm._unit));
+        strcpy(m.meshid, OPT(_qm._meshname));
+
+        for (i=0; i<ndims; i++) {
+            m.dims[i] = _qm._dims[i];
+            m.zones[i] = _qm._zones[i];
+            m.min_index[i] = _qm._minindex[i];
+            m.max_index[i] = _qm._maxindex_n[i];
+            switch (centering) {
+                case DB_NODECENT:
+                    m.align[i] = 0.0; break;
+                case DB_EDGECENT: /* edge centering on 1D mesh is like zone centering */
+                    if (ndims == 1) m.align[i] = 0.5; break;
+                case DB_FACECENT: /* face centering on 2D mesh is like zone centering */
+                    if (ndims == 2) m.align[i] = 0.5; break;
+                case DB_ZONECENT:
+                    m.align[i] = 0.5; break;
+                default:
+                    m.align[i] = 0.5; break;
+            }
+        }
+
+        /* output mrgtree info if we have it */
+        if (_qm._region_pnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_qm._region_pnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.region_pnames/*out*/,
+                friendly_name(name, "_region_pnames", 0));
+            FREE(s);
+        }
+
+        /* Write quadvar header to file */
+        STRUCT(DBquadvar) {
+            MEMBER_S(str(m.meshid), meshid);
+            MEMBER_R(str(m.value[_j]), value, nvars);
+            MEMBER_R(str(m.mixed_value[_j]), mixed_value, nvars);
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nvals)        MEMBER_S(int, nvals);
+            if (m.nels)         MEMBER_S(int, nels);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.mixlen)       MEMBER_S(int, mixlen);
+            if (m.major_order)  MEMBER_S(int, major_order);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (_qm._time_set)  MEMBER_S(float, time);
+            if (_qm._dtime_set) MEMBER_S(double, dtime);
+            if (m.use_specmf)   MEMBER_S(int, use_specmf);
+            if (m.ascii_labels) MEMBER_S(int, ascii_labels);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (m.conserved)    MEMBER_S(int, conserved);
+            if (m.extensive)    MEMBER_S(int, extensive);
+            if (m.centering)    MEMBER_S(int, centering);
+            MEMBER_3(int, dims);
+            MEMBER_3(int, zones);
+            MEMBER_3(int, min_index);
+            MEMBER_3(int, max_index);
+            MEMBER_3(float, align);
+            MEMBER_S(str(m.label), label);
+            MEMBER_S(str(m.units), units);
+            MEMBER_S(str(m.region_pnames), region_pnames);
+        } OUTPUT(dbfile, DB_QUADVAR, name, &m);
+        
+        FREE(_qm._meshname);
+    } CLEANUP {
+        FREE(_qm._meshname);
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForQuadvarDecompression
+ *
+ * Purpose:     Does some small work to prepare for possible quadvar 
+ *              decompression 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static void
+PrepareForQuadvarDecompression(DBfile_hdf5 *dbfile, const char *varname,
+    const DBquadvar *qv)
+{
+#ifdef HAVE_HZIP
+    int i;
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.dbfile = dbfile;
+    db_hdf5_hzip_params.isquad = 1;
+    db_hdf5_hzip_params.meshname = qv->meshname;
+    db_hdf5_hzip_params.ndims = qv->ndims;
+    for (i = 0; i < qv->ndims; i++)
+        db_hdf5_hzip_params.dims[i] = qv->dims[i];
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetQuadvar
+ *
+ * Purpose:     Reads a quadvar object from the file
+ *
+ * Return:      Success:        Ptr to new quadvar object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, March 31, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set datatype correctly. Added support for dataReadMask
+ *
+ *   Mark C. Miller, Thu Jul 17 15:13:57 PDT 2008
+ *   Added to call to prepare for possible decompression.
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:27:59 PST 2010
+ *   Added missing setting for recently added centering member.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBquadvar *
+db_hdf5_GetQuadvar(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetQuadvar";
+    char                *s = 0;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, stride, i;
+    DBquadvar_mt        m;
+    DBquadvar           *qv=NULL;
+    
+    PROTECT {
+        /* Open object and make sure it's a quadvar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_QUADVAR!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read quadvar data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBquadvar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a quadvar object and initialize meta data */
+        if (NULL==(qv=DBAllocQuadvar())) return NULL;
+        qv->name = BASEDUP(name);
+        qv->meshname = OPTDUP(m.meshid);
+        qv->units = OPTDUP(m.units);
+        qv->label = OPTDUP(m.label);
+        qv->cycle = m.cycle;
+        if ((qv->datatype = db_hdf5_GetVarType(_dbfile, m.value[0])) < 0)
+            qv->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) qv->datatype = DB_FLOAT;
+        qv->nels = m.nels;
+        qv->nvals = m.nvals;
+        qv->ndims = m.ndims;
+        qv->major_order = m.major_order;
+        qv->origin = m.origin;
+        qv->time = m.time;
+        qv->dtime = m.dtime;
+        qv->mixlen = m.mixlen;
+        qv->use_specmf = m.use_specmf;
+        qv->ascii_labels = m.ascii_labels;
+        qv->guihide = m.guihide;
+        qv->conserved = m.conserved;
+        qv->extensive = m.extensive;
+        qv->centering = m.centering;
+        for (stride=1, i=0; i<m.ndims; stride*=m.dims[i++]) {
+            qv->dims[i] = m.dims[i];
+            qv->stride[i] = stride;
+            qv->min_index[i] = m.min_index[i];
+            qv->max_index[i] = m.max_index[i];
+            qv->align[i] = m.align[i];
+        }
+
+        PrepareForQuadvarDecompression(dbfile, name, qv);
+
+        /* Read the raw data */
+        if (m.nvals>MAX_VARS) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (SILO_Globals.dataReadMask & DBQVData)
+        {
+            qv->vals = calloc(m.nvals, sizeof(void*));
+            if (m.mixlen) qv->mixvals = calloc(m.nvals, sizeof(void*));
+            for (i=0; i<m.nvals; i++) {
+                qv->vals[i] = db_hdf5_comprd(dbfile, m.value[i], 0);
+                if (m.mixlen && m.mixed_value[i][0]) {
+                    qv->mixvals[i] = db_hdf5_comprd(dbfile, m.mixed_value[i], 0);
+                }
+            }
+        }
+
+        s = db_hdf5_comprd(dbfile, m.region_pnames, 1);
+        if (s) qv->region_pnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeQuadvar(qv);
+    } END_PROTECT;
+
+    return qv;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForUcdmeshCompression
+ *
+ * Purpose:     Does some small work to prepare for possible mesh
+ *              compression 
+ *
+ * Return:      Success:        ALLOW_MESH_COMPRESSION 
+ *
+ *              Failure:        0 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static int PrepareForUcdmeshCompression(DBfile_hdf5 *dbfile,
+    const char *meshname, const char *zlname)
+{
+    if (SILO_Globals.compressionParams == 0) return 0;
+
+#ifdef HAVE_HZIP
+    if (LookupNodelist(dbfile, zlname, meshname) != 0)
+    {
+        db_hdf5_hzip_clear_params();
+        db_hdf5_hzip_params.dbfile = dbfile;
+        db_hdf5_hzip_params.zlname = zlname;
+        db_hdf5_hzip_params.meshname = meshname;
+        AddMeshnameToNodelist(dbfile, zlname, meshname);
+        return ALLOW_MESH_COMPRESSION;
+    }
+#endif
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutUcdmesh
+ *
+ * Purpose:     Write a ucdmesh object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no' and `gnodeno' properties to duplicate
+ *              changes made to the PDB driver.
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Mon Jul 31 17:43:52 PDT 2006
+ *   Removed use of fullname for zonelist, facelist, phzonelist options
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Jul 17 15:14:44 PDT 2008
+ *   Added call to prepare for possible compression. Changed calls that
+ *   write coordinates and gnodeno to use compwrz
+ *
+ *   Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *   Added support for long long global node numbers.
+ *   Changed how long long global node/zone numbers are supported
+ *   from a int (bool), "llong_gnode|zoneno" to an int holding
+ *   the actual datatype. The type is assumed int if it its
+ *   value is zero or it does not exist. Otherwise, the type is
+ *   is whatever is stored in gnznodtype member. 
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutUcdmesh(DBfile *_dbfile, char *name, int ndims, char *coordnames[],
+                   DB_DTPTR2 _coords, int nnodes, int nzones, char *zlname,
+                   char *flname, int datatype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutUcdmesh";
+    DBucdmesh_mt        m;
+    int                 i, compressionFlags;
+    DB_DTPTR          **coords = (DB_DTPTR**) _coords;
+
+    memset(&_um, 0, sizeof _um);
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+        /* Check datatype */
+        if (DB_FLOAT!=datatype && DB_DOUBLE!=datatype) {
+            db_perror("invalid floating-point datatype", E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* Set global options */
+        strcpy(_um._meshname, name);
+        _um._coordsys = DB_OTHER;
+        _um._facetype = DB_RECTILINEAR;
+        _um._ndims = ndims;
+        _um._nnodes = nnodes;
+        _um._nzones = nzones;
+        _um._planar = DB_OTHER;
+        _um._use_specmf = DB_OFF;
+        _um._group_no = -1;
+        db_ProcessOptlist(DB_UCDMESH, optlist);
+
+        /* Prepare for possible compression of coords/gnodeno */
+        compressionFlags = PrepareForUcdmeshCompression(dbfile,
+            name, zlname); 
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _um._time_set, _um._time,
+            _um._dtime_set, _um._dtime, _um._cycle);
+
+        /* Obtain extents as doubles */
+        if (DB_DOUBLE==datatype) {
+            UM_CalcExtents(coords, datatype, ndims, nnodes,
+                           m.min_extents/*out*/, m.max_extents/*out*/);
+        } else {
+            float min_extents[3], max_extents[3];
+            UM_CalcExtents(coords, datatype, ndims, nnodes,
+                           min_extents/*out*/, max_extents/*out*/);
+            for (i=0; i<ndims; i++) {
+                m.min_extents[i] = min_extents[i];
+                m.max_extents[i] = max_extents[i];
+            }
+        }
+        
+        /* Write variable arrays: coords[], gnodeno[] */
+        for (i=0; i<ndims; i++) {
+            db_hdf5_compwrz(dbfile, datatype, 1, &nnodes, coords[i],
+                m.coord[i]/*out*/, friendly_name(name, "_coord%d", &i), 
+                compressionFlags);
+        }
+        if (_um._llong_gnodeno)
+            db_hdf5_compwr(dbfile, DB_LONG_LONG, 1, &nnodes, _um._gnodeno,
+                m.gnodeno/*out*/, friendly_name(name, "_gnodeno",0));
+        else
+            db_hdf5_compwrz(dbfile, DB_INT, 1, &nnodes, _um._gnodeno,
+                m.gnodeno/*out*/, friendly_name(name, "_gnodeno",0),
+                compressionFlags);
+        
+        /* Build ucdmesh header in memory */
+        m.ndims = ndims;
+        m.nnodes = nnodes;
+        m.nzones = nzones;
+        m.facetype = _um._facetype;
+        m.coord_sys = _um._coordsys;
+        m.topo_dim = _um._topo_dim;
+        m.planar = _um._planar;
+        m.origin = _um._origin;
+        m.cycle = _um._cycle;
+        m.time = _um._time;
+        m.dtime = _um._dtime;
+        m.group_no = _um._group_no;
+        m.guihide = _um._guihide;
+        strcpy(m.zonelist, OPT(zlname));
+        strcpy(m.facelist, OPT(flname));
+        strcpy(m.phzonelist, OPT(_um._phzl_name));
+        for (i=0; i<ndims; i++) {
+            strcpy(m.label[i], OPT(_um._labels[i]));
+            strcpy(m.units[i], OPT(_um._units[i]));
+        }
+        strcpy(m.mrgtree_name, OPT(_um._mrgtree_name));
+        m.tv_connectivity = _um._tv_connectivity;
+        m.disjoint_mode = _um._disjoint_mode;
+        m.gnznodtype = _um._llong_gnodeno?DB_LONG_LONG:0;
+
+        /* Write ucdmesh header to file */
+        STRUCT(DBucdmesh) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nnodes)       MEMBER_S(int, nnodes);
+            if (m.nzones)       MEMBER_S(int, nzones);
+            if (m.facetype)     MEMBER_S(int, facetype);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.coord_sys)    MEMBER_S(int, coord_sys);
+            if (m.topo_dim)     MEMBER_S(int, topo_dim);
+            if (m.planar)       MEMBER_S(int, planar);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.group_no)     MEMBER_S(int, group_no);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (_um._time_set)  MEMBER_S(float, time);
+            if (_um._dtime_set) MEMBER_S(double, dtime);
+            MEMBER_S(str(m.facelist), facelist);
+            MEMBER_S(str(m.zonelist), zonelist);
+            MEMBER_S(str(m.gnodeno), gnodeno);
+            MEMBER_3(double, min_extents);
+            MEMBER_3(double, max_extents);
+            MEMBER_R(str(m.coord[_j]), coord, ndims);
+            MEMBER_R(str(m.label[_j]), label, ndims);
+            MEMBER_R(str(m.units[_j]), units, ndims);
+            MEMBER_S(str(m.phzonelist), phzonelist);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+            if (m.tv_connectivity) MEMBER_S(int, tv_connectivity);
+            if (m.disjoint_mode)   MEMBER_S(int, disjoint_mode);
+            if (m.gnznodtype)   MEMBER_S(int, gnznodtype);
+        } OUTPUT(dbfile, DB_UCDMESH, name, &m);
+        
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutUcdsubmesh
+ *
+ * Purpose:     Write a subset of a ucdmesh object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Mon Jul 31 17:57:29 PDT 2006
+ *   Eliminated use of db_hdf5_fullname for zlname, flname and added
+ *   possible optional ph_zlname which was mistakenly left out in the
+ *   initial implementation.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutUcdsubmesh(DBfile *_dbfile, char *name, char *parentmesh,
+                      int nzones, char *zlname, char *flname,
+                      DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_pdb_PutUcdmesh";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBucdmesh_mt        m;
+
+    PROTECT {
+        /* Get metadata from the parent UCD mesh */
+        if ((o=H5Topen(dbfile->cwg, parentmesh))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_UCDMESH!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBucdmesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        H5Tclose(o);
+
+        /* Set global options */
+        strcpy(_um._meshname, name);
+        _um._coordsys = DB_OTHER;
+        _um._facetype = DB_RECTILINEAR;
+        _um._ndims = m.ndims;
+        _um._nnodes = m.nnodes;
+        _um._nzones = m.nzones;
+        _um._planar = DB_OTHER;
+        _um._use_specmf = DB_OFF;
+        _um._group_no = -1;
+        db_ProcessOptlist(DB_UCDMESH, optlist);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _um._time_set, _um._time,
+            _um._dtime_set, _um._dtime, _um._cycle);
+
+        /* Build header in memory -- most fields are already initialized */
+        m.ndims = _um._ndims;
+        m.nnodes = _um._nnodes;
+        m.nzones = _um._nzones;
+        m.facetype = _um._facetype;
+        m.cycle = _um._cycle;
+        m.coord_sys = _um._coordsys;
+        m.topo_dim = _um._topo_dim;
+        m.planar = _um._planar;
+        m.origin = _um._origin;
+        m.time = _um._time;
+        m.dtime = _um._dtime;
+        m.guihide = _um._guihide;
+        strcpy(m.zonelist, zlname);
+        strcpy(m.facelist, OPT(flname));
+        strcpy(m.phzonelist, OPT(_um._phzl_name));
+        for (i=0; i<m.ndims; i++) {
+            strcpy(m.label[i], OPT(_um._labels[i]));
+            strcpy(m.units[i], OPT(_um._units[i]));
+        }
+        strcpy(m.mrgtree_name, OPT(_um._mrgtree_name));
+        m.tv_connectivity = _um._tv_connectivity;
+        m.disjoint_mode = _um._disjoint_mode;
+        
+        /* Write header to file */
+        STRUCT(DBucdmesh) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nnodes)       MEMBER_S(int, nnodes);
+            if (m.nzones)       MEMBER_S(int, nzones);
+            if (m.facetype)     MEMBER_S(int, facetype);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.coord_sys)    MEMBER_S(int, coord_sys);
+            if (m.topo_dim)     MEMBER_S(int, topo_dim);
+            if (m.planar)       MEMBER_S(int, planar);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (_um._time_set)  MEMBER_S(float, time);
+            if (_um._dtime_set) MEMBER_S(double, dtime);
+            MEMBER_S(str(m.facelist), facelist);
+            MEMBER_S(str(m.zonelist), zonelist);
+            MEMBER_3(double, min_extents);
+            MEMBER_3(double, max_extents);
+            MEMBER_R(str(m.coord[_j]), coord, m.ndims);
+            MEMBER_R(str(m.label[_j]), label, m.ndims);
+            MEMBER_R(str(m.units[_j]), units, m.ndims);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+            if (m.tv_connectivity) MEMBER_S(int, tv_connectivity);
+            if (m.disjoint_mode)   MEMBER_S(int, disjoint_mode);
+        } OUTPUT(dbfile, DB_UCDMESH, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForUcdmeshDecompression
+ *
+ * Purpose:     Does some small work to prepare for possible mesh
+ *              decompression 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static void
+PrepareForUcdmeshDecompression(DBfile_hdf5 *dbfile, const char *meshname,
+    const char *zlname)
+{
+#ifdef HAVE_HZIP
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.dbfile = dbfile;
+    db_hdf5_hzip_params.meshname = meshname;
+    db_hdf5_hzip_params.zlname = zlname;
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetUcdmesh
+ *
+ * Purpose:     Reads a UCD mesh object from the file.
+ *
+ * Return:      Success:        Pointer to a new ucdmesh.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no', and `gnodeno' to duplicate changes made to
+ *              the PDB driver.
+ *
+ *              Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *              Made it set datatype correctly.
+ *              Added support for dataReadMask
+ *
+ *              Mark C. Miller, Thu Sep  7 10:50:55 PDT 2006
+ *              Added use of db_hdf5_resolvename for retrieval of
+ *              sub-objects.
+ *
+ *              Mark C. Miller, Thu Jul 17 15:16:13 PDT 2008
+ *              Added support for decompression. Needed to change order
+ *              of operations to read zonelist first as that is the 
+ *              bootstrap HZIP needs to decompress anything.
+ *
+ *              Mark C. Miller, Thu Nov  5 16:17:18 PST 2009
+ *              Made it NOT db_Split() the zonelist if mask is such
+ *              that zonelist info is NOT included.
+ *
+ *              Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *              Changed how long long global node/zone numbers are supported
+ *              from a int (bool), "llong_gnode|zoneno" to an int holding
+ *              the actual datatype. The type is assumed int if it its
+ *              value is zero or it does not exist. Otherwise, the type is
+ *              is whatever is stored in gnznodtype member. 
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBucdmesh *
+db_hdf5_GetUcdmesh(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetUcdmesh";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBucdmesh_mt        m;
+    DBucdmesh           *um=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a ucdmesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_UCDMESH!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read header into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBucdmesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a ucdmesh object and initialize meta data */
+        if (NULL==(um=DBAllocUcdmesh())) return NULL;
+        um->name = BASEDUP(name);
+        um->cycle = m.cycle;
+        um->coord_sys = m.coord_sys;
+        um->topo_dim = m.topo_dim;
+        /* The value we store to the file for 'topo_dim' member is
+           designed such that zero indicates a value that was NOT
+           specified in the file. Since zero is a valid topological
+           dimension, when we store topo_dim to a file, we always
+           add 1. So, we have to subtract it here. However, this
+           data member was not being handled correctly in files
+           versions before 4.7. So, for older files, if topo_dim
+           is non-zero we just pass it without alteration. */
+        if (!DBFileVersionGE(_dbfile,4,5,1) || DBFileVersionGE(_dbfile, 4,7,0))
+            um->topo_dim = um->topo_dim - 1;
+        if ((um->datatype = db_hdf5_GetVarType(_dbfile, m.coord[0])) < 0)
+            um->datatype = DB_FLOAT;
+        if (force_single_g) um->datatype = DB_FLOAT;
+        um->time = m.time;
+        um->dtime = m.dtime;
+        um->ndims = m.ndims;
+        um->nnodes = m.nnodes;
+        um->origin = m.origin;
+        um->group_no = m.group_no;
+        um->guihide = m.guihide;
+        for (i=0; i<m.ndims; i++) {
+            um->units[i] = OPTDUP(m.units[i]);
+            um->labels[i] = OPTDUP(m.label[i]);
+            if (um->datatype == DB_DOUBLE)
+            {
+                ((double*)um->min_extents)[i] = m.min_extents[i];
+                ((double*)um->max_extents)[i] = m.max_extents[i];
+            }
+            else
+            {
+                um->min_extents[i] = m.min_extents[i];
+                um->max_extents[i] = m.max_extents[i];
+            }
+        }
+        um->mrgtree_name = OPTDUP(m.mrgtree_name);
+        um->tv_connectivity = m.tv_connectivity;
+        um->disjoint_mode = m.disjoint_mode;
+
+        /* We have a problem with data read mask and compression. If 
+           masks says not to read zonelist but the zonelist is actually
+           compressed, we're gonna need it to complete the mesh read.
+           So, we need a cheap way to ask if the zonelist is compressed
+           and hope it is cheap enough that always asking that question
+           won't present performance problems. For now, we are just
+           going to let it fail. */
+
+        /* For compression's sake, read the zonelist first */
+        if (m.zonelist[0] && (SILO_Globals.dataReadMask & DBUMZonelist)) {
+            calledFromGetUcdmesh = um->name;
+            um->zones = db_hdf5_GetZonelist(_dbfile, 
+                            db_hdf5_resolvename(_dbfile, name, m.zonelist));
+            calledFromGetUcdmesh = 0;
+
+            /*----------------------------------------------------------*/
+            /* If we have ghost zones, split any group of shapecnt so   */
+            /* all the shapecnt refer to all real zones or all ghost    */
+            /* zones.  This will make dealing with ghost zones easier   */
+            /* for applications.                                        */
+            /*----------------------------------------------------------*/
+            if (((um->zones->min_index != 0) || 
+                 (um->zones->max_index != um->zones->nzones - 1)) &&
+                 SILO_Globals.dataReadMask & DBZonelistInfo)
+            {
+                db_SplitShapelist (um);
+            }
+        }
+
+        /* Prepare for possible ucdmesh decompression */
+        PrepareForUcdmeshDecompression(dbfile, name, m.zonelist);
+
+        /* Read the raw data */
+        if (SILO_Globals.dataReadMask & DBUMCoords)
+        {
+            for (i=0; i<m.ndims; i++) {
+                um->coords[i] = db_hdf5_comprd(dbfile, m.coord[i], 0);
+            }
+        }
+        if (SILO_Globals.dataReadMask & DBUMGlobNodeNo)
+            um->gnodeno = db_hdf5_comprd(dbfile, m.gnodeno, 1);
+        um->gnznodtype = m.gnznodtype?m.gnznodtype:DB_INT;
+
+        /* Read face, zone, and edge lists */
+        if (m.facelist[0] && (SILO_Globals.dataReadMask & DBUMFacelist)) {
+            um->faces = db_hdf5_GetFacelist(_dbfile,
+                            db_hdf5_resolvename(_dbfile, name, m.facelist));
+        }
+        if (m.phzonelist[0] && (SILO_Globals.dataReadMask & DBUMZonelist)) {
+            um->phzones = db_hdf5_GetPHZonelist(_dbfile, 
+                              db_hdf5_resolvename(_dbfile, name, m.phzonelist));
+        }
+        um->edges = NULL;                               /*FIXME*/
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+    } END_PROTECT;
+
+    return um;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForUcdvarCompression
+ *
+ * Purpose:     Does some small work to prepare for possible ucdvar 
+ *              compression 
+ *
+ * Return:      Success:        ALLOW_MESH_COMPRESSION 
+ *
+ *              Failure:        0 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static int
+PrepareForUcdvarCompression(DBfile_hdf5 *dbfile, const char *varname,
+    const char *meshname, int datatype, int centering)
+{
+    if (SILO_Globals.compressionParams == 0) return 0;
+
+#ifdef HAVE_HZIP
+    if (centering == DB_NODECENT)
+    {
+        db_hdf5_hzip_clear_params();
+        db_hdf5_hzip_params.meshname = meshname;
+        db_hdf5_hzip_params.dbfile = dbfile;
+        return ALLOW_MESH_COMPRESSION;
+    }
+#endif
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutUcdvar
+ *
+ * Purpose:     Writes UCD variables to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Brad Whitlock, Wed Jan 18 15:17:15 PST 2006 
+ *   Added ascii_labels.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ * 
+ *   Mark C. Miller, Thu Jul 17 15:17:51 PDT 2008
+ *   Added call to prepare for compression. Changed call to write data
+ *   to use compwrz.
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutUcdvar(DBfile *_dbfile, char *name, char *meshname, int nvars,
+                  char *varnames[/*nvars*/], DB_DTPTR2 _vars,
+                  int nels, DB_DTPTR2 _mixvars, int mixlen,
+                  int datatype, int centering, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutUcdvar";
+    char                *s = 0;
+    DBucdvar_mt         m;
+    int                 i, saved_ndims, saved_nnodes, saved_nzones;
+    int                 compressionFlags;
+    DB_DTPTR          **vars = (DB_DTPTR**) _vars;
+    DB_DTPTR          **mixvars = (DB_DTPTR**) _mixvars;
+
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+        /* Set global options  - based on previous PutUcdmesh() call */
+        saved_ndims = _um._ndims;
+        saved_nnodes = _um._nnodes;
+        saved_nzones = _um._nzones;
+        memset(&_um, 0, sizeof _um);
+        _um._coordsys = DB_OTHER;
+        _um._topo_dim = saved_ndims;
+        _um._facetype = DB_RECTILINEAR;
+        _um._ndims = saved_ndims;
+        _um._nnodes = saved_nnodes;
+        _um._nzones = saved_nzones;
+        _um._planar = DB_OTHER;
+        _um._use_specmf = DB_OFF;
+        _um._group_no = -1;
+        strcpy(_um._meshname, meshname);
+        db_ProcessOptlist(DB_UCDMESH, optlist); /*yes, UCDMESH*/
+
+        /* Prepare for possible compression of ucdvars */
+        compressionFlags = PrepareForUcdvarCompression(dbfile, name, meshname,
+            datatype, centering);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _um._time_set, _um._time,
+            _um._dtime_set, _um._dtime, _um._cycle);
+
+        /* Write variable arrays: vars[], mixvars[] */
+        if (nvars>MAX_VARS) {
+            db_perror("too many variables", E_BADARGS, me);
+            UNWIND();
+        }
+        for (i=0; i<nvars; i++) {
+            db_hdf5_compwrz(dbfile, datatype, 1, &nels, vars[i],
+                m.value[i]/*out*/, friendly_name(varnames[i], "_data", 0), compressionFlags);
+            if (mixvars && mixvars[i] && mixlen>0) {
+                db_hdf5_compwr(dbfile, datatype, 1, &mixlen, mixvars[i],
+                    m.mixed_value[i]/*out*/, friendly_name(varnames[i], "_mix", 0));
+            }
+        }
+
+        /* output mrgtree info if we have it */
+        if (_um._region_pnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_um._region_pnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.region_pnames/*out*/,
+                friendly_name(name, "_region_pnames", 0));
+            FREE(s);
+        }
+
+        /* Build header in memory */
+        m.ndims = _um._ndims;
+        m.nvals = nvars;
+        m.nels = nels;
+        m.centering = centering;
+        m.origin = _um._origin;
+        m.mixlen = mixlen;
+        m.cycle = _um._cycle;
+        m.time = _um._time;
+        m.dtime = _um._dtime;
+        m.lo_offset = _um._lo_offset;
+        m.hi_offset = _um._hi_offset;
+        m.use_specmf = _um._use_specmf;
+        m.ascii_labels = _um._ascii_labels;
+        m.guihide = _um._guihide;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+        m.conserved = _um._conserved;
+        m.extensive = _um._extensive;
+        strcpy(m.meshid, OPT(_um._meshname));
+        strcpy(m.label, OPT(_um._label));
+        strcpy(m.units, OPT(_um._unit));
+
+        /* Write header to file */
+        STRUCT(DBucdvar) {
+            MEMBER_R(str(m.value[_j]), value, nvars);
+            MEMBER_R(str(m.mixed_value[_j]), mixed_value, nvars);
+            MEMBER_S(str(m.meshid), meshid);
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nvals)        MEMBER_S(int, nvals);
+            if (m.nels)         MEMBER_S(int, nels);
+            if (m.centering)    MEMBER_S(int, centering);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.mixlen)       MEMBER_S(int, mixlen);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.use_specmf)   MEMBER_S(int, use_specmf);
+            if (m.ascii_labels) MEMBER_S(int, ascii_labels);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (_um._time_set)  MEMBER_S(float, time);
+            if (_um._dtime_set) MEMBER_S(double, dtime);
+            if (_um._lo_offset_set) MEMBER_S(int, lo_offset);
+            if (_um._hi_offset_set) MEMBER_S(int, hi_offset);
+            if (m.conserved)    MEMBER_S(int, conserved);
+            if (m.extensive)    MEMBER_S(int, extensive);
+            MEMBER_S(str(m.label), label);
+            MEMBER_S(str(m.units), units);
+            MEMBER_S(str(m.region_pnames), region_pnames);
+        } OUTPUT(dbfile, DB_UCDVAR, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForUcdvarDecompression
+ *
+ * Purpose:     Does some small work to prepare for possible ucdvar 
+ *              decompression 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *
+ *     We assume here that looking up the nodelist is cheaper than
+ *     checking if the values are compressed, so we perform that
+ *     operation first. Reason being is that checking if the 
+ *     dataset is compressed may involve disk I/O. Looking up
+ *     the nodelist is a bunch of string and pointer compars.
+ *     But, that operation is always performed!!!
+ *-------------------------------------------------------------------------
+ */
+static void
+PrepareForUcdvarDecompression(DBfile *_dbfile, const char *varname,
+    const char *meshname, char valnames[MAX_VARS][256], int nvals)
+{
+
+#ifdef HAVE_HZIP
+
+    /* We have to have read the mesh zonelist first,
+       if we don't already have it. */
+    if (LookupNodelist((DBfile_hdf5*)_dbfile, 0, meshname) == 0)
+    {
+        /* See if we even have compressed data to begin with */
+        int i, haveCompressed = 0;
+        for (i=0; i<nvals && !haveCompressed; i++)
+            haveCompressed = db_hdf5_compckz((DBfile_hdf5*)_dbfile, (char*) valnames[i]);
+
+        if (haveCompressed)
+        {
+            long currentMask = DBGetDataReadMask();
+            DBucdmesh *um;
+            DBSetDataReadMask(DBUMZonelist|DBZonelistInfo);
+            um = db_hdf5_GetUcdmesh(_dbfile, (char*) meshname);
+
+            /* Note that if for some reason the zl was not compressed, then
+               getting it via the above GetUcdmesh call won't register it.
+               Also, registering an already existing zonelist has no effect.
+               So, as a precaution, we register the zonelist here, too.
+               And, since we know the meshname here also, that will get
+               added to the registered zonelist if it already exists. */
+            RegisterNodelist((DBfile_hdf5*)_dbfile, 0, meshname,
+                um->zones->ndims, um->zones->nzones, um->zones->origin,
+                um->zones->nodelist);
+            DBSetDataReadMask(currentMask);
+            DBFreeUcdmesh(um);
+        }
+    }
+
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.dbfile = (DBfile_hdf5*)_dbfile;
+    db_hdf5_hzip_params.meshname = meshname;
+
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetUcdvar
+ *
+ * Purpose:     Reads a UCD variable object from the file.
+ *
+ * Return:      Success:        Ptr to new UCD variable object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set the correct datatype. Added support for dataReadMask
+ *
+ *   Brad Whitlock, Wed Jan 18 15:17:48 PST 2006
+ *   Added ascii_labels.
+ *
+ *   Mark C. Miller, Thu Jul 17 15:19:14 PDT 2008
+ *   Added call to prepare for possible decompression.
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBucdvar *
+db_hdf5_GetUcdvar(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetUcdvar";
+    char                *s = 0;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBucdvar_mt         m;
+    DBucdvar            *uv=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a ucdvar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_UCDVAR!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read ucdvar data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBucdvar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a ucdvar object and initialize meta data */
+        if (NULL==(uv=DBAllocUcdvar())) return NULL;
+        uv->name = BASEDUP(name);
+        uv->meshname = OPTDUP(m.meshid);
+        uv->cycle = m.cycle;
+        uv->units = OPTDUP(m.units);
+        uv->label = OPTDUP(m.label);
+        uv->time = m.time;
+        uv->dtime = m.dtime;
+        if ((uv->datatype = db_hdf5_GetVarType(_dbfile, m.value[0])) < 0)
+            uv->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) uv->datatype = DB_FLOAT;
+        uv->nels = m.nels;
+        uv->nvals = m.nvals;
+        uv->ndims = m.ndims;
+        uv->origin = m.origin;
+        uv->centering = m.centering;
+        uv->mixlen = m.mixlen;
+        uv->use_specmf = m.use_specmf;
+        uv->ascii_labels = m.ascii_labels;
+        uv->guihide = m.guihide;
+        uv->conserved = m.conserved;
+        uv->extensive = m.extensive;
+
+        /* If var is compressed, we need to do some work to decompress it */
+        PrepareForUcdvarDecompression(_dbfile, name, uv->meshname, m.value, m.nvals);
+
+        /* Read the raw data */
+        if (m.nvals>MAX_VARS) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (SILO_Globals.dataReadMask & DBUVData)
+        {
+            uv->vals = calloc(m.nvals, sizeof(void*));
+            if (m.mixlen) uv->mixvals = calloc(m.nvals, sizeof(void*));
+            for (i=0; i<m.nvals; i++) {
+                uv->vals[i] = db_hdf5_comprd(dbfile, m.value[i], 0);
+                if (m.mixlen && m.mixed_value[i][0]) {
+                    uv->mixvals[i] = db_hdf5_comprd(dbfile, m.mixed_value[i], 0);
+                }
+            }
+        }
+
+        s = db_hdf5_comprd(dbfile, m.region_pnames, 1);
+        if (s) uv->region_pnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeUcdvar(uv);
+    } END_PROTECT;
+
+    return uv;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutFacelist
+ *
+ * Purpose:     Writes facelist information to a facelist object in the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutFacelist(DBfile *_dbfile, char *name, int nfaces, int ndims,
+                    int *nodelist, int lnodelist, int origin, int *zoneno,
+                    int *shapesize, int *shapecnt, int nshapes, int *types,
+                    int *typelist, int ntypes)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBfacelist_mt       m;
+
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+        /* Write variable arrays */
+        if (lnodelist) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &lnodelist, nodelist,
+                m.nodelist/*out*/, friendly_name(name, "_nodelist", 0));
+        }
+        if (3==ndims) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nshapes, shapecnt,
+                m.shapecnt/*out*/, friendly_name(name, "_shapecnt", 0));
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nshapes, shapesize,
+                m.shapesize/*out*/, friendly_name(name, "_shapesize", 0));
+        }
+        if (ntypes && typelist) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &ntypes, typelist,
+                m.typelist/*out*/, friendly_name(name, "_typelist", 0));
+        }
+        if (ntypes && types) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nfaces, types,
+                m.types/*out*/, friendly_name(name, "_types", 0));
+        }
+        if (zoneno) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nfaces, zoneno,
+                m.zoneno/*out*/, friendly_name(name, "_zoneno", 0));
+        }
+        
+        /* Build header in memory */
+        m.ndims = ndims;
+        m.nfaces = nfaces;
+        m.nshapes = nshapes;
+        m.ntypes = ntypes;
+        m.lnodelist = lnodelist;
+        m.origin = origin;
+
+        /* Write header to file */
+        STRUCT(DBfacelist) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nfaces)       MEMBER_S(int, nfaces);
+            if (m.nshapes)      MEMBER_S(int, nshapes);
+            if (m.ntypes)       MEMBER_S(int, ntypes);
+            if (m.lnodelist)    MEMBER_S(int, lnodelist);
+            if (m.origin)       MEMBER_S(int, origin);
+            MEMBER_S(str(m.nodelist), nodelist);
+            MEMBER_S(str(m.shapecnt), shapecnt);
+            MEMBER_S(str(m.shapesize), shapesize);
+            MEMBER_S(str(m.typelist), typelist);
+            MEMBER_S(str(m.types), types);
+            MEMBER_S(str(m.zoneno), zoneno);
+        } OUTPUT(dbfile, DB_FACELIST, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetFacelist
+ *
+ * Purpose:     Reads a facelist object from the file.
+ *
+ * Return:      Success:        Ptr to a new facelist object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *  Added support for dataReadMask
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBfacelist *
+db_hdf5_GetFacelist(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetFacelist";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBfacelist_mt       m;
+    DBfacelist          *fl=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a facelist */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_FACELIST!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read facelist data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBfacelist_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a facelist object and initialize meta data */
+        if (NULL==(fl=DBAllocFacelist())) return NULL;
+        fl->ndims = m.ndims;
+        fl->nfaces = m.nfaces;
+        fl->origin = m.origin;
+        fl->lnodelist = m.lnodelist;
+        fl->nshapes = m.nshapes;
+        fl->ntypes = m.ntypes;
+
+        /* Read the raw data */
+        if (SILO_Globals.dataReadMask & DBFacelistInfo)
+        {
+            fl->nodelist = db_hdf5_comprd(dbfile, m.nodelist, 1);
+            fl->shapecnt = db_hdf5_comprd(dbfile, m.shapecnt, 1);
+            fl->shapesize = db_hdf5_comprd(dbfile, m.shapesize, 1);
+            fl->typelist = db_hdf5_comprd(dbfile, m.typelist, 1);
+            fl->types = db_hdf5_comprd(dbfile, m.types, 1);
+            fl->zoneno = db_hdf5_comprd(dbfile, m.zoneno, 1);
+        }
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeFacelist(fl);
+    } END_PROTECT;
+
+    return fl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForZonelistCompression
+ *
+ * Purpose:     Does some small work to prepare for possible zonelist 
+ *              compression 
+ *
+ * Return:      Success:        ALLOW_MESH_COMPRESSION 
+ *
+ *              Failure:        0 
+ *
+ * HZIP supports only 2D quad meshes and 3D hex meshes.
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static int
+PrepareForZonelistCompression(DBfile_hdf5 *dbfile, const char *name,
+    int origin, int nshapes, const int *shapetype, const int *shapecnt,
+    const int *nodelist)
+{
+    int i;
+    int ntopo = 0;
+    int zncnt = shapecnt[0];
+
+    if (nshapes == 0) return 0;
+    if (SILO_Globals.compressionParams == 0) return 0;
+
+#ifdef HAVE_HZIP
+
+    /* hzip supports only quad/hex meshes */
+    if (shapetype[0] == DB_ZONETYPE_QUAD)
+    {
+        ntopo = 2;
+        for (i = 1; i < nshapes; i++)
+        {
+            zncnt += shapecnt[i];
+            if (shapetype[i] != DB_ZONETYPE_QUAD)
+                return 0;
+        }
+    }
+    else if (shapetype[0] == DB_ZONETYPE_HEX)
+    {
+        ntopo = 3;
+        for (i = 1; i < nshapes; i++)
+        {
+            zncnt += shapecnt[i];
+            if (shapetype[i] != DB_ZONETYPE_HEX)
+                return 0;
+        }
+    }
+    else
+    {
+        return 0;
+    }
+
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.iszl = 1;
+    db_hdf5_hzip_params.zlname = name;
+    db_hdf5_hzip_params.dbfile = dbfile;
+    RegisterNodelist(dbfile, name, 0, ntopo, zncnt, origin, nodelist);
+    return ALLOW_MESH_COMPRESSION;
+
+#else
+
+    return 0;
+
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutZonelist
+ *
+ * Purpose:     Writes a zonelist to a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutZonelist(DBfile *_dbfile, char *name, int nzones, int ndims,
+                    int nodelist[], int lnodelist, int origin, int shapesize[],
+                    int shapecnt[], int nshapes)
+{
+    db_hdf5_PutZonelist2(_dbfile, name, nzones, ndims, nodelist, lnodelist,
+                         origin, 0, 0, NULL, shapesize, shapecnt, nshapes,
+                         NULL);
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutZonelist2
+ *
+ * Purpose:     Write a ucd zonelist object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, April 12, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added an option list argument to duplicate changes to the
+ *              PDB driver. Added gzoneno property.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Jul 17 15:20:31 PDT 2008
+ *   Added code to prepare for possible compression. Changed call to
+ *   write nodelist to use compwrz.
+ *
+ *   Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *   Changed how long long global node/zone numbers are supported
+ *   from a int (bool), "llong_gnode|zoneno" to an int holding
+ *   the actual datatype. The type is assumed int if it its
+ *   value is zero or it does not exist. Otherwise, the type is
+ *   is whatever is stored in gnznodtype member. 
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutZonelist2(DBfile *_dbfile, char *name, int nzones, int ndims,
+                     int nodelist[], int lnodelist, int origin,
+                     int lo_offset, int hi_offset, int shapetype[],
+                     int shapesize[], int shapecnt[], int nshapes,
+                     DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBzonelist_mt       m;
+    int                 compressionFlags;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        memset(&_uzl, 0, sizeof _uzl);
+        db_ProcessOptlist(DB_ZONELIST, optlist);
+
+        /* Prepare for possible compression of zonelist */
+        compressionFlags = PrepareForZonelistCompression(dbfile,
+            name, origin, nshapes, shapetype, shapecnt, nodelist);
+
+        /* Write variable arrays (currently only support compression of nodelist) */
+        db_hdf5_compwrz(dbfile, DB_INT, 1, &lnodelist, nodelist,
+            m.nodelist/*out*/, friendly_name(name,"_nodelist", 0), compressionFlags);
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nshapes, shapecnt,
+            m.shapecnt/*out*/, friendly_name(name,"_shapecnt", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nshapes, shapesize,
+            m.shapesize/*out*/, friendly_name(name,"_shapesize", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nshapes, shapetype,
+            m.shapetype/*out*/, friendly_name(name,"_shapetype", 0));
+
+        if (_uzl._llong_gzoneno)
+            db_hdf5_compwr(dbfile, DB_LONG_LONG, 1, &nzones, _uzl._gzoneno,
+                m.gzoneno/*out*/, friendly_name(name,"_gzoneno", 0));
+        else
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nzones, _uzl._gzoneno,
+                m.gzoneno/*out*/, friendly_name(name,"_gzoneno", 0));
+
+        /* Build header in memory */
+        m.ndims = ndims;
+        m.nzones = nzones;
+        m.nshapes = nshapes;
+        m.lnodelist = lnodelist;
+        m.origin = origin;
+        m.lo_offset = lo_offset;
+        m.hi_offset = hi_offset;
+        m.gnznodtype = _uzl._llong_gzoneno?DB_LONG_LONG:0;
+
+        /* Write header to file */
+        STRUCT(DBzonelist) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nzones)       MEMBER_S(int, nzones);
+            if (m.nshapes)      MEMBER_S(int, nshapes);
+            if (m.lnodelist)    MEMBER_S(int, lnodelist);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.lo_offset)    MEMBER_S(int, lo_offset);
+            if (m.hi_offset)    MEMBER_S(int, hi_offset);
+            MEMBER_S(str(m.nodelist), nodelist);
+            MEMBER_S(str(m.shapecnt), shapecnt);
+            MEMBER_S(str(m.shapesize), shapesize);
+            MEMBER_S(str(m.shapetype), shapetype);
+            MEMBER_S(str(m.gzoneno), gzoneno);
+            if (m.gnznodtype)   MEMBER_S(int, gnznodtype);
+        } OUTPUT(dbfile, DB_ZONELIST, name, &m);
+        
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutPHZonelist
+ *
+ * Purpose:     Write a DBphzonelist object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, April 12, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added an option list argument to duplicate changes to the
+ *              PDB driver. Added gzoneno property.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *   Add support for long long global node/zone numbers.
+ *
+ *   Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *   Changed how long long global node/zone numbers are supported
+ *   from a int (bool), "llong_gnode|zoneno" to an int holding
+ *   the actual datatype. The type is assumed int if it its
+ *   value is zero or it does not exist. Otherwise, the type is
+ *   is whatever is stored in gnznodtype member. 
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutPHZonelist(DBfile *_dbfile, char *name, 
+                      int nfaces, int *nodecnt, int lnodelist, int *nodelist,
+                      char *extface,
+                      int nzones, int *facecnt, int lfacelist, int *facelist,
+                      int origin, int lo_offset, int hi_offset,
+                      DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBphzonelist_mt       m;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        memset(&_phzl, 0, sizeof _phzl);
+        db_ProcessOptlist(DB_PHZONELIST, optlist);
+        
+        /* Write variable arrays */
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nfaces, nodecnt,
+            m.nodecnt/*out*/, friendly_name(name,"_nodecnt", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &lnodelist, nodelist,
+            m.nodelist/*out*/, friendly_name(name,"_nodelist", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nfaces, extface,
+            m.extface/*out*/, friendly_name(name,"_extface", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nzones, facecnt,
+            m.facecnt/*out*/, friendly_name(name,"_facecnt", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &lfacelist, facelist,
+            m.facelist/*out*/, friendly_name(name,"_facelist", 0));
+        if (_phzl._llong_gzoneno)
+            db_hdf5_compwr(dbfile, DB_LONG_LONG, 1, &nzones, _phzl._gzoneno,
+                m.gzoneno/*out*/, friendly_name(name,"_gzoneno", 0));
+        else
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nzones, _phzl._gzoneno,
+                m.gzoneno/*out*/, friendly_name(name,"_gzoneno", 0));
+
+        /* Build header in memory */
+        m.nfaces = nfaces;
+        m.lnodelist = lnodelist;
+        m.nzones = nzones;
+        m.lfacelist = lfacelist;
+        m.origin = origin;
+        m.lo_offset = lo_offset;
+        m.hi_offset = hi_offset;
+        m.gnznodtype = _phzl._llong_gzoneno?DB_LONG_LONG:0;
+
+        /* Write header to file */
+        STRUCT(DBphzonelist) {
+            if (m.nfaces)       MEMBER_S(int, nfaces);
+            if (m.lnodelist)    MEMBER_S(int, lnodelist);
+            if (m.nzones)       MEMBER_S(int, nzones);
+            if (m.lfacelist)    MEMBER_S(int, lfacelist);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.lo_offset)    MEMBER_S(int, lo_offset);
+            if (m.hi_offset)    MEMBER_S(int, hi_offset);
+            MEMBER_S(str(m.nodecnt), nodecnt);
+            MEMBER_S(str(m.nodelist), nodelist);
+            MEMBER_S(str(m.extface), extface);
+            MEMBER_S(str(m.facecnt), facecnt);
+            MEMBER_S(str(m.facelist), facelist);
+            MEMBER_S(str(m.gzoneno), gzoneno);
+            if (m.gnznodtype)   MEMBER_S(int, gnznodtype);
+        } OUTPUT(dbfile, DB_PHZONELIST, name, &m);
+        
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PrepareForZonelistDecompression
+ *
+ * Purpose:     Does some small work to prepare for possible zonelist 
+ *              de compression 
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 17 15:07:21 PDT 2008
+ *-------------------------------------------------------------------------
+ */
+static void
+PrepareForZonelistDecompression(DBfile_hdf5* dbfile, const char *zlname,
+    const char *meshname, int origin)
+{
+#ifdef HAVE_HZIP
+    db_hdf5_hzip_clear_params();
+    db_hdf5_hzip_params.dbfile = dbfile;
+    db_hdf5_hzip_params.iszl = 1;
+    db_hdf5_hzip_params.zlname = zlname;
+    db_hdf5_hzip_params.meshname = meshname;
+    db_hdf5_hzip_params.zlorigin = origin;
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetZonelist
+ *
+ * Purpose:     Reads a zonelist object from the file
+ *
+ * Return:      Success:        Ptr to new zonelist
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-14
+ *              Added the `gzoneno' property to mirror changes made to the
+ *              PDB driver.
+ *
+ *              Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *              Made it behave identically to PDB driver (for better or
+ *              worse) when called from GetUcdmesh. Added support for
+ *              dataReadMask
+ *
+ *              Mark C. Miller, Thu Jul 17 15:21:35 PDT 2008
+ *              Added code to prepare for possible zonelist decompression.
+ *
+ *              Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *              Changed how long long global node/zone numbers are supported
+ *              from a int (bool), "llong_gnode|zoneno" to an int holding
+ *              the actual datatype. The type is assumed int if it its
+ *              value is zero or it does not exist. Otherwise, the type is
+ *              is whatever is stored in gnznodtype member. 
+ *
+ *              Mark C. Miller, Tue Jul 27 23:20:27 PDT 2010
+ *              Removed odd-ball logic to summarily set min/max index to
+ *              zero unless 'calledFromGetUcdmesh'
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBzonelist *
+db_hdf5_GetZonelist(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetZonelist";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBzonelist_mt       m;
+    DBzonelist          *zl=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a zonelist */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_ZONELIST!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read zonelist data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBzonelist_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a zonelist object and initialize meta data */
+        if (NULL==(zl=DBAllocZonelist())) return NULL;
+        zl->ndims = m.ndims;
+        zl->nzones = m.nzones;
+        zl->nshapes = m.nshapes;
+        zl->lnodelist = m.lnodelist;
+        zl->origin = m.origin;
+        zl->min_index = m.lo_offset;
+        zl->max_index = m.nzones - m.hi_offset - 1;
+
+        /* Prepare for possible zonelist decompression */
+        PrepareForZonelistDecompression(dbfile, name,
+            calledFromGetUcdmesh, zl->origin);
+
+        /* Read the raw data */
+        if (SILO_Globals.dataReadMask & DBZonelistInfo)
+        {
+            zl->shapecnt = db_hdf5_comprd(dbfile, m.shapecnt, 1);
+            zl->shapesize = db_hdf5_comprd(dbfile, m.shapesize, 1);
+            zl->shapetype = db_hdf5_comprd(dbfile, m.shapetype, 1);
+            zl->nodelist = db_hdf5_comprd(dbfile, m.nodelist, 1);
+        }
+        if (SILO_Globals.dataReadMask & DBZonelistGlobZoneNo)
+            zl->gzoneno = db_hdf5_comprd(dbfile, m.gzoneno, 1);
+        zl->gnznodtype = m.gnznodtype?m.gnznodtype:DB_INT;
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeZonelist(zl);
+    } END_PROTECT;
+
+    return zl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetPHZonelist
+ *
+ * Purpose:     Reads a DBphzonelist object from the file
+ *
+ * Return:      Success:        Ptr to new DBphzonelist
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-14
+ *              Added the `gzoneno' property to mirror changes made to the
+ *              PDB driver.
+ *
+ *  Mark C. Miller, Wed Jan 27 10:37:25 PST 2010
+ *  Added missing initialization of gnznodtype
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBphzonelist *
+db_hdf5_GetPHZonelist(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetPHZonelist";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBphzonelist_mt       m;
+    DBphzonelist          *phzl=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a phzonelist */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_PHZONELIST!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read phzonelist data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBphzonelist_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a phzonelist object and initialize meta data */
+        if (NULL==(phzl=DBAllocPHZonelist())) return NULL;
+        phzl->nfaces = m.nfaces;
+        phzl->lnodelist = m.lnodelist;
+        phzl->nzones = m.nzones;
+        phzl->lfacelist = m.lfacelist;
+        phzl->origin = m.origin;
+        phzl->lo_offset = m.lo_offset;
+        phzl->hi_offset = m.hi_offset;
+        phzl->gnznodtype = m.gnznodtype?m.gnznodtype:DB_INT;
+
+        if (SILO_Globals.dataReadMask & DBZonelistInfo)
+        {
+            phzl->nodecnt = db_hdf5_comprd(dbfile, m.nodecnt, 1);
+            phzl->nodelist = db_hdf5_comprd(dbfile, m.nodelist, 1);
+            phzl->extface = db_hdf5_comprd(dbfile, m.extface, 1);
+            phzl->facecnt = db_hdf5_comprd(dbfile, m.facecnt, 1);
+            phzl->facelist = db_hdf5_comprd(dbfile, m.facelist, 1);
+        }
+        if (SILO_Globals.dataReadMask & DBZonelistGlobZoneNo)
+            phzl->gzoneno = db_hdf5_comprd(dbfile, m.gzoneno, 1);
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreePHZonelist(phzl);
+    } END_PROTECT;
+
+    return phzl;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMaterial
+ *
+ * Purpose:     Write a material object to the file
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   Added support for dataReadMask. Added warning regarding missing
+ *   material name functionality
+ *
+ *   Mark C. Miller, August 9, 2004
+ *   Added code to output optional material names
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Feb 11 09:40:10 PST 2010
+ *   Set global values in _ma to zero after use.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMaterial(DBfile *_dbfile, char *name, char *mname, int nmat,
+                    int matnos[], int matlist[], int dims[], int ndims,
+                    int mix_next[], int mix_mat[], int mix_zone[],
+                    DB_DTPTR1 mix_vf, int mixlen, int datatype,
+                    DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmaterial_mt       m;
+    int                 i, nels;
+    char               *s = NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ProcessOptlist(DB_MATERIAL, optlist);
+        for (i=0, nels=1; i<ndims; i++) nels *= dims[i];
+
+        /* Write raw data arrays */
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nels, matlist,
+            m.matlist/*out*/, friendly_name(name,"_matlist", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nmat, matnos,
+            m.matnos/*out*/, friendly_name(name,"_matnos", 0));
+        if (mixlen>0) {
+            db_hdf5_compwr(dbfile, datatype, 1, &mixlen, mix_vf,
+                m.mix_vf/*out*/, friendly_name(name,"_mix_vf", 0));
+            db_hdf5_compwr(dbfile, DB_INT, 1, &mixlen, mix_next,
+                m.mix_next/*out*/, friendly_name(name,"_mix_next", 0));
+            db_hdf5_compwr(dbfile, DB_INT, 1, &mixlen, mix_mat,
+                m.mix_mat/*out*/, friendly_name(name,"_mix_mat", 0));
+            db_hdf5_compwr(dbfile, DB_INT, 1, &mixlen, mix_zone,
+                m.mix_zone/*out*/, friendly_name(name,"_mix_zone", 0));
+        }
+
+        if (_ma._matnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_ma._matnames, nmat, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.matnames/*out*/,
+                friendly_name(name, "_matnames", 0));
+            FREE(s);
+            _ma._matnames = NULL;
+        }
+
+        if (_ma._matcolors != NULL) {
+            int len;
+            DBStringArrayToStringList(_ma._matcolors, nmat, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.matcolors/*out*/,
+                friendly_name(name,"_matcolors", 0));
+            FREE(s);
+            _ma._matcolors = NULL;
+        }
+        
+        /* Build header in memory */
+        m.ndims = ndims;
+        m.nmat = nmat;
+        m.mixlen = mixlen;
+        m.origin = _ma._origin;
+        m.major_order = _ma._majororder;
+        m.allowmat0 = _ma._allowmat0;
+        m.guihide = _ma._guihide;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+        strcpy(m.meshid, OPT(mname));
+        for (nels=1, i=0; i<ndims; i++) {
+            m.dims[i] = dims[i];
+        }
+        
+        /* Write header to file */
+        STRUCT(DBmaterial) {
+            if (m.dims)         MEMBER_S(int, ndims);
+            if (m.nmat)         MEMBER_S(int, nmat);
+            if (m.mixlen)       MEMBER_S(int, mixlen);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.major_order)  MEMBER_S(int, major_order);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (m.allowmat0)    MEMBER_S(int, allowmat0);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            MEMBER_3(int, dims);
+            MEMBER_S(str(m.meshid), meshid);
+            MEMBER_S(str(m.matlist), matlist);
+            MEMBER_S(str(m.matnos), matnos);
+            MEMBER_S(str(m.mix_vf), mix_vf);
+            MEMBER_S(str(m.mix_next), mix_next);
+            MEMBER_S(str(m.mix_mat), mix_mat);
+            MEMBER_S(str(m.mix_zone), mix_zone);
+            MEMBER_S(str(m.matnames), matnames);
+            MEMBER_S(str(m.matcolors), matcolors);
+        } OUTPUT(dbfile, DB_MATERIAL, name, &m);
+
+        FREE(s);
+
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMaterial
+ *
+ * Purpose:     Reads a material object from the file.
+ *
+ * Return:      Success:        Ptr to new material
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set correct datatype. Added support for dataReadMask
+ *
+ *   Mark C. Miller, August 9, 2004
+ *   Added code to read in optional material names
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmaterial *
+db_hdf5_GetMaterial(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMaterial";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i, nels;
+    DBmaterial_mt       m;
+    DBmaterial          *ma=NULL;
+    char                *s=NULL;
+    
+    PROTECT {
+        /* Open object and make sure it's a material */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MATERIAL!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmaterial_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(ma=DBAllocMaterial())) return NULL;
+        ma->name = BASEDUP(name);
+        ma->meshname = OPTDUP(m.meshid);
+        ma->ndims = m.ndims;
+        ma->origin = m.origin;
+        ma->major_order = m.major_order;
+        ma->allowmat0 = m.allowmat0;
+        ma->guihide = m.guihide;
+        ma->nmat = m.nmat;
+        ma->mixlen = m.mixlen;
+        if ((ma->datatype = db_hdf5_GetVarType(_dbfile, m.mix_vf)) < 0)
+            ma->datatype = DB_DOUBLE;  /* PDB driver assumes double */
+        if (force_single_g) ma->datatype = DB_FLOAT;
+        for (nels=1, i=0; i<m.ndims; i++) {
+            ma->dims[i] = m.dims[i];
+            ma->stride[i] = nels;
+            nels *= m.dims[i];
+        }
+
+        /* Read the raw data */
+        if (SILO_Globals.dataReadMask & DBMatMatlist)
+            ma->matlist = db_hdf5_comprd(dbfile, m.matlist, 1);
+        if (SILO_Globals.dataReadMask & DBMatMatnos)
+            ma->matnos = db_hdf5_comprd(dbfile, m.matnos, 1);
+        if (SILO_Globals.dataReadMask & DBMatMixList)
+        {
+            ma->mix_vf = db_hdf5_comprd(dbfile, m.mix_vf, 0);
+            ma->mix_next = db_hdf5_comprd(dbfile, m.mix_next, 1);
+            ma->mix_mat = db_hdf5_comprd(dbfile, m.mix_mat, 1);
+            ma->mix_zone = db_hdf5_comprd(dbfile, m.mix_zone, 1);
+        }
+        if (SILO_Globals.dataReadMask & DBMatMatnames)
+        {
+            s = db_hdf5_comprd(dbfile, m.matnames, 1);
+            if (s) ma->matnames = DBStringListToStringArray(s, ma->nmat,
+                !handleSlashSwap, !skipFirstSemicolon);
+            FREE(s);
+        }
+        if (SILO_Globals.dataReadMask & DBMatMatcolors)
+        {
+            s = db_hdf5_comprd(dbfile, m.matcolors, 1);
+            if (s) ma->matcolors = DBStringListToStringArray(s, ma->nmat,
+                !handleSlashSwap, !skipFirstSemicolon);
+            FREE(s);
+        }
+
+        H5Tclose(o);
+        FREE(s);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMaterial(ma);
+        FREE(s);
+    } END_PROTECT;
+
+    return ma;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMatspecies
+ *
+ * Purpose:     Write a matspecies object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Removed the `origin' property to duplicate changes made to
+ *              the PDB driver.
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *   Added names and colors for species.
+ *
+ *   Mark C. Miller, Thu Feb 11 09:40:10 PST 2010
+ *   Set global values in _ms to zero after use.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMatspecies(DBfile *_dbfile, char *name, char *matname, int nmat,
+                      int nmatspec[], int speclist[], int dims[], int ndims,
+                      int nspecies_mf, DB_DTPTR1 species_mf, int mix_speclist[],
+                      int mixlen, int datatype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmatspecies_mt     m;
+    char               *s = NULL;
+    int                 i, nels, nstrs = 0;
+    
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ProcessOptlist(DB_MATSPECIES, optlist);
+
+        /* Write raw data arrays */
+        for (i=0, nels=1; i<ndims; i++) nels *= dims[i];
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nels, speclist, m.speclist/*out*/,
+            friendly_name(name,"_speclist", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nmat, nmatspec, m.nmatspec/*out*/,
+            friendly_name(name,"_nmatspec", 0));
+        db_hdf5_compwr(dbfile, datatype, 1, &nspecies_mf, species_mf,
+            m.species_mf/*out*/, friendly_name(name,"_species_mf", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &mixlen, mix_speclist,
+            m.mix_speclist/*out*/, friendly_name(name,"_mix_speclist", 0));
+        
+        if (_ms._specnames != NULL) {
+            int len;
+            for (i = 0; i < nmat; i++)
+                nstrs += nmatspec[i];
+            DBStringArrayToStringList(_ms._specnames, nstrs, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.specnames/*out*/,
+                friendly_name(name, "_species_names", 0));
+            FREE(s);
+            _ms._specnames = NULL;
+        }
+
+        if (_ms._speccolors != NULL) {
+            int len;
+            if (nstrs == 0)
+            {
+                for (i = 0; i < nmat; i++)
+                    nstrs += nmatspec[i];
+            }
+            DBStringArrayToStringList(_ms._speccolors, nstrs, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.speccolors/*out*/,
+                friendly_name(name,"_speccolors", 0));
+            FREE(s);
+            _ms._speccolors = NULL;
+        }
+
+        /* Build header in memory */
+        m.ndims = ndims;
+        m.nmat = nmat;
+        m.nspecies_mf = nspecies_mf;
+        m.mixlen = mixlen;
+        m.major_order = _ms._majororder;
+        m.guihide = _ms._guihide;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+        strcpy(m.matname, OPT(matname));
+        for (i=0; i<ndims; i++) m.dims[i] = dims[i];
+        
+        /* Write header to file */
+        STRUCT(DBmatspecies) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nmat)         MEMBER_S(int, nmat);
+            if (m.nspecies_mf)  MEMBER_S(int, nspecies_mf);
+            if (m.mixlen)       MEMBER_S(int, mixlen);
+            if (m.major_order)  MEMBER_S(int, major_order);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            MEMBER_3(int, dims);
+            MEMBER_S(str(m.matname), matname);
+            MEMBER_S(str(m.speclist), speclist);
+            MEMBER_S(str(m.nmatspec), nmatspec);
+            MEMBER_S(str(m.species_mf), species_mf);
+            MEMBER_S(str(m.mix_speclist), mix_speclist);
+            MEMBER_S(str(m.specnames), specnames);
+            MEMBER_S(str(m.speccolors), speccolors);
+        } OUTPUT(dbfile, DB_MATSPECIES, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMatspecies
+ *
+ * Purpose:     Reads a matspecies object from the file.
+ *
+ * Return:      Success:        Ptr to new matspecies object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Removed the `origin' property, duplicating changes made to
+ *              the PDB driver.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Made it set correct datatype.
+ *
+ *              Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *              Added names and colors for species.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmatspecies *
+db_hdf5_GetMatspecies(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMatspecies";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i, nels, nstrs = 0;
+    DBmatspecies_mt     m;
+    DBmatspecies        *ms=NULL;
+    char                *s=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a matspecies */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MATSPECIES!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmatspecies_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(ms=DBAllocMatspecies())) return NULL;
+        ms->name = BASEDUP(name);
+        ms->matname = OPTDUP(m.matname);
+        ms->nmat = m.nmat;
+        ms->ndims = m.ndims;
+        ms->guihide = m.guihide;
+        ms->major_order = m.major_order;
+        ms->nspecies_mf = m.nspecies_mf;
+        ms->mixlen = m.mixlen;
+        if ((ms->datatype = db_hdf5_GetVarType(_dbfile, m.species_mf)) < 0)
+            ms->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) ms->datatype = DB_FLOAT;
+        for (i=0, nels=1; i<m.ndims; i++) {
+            ms->dims[i] = m.dims[i];
+            ms->stride[i] = nels;
+            nels *= m.dims[i];
+        }
+
+        /* Read the raw data */
+        ms->nmatspec = db_hdf5_comprd(dbfile, m.nmatspec, 1);
+        ms->species_mf = db_hdf5_comprd(dbfile, m.species_mf, 0);
+        ms->speclist = db_hdf5_comprd(dbfile, m.speclist, 1);
+        ms->mix_speclist = db_hdf5_comprd(dbfile, m.mix_speclist, 1);
+        if (SILO_Globals.dataReadMask & DBMatMatnames)
+        {
+            for (i=0; i < ms->nmat; i++)
+                nstrs += ms->nmatspec[i];
+            s = db_hdf5_comprd(dbfile, m.specnames, 1);
+            if (s) ms->specnames = DBStringListToStringArray(s, nstrs,
+                !handleSlashSwap, !skipFirstSemicolon);
+            FREE(s);
+        }
+        if (SILO_Globals.dataReadMask & DBMatMatcolors)
+        {
+            if (nstrs == 0)
+            {
+                for (i=0; i < ms->nmat; i++)
+                    nstrs += ms->nmatspec[i];
+            }
+            s = db_hdf5_comprd(dbfile, m.speccolors, 1);
+            if (s) ms->speccolors = DBStringListToStringArray(s, nstrs,
+                !handleSlashSwap, !skipFirstSemicolon);
+            FREE(s);
+        }
+
+        H5Aclose(attr);
+        H5Tclose(o);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMatspecies(ms);
+    } END_PROTECT;
+    return ms;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMultimesh
+ *
+ * Purpose:     Write a multi-block mesh object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  2, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Eric Brugger, 2004-03-12
+ *              Split the declaration and initialization of sizes
+ *              into multiple statements so that it compiles on old
+ *              sgi compilers.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Added call to reset global data
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMultimesh(DBfile *_dbfile, char *name, int nmesh,
+                     char *meshnames[], int meshtypes[], DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmultimesh_mt      m;
+    int                 i, len;
+    char                *s=NULL;
+    char                *t=NULL;
+    
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ResetGlobalData_MultiMesh();
+        db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _mm._time_set, _mm._time,
+            _mm._dtime_set, _mm._dtime, _mm._cycle);
+
+        /*
+         * Create a character string which is a semi-colon separated list of
+         * mesh names.
+         */
+        if (meshnames)
+        {
+            for (i=len=0; i<nmesh; i++) len += strlen(meshnames[i])+1;
+            s = malloc(len+1);
+            for (i=len=0; i<nmesh; i++) {
+                if (i) s[len++] = ';';
+                strcpy(s+len, meshnames[i]);
+                len += strlen(meshnames[i]);
+            }
+            len++; /*count null*/
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s,
+                m.meshnames/*out*/, friendly_name(name,"_meshnames", 0));
+        }
+        
+        /* Write raw data arrays */
+        if (meshtypes)
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nmesh, meshtypes,
+                m.meshtypes/*out*/, friendly_name(name,"_meshtypes", 0));
+        if (_mm._extents && _mm._extentssize) {
+            int sizes[2];
+            sizes[0] = nmesh;
+            sizes[1] = _mm._extentssize;
+            db_hdf5_compwr(dbfile, DB_DOUBLE, 2, sizes, _mm._extents,
+                m.extents/*out*/, friendly_name(name,"_extents",0));
+        }
+        if (_mm._zonecounts) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nmesh, _mm._zonecounts,
+                m.zonecounts/*out*/, friendly_name(name,"_zoneconts",0));
+        }
+        if (_mm._has_external_zones) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nmesh, _mm._has_external_zones,
+                m.has_external_zones/*out*/, friendly_name(name,"_has_external_zones",0));
+        }
+        if (_mm._lgroupings > 0 && _mm._groupings != NULL) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._lgroupings, _mm._groupings,
+                m.groupings/*out*/, friendly_name(name,"_groupings",0));
+        }
+        if (_mm._lgroupings > 0 && _mm._groupnames != NULL) {
+           DBStringArrayToStringList(_mm._groupnames, 
+                           _mm._lgroupings, &t, &len);
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, t,
+                m.groupnames/*out*/, friendly_name(name,"_groupnames",0));
+           FREE(t);
+        }
+        if (_mm._file_ns)
+        {
+           len = strlen(_mm._file_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._file_ns,
+                m.file_ns_name/*out*/, friendly_name(name,"_file_ns",0));
+        }
+        if (_mm._block_ns)
+        {
+           len = strlen(_mm._block_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._block_ns,
+                m.block_ns_name/*out*/, friendly_name(name,"_block_ns",0));
+        }
+        if (_mm._empty_list && _mm._empty_cnt>0) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._empty_cnt, _mm._empty_list,
+                m.empty_list/*out*/, friendly_name(name,"_empty_list",0));
+        }
+        
+        /* Initialize meta data */
+        m.nblocks = nmesh;
+        m.cycle = _mm._cycle;
+        m.time = _mm._time;
+        m.dtime = _mm._dtime;
+        m.ngroups = _mm._ngroups;
+        m.blockorigin = _mm._blockorigin;
+        m.grouporigin = _mm._grouporigin;
+        m.extentssize = _mm._extentssize;
+        m.guihide = _mm._guihide;
+        m.lgroupings = _mm._lgroupings;
+        m.tv_connectivity = _mm._tv_connectivity;
+        m.disjoint_mode = _mm._disjoint_mode;
+        m.topo_dim = _mm._topo_dim;
+        strcpy(m.mrgtree_name, OPT(_mm._mrgtree_name));
+        m.block_type = _mm._block_type;
+        m.empty_cnt = _mm._empty_cnt;
+
+        /* Write meta data to file */
+        STRUCT(DBmultimesh) {
+            if (m.nblocks)      MEMBER_S(int, nblocks);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.ngroups)      MEMBER_S(int, ngroups);
+            if (m.blockorigin)  MEMBER_S(int, blockorigin);
+            if (m.grouporigin)  MEMBER_S(int, grouporigin);
+            if (_mm._time_set)  MEMBER_S(float, time);
+            if (_mm._dtime_set) MEMBER_S(double, dtime);
+            if (m.extentssize)  MEMBER_S(int, extentssize);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            MEMBER_S(str(m.meshtypes), meshtypes);
+            MEMBER_S(str(m.meshnames), meshnames);
+            MEMBER_S(str(m.extents), extents);
+            MEMBER_S(str(m.zonecounts), zonecounts);
+            MEMBER_S(str(m.has_external_zones), has_external_zones);
+            if (m.lgroupings)   MEMBER_S(int, lgroupings);
+            MEMBER_S(str(m.groupings), groupings);
+            MEMBER_S(str(m.groupnames), groupnames);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+            if (m.tv_connectivity) MEMBER_S(int, tv_connectivity);
+            if (m.disjoint_mode)   MEMBER_S(int, disjoint_mode);
+            if (m.topo_dim)     MEMBER_S(int, topo_dim);
+            MEMBER_S(str(m.file_ns_name), file_ns_name);
+            MEMBER_S(str(m.block_ns_name), block_ns_name);
+            if (m.block_type)   MEMBER_S(int, block_type);
+            MEMBER_S(str(m.empty_list), empty_list);
+            if (m.empty_cnt)   MEMBER_S(int, empty_cnt);
+        } OUTPUT(dbfile, DB_MULTIMESH, name, &m);
+
+        /* Free resources */
+        FREE(s);
+        
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMultimesh
+ *
+ * Purpose:     Reads a multimesh object from the file.
+ *
+ * Return:      Success:        Ptr to new multimesh object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Wed Feb  2 07:52:22 PST 2005
+ *              Added code to temporarily disable force single when
+ *              reading extents
+ *
+ *   Mark C. Miller, Tue Feb 15 14:53:29 PST 2005
+ *   Changed how force_single was handled to deal with possible throw
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultimesh *
+db_hdf5_GetMultimesh(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMultimesh";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBmultimesh_mt      m;
+    DBmultimesh         *mm=NULL;
+    char                *s=NULL;
+    char                *t=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a multimesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MULTIMESH!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmultimesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(mm=DBAllocMultimesh(0))) return NULL;
+        mm->nblocks = m.nblocks;
+        mm->ngroups = m.ngroups;
+        mm->blockorigin = m.blockorigin;
+        mm->grouporigin = m.grouporigin;
+        mm->extentssize = m.extentssize;
+        mm->guihide = m.guihide;
+        mm->lgroupings = m.lgroupings;
+        mm->mrgtree_name = OPTDUP(m.mrgtree_name);
+        mm->tv_connectivity = m.tv_connectivity;
+        mm->disjoint_mode = m.disjoint_mode;
+        /* The value we store to the file for 'topo_dim' member is
+           designed such that zero indicates a value that was NOT
+           specified in the file. Since zero is a valid topological
+           dimension, when we store topo_dim to a file, we always
+           add 1. So, we have to subtract it here. This was implemented
+           for multimeshes in 4.7 and so is handled correctly for
+           them in all cases. */
+        mm->topo_dim = m.topo_dim - 1;
+
+        /* Read the raw data */
+        if (mm->extentssize>0)
+           mm->extents = db_hdf5_comprd(dbfile, m.extents, 1);
+        mm->zonecounts =  db_hdf5_comprd(dbfile, m.zonecounts, 1);
+        mm->has_external_zones =  db_hdf5_comprd(dbfile, m.has_external_zones, 1);
+        mm->meshtypes = db_hdf5_comprd(dbfile, m.meshtypes, 1);
+        s = db_hdf5_comprd(dbfile, m.meshnames, 1);
+        if (s) mm->meshnames = DBStringListToStringArray(s, m.nblocks,
+            handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+        mm->groupings =  db_hdf5_comprd(dbfile, m.groupings, 1);
+        t = db_hdf5_comprd(dbfile, m.groupnames, 1);
+        if (t) mm->groupnames = DBStringListToStringArray(t, mm->lgroupings,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(t);
+        mm->file_ns =  db_hdf5_comprd(dbfile, m.file_ns_name, 1);
+        mm->block_ns =  db_hdf5_comprd(dbfile, m.block_ns_name, 1);
+        mm->block_type = m.block_type;
+        mm->empty_list =  db_hdf5_comprd(dbfile, m.empty_list, 1);
+        mm->empty_cnt = m.empty_cnt;
+        
+        H5Tclose(o);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMultimesh(mm);
+        FREE(t);
+        FREE(s);
+    } END_PROTECT;
+    return mm;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMultimeshadj
+ *
+ * Purpose:     Write a multi-block mesh adjacency object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Thursday, September 8, 2005 
+ *
+ * Modifcations:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Sat Oct 18 08:22:18 PDT 2008
+ *   Added patch from Sean Ahern where the write of the zonelists was
+ *   actually referring to the nodelists array.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *
+ *   Mark C. Miller, Sat Mar 27 10:51:48 PDT 2010
+ *   Add missing call to H5Tclose(o). Wouldn't have detected this without
+ *   changing close degree setting based on DBShowErrors setting.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMultimeshadj(DBfile *_dbfile, const char *name, int nmesh,
+                  const int *meshtypes, const int *nneighbors,
+                  const int *neighbors, const int *back,
+                  const int *lnodelists, int *nodelists[],
+                  const int *lzonelists, int *zonelists[],
+                  DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmultimeshadj_mt   m;
+    int                 i, len, lneighbors, zoff, noff;
+    char                *s=NULL;
+    hid_t               o=-1, attr=-1, nldset=-1, zldset=-1;
+    hid_t               mtype=-1, fspace=-1, mspace=-1;
+    static char         *me = "db_hdf5_PutMultimeshadj";
+    int                 _objtype;
+    
+    memset(&m, 0, sizeof m);
+
+    /* compute expected size of neighbors array */
+    lneighbors = 0;
+    for (i = 0; i < nmesh; i++)
+       lneighbors += nneighbors[i];
+
+    PROTECT {
+
+       H5E_BEGIN_TRY {
+           o = H5Topen(dbfile->cwg, name);
+       } H5E_END_TRY;
+
+       if (o >= 0)
+       {
+            /* Object exists, do some simple sanity checking */
+            if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+                H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+                H5Aclose(attr)<0) {
+                db_perror((char*)name, E_CALLFAIL, me);
+                UNWIND();
+            }
+            if (DB_MULTIMESHADJ!=(DBObjectType)_objtype) {
+                db_perror("not a DBmultimeshadj object", E_BADARGS, me);
+                UNWIND();
+            }
+
+            /* Read meta data into memory */
+            if ((attr=H5Aopen_name(o, "silo"))<0 ||
+                H5Aread(attr, DBmultimeshadj_mt5, &m)<0 ||
+                H5Aclose(attr)<0) {
+                db_perror((char*)name, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            /* should add correct sanity checks here */
+
+            H5Tclose(o);
+
+       }
+       else
+       {
+
+           /* Object doesn't exist, allocate space in the file for the datasets */
+           db_ResetGlobalData_MultiMesh();
+           db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+           /* Initialize meta data */
+           m.nblocks = nmesh;
+           m.blockorigin = _mm._blockorigin;
+           m.lneighbors = lneighbors;
+
+           /* compute length of neighbors, back, lnodelists, nodelists,
+              lzonelists, zonelists arrays */
+           lneighbors = 0;
+           for (i = 0; i < nmesh; i++)
+               lneighbors += nneighbors[i];
+
+           db_hdf5_compwr(dbfile, DB_INT, 1, &nmesh, (void*)meshtypes,
+               m.meshtypes/*out*/, friendly_name(name, "_meshtypes",0));
+           db_hdf5_compwr(dbfile, DB_INT, 1, &nmesh, (void*)nneighbors,
+               m.nneighbors/*out*/, friendly_name(name,"_nneighbots",0));
+           db_hdf5_compwr(dbfile, DB_INT, 1, &lneighbors, (void*)neighbors,
+               m.neighbors/*out*/, friendly_name(name,"_neighbors",0));
+           if (back)
+           {
+               db_hdf5_compwr(dbfile, DB_INT, 1, &lneighbors, (void*)back,
+                   m.back/*out*/, friendly_name(name,"_back",0));
+           }
+           if (lnodelists)
+           {
+               db_hdf5_compwr(dbfile, DB_INT, 1, &lneighbors, (void*)lnodelists,
+                   m.lnodelists/*out*/, friendly_name(name,"_lnodelists",0));
+           }
+           if (lzonelists)
+           {
+               db_hdf5_compwr(dbfile, DB_INT, 1, &lneighbors, (void*)lzonelists,
+                   m.lzonelists/*out*/, friendly_name(name,"_lzonelists",0));
+           }
+
+           /* All object components up to here are invariant and *should*
+              be identical in repeated calls. Now, handle the parts of the
+              object that can vary from call to call. Reserve space for
+              the entire nodelists and/or zonelists arrays */
+
+           if (nodelists) {
+
+               /* compute total length of nodelists array */
+               len = 0;
+               for (i = 0; i < lneighbors; i++)
+                   len += lnodelists[i];
+               m.totlnodelists = len;
+
+               /* reserve space for the nodelists array in the file */
+               /* negative rank means to reserve space */
+               if (db_hdf5_compwr(dbfile, DB_INT, -1, &len, NULL,
+                       m.nodelists/*out*/, friendly_name(name,"_nodelists",0))<0) {
+                  return db_perror ("db_hdf5_compwr", E_CALLFAIL, me) ;
+               }
+           }
+
+           if (zonelists) {
+
+               /* compute total length of nodelists array */
+               len = 0;
+               for (i = 0; i < lneighbors; i++)
+                   len += lzonelists[i];
+               m.totlzonelists = len;
+
+               /* reserve space for the zonelists array in the file */
+               /* negative rank means to reserve space */
+               if (db_hdf5_compwr(dbfile, DB_INT, -1, &len, NULL,
+                       m.zonelists/*out*/, friendly_name(name, "_zonelists",0))<0) {
+                  return db_perror ("db_hdf5_compwr", E_CALLFAIL, me) ;
+               }
+           }
+
+           /* hack to maintain backward compatibility with pdb driver */
+           db_hdf5_handle_ctdt(dbfile, _mm._time_set, _mm._time,
+               _mm._dtime_set, _mm._dtime, _mm._cycle);
+
+           /* Write meta data to file */
+           STRUCT(DBmultimeshadj) {
+               MEMBER_S(int, nblocks);
+               MEMBER_S(int, blockorigin);
+               MEMBER_S(int, lneighbors);
+               if (m.totlnodelists) MEMBER_S(int, totlnodelists);
+               if (m.totlzonelists) MEMBER_S(int, totlzonelists);
+               MEMBER_S(str(m.meshtypes), meshtypes);
+               MEMBER_S(str(m.nneighbors), nneighbors);
+               MEMBER_S(str(m.neighbors), neighbors);
+               if (m.back[0]) MEMBER_S(str(m.back), back);
+               if (m.lnodelists[0]) MEMBER_S(str(m.lnodelists), lnodelists);
+               if (m.nodelists[0]) MEMBER_S(str(m.nodelists), nodelists);
+               if (m.lzonelists[0]) MEMBER_S(str(m.lzonelists), lzonelists);
+               if (m.zonelists[0]) MEMBER_S(str(m.zonelists), zonelists);
+           } OUTPUT(dbfile, DB_MULTIMESHADJ, name, &m);
+       }
+
+       if (m.nodelists[0] && 
+           (nldset = H5Dopen(dbfile->cwg, m.nodelists)) < 0) {
+           db_perror((char*)name, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       if (m.zonelists[0] &&
+           (zldset = H5Dopen(dbfile->cwg, m.zonelists)) < 0) {
+           db_perror((char*)name, E_CALLFAIL, me);
+           UNWIND();
+       }
+
+       if ((mtype=silom2hdfm_type(DB_INT))<0) {
+           db_perror("datatype", E_BADARGS, me);
+           UNWIND();
+       }
+
+       /* Ok, now write contents of nodelists and/or zonelists */
+       noff = 0;
+       zoff = 0;
+       for (i = 0; i < lneighbors; i++)
+       {
+          hsize_t ds_size[H5S_MAX_RANK];
+
+          if (nodelists)
+          {
+             if (nodelists[i])
+             {
+                int offset = noff;
+                int length = lnodelists[i];
+                int stride = 1;
+
+                /* Build the file space selection */
+                if ((fspace=build_fspace(nldset, 1, &offset, &length, &stride,
+                                        ds_size/*out*/))<0) {
+                   db_perror("file data space", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Build the memory data space */
+               if ((mspace=H5Screate_simple(1, ds_size, NULL))<0) {
+                   db_perror("memory data space", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Write data */
+               if (H5Dwrite(nldset, mtype, mspace, fspace, H5P_DEFAULT, nodelists[i])<0) {
+                   db_perror("partial write", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Close everything */
+               H5Sclose(fspace);
+               H5Sclose(mspace);
+             }
+             noff += lnodelists[i];
+          }
+
+          if (zonelists)
+          {
+             if (zonelists[i])
+             {
+                int offset = zoff;
+                int length = lzonelists[i];
+                int stride = 1;
+
+               /* Build the file space selection */
+               if ((fspace=build_fspace(zldset, 1, &offset, &length, &stride,
+                                        ds_size/*out*/))<0) {
+                   db_perror("file data space", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Build the memory data space */
+               if ((mspace=H5Screate_simple(1, ds_size, NULL))<0) {
+                   db_perror("memory data space", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Write data */
+               if (H5Dwrite(zldset, mtype, mspace, fspace, H5P_DEFAULT, zonelists[i])<0) {
+                   db_perror("partial write", E_CALLFAIL, me);
+                   UNWIND();
+               }
+
+               /* Close everything */
+               H5Sclose(fspace);
+               H5Sclose(mspace);
+
+             }
+             zoff += lzonelists[i];
+          }
+       }
+
+       if (nldset != -1)
+           H5Dclose(nldset);
+       if (zldset != -1)
+           H5Dclose(zldset);
+
+    } CLEANUP {
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMultimeshadj
+ *
+ * Purpose:     Reads a multimesh adjacency object from the file.
+ *
+ * Return:      Success:        Ptr to new multimesh adjacency object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              Thursday, September 8, 2005 
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultimeshadj *
+db_hdf5_GetMultimeshadj(DBfile *_dbfile, const char *name, int nmesh,
+                        const int *block_map)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMultimesh";
+    hid_t               o=-1, attr=-1, nldset = -1, zldset = -1;
+    hid_t               mtype=-1, fspace=-1, mspace=-1;
+    DBmultimeshadj_mt   m;
+    DBmultimeshadj      *mmadj=NULL;
+    char                *typestring = NULL;
+    int                 i, j, tmpnmesh, _objtype;
+    int                 *offsetmap, *offsetmapn=0, *offsetmapz=0, lneighbors, tmpoff;
+
+    PROTECT {
+        /* Open object and make sure it's a multimesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror((char*)name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MULTIMESHADJ!=(DBObjectType)_objtype) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmultimeshadj_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(mmadj=DBAllocMultimeshadj(0))) return NULL;
+        mmadj->nblocks = m.nblocks;
+        mmadj->blockorigin = m.blockorigin;
+        mmadj->lneighbors = m.lneighbors;
+
+        /* Read the raw data */
+        mmadj->meshtypes = db_hdf5_comprd(dbfile, m.meshtypes, 1);
+        mmadj->nneighbors = db_hdf5_comprd(dbfile, m.nneighbors, 1);
+        mmadj->neighbors = db_hdf5_comprd(dbfile, m.neighbors, 1);
+        mmadj->back = db_hdf5_comprd(dbfile, m.back, 1);
+        mmadj->lnodelists = db_hdf5_comprd(dbfile, m.lnodelists, 1);
+        mmadj->lzonelists = db_hdf5_comprd(dbfile, m.lzonelists, 1);
+
+        offsetmap = ALLOC_N(int, mmadj->nblocks);
+        lneighbors = 0;
+        for (i = 0; i < mmadj->nblocks; i++)
+        {
+            offsetmap[i] = lneighbors;
+            lneighbors += mmadj->nneighbors[i];
+        }
+ 
+        if (mmadj->lnodelists && (SILO_Globals.dataReadMask & DBMMADJNodelists))
+        {
+           mmadj->nodelists = ALLOC_N(int *, lneighbors); 
+           offsetmapn = ALLOC_N(int, mmadj->nblocks);
+           tmpoff = 0;
+           for (i = 0; i < mmadj->nblocks; i++)
+           {
+               offsetmapn[i] = tmpoff;
+               for (j = 0; j < mmadj->nneighbors[i]; j++)
+                  tmpoff += mmadj->lnodelists[offsetmap[i]+j];
+           }
+           mmadj->totlnodelists = m.totlnodelists;
+        }
+ 
+        if (mmadj->lzonelists && (SILO_Globals.dataReadMask & DBMMADJZonelists))
+        {
+           mmadj->zonelists = ALLOC_N(int *, lneighbors); 
+           offsetmapz = ALLOC_N(int, mmadj->nblocks);
+           tmpoff = 0;
+           for (i = 0; i < mmadj->nblocks; i++)
+           {
+               offsetmapz[i] = tmpoff;
+               for (j = 0; j < mmadj->nneighbors[i]; j++)
+                  tmpoff += mmadj->lzonelists[offsetmap[i]+j];
+           }
+           mmadj->totlzonelists = m.totlzonelists;
+        }
+        
+        tmpnmesh = nmesh;
+        if (nmesh <= 0 || !block_map)
+            tmpnmesh = mmadj->nblocks;
+ 
+        if (m.nodelists[0] && 
+            (nldset = H5Dopen(dbfile->cwg, m.nodelists)) < 0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        if (m.zonelists[0] &&
+            (zldset = H5Dopen(dbfile->cwg, m.zonelists)) < 0) {
+            db_perror((char*)name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        if ((mtype=silom2hdfm_type(DB_INT))<0) {
+            FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+            DBFreeMultimeshadj(mmadj);
+            db_perror("datatype", E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* This loop could be optimized w.r.t. number of I/O requests
+           it makes. The nodelists and/or zonelists could be read in
+           a single call. But then we'd have to split it into separate
+           arrays duplicating memory */
+        for (i = 0; (i < tmpnmesh) &&
+                    (SILO_Globals.dataReadMask & (DBMMADJNodelists|DBMMADJZonelists)); i++)
+        {
+           hsize_t ds_size[H5S_MAX_RANK];
+           int blockno = block_map ? block_map[i] : i;
+ 
+           if (mmadj->lnodelists && (SILO_Globals.dataReadMask & DBMMADJNodelists))
+           {
+              tmpoff = offsetmapn[blockno];
+              for (j = 0; j < mmadj->nneighbors[blockno]; j++)
+              {
+                 int stride = 1;
+                 int len = mmadj->lnodelists[offsetmap[blockno]+j];
+                 int *nlist = ALLOC_N(int, len);
+
+                 /* Build the file space selection */
+                 if ((fspace=build_fspace(nldset, 1, &tmpoff, &len, &stride,
+                                          ds_size/*out*/))<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     db_perror("file data space", E_CALLFAIL, me);
+                     UNWIND();
+                 }
+
+                 /* Build the memory data space */
+                 if ((mspace=H5Screate_simple(1, ds_size, NULL))<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     db_perror("memory data space", E_CALLFAIL, me);
+                     UNWIND();
+                 }
+
+                 P_rdprops = H5P_DEFAULT;
+                 if (!SILO_Globals.enableChecksums)
+                     P_rdprops = P_ckrdprops;
+
+                 /* Read data */
+                 if (H5Dread(nldset, mtype, mspace, fspace, P_rdprops, nlist)<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     hdf5_to_silo_error(name, me);
+                     UNWIND();
+                 }
+
+                 /* Close everything */
+                 H5Sclose(fspace);
+                 H5Sclose(mspace);
+ 
+                 mmadj->nodelists[offsetmap[blockno]+j] = nlist;
+                 tmpoff += len;
+              }
+           }
+ 
+           if (mmadj->lzonelists && (SILO_Globals.dataReadMask & DBMMADJZonelists))
+           {
+              tmpoff = offsetmapz[blockno];
+              for (j = 0; j < mmadj->nneighbors[blockno]; j++)
+              {
+                 int stride = 1;
+                 int len = mmadj->lzonelists[offsetmap[blockno]+j];
+                 int *zlist = ALLOC_N(int, len);
+
+                 /* Build the file space selection */
+                 if ((fspace=build_fspace(zldset, 1, &tmpoff, &len, &stride,
+                                          ds_size/*out*/))<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     db_perror("file data space", E_CALLFAIL, me);
+                     UNWIND();
+                 }
+
+                 /* Build the memory data space */
+                 if ((mspace=H5Screate_simple(1, ds_size, NULL))<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     db_perror("memory data space", E_CALLFAIL, me);
+                     UNWIND();
+                 }
+
+                 P_rdprops = H5P_DEFAULT;
+                 if (!SILO_Globals.enableChecksums)
+                     P_rdprops = P_ckrdprops;
+
+                 /* Read data */
+                 if (H5Dread(zldset, mtype, mspace, fspace, P_rdprops, zlist)<0) {
+                     FREE(offsetmap); FREE(offsetmapn); FREE(offsetmapz);
+                     DBFreeMultimeshadj(mmadj);
+                     hdf5_to_silo_error(name, me);
+                     UNWIND();
+                 }
+
+                 /* Close everything */
+                 H5Sclose(fspace);
+                 H5Sclose(mspace);
+ 
+                 mmadj->zonelists[offsetmap[blockno]+j] = zlist;
+                 tmpoff += len;
+              }
+           }
+        }
+ 
+        FREE(offsetmap);
+        FREE(offsetmapn);
+        FREE(offsetmapz);
+        if (nldset != -1)
+            H5Dclose(nldset);
+        if (zldset != -1)
+            H5Dclose(zldset);
+        H5Tclose(o);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMultimeshadj(mmadj);
+    } END_PROTECT;
+
+    return mmadj;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMultivar
+ *
+ * Purpose:     Writes a multivar object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Eric Brugger, 2004-03-12
+ *              Split the declaration and initialization of sizes
+ *              into multiple statements so that it compiles on old
+ *              sgi compilers.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Added call to reset global data
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMultivar(DBfile *_dbfile, char *name, int nvars, char *varnames[],
+                    int vartypes[], DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmultivar_mt       m;
+    int                 i, len;
+    char                *s=NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+
+        /* Set global options */
+        db_ResetGlobalData_MultiMesh();
+        db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _mm._time_set, _mm._time,
+            _mm._dtime_set, _mm._dtime, _mm._cycle);
+
+        /*
+         * Create a character string which is a semi-colon separated list of
+         * variable names.
+         */
+        if (varnames)
+        {
+            for (i=len=0; i<nvars; i++) len += strlen(varnames[i])+1;
+            s = malloc(len+1);
+            for (i=len=0; i<nvars; i++) {
+                if (i) s[len++] = ';';
+                strcpy(s+len, varnames[i]);
+                len += strlen(varnames[i]);
+            }
+            len++; /*count null*/
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s,
+                m.varnames/*out*/, friendly_name(name, "_varnames", 0));
+        }
+        
+        /* Write raw data arrays */
+        if (vartypes)
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nvars, vartypes,
+                m.vartypes/*out*/, friendly_name(name, "_vartypes", 0));
+        if (_mm._extents && _mm._extentssize) {
+            int sizes[2];
+            sizes[0] = nvars;
+            sizes[1] = _mm._extentssize;
+            db_hdf5_compwr(dbfile, DB_DOUBLE, 2, sizes, _mm._extents,
+                m.extents/*out*/, friendly_name(name, "_extents", 0));
+        }
+
+        /* output mrgtree info if we have it */
+        if (_mm._region_pnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_mm._region_pnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.region_pnames/*out*/,
+                friendly_name(name, "_region_pnames", 0));
+            FREE(s);
+        }
+
+        /* output nameschemes if we have 'em */
+        if (_mm._file_ns)
+        {
+           len = strlen(_mm._file_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._file_ns,
+                m.file_ns_name/*out*/, friendly_name(name,"_file_ns",0));
+        }
+        if (_mm._block_ns)
+        {
+           len = strlen(_mm._block_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._block_ns,
+                m.block_ns_name/*out*/, friendly_name(name,"_block_ns",0));
+        }
+        if (_mm._empty_list && _mm._empty_cnt>0) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._empty_cnt, _mm._empty_list,
+                m.empty_list/*out*/, friendly_name(name,"_empty_list",0));
+        }
+
+        /* Initialize meta data */
+        m.nvars = nvars;
+        m.cycle = _mm._cycle;
+        m.time = _mm._time;
+        m.dtime = _mm._dtime;
+        m.ngroups = _mm._ngroups;
+        m.blockorigin = _mm._blockorigin;
+        m.grouporigin = _mm._grouporigin;
+        m.extentssize = _mm._extentssize;
+        m.guihide = _mm._guihide;
+        strcpy(m.mmesh_name, OPT(_mm._mmesh_name));
+        m.tensor_rank = _mm._tensor_rank;
+        m.conserved = _mm._conserved;
+        m.extensive = _mm._extensive;
+        m.block_type = _mm._block_type;
+        m.empty_cnt = _mm._empty_cnt;
+
+        /* Write meta data to file */
+        STRUCT(DBmultivar) {
+            if (m.nvars)        MEMBER_S(int, nvars);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.ngroups)      MEMBER_S(int, ngroups);
+            if (m.blockorigin)  MEMBER_S(int, blockorigin);
+            if (m.grouporigin)  MEMBER_S(int, grouporigin);
+            if (_mm._time_set)  MEMBER_S(float, time);
+            if (_mm._dtime_set) MEMBER_S(double, dtime);
+            if (m.extentssize)  MEMBER_S(int, extentssize);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (m.tensor_rank)  MEMBER_S(int, tensor_rank);
+            if (m.conserved)    MEMBER_S(int, conserved);
+            if (m.extensive)    MEMBER_S(int, extensive);
+            MEMBER_S(str(m.vartypes), vartypes);
+            MEMBER_S(str(m.varnames), varnames);
+            MEMBER_S(str(m.extents), extents);
+            MEMBER_S(str(m.region_pnames), region_pnames);
+            MEMBER_S(str(m.mmesh_name), mmesh_name);
+            MEMBER_S(str(m.file_ns_name), file_ns_name);
+            MEMBER_S(str(m.block_ns_name), block_ns_name);
+            if (m.block_type)   MEMBER_S(int, block_type);
+            MEMBER_S(str(m.empty_list), empty_list);
+            if (m.empty_cnt)   MEMBER_S(int, empty_cnt);
+        } OUTPUT(dbfile, DB_MULTIVAR, name, &m);
+
+        /* Free resources */
+        FREE(s);
+        
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMultivar
+ *
+ * Purpose:     Reads a multivar object from the file.
+ *
+ * Return:      Success:        Ptr to new multivar object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Removed erroneous code setting vartypes
+ *
+ *              Mark C. Miller, Wed Feb  2 07:52:22 PST 2005
+ *              Added code to temporarily disable force single when
+ *              reading extents
+ *
+ *   Mark C. Miller, Tue Feb 15 14:53:29 PST 2005
+ *   Changed how force_single was handled to deal with possible throw
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultivar *
+db_hdf5_GetMultivar(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMultivar";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBmultivar_mt       m;
+    DBmultivar          *mv=NULL;
+    char                *s=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a multivar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MULTIVAR!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmultivar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(mv=DBAllocMultivar(0))) return NULL;
+        mv->nvars = m.nvars;
+        mv->ngroups = m.ngroups;
+        mv->blockorigin = m.blockorigin;
+        mv->grouporigin = m.grouporigin;
+        mv->extentssize = m.extentssize;
+        mv->guihide = m.guihide;
+        mv->tensor_rank = m.tensor_rank;
+        mv->mmesh_name = OPTDUP(m.mmesh_name);
+        mv->conserved = m.conserved;
+        mv->extensive = m.extensive;
+
+        /* Read the raw data variable types and convert to mem types*/
+        if (mv->extentssize>0)
+           mv->extents = db_hdf5_comprd(dbfile, m.extents, 1);
+        mv->vartypes = db_hdf5_comprd(dbfile, m.vartypes, 1);
+
+        /* Read the raw data variable names */
+        s = db_hdf5_comprd(dbfile, m.varnames, 1);
+        if (s) mv->varnames = DBStringListToStringArray(s, m.nvars,
+           handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        s = db_hdf5_comprd(dbfile, m.region_pnames, 1);
+        if (s) mv->region_pnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        mv->file_ns =  db_hdf5_comprd(dbfile, m.file_ns_name, 1);
+        mv->block_ns =  db_hdf5_comprd(dbfile, m.block_ns_name, 1);
+        mv->block_type = m.block_type;
+        mv->empty_list =  db_hdf5_comprd(dbfile, m.empty_list, 1);
+        mv->empty_cnt = m.empty_cnt;
+        
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMultivar(mv);
+        FREE(s);
+    } END_PROTECT;
+    return mv;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMultimat
+ *
+ * Purpose:     Write a multimat object into the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Added call to reset global data
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *   Added material names and matcolors options
+ *
+ *   Thoamas R. Treadway, Tue Aug 15 14:05:59 PDT 2006
+ *   Added DBOPT_ALLOWMAT0
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMultimat(DBfile *_dbfile, char *name, int nmats, char *matnames[],
+                    DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmultimat_mt       m;
+    int                 i, len;
+    char                *s=NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ResetGlobalData_MultiMesh();
+        db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _mm._time_set, _mm._time,
+            _mm._dtime_set, _mm._dtime, _mm._cycle);
+
+        /*
+         * Create a character string which is a semi-colon separated list of
+         * material names.
+         */
+        /* Write raw data arrays */
+        if (matnames)
+        {
+            for (i=len=0; i<nmats; i++) len += strlen(matnames[i])+1;
+            s = malloc(len+1);
+            for (i=len=0; i<nmats; i++) {
+                if (i) s[len++] = ';';
+                strcpy(s+len, matnames[i]);
+                len += strlen(matnames[i]);
+            }
+            len++; /*count null*/
+
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.matnames/*out*/,
+                friendly_name(name, "_matnames", 0));
+        }
+        if (_mm._matnos && _mm._nmatnos > 0) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._nmatnos, _mm._matnos,
+                m.matnos/*out*/, friendly_name(name,"_matnos", 0));
+        }
+        if (_mm._mixlens) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nmats, _mm._mixlens,
+                m.mixlens/*out*/, friendly_name(name,"_mixlens", 0));
+        }
+        if (_mm._matcounts && _mm._matlists) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &nmats, _mm._matcounts,
+                m.matcounts/*out*/, friendly_name(name,"_matcounts", 0));
+            for (i=len=0; i<nmats; i++)
+               len += _mm._matcounts[i];
+            db_hdf5_compwr(dbfile, DB_INT, 1, &len, _mm._matlists,
+                m.matlists/*out*/, friendly_name(name,"_matlists", 0));
+        }
+        if (_mm._matcolors && _mm._nmatnos > 0) {
+            int len; char *tmp;
+            DBStringArrayToStringList(_mm._matcolors,
+                _mm._nmatnos, &tmp, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                m.mat_colors/*out*/, friendly_name(name,"_matcolors", 0));
+            FREE(tmp);
+        }
+        if (_mm._matnames && _mm._nmatnos > 0) {
+            int len; char *tmp;
+            DBStringArrayToStringList(_mm._matnames,
+                _mm._nmatnos, &tmp, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                m.material_names/*out*/, friendly_name(name,"_material_names", 0));
+            FREE(tmp);
+        }
+        /* output nameschemes if we have 'em */
+        if (_mm._file_ns)
+        {
+           len = strlen(_mm._file_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._file_ns,
+                m.file_ns_name/*out*/, friendly_name(name,"_file_ns",0));
+        }
+        if (_mm._block_ns)
+        {
+           len = strlen(_mm._block_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._block_ns,
+                m.block_ns_name/*out*/, friendly_name(name,"_block_ns",0));
+        }
+        if (_mm._empty_list && _mm._empty_cnt>0) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._empty_cnt, _mm._empty_list,
+                m.empty_list/*out*/, friendly_name(name,"_empty_list",0));
+        }
+
+        /* Initialize meta data */
+        m.nmats = nmats;
+        m.cycle = _mm._cycle;
+        m.time = _mm._time;
+        m.dtime = _mm._dtime;
+        m.ngroups = _mm._ngroups;
+        m.blockorigin = _mm._blockorigin;
+        m.grouporigin = _mm._grouporigin;
+        m.nmatnos = _mm._nmatnos;
+        m.allowmat0 = _mm._allowmat0;
+        m.guihide = _mm._guihide;
+        strcpy(m.mmesh_name, OPT(_mm._mmesh_name));
+        m.empty_cnt = _mm._empty_cnt;
+
+        /* Write meta data to file */
+        STRUCT(DBmultimat) {
+            if (m.nmats)        MEMBER_S(int, nmats);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.ngroups)      MEMBER_S(int, ngroups);
+            if (m.blockorigin)  MEMBER_S(int, blockorigin);
+            if (m.grouporigin)  MEMBER_S(int, grouporigin);
+            if (_mm._time_set)  MEMBER_S(float, time);
+            if (_mm._dtime_set) MEMBER_S(double, dtime);
+            MEMBER_S(str(m.matnames), matnames);
+            MEMBER_S(str(m.matnos), matnos);
+            MEMBER_S(str(m.mixlens), mixlens);
+            MEMBER_S(str(m.matcounts), matcounts);
+            MEMBER_S(str(m.matlists), matlists);
+            if (m.nmatnos)      MEMBER_S(int, nmatnos);
+            if (m.allowmat0)    MEMBER_S(int, allowmat0);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            MEMBER_S(str(m.material_names), material_names);
+            MEMBER_S(str(m.mat_colors), mat_colors);
+            MEMBER_S(str(m.mmesh_name), mmesh_name);
+            MEMBER_S(str(m.file_ns_name), file_ns_name);
+            MEMBER_S(str(m.block_ns_name), block_ns_name);
+            MEMBER_S(str(m.empty_list), empty_list);
+            if (m.empty_cnt)   MEMBER_S(int, empty_cnt);
+        } OUTPUT(dbfile, DB_MULTIMAT, name, &m);
+
+        /* Free resources */
+        FREE(s);
+        
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMultimat
+ *
+ * Purpose:     Reads a multimat object from the file.
+ *
+ * Return:      Success:        Ptr to new multimat object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added material names and material colors options as well as nmatnos
+ *    and matnos
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultimat *
+db_hdf5_GetMultimat(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMultimat";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype;
+    DBmultimat_mt       m;
+    DBmultimat          *mm=NULL;
+    char                *s=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a multimat */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MULTIMAT!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmultimat_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(mm=DBAllocMultimat(0))) return NULL;
+        mm->nmats = m.nmats;
+        mm->ngroups = m.ngroups;
+        mm->blockorigin = m.blockorigin;
+        mm->grouporigin = m.grouporigin;
+        mm->allowmat0 = m.allowmat0;
+        mm->guihide = m.guihide;
+        mm->nmatnos = m.nmatnos;
+        mm->mmesh_name = OPTDUP(m.mmesh_name);
+
+        /* Read the raw data */
+        mm->mixlens = db_hdf5_comprd(dbfile, m.mixlens, 1);
+        mm->matcounts = db_hdf5_comprd(dbfile, m.matcounts, 1);
+        mm->matlists = db_hdf5_comprd(dbfile, m.matlists, 1);
+        mm->matnos = db_hdf5_comprd(dbfile, m.matnos, 1);
+        s = db_hdf5_comprd(dbfile, m.matnames, 1);
+        if (s) mm->matnames = DBStringListToStringArray(s, m.nmats,
+            handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        if (m.nmatnos > 0) {
+            char *tmpmaterial_names = db_hdf5_comprd(dbfile, m.material_names, 1);
+            char *tmpmat_colors = db_hdf5_comprd(dbfile, m.mat_colors, 1);
+            if (tmpmaterial_names)
+                mm->material_names = DBStringListToStringArray(tmpmaterial_names,
+                    m.nmatnos, !handleSlashSwap, !skipFirstSemicolon);
+            if (tmpmat_colors)
+                mm->matcolors = DBStringListToStringArray(tmpmat_colors,
+                    m.nmatnos, !handleSlashSwap, !skipFirstSemicolon);
+            FREE(tmpmaterial_names);
+            FREE(tmpmat_colors);
+        }
+
+        mm->file_ns =  db_hdf5_comprd(dbfile, m.file_ns_name, 1);
+        mm->block_ns =  db_hdf5_comprd(dbfile, m.block_ns_name, 1);
+        mm->empty_list =  db_hdf5_comprd(dbfile, m.empty_list, 1);
+        mm->empty_cnt = m.empty_cnt;
+        
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMultimat(mm);
+        FREE(s);
+    } END_PROTECT;
+    return mm;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMultimatspecies
+ *
+ * Purpose:     Write a multi-mat species object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *              Added call to reset global data
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *   Added names and colors for species.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMultimatspecies(DBfile *_dbfile, char *name, int nspec,
+                           char *specnames[], DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmultimatspecies_mt m;
+    int                 i, len, nstrs = 0;
+    char                *s=NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ResetGlobalData_MultiMesh();
+        db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _mm._time_set, _mm._time,
+            _mm._dtime_set, _mm._dtime, _mm._cycle);
+
+        /*
+         * Create a character string which is a semi-colon separated list of
+         * material names.
+         */
+        /* Write raw data arrays */
+        if (specnames)
+        {
+            for (i=len=0; i<nspec; i++) len += strlen(specnames[i])+1;
+            s = malloc(len+1);
+            for (i=len=0; i<nspec; i++) {
+                if (i) s[len++] = ';';
+                strcpy(s+len, specnames[i]);
+                len += strlen(specnames[i]);
+            }
+            len++; /*count null*/
+
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.specnames/*out*/,
+                friendly_name(name, "_specnames", 0));
+        }
+
+        if (_mm._nmat>0 && _mm._nmatspec) {
+
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._nmat, _mm._nmatspec,
+                m.nmatspec/*out*/, friendly_name(name, "_nmatspec", 0));
+
+            if (_mm._specnames) {
+                int len; char *tmp;
+                for (i=0; i < _mm._nmat; i++)
+                    nstrs += _mm._nmatspec[i];
+                DBStringArrayToStringList(_mm._specnames, nstrs, &tmp, &len);
+                db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                    m.species_names/*out*/, friendly_name(name,"_species_names", 0));
+                FREE(tmp);
+            }
+
+            if (_mm._speccolors) {
+                int len; char *tmp;
+                if (nstrs == 0)
+                {
+                    for (i=0; i < _mm._nmat; i++)
+                        nstrs += _mm._nmatspec[i];
+                }
+                DBStringArrayToStringList(_mm._speccolors, nstrs, &tmp, &len);
+                db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, tmp,
+                    m.speccolors/*out*/, friendly_name(name,"_speccolors", 0));
+                FREE(tmp);
+            }
+        }
+        /* output nameschemes if we have 'em */
+        if (_mm._file_ns)
+        {
+           len = strlen(_mm._file_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._file_ns,
+                m.file_ns_name/*out*/, friendly_name(name,"_file_ns",0));
+        }
+        if (_mm._block_ns)
+        {
+           len = strlen(_mm._block_ns)+1;
+           db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, _mm._block_ns,
+                m.block_ns_name/*out*/, friendly_name(name,"_block_ns",0));
+        }
+        if (_mm._empty_list && _mm._empty_cnt>0) {
+            db_hdf5_compwr(dbfile, DB_INT, 1, &_mm._empty_cnt, _mm._empty_list,
+                m.empty_list/*out*/, friendly_name(name,"_empty_list",0));
+        }
+
+        /* Initialize meta data */
+        m.nspec = nspec;
+        m.nmat = _mm._nmat;
+        m.cycle = _mm._cycle;
+        m.time = _mm._time;
+        m.dtime = _mm._dtime;
+        m.ngroups = _mm._ngroups;
+        m.blockorigin = _mm._blockorigin;
+        m.grouporigin = _mm._grouporigin;
+        m.guihide = _mm._guihide;
+        strcpy(m.matname, OPT(_mm._matname));
+        m.empty_cnt = _mm._empty_cnt;
+
+        /* Write meta data to file */
+        STRUCT(DBmultimatspecies) {
+            if (m.nspec)        MEMBER_S(int, nspec);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.ngroups)      MEMBER_S(int, ngroups);
+            if (m.blockorigin)  MEMBER_S(int, blockorigin);
+            if (m.grouporigin)  MEMBER_S(int, grouporigin);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (_mm._time_set)  MEMBER_S(float, time);
+            if (_mm._dtime_set) MEMBER_S(double, dtime);
+            if (_mm._nmat>0 && _mm._nmatspec) MEMBER_S(int, nmat);
+            MEMBER_S(str(m.specnames), specnames);
+            MEMBER_S(str(m.nmatspec), nmatspec);
+            MEMBER_S(str(m.matname), matname);
+            MEMBER_S(str(m.species_names), species_names);
+            MEMBER_S(str(m.speccolors), speccolors);
+            MEMBER_S(str(m.file_ns_name), file_ns_name);
+            MEMBER_S(str(m.block_ns_name), block_ns_name);
+            MEMBER_S(str(m.empty_list), empty_list);
+            if (m.empty_cnt)   MEMBER_S(int, empty_cnt);
+        } OUTPUT(dbfile, DB_MULTIMATSPECIES, name, &m);
+
+        /* Free resources */
+        FREE(s);
+        
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMultimatspecies
+ *
+ * Purpose:     Reads a multimat species object from the file.
+ *
+ * Return:      Success:        Ptr to new multimatspecies.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `ngroups', `blockorigin', and `grouporigin' to
+ *              duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *              Added names and colors for species.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:48:15 PDT 2010
+ *   Added support for namescheme/empty_list options for multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultimatspecies *
+db_hdf5_GetMultimatspecies(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMultimatspecies";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i, nstrs=0;
+    DBmultimatspecies_mt m;
+    DBmultimatspecies   *mm=NULL;
+    char                *s=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a multimatspecies */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MULTIMATSPECIES!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmultimatspecies_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(mm=DBAllocMultimatspecies(0))) return NULL;
+        mm->nspec = m.nspec;
+        mm->ngroups = m.ngroups;
+        mm->blockorigin = m.blockorigin;
+        mm->grouporigin = m.grouporigin;
+        mm->guihide = m.guihide;
+        mm->nmat = m.nmat;
+        mm->nmatspec = db_hdf5_comprd(dbfile, m.nmatspec, 1);
+
+        /* Read the raw data */
+        s = db_hdf5_comprd(dbfile, m.specnames, 1);
+        if (s) mm->specnames = DBStringListToStringArray(s, m.nspec,
+            handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+        
+        if (mm->nmat > 0 && mm->nmatspec) {
+            char *tmpspecies_names = db_hdf5_comprd(dbfile, m.species_names, 1);
+            char *tmpspeccolors = db_hdf5_comprd(dbfile, m.speccolors, 1);
+  
+            if (tmpspecies_names)
+            {
+                for (i = 0; i < mm->nmat; i++)
+                    nstrs += mm->nmatspec[i];
+                mm->species_names = DBStringListToStringArray(tmpspecies_names, nstrs,
+                    !handleSlashSwap, !skipFirstSemicolon);
+            }
+            if (tmpspeccolors)
+            {
+                if (nstrs == 0)
+                {
+                    for (i = 0; i < mm->nmat; i++)
+                        nstrs += mm->nmatspec[i];
+                }
+                mm->speccolors = DBStringListToStringArray(tmpspeccolors, nstrs,
+                    !handleSlashSwap, !skipFirstSemicolon);
+            }
+            FREE(tmpspecies_names);
+            FREE(tmpspeccolors);
+        }
+
+        mm->file_ns =  db_hdf5_comprd(dbfile, m.file_ns_name, 1);
+        mm->block_ns =  db_hdf5_comprd(dbfile, m.block_ns_name, 1);
+        mm->empty_list =  db_hdf5_comprd(dbfile, m.empty_list, 1);
+        mm->empty_cnt = m.empty_cnt;
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMultimatspecies(mm);
+        FREE(s);
+    } END_PROTECT;
+    return mm;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutPointmesh
+ *
+ * Purpose:     Writes a pointmesh object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, April  6, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no' property to duplicate changes made to the
+ *              PDB driver.
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Jan 17 21:41:52 PST 2008
+ *   Fixed missing origin member
+ *
+ *   Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *   Changed how long long global node/zone numbers are supported
+ *   from a int (bool), "llong_gnode|zoneno" to an int holding
+ *   the actual datatype. The type is assumed int if it its
+ *   value is zero or it does not exist. Otherwise, the type is
+ *   is whatever is stored in gnznodtype member. 
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutPointmesh(DBfile *_dbfile, char *name, int ndims, DB_DTPTR2 _coords,
+                     int nels, int datatype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutPointmesh";
+    DBpointmesh_mt      m;
+    int                 i;
+    DB_DTPTR          **coords = (DB_DTPTR**) _coords;
+    
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Check datatype */
+        if (DB_FLOAT!=datatype && DB_DOUBLE!=datatype) {
+            db_perror("invalid floating-point datatype", E_BADARGS, me);
+            UNWIND();
+        }
+
+        /* Set global options */
+        memset(&_pm, 0, sizeof _pm);
+        _pm._ndims = _pm._nspace = ndims;
+        _pm._group_no = -1;
+        db_ProcessOptlist(DB_POINTMESH, optlist);
+        _pm._nels = nels;
+        _pm._minindex = _pm._lo_offset;
+        _pm._maxindex = nels - _pm._hi_offset - 1;
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _pm._time_set, _pm._time,
+            _pm._dtime_set, _pm._dtime, _pm._cycle);
+
+        /* Write raw data arrays */
+        for (i=0; i<ndims; i++) {
+            db_hdf5_compwr(dbfile, datatype, 1, &nels, coords[i],
+                m.coord[i]/*out*/, friendly_name(name, "_coord%d", &i));
+        }
+
+        /* Find the mesh extents from the coordinate arrays */
+        if (DB_DOUBLE==datatype) {
+            for (i=0; i<ndims; i++) {
+                _DBdarrminmax(((double**)coords)[i], nels,
+                              m.min_extents+i, m.max_extents+i);
+            }
+        } else {
+            for (i=0; i<ndims; i++) {
+                float min_extents, max_extents;
+                _DBarrminmax(coords[i], nels, &min_extents, &max_extents);
+                m.min_extents[i] = min_extents;
+                m.max_extents[i] = max_extents;
+            }
+        }
+
+        /* Global node numbers */
+        if (_pm._gnodeno)
+        {
+            if (_pm._llong_gnodeno)
+                db_hdf5_compwr(dbfile, DB_LONG_LONG, 1, &nels, _pm._gnodeno,
+                    m.gnodeno/*out*/, friendly_name(name, "_gnodeno", 0));
+            else
+                db_hdf5_compwr(dbfile, DB_INT, 1, &nels, _pm._gnodeno,
+                    m.gnodeno/*out*/, friendly_name(name, "_gnodeno", 0));
+        }
+
+        /* Build header in memory */
+        m.ndims = ndims;
+        m.nspace = _pm._nspace;
+        m.nels = _pm._nels;
+        m.cycle = _pm._cycle;
+        m.origin = _pm._origin;
+        m.min_index = _pm._minindex;
+        m.max_index = _pm._maxindex;
+        m.time = _pm._time;
+        m.dtime = _pm._dtime;
+        m.group_no = _pm._group_no;
+        m.guihide = _pm._guihide;
+        for (i=0; i<ndims; i++) {
+            strcpy(m.label[i], OPT(_pm._labels[i]));
+            strcpy(m.units[i], OPT(_pm._units[i]));
+        }
+        strcpy(m.mrgtree_name, OPT(_pm._mrgtree_name));
+        m.gnznodtype = _pm._llong_gnodeno?DB_LONG_LONG:0;
+        
+        /* Write header to file */
+        STRUCT(DBpointmesh) {
+            if (m.ndims)        MEMBER_S(int, ndims);
+            if (m.nspace)       MEMBER_S(int, nspace);
+            if (m.nels)         MEMBER_S(int, nels);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (_pm._time_set)  MEMBER_S(float, time);
+            if (_pm._dtime_set) MEMBER_S(double, dtime);
+            if (m.min_index)    MEMBER_S(int, min_index);
+            if (m.max_index)    MEMBER_S(int, max_index);
+            if (m.group_no)     MEMBER_S(int, group_no);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (m.origin)       MEMBER_S(int, origin);
+            MEMBER_3(double, min_extents);
+            MEMBER_3(double, max_extents);
+            MEMBER_R(str(m.coord[_j]), coord, ndims);
+            MEMBER_R(str(m.label[_j]), label, ndims);
+            MEMBER_R(str(m.units[_j]), units, ndims);
+            MEMBER_S(str(m.gnodeno), gnodeno);
+            MEMBER_S(str(m.mrgtree_name), mrgtree_name);
+            if (m.gnznodtype    )MEMBER_S(int, gnznodtype);
+        } OUTPUT(dbfile, DB_POINTMESH, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetPointmesh
+ *
+ * Purpose:     Reads a pointmesh object from the file.
+ *
+ * Return:      Success:        Ptr to new pointmesh.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, April  7, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-13
+ *              Added `group_no' to duplicate changes to the PDB driver.
+ *
+ *              Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *              Made it set datatype correctly. Added support for dataReadMask
+ *
+ *              Mark C. Miller, Thu Jan 17 21:41:52 PST 2008
+ *              Fixed missing origin member
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBpointmesh *
+db_hdf5_GetPointmesh(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetPointmesh";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBpointmesh_mt      m;
+    DBpointmesh         *pm=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a pointmesh */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_POINTMESH!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBpointmesh_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(pm=DBAllocPointmesh())) return NULL;
+        pm->name = BASEDUP(name);
+        pm->cycle = m.cycle;
+        pm->time = m.time;
+        pm->dtime = m.dtime;
+        if ((pm->datatype = db_hdf5_GetVarType(_dbfile, m.coord[0])) < 0)
+            pm->datatype = DB_FLOAT;
+        if (force_single_g) pm->datatype = DB_FLOAT;
+        pm->ndims = m.ndims;
+        pm->nels = m.nels;
+        pm->group_no = m.group_no;
+        pm->guihide = m.guihide;
+        pm->origin = m.origin;
+        pm->mrgtree_name = OPTDUP(m.mrgtree_name);
+        for (i=0; i<m.ndims; i++) {
+            pm->units[i] = OPTDUP(m.units[i]);
+            pm->labels[i] = OPTDUP(m.label[i]);
+            if (pm->datatype == DB_DOUBLE)
+            {
+                ((double*)pm->min_extents)[i] = m.min_extents[i];
+                ((double*)pm->max_extents)[i] = m.max_extents[i];
+            }
+            else
+            {
+                pm->min_extents[i] = m.min_extents[i];
+                pm->max_extents[i] = m.max_extents[i];
+            }
+        }
+
+        /* Read raw data */
+        if (SILO_Globals.dataReadMask & DBPMCoords)
+        {
+            for (i=0; i<m.ndims; i++) {
+                pm->coords[i] = db_hdf5_comprd(dbfile, m.coord[i], 0);
+            }
+        }
+        if (SILO_Globals.dataReadMask & DBPMGlobNodeNo)
+            pm->gnodeno = db_hdf5_comprd(dbfile, m.gnodeno, 1);
+        pm->gnznodtype = m.gnznodtype?m.gnznodtype:DB_INT;
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreePointmesh(pm);
+    } END_PROTECT;
+    return pm;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutPointvar
+ *
+ * Purpose:     Write a pointvar object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, April  7, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Added Hack to make HDF5 driver deal with cycle/time same as PDB driver
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:25:00 PST 2010
+ *   Refactored logic to handle time, dtime and cycle to a new method,
+ *   db_hdf5_handle_ctdt().
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutPointvar(DBfile *_dbfile, char *name, char *meshname, int nvars,
+                    DB_DTPTR2 _vars, int nels, int datatype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBpointvar_mt       m;
+    int                 i, saved_ndims;
+    char               *s = 0;
+    DB_DTPTR          **vars = (DB_DTPTR**) _vars;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        saved_ndims = _pm._ndims;
+        memset(&_pm, 0, sizeof _pm);
+        _pm._ndims = _pm._nspace = saved_ndims;
+        _pm._group_no = -1;
+        db_ProcessOptlist(DB_POINTMESH, optlist);
+        _pm._nels = nels;
+        _pm._minindex = _pm._lo_offset;
+        _pm._maxindex = nels - _pm._hi_offset - 1;
+
+        /* hack to maintain backward compatibility with pdb driver */
+        db_hdf5_handle_ctdt(dbfile, _pm._time_set, _pm._time,
+            _pm._dtime_set, _pm._dtime, _pm._cycle);
+
+        /* Write raw data arrays */
+        for (i=0; i<nvars; i++) {
+            db_hdf5_compwr(dbfile, datatype, 1, &nels, vars[i],
+                m.data[i]/*out*/, friendly_name(name, nvars==1?"_data":"%d_data", &i));
+        }
+
+        /* output mrgtree info if we have it */
+        if (_pm._region_pnames != NULL) {
+            int len;
+            DBStringArrayToStringList(_pm._region_pnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.region_pnames/*out*/,
+                friendly_name(name, "_region_pnames", 0));
+            FREE(s);
+        }
+
+        /* Build header in memory */
+        m.nvals = nvars;
+        m.nels = nels;
+        m.nspace = _pm._nspace;
+        m.origin = _pm._origin;
+        m.min_index = _pm._minindex;
+        m.max_index = _pm._maxindex;
+        m.cycle = _pm._cycle;
+        m.guihide = _pm._guihide;
+        m.time = _pm._time;
+        m.dtime = _pm._dtime;
+        m.ascii_labels = _pm._ascii_labels;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+        m.conserved = _pm._conserved;
+        m.extensive = _pm._extensive;
+        strcpy(m.meshid, OPT(meshname));
+        strcpy(m.label, OPT(_pm._label));
+        strcpy(m.units, OPT(_pm._unit));
+
+        /* Write header to file */
+        STRUCT(DBpointvar) {
+            if (m.nvals)        MEMBER_S(int, nvals);
+            if (m.nels)         MEMBER_S(int, nels);
+            if (m.nspace)       MEMBER_S(int, nspace);
+            if (m.origin)       MEMBER_S(int, origin);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            if (m.min_index)    MEMBER_S(int, min_index);
+            if (m.max_index)    MEMBER_S(int, max_index);
+            if (m.cycle)        MEMBER_S(int, cycle);
+            if (m.guihide)      MEMBER_S(int, guihide);
+            if (m.ascii_labels) MEMBER_S(int, ascii_labels);
+            if (_pm._time_set)  MEMBER_S(float, time);
+            if (_pm._dtime_set) MEMBER_S(double, dtime);
+            if (m.conserved)    MEMBER_S(int, conserved);
+            if (m.extensive)    MEMBER_S(int, extensive);
+            MEMBER_S(str(m.meshid), meshid);
+            MEMBER_S(str(m.label), label);
+            MEMBER_S(str(m.units), units);
+            MEMBER_R(str(m.data[_j]), data, m.nvals);
+            MEMBER_S(str(m.region_pnames), region_pnames);
+        } OUTPUT(dbfile, DB_POINTVAR, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetPointvar
+ *
+ * Purpose:     Reads a pointvar object from the file.
+ *
+ * Return:      Success:        Ptr to new pointvar object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  8, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Jul 29 11:26:24 PDT 2004
+ *   Made it set datatype correctly. Added support for dataReadMask
+ *
+ *   Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *   Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmeshvar *
+db_hdf5_GetPointvar(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetPointvar";
+    char                *s = 0;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBpointvar_mt       m;
+    DBmeshvar           *pv=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a pointvar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_POINTVAR!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBpointvar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(pv=DBAllocMeshvar())) return NULL;
+        pv->name = BASEDUP(name);
+        pv->units = OPTDUP(m.units);
+        pv->meshname = OPTDUP(m.meshid);
+        pv->label = OPTDUP(m.label);
+        pv->cycle = m.cycle;
+        if ((pv->datatype = db_hdf5_GetVarType(_dbfile, m.data[0])) < 0)
+            pv->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) pv->datatype = DB_FLOAT;
+        pv->nels = m.nels;
+        pv->nvals = m.nvals;
+        pv->nspace = m.nspace;
+        pv->ndims = 1;
+        pv->origin = m.origin;
+        pv->time = m.time;
+        pv->dtime = m.dtime;
+        pv->min_index[0] = m.min_index;
+        pv->max_index[0] = m.max_index;
+        pv->guihide = m.guihide;
+        pv->ascii_labels = m.ascii_labels;
+        pv->conserved = m.conserved;
+        pv->extensive = m.extensive;
+
+        /* Read raw data */
+        if (SILO_Globals.dataReadMask & DBPVData)
+        {
+            pv->vals = calloc(m.nvals, sizeof(void*));
+            for (i=0; i<m.nvals; i++) {
+                pv->vals[i] = db_hdf5_comprd(dbfile, m.data[i], 0);
+            }
+        }
+
+        s = db_hdf5_comprd(dbfile, m.region_pnames, 1);
+        if (s) pv->region_pnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        H5Tclose(o);
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMeshvar(pv);
+    } END_PROTECT;
+    return pv;
+}
+        
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutCompoundarray
+ *
+ * Purpose:     Writes a compound array object to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  8, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Thu Apr 19 19:16:11 PDT 2007
+ *   Modifed db_hdf5_compwr interface for friendly hdf5 dataset names
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+SILO_CALLBACK int
+db_hdf5_PutCompoundarray(DBfile *_dbfile, char *name, char *elmtnames[],
+                         int elmtlen[], int nelmts, void *values,
+                         int nvalues, int datatype, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBcompoundarray_mt  m;
+    int                 i, len;
+    char                *s=NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /*
+         * Create a character string which is a semi-colon separated list of
+         * component names.
+         */
+        for (i=len=0; i<nelmts; i++) len += strlen(elmtnames[i])+1;
+        s = malloc(len+1);
+        for (i=len=0; i<nelmts; i++) {
+            if (i) s[len++] = ';';
+            strcpy(s+len, elmtnames[i]);
+            len += strlen(elmtnames[i]);
+        }
+        len++; /*count null*/
+
+        /* Write raw data arrays */
+        db_hdf5_compwr(dbfile, datatype, 1, &nvalues, values, m.values,
+            friendly_name(name, "_values", 0));
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.elemnames,
+            friendly_name(name, "_elemnames", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &nelmts, elmtlen, m.elemlengths,
+            friendly_name(name, "_elemlengths", 0));
+
+        /* Initialize meta data */
+        m.nelems = nelmts;
+        m.nvalues = nvalues;
+        m.datatype = (DB_FLOAT==datatype || DB_DOUBLE==datatype)?0:datatype;
+
+        /* Write meta data to file */
+        STRUCT(DBcompoundarray) {
+            if (m.nelems)       MEMBER_S(int, nelems);
+            if (m.nvalues)      MEMBER_S(int, nvalues);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            MEMBER_S(str(m.values), values);
+            MEMBER_S(str(m.elemnames), elemnames);
+            MEMBER_S(str(m.elemlengths), elemlengths);
+        } OUTPUT(dbfile, DB_ARRAY, name, &m);
+
+        /* Free resources */
+        FREE(s);
+        
+    } CLEANUP {
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetCompoundarray
+ *
+ * Purpose:     Reads a compound array object from the file.
+ *
+ * Return:      Success:        Ptr to new compound array.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  8, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Aug  2 15:06:57 PDT 2004
+ *   Made it set datatype correctly
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBcompoundarray *
+db_hdf5_GetCompoundarray(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetCompoundarray";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBcompoundarray_mt m;
+    DBcompoundarray     *ca=NULL;
+    char                *s=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a compund array */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_ARRAY!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBcompoundarray_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        if (NULL==(ca=DBAllocCompoundarray())) return NULL;
+        ca->name = BASEDUP(name);
+        ca->nelems = m.nelems;
+        ca->nvalues = m.nvalues;
+        if ((ca->datatype = db_hdf5_GetVarType(_dbfile, m.values)) < 0)
+            ca->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) ca->datatype = DB_FLOAT;
+        
+        /* Read the raw data */
+        ca->elemlengths = db_hdf5_comprd(dbfile, m.elemlengths, 1);
+        ca->values = db_hdf5_comprd(dbfile, m.values, 1);
+        ca->elemnames = calloc(m.nelems, sizeof(char*));
+        s = db_hdf5_comprd(dbfile, m.elemnames, 1);
+        for (i=0; i<m.nelems; i++) {
+            char *tok = strtok(i?NULL:s, ";");
+            ca->elemnames[i] = STRDUP(tok);
+        }
+        
+        H5Tclose(o);
+        FREE(s);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeCompoundarray(ca);
+        FREE(s);
+    } END_PROTECT;
+    return ca;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_InqVarType
+ *
+ * Purpose:     Returns the object type for an object.
+ *
+ * Return:      Success:        Object type
+ *
+ *              Failure:        DB_INVALID_OBJECT
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, April  8, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Feb  1 13:48:33 PST 2005
+ *   Fixed return of variable type for case of QUAD_RECT | QUAD_CURV
+ *
+ *   Mark C. Miller, Mon Feb 14 20:16:50 PST 2005
+ *   Undid fix above
+ *
+ *   Mark C. Miller, Wed Apr 20 16:05:23 PDT 2005
+ *   Made it return DB_VARIABLE for any inquiry where it couldn't
+ *   get actual variable type from the object
+ *
+ *   Mark C. Miller, Mon Jul 17 18:07:57 PDT 2006
+ *   Improved fix, above, for inquries on "/.silo/#000XXXX" datasets
+ *   for silex
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBObjectType
+db_hdf5_InqVarType(DBfile *_dbfile, char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_InqVarType";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype = DB_INVALID_OBJECT;
+
+    PROTECT {
+
+        /* Open object */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            if ((o=H5Gopen(dbfile->cwg, name))<0) {
+                _objtype = DB_VARIABLE;
+            }
+            else
+            {
+                _objtype = DB_DIR;
+                H5Gclose(o);
+            }
+        }
+        else
+        {
+            /* Read the `silo_type' attribute */
+            if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+                H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+                H5Aclose(attr)<0) {
+                _objtype = DB_VARIABLE;
+            }
+            H5Tclose(o);
+        }
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+    } END_PROTECT;
+    return (DBObjectType)_objtype;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_InqMeshName
+ *
+ * Purpose:     Returns the name of the mesh with which the specified
+ *              variable is associated.
+ *
+ * Bugs:        The user must pass a large enough buffer for the `meshname'
+ *              argument. This function will never copy more than 1024 bytes
+ *              into the `meshname' array, counting the null termination.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, April  9, 1999
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Oct 17 08:16:13 PDT 2006
+ *   Made it try either "meshid" or "meshname" data members
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_InqMeshName(DBfile *_dbfile, char *name, char *meshname/*out*/)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_InqMeshName";
+    int                  pass;
+
+    for (pass = 0; pass < 2; pass++)
+    {
+        char   s[1024];
+        hid_t  o=-1, attr=-1, type=-1, str_type=-1;
+
+        PROTECT {
+            /* Describe memory */
+            if ((str_type=H5Tcopy(H5T_C_S1))<0 ||
+                H5Tset_size(str_type, sizeof s)<0 ||
+                (type=H5Tcreate(H5T_COMPOUND, sizeof s))<0 ||
+                db_hdf5_put_cmemb(type, pass==0?"meshid":"meshname",
+                                  0, 0, NULL, str_type)<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+
+            /* Open variable */
+            if ((o=H5Topen(dbfile->cwg, name))<0 ||
+                (attr=H5Aopen_name(o, "silo"))<0) {
+                db_perror(name, E_NOTFOUND, me);
+                UNWIND();
+            }
+
+            /*
+             * Read "silo" attribute. If the read fails it's probably because
+             * there is no "meshid" field in the attribute, in which case we
+             * haven't opened a mesh variable and we should fail.
+             */
+            s[0] = '\0';
+            if (H5Aread(attr, type, s)<0) {
+                db_perror(name, E_CALLFAIL, me);
+                UNWIND();
+            }
+        
+            /* Copy result to output buffer and release resources */
+            strcpy(meshname, s);
+            H5Aclose(attr);
+            H5Tclose(type);
+            H5Tclose(str_type);
+            H5Tclose(o);
+
+        } CLEANUP {
+            H5E_BEGIN_TRY {
+                H5Aclose(attr);
+                H5Tclose(type);
+                H5Tclose(str_type);
+                H5Tclose(o);
+            } H5E_END_TRY;
+        } END_PROTECT;
+
+        if (s[0] != '\0')
+            break;
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMrgtree
+ *
+ * Purpose:     Write a mesh region grouping tree to a file.
+ *
+ * Programmer: Mark C. Miller
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMrgtree(DBfile *_dbfile, const char *name, const char *mesh_name,
+    DBmrgtree *tree, DBoptlist *opts)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBmrgtree_mt        m;
+    int                 i, j, n, len, pass, num_nodes = tree->num_nodes;
+    int                 tot_children, tot_segs;
+    char               *s = 0;
+    DBmrgtnode        **ltree = 0;
+    char              **strArray = 0;
+    int                *intArray = 0;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+
+        /* Set global options */
+        db_ResetGlobalData_Mrgtree();
+        db_ProcessOptlist(DB_MRGTREE, opts);
+
+        /* allocate an emtpy, linearized list of tree node pointers */
+        ltree = (DBmrgtnode **) malloc(num_nodes * sizeof(DBmrgtnode*));
+
+        /* walk tree to populate the linearized list of nodes ptrs */
+        DBWalkMrgtree(tree, DBLinearizeMrgtree, ltree, DB_POSTORDER);
+
+        /* form an array of the integer, scalar data at each node */
+        intArray = (int *) malloc(num_nodes * sizeof(int) * 6);
+        for (i = 0; i < num_nodes; i++)
+        {
+            intArray[i*6+0] = ltree[i]->narray;
+            intArray[i*6+1] = ltree[i]->type_info_bits;
+            intArray[i*6+2] = ltree[i]->max_children;
+            intArray[i*6+3] = ltree[i]->nsegs;
+            intArray[i*6+4] = ltree[i]->num_children;
+            intArray[i*6+5] = ltree[i] != tree->root ? ltree[i]->parent->walk_order : -1;
+        }
+        len = num_nodes * 6;
+        db_hdf5_compwr(dbfile, DB_INT, 1, &len, intArray,
+            m.n_scalars/*out*/, friendly_name(name,"_scalars", 0));
+        FREE(intArray);
+
+        /* form an array of strings of the name data member */
+        strArray = (char **) malloc(num_nodes * sizeof(char *));
+        for (i = 0; i < num_nodes; i++)
+            strArray[i] = ltree[i]->name;
+        
+        /* output all the node names as one long dataset */
+        s = 0;
+        DBStringArrayToStringList(strArray, num_nodes, &s, &len);
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.n_name/*out*/,
+            friendly_name(name, "_name", 0));
+        FREE(s);
+        FREE(strArray);
+
+        /* form an array of strings of names data member */
+        /* requires 2 passes; first pass only counts, 2nd pass builds the array */
+        for (pass = 0; pass < 2; pass ++)
+        {
+            if (pass == 1)
+            {
+                if (n == 0)
+                    break;
+                strArray = (char **) malloc(n * sizeof(char *));
+            }
+            n = 0;
+            for (i = 0; i < num_nodes; i++)
+            {
+                if (ltree[i]->narray > 0)
+                {
+                    if (strchr(ltree[i]->names[0], '%') == 0)
+                    {
+                        for (j = 0; j < ltree[i]->narray; j++)
+                        {
+                            if (pass == 1)
+                                strArray[n] = ltree[i]->names[j];
+                            n++;
+                        }
+                    }
+                    else
+                    {
+                        if (pass == 1)
+                            strArray[n] = ltree[i]->names[0];
+                        n++;
+                    }
+                }
+            }
+        }
+        if (n > 0)
+        {
+            s = 0;
+            DBStringArrayToStringList(strArray, n, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.n_names/*out*/,
+                friendly_name(name, "_names", 0));
+            FREE(s);
+            FREE(strArray);
+        }
+
+        /* linearize and output map name data */
+        strArray = (char **) malloc(num_nodes * sizeof(char*));
+        for (i = 0; i < num_nodes; i++)
+            strArray[i] = ltree[i]->maps_name;
+        s = 0;
+        len = 0;
+        DBStringArrayToStringList(strArray, num_nodes, &s, &len);
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.n_maps_name/*out*/,
+            friendly_name(name, "_maps_name", 0));
+        FREE(s);
+        FREE(strArray);
+
+        tot_segs = 0;
+        for (i = 0; i < num_nodes; i++)
+            tot_segs += ltree[i]->nsegs * (ltree[i]->narray?ltree[i]->narray:1);
+
+        /* linearize and output map segment id data */
+        intArray = (int *) malloc(tot_segs * sizeof(int));
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+            for (j = 0; j < ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1); j++)
+                intArray[n++] = ltree[i]->seg_ids[j];
+        db_hdf5_compwr(dbfile, DB_INT, 1, &tot_segs, intArray,
+            m.n_seg_ids/*out*/, friendly_name(name,"_seg_ids", 0));
+        FREE(intArray);
+
+        /* linearize and output seg len type data */
+        intArray = (int *) malloc(tot_segs * sizeof(int));
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+            for (j = 0; j < ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1); j++)
+                intArray[n++] = ltree[i]->seg_lens[j];
+        db_hdf5_compwr(dbfile, DB_INT, 1, &tot_segs, intArray,
+            m.n_seg_lens/*out*/, friendly_name(name,"_seg_lens", 0));
+        FREE(intArray);
+
+        /* linearize and output seg type data */
+        intArray = (int *) malloc(tot_segs * sizeof(int));
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+            for (j = 0; j < ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1); j++)
+                intArray[n++] = ltree[i]->seg_types[j];
+        db_hdf5_compwr(dbfile, DB_INT, 1, &tot_segs, intArray,
+            m.n_seg_types/*out*/, friendly_name(name,"_seg_types", 0));
+        FREE(intArray);
+
+        /* form integer array for children data */
+        tot_children = 0;
+        for (i = 0; i < num_nodes; i++)
+            tot_children += ltree[i]->num_children;
+        intArray = (int *) malloc(tot_children * sizeof(int));
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+            for (j = 0; j < ltree[i]->num_children; j++)
+                intArray[n++] = ltree[i]->children[j]->walk_order;
+        db_hdf5_compwr(dbfile, DB_INT, 1, &tot_children, intArray,
+            m.n_children/*out*/, friendly_name(name,"_children", 0));
+        FREE(intArray);
+        FREE(ltree);
+
+        if (_mrgt._mrgvar_onames)
+        {
+            s = 0;
+            len = 0;
+            DBStringArrayToStringList(_mrgt._mrgvar_onames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.mrgvar_onames/*out*/,
+                friendly_name(name, "_mrgvar_onames", 0));
+            FREE(s);
+        }
+
+        if (_mrgt._mrgvar_rnames)
+        {
+            s = 0;
+            len = 0;
+            DBStringArrayToStringList(_mrgt._mrgvar_rnames, -1, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.mrgvar_rnames/*out*/,
+                friendly_name(name, "_mrgvar_rnames", 0));
+            FREE(s);
+        }
+
+        /* Build header in memory */
+        m.src_mesh_type = tree->src_mesh_type;
+        strcpy(m.src_mesh_name, OPT(mesh_name));
+        m.type_info_bits = tree->type_info_bits;
+        m.num_nodes = tree->num_nodes;
+        m.root = tree->root->walk_order;
+        
+        /* Write header to file */
+        STRUCT(DBmrgtree) {
+            if (m.src_mesh_type)    MEMBER_S(int, src_mesh_type);
+            MEMBER_S(str(m.src_mesh_name), src_mesh_name);
+            if (m.type_info_bits)   MEMBER_S(int, type_info_bits);
+            if (m.num_nodes)        MEMBER_S(int, num_nodes);
+            MEMBER_S(int, root);
+            MEMBER_S(str(m.n_scalars), n_scalars);
+            MEMBER_S(str(m.n_name), n_name);
+            MEMBER_S(str(m.n_names), n_names);
+            MEMBER_S(str(m.n_maps_name), n_maps_name);
+            MEMBER_S(str(m.n_seg_ids), n_seg_ids);
+            MEMBER_S(str(m.n_seg_lens), n_seg_lens);
+            MEMBER_S(str(m.n_seg_types), n_seg_types);
+            MEMBER_S(str(m.n_children), n_children);
+            MEMBER_S(str(m.mrgvar_onames), mrgvar_onames);
+            MEMBER_S(str(m.mrgvar_rnames), mrgvar_rnames);
+        } OUTPUT(dbfile, DB_MRGTREE, name, &m);
+
+    } CLEANUP {
+        FREE(ltree);
+        FREE(intArray);
+        FREE(strArray);
+        FREE(s);
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMrgtree
+ *
+ * Purpose:     Read a mesh region grouping tree from a file.
+ *
+ * Programmer: Mark C. Miller
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmrgtree *
+db_hdf5_GetMrgtree(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMrgtree";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i, j, n, num_nodes;
+    DBmrgtree_mt         m;
+    int                 *intArray = 0;
+    char               **strArray = 0;
+    DBmrgtnode         **ltree = 0;
+    char                *s = 0;
+    DBmrgtree           *tree = 0;
+    
+    PROTECT {
+        /* Open object and make sure it's a material */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MRGTREE!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmrgtree_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        tree = (DBmrgtree*) malloc(sizeof(DBmrgtree));
+        memset(tree, 0, sizeof(DBmrgtree));
+        tree->name = BASEDUP(name);
+        tree->src_mesh_name = OPTDUP(m.src_mesh_name);
+        tree->type_info_bits = m.type_info_bits;
+        tree->num_nodes = m.num_nodes;
+        num_nodes = m.num_nodes;
+        tree->root = 0;
+        tree->cwr = 0;
+
+        /* allocate all the nodes of the tree and a linear list of pointers
+           to them */
+        ltree = (DBmrgtnode **) malloc(num_nodes * sizeof(DBmrgtnode*));
+        for (i = 0; i < num_nodes; i++)
+            ltree[i] = (DBmrgtnode *) calloc(1,sizeof(DBmrgtnode));
+
+        /* Read the nodal scalar data */
+        intArray = db_hdf5_comprd(dbfile, m.n_scalars, 1);
+        for (i = 0; i < num_nodes; i++)
+        {
+            ltree[i]->narray           = intArray[i*6+0];
+            ltree[i]->type_info_bits   = intArray[i*6+1];
+            ltree[i]->max_children     = intArray[i*6+2];
+            ltree[i]->nsegs            = intArray[i*6+3];
+            ltree[i]->num_children     = intArray[i*6+4];
+            ltree[i]->parent           = intArray[i*6+5] >= 0 ? ltree[intArray[i*6+5]] : 0;
+        }
+        FREE(intArray);
+
+        /* read the node 'name' member */
+        s = db_hdf5_comprd(dbfile, m.n_name, 1);
+        strArray = DBStringListToStringArray(s, num_nodes,
+            !handleSlashSwap, !skipFirstSemicolon);
+        for (i = 0; i < num_nodes; i++)
+            ltree[i]->name = strArray[i];
+        FREE(s);
+        FREE(strArray); /* free only top-level array of pointers */
+
+        /* read the node 'names' member */
+        s = db_hdf5_comprd(dbfile, m.n_names, 1);
+        if (s)
+        {
+            strArray = DBStringListToStringArray(s, -1,
+                !handleSlashSwap, !skipFirstSemicolon);
+            n = 0;
+            for (i = 0; i < num_nodes; i++)
+            {
+                if (ltree[i]->narray == 0)
+                    continue;
+
+                if (strchr(strArray[n], '%') == 0)
+                {
+                    ltree[i]->names = (char**) malloc(ltree[i]->narray * sizeof(char*));
+                    for (j = 0; j < ltree[i]->narray; j++, n++)
+                        ltree[i]->names[j] = strArray[n];
+                }
+                else
+                {
+                    ltree[i]->names = (char**) malloc(1 * sizeof(char*));
+                    ltree[i]->names[0] = strArray[n];
+                    n++;
+                }
+            }
+        }
+        FREE(s);
+        FREE(strArray); /* free only top-level array of pointers */
+
+        /* read the maps_name data */
+        s = db_hdf5_comprd(dbfile, m.n_maps_name, 1);
+        strArray = DBStringListToStringArray(s, num_nodes,
+            !handleSlashSwap, !skipFirstSemicolon);
+        for (i = 0; i < num_nodes; i++)
+            ltree[i]->maps_name = strArray[i];
+        FREE(s);
+        FREE(strArray); /* free only top-level array of pointers */
+
+        /* read the map segment id data */
+        intArray = db_hdf5_comprd(dbfile, m.n_seg_ids, 1);
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+        {
+            int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+            if (ns > 0)
+            {
+                ltree[i]->seg_ids = (int*) malloc(ns * sizeof(int));
+                for (j = 0; j < ns; j++)
+                    ltree[i]->seg_ids[j] = intArray[n++];
+            }
+        }
+        FREE(intArray);
+
+        /* read the map segment len data */
+        intArray = db_hdf5_comprd(dbfile, m.n_seg_lens, 1);
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+        {
+            int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+            if (ns > 0)
+            {
+                ltree[i]->seg_lens = (int*) malloc(ns * sizeof(int));
+                for (j = 0; j < ns; j++)
+                    ltree[i]->seg_lens[j] = intArray[n++];
+            }
+        }
+        FREE(intArray);
+
+        /* read the map segment type data */
+        intArray = db_hdf5_comprd(dbfile, m.n_seg_types, 1);
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+        {
+            int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+            if (ns > 0)
+            {
+                ltree[i]->seg_types = (int*) malloc(ns * sizeof(int));
+                for (j = 0; j < ns; j++)
+                    ltree[i]->seg_types[j] = intArray[n++];
+            }
+        }
+        FREE(intArray);
+
+        /* read the child ids */
+        intArray = db_hdf5_comprd(dbfile, m.n_children, 1);
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+        {
+            int nc = ltree[i]->num_children;
+            if (nc > 0)
+            {
+                ltree[i]->children = (DBmrgtnode**) malloc(nc * sizeof(DBmrgtnode*));
+                for (j = 0; j < nc; j++)
+                    ltree[i]->children[j] = ltree[intArray[n++]];
+            }
+        }
+        FREE(intArray);
+
+        s = db_hdf5_comprd(dbfile, m.mrgvar_onames, 1);
+        if (s) tree->mrgvar_onames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        s = db_hdf5_comprd(dbfile, m.mrgvar_rnames, 1);
+        if (s) tree->mrgvar_rnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        tree->root = ltree[m.root];
+        tree->cwr = tree->root;
+
+        H5Tclose(o);
+        FREE(ltree);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        FREE(strArray);
+        FREE(intArray);
+        FREE(ltree);
+        FREE(tree);
+        FREE(s);
+    } END_PROTECT;
+
+    return tree;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutGroupelmap
+ *
+ * Purpose:     Write a grouping element map to a file.
+ *
+ * Programmer: Mark C. Miller
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutGroupelmap(DBfile *_dbfile, const char *name,
+    int num_segments, int *groupel_types, int *segment_lengths,
+    int *segment_ids, int **segment_data, void **segment_fracs,
+    int fracs_data_type, DBoptlist *opts)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    DBgroupelmap_mt      m;
+    int                  i, j, tot_len;
+    int                *intArray;
+    char               *s = NULL;
+
+    memset(&m, 0, sizeof m);
+    PROTECT {
+        /* Set global options */
+        db_ProcessOptlist(DB_GROUPELMAP, opts);
+
+        /* Write raw data arrays */
+        db_hdf5_compwr(dbfile, DB_INT, 1, &num_segments, groupel_types,
+            m.groupel_types/*out*/, friendly_name(name,"_groupel_types", 0));
+        db_hdf5_compwr(dbfile, DB_INT, 1, &num_segments, segment_lengths,
+            m.segment_lengths/*out*/, friendly_name(name,"_segment_lengths", 0));
+        if (segment_ids)
+            db_hdf5_compwr(dbfile, DB_INT, 1, &num_segments, segment_ids,
+                m.segment_ids/*out*/, friendly_name(name,"_segment_ids", 0));
+
+        tot_len = 0;
+        for (i = 0; i < num_segments; i++)
+            tot_len += segment_lengths[i];
+        intArray = (int *) malloc(tot_len * sizeof(int));
+        tot_len = 0;
+        for (i = 0; i < num_segments; i++)
+            for (j = 0; j < segment_lengths[i]; j++)
+                intArray[tot_len++] = segment_data[i][j]; 
+        db_hdf5_compwr(dbfile, DB_INT, 1, &tot_len, intArray,
+            m.segment_data/*out*/, friendly_name(name,"_segment_data", 0));
+        FREE(intArray);
+
+        /* write out fractional data if we have it */
+        if (segment_fracs)
+        {
+            void *fracsArray;
+
+            /* write array of frac lengths */
+            tot_len = 0;
+            intArray = (int *) malloc(num_segments * sizeof(int));
+            for (i = 0; i < num_segments; i++)
+            {
+                int len = segment_fracs[i] == 0 ? 0 : segment_lengths[i];
+                intArray[i] = len;
+                tot_len += len; 
+            }
+            db_hdf5_compwr(dbfile, DB_INT, 1, &num_segments, intArray,
+                m.frac_lengths/*out*/, friendly_name(name,"_frac_lengths", 0));
+            FREE(intArray);
+
+            /* build and write out fractional data array */
+            fracsArray = (void *) malloc(tot_len * ((fracs_data_type==DB_FLOAT)?sizeof(float):sizeof(double))); 
+            tot_len = 0;
+            for (i = 0; i < num_segments; i++)
+            {
+                if (segment_fracs[i] == 0)
+                    continue;
+
+                for (j = 0; j < segment_lengths[i]; j++)
+                {
+                    if (fracs_data_type == DB_FLOAT)
+                    {
+                        float *pfa = (float *) fracsArray;
+                        float *psf = (float *) segment_fracs[i];
+                        pfa[tot_len++] = psf[j];
+                    }
+                    else
+                    {
+                        double *pfa = (double *) fracsArray;
+                        double *psf = (double *) segment_fracs[i];
+                        pfa[tot_len++] = psf[j];
+                    }
+                }
+            }
+            db_hdf5_compwr(dbfile, fracs_data_type, 1, &tot_len, fracsArray,
+                m.segment_fracs/*out*/, friendly_name(name,"_segment_fracs", 0));
+            FREE(fracsArray);
+        } 
+        
+        /* Build header in memory */
+        m.num_segments = num_segments;
+        m.fracs_data_type = (DB_FLOAT==fracs_data_type || DB_DOUBLE==fracs_data_type)?0:fracs_data_type;
+        
+        /* Write header to file */
+        STRUCT(DBgroupelmap) {
+            if (m.num_segments)    MEMBER_S(int, num_segments);
+            if (m.fracs_data_type) MEMBER_S(int, fracs_data_type);
+            MEMBER_S(str(m.groupel_types), groupel_types);
+            MEMBER_S(str(m.segment_lengths), segment_lengths);
+            MEMBER_S(str(m.segment_ids), segment_ids);
+            MEMBER_S(str(m.segment_data), segment_data);
+            MEMBER_S(str(m.frac_lengths), frac_lengths);
+            MEMBER_S(str(m.segment_fracs), segment_fracs);
+        } OUTPUT(dbfile, DB_GROUPELMAP, name, &m);
+    } CLEANUP {
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetGroupelmap
+ *
+ * Purpose:     Read a grouping element map from a file.
+ *
+ * Programmer: Mark C. Miller
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBgroupelmap *
+db_hdf5_GetGroupelmap(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetGroupelmap";
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i, j, n;
+    int                *intArray = 0;
+    void               *fracsArray = 0;
+    DBgroupelmap        *gm=NULL;
+    DBgroupelmap_mt      m;
+    
+    PROTECT {
+        /* Open object and make sure it's a material */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_GROUPELMAP!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read meta data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBgroupelmap_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create object and initialize meta data */
+        gm = (DBgroupelmap *) malloc(sizeof(DBgroupelmap));
+        gm->name = BASEDUP(name);
+        gm->num_segments = m.num_segments;
+        if ((gm->fracs_data_type = db_hdf5_GetVarType(_dbfile, m.segment_fracs)) < 0)
+            gm->fracs_data_type = DB_DOUBLE;  /* PDB driver assumes double */
+        if (gm->fracs_data_type == DB_DOUBLE && force_single_g)
+            gm->fracs_data_type = DB_FLOAT;
+
+        /* Read the raw data */
+        gm->groupel_types = db_hdf5_comprd(dbfile, m.groupel_types, 1);
+        gm->segment_lengths = db_hdf5_comprd(dbfile, m.segment_lengths, 1);
+        gm->segment_ids = db_hdf5_comprd(dbfile, m.segment_ids, 1);
+
+        /* read the map segment data */
+        gm->segment_data = (int **) malloc(m.num_segments * sizeof(int*));
+        intArray = db_hdf5_comprd(dbfile, m.segment_data, 1);
+        n = 0;
+        for (i = 0; i < m.num_segments; i++)
+        {
+            int sl = gm->segment_lengths[i];
+            gm->segment_data[i] = 0;
+            if (sl > 0)
+            {
+                gm->segment_data[i] = (int*) malloc(sl * sizeof(int));
+                for (j = 0; j < sl; j++)
+                    gm->segment_data[i][j] = intArray[n++];
+            }
+        }
+        FREE(intArray);
+
+        intArray = db_hdf5_comprd(dbfile, m.frac_lengths, 1);
+        if (intArray)
+        {
+            gm->segment_fracs = malloc(m.num_segments * sizeof(void*));
+            fracsArray = db_hdf5_comprd(dbfile, m.segment_fracs, 1);
+            n = 0;
+            for (i = 0; i < m.num_segments; i++)
+            {
+                int len = intArray[i];
+
+                if (len <= 0)
+                {
+                    gm->segment_fracs[i] = 0;
+                    continue;
+                }
+
+                gm->segment_fracs[i] = malloc(len * ((gm->fracs_data_type==DB_FLOAT)?sizeof(float):sizeof(double)));
+                for (j = 0; j < len; j++)
+                {
+                    if (gm->fracs_data_type == DB_FLOAT)
+                    {
+                        float *pfa = (float *) fracsArray;
+                        float *psf = (float *) gm->segment_fracs[i];
+                        psf[j] = pfa[n++];
+                    }
+                    else
+                    {
+                        double *pfa = (double *) fracsArray;
+                        double *psf = (double *) gm->segment_fracs[i];
+                        psf[j] = pfa[n++];
+                    }
+                }
+            }
+        }
+        else
+        {
+            gm->segment_fracs = 0;
+        }
+        FREE(intArray);
+        FREE(fracsArray);
+
+        H5Tclose(o);
+
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        FREE(intArray);
+        FREE(fracsArray);
+    } END_PROTECT;
+
+    return gm;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_PutMrgvar
+ *
+ * Purpose:     Write an mrgvar to a file 
+ *
+ * Programmer: Mark C. Miller
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_hdf5_PutMrgvar(DBfile *_dbfile, const char *name,
+    const char *mrgt_name,
+    int ncomps, char **compnames,
+    int nregns, char **reg_pnames,
+    int datatype, void **data, DBoptlist *optlist)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_PutMrgvar";
+    char                *s = 0;
+    int                 i, len, nstrs;
+    DBmrgvar_mt         m;
+
+    memset(&m, 0, sizeof m);
+
+    PROTECT {
+
+        db_ProcessOptlist(DB_MRGVAR, optlist);
+
+        /* Write variable arrays */
+        if (ncomps>MAX_VARS) {
+            db_perror("too many variables", E_BADARGS, me);
+            UNWIND();
+        }
+        for (i=0; i<ncomps; i++) {
+            char tmpname[256];
+            const char *p = tmpname;
+            if (compnames)
+                sprintf(tmpname, "%s_%s", name, compnames[i]);
+            else
+                sprintf(tmpname, "%s_comp%d", name, i);
+            db_hdf5_compwr(dbfile, datatype, 1, &nregns, data[i],
+                m.data[i]/*out*/, friendly_name(p, "_data", 0));
+        }
+
+        /* output reg_pnames */
+        nstrs = nregns;
+        if (strchr(reg_pnames[0], '%') != 0)
+            nstrs = 1;
+        DBStringArrayToStringList(reg_pnames, nstrs, &s, &len);
+        db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.reg_pnames/*out*/,
+                friendly_name(name, "_reg_pnames", 0));
+        FREE(s);
+
+        if (compnames)
+        {
+            /* output compnames */
+            DBStringArrayToStringList(compnames, ncomps, &s, &len);
+            db_hdf5_compwr(dbfile, DB_CHAR, 1, &len, s, m.compnames/*out*/,
+                    friendly_name(name, "_compnames", 0));
+            FREE(s);
+        }
+
+        /* Build header in memory */
+        m.ncomps = ncomps;
+        m.nregns = nregns;
+        m.datatype = datatype;
+        strcpy(m.mrgt_name, OPT(mrgt_name));
+
+        /* Write header to file */
+        STRUCT(DBmrgvar) {
+            MEMBER_R(str(m.data[_j]), data, ncomps);
+            MEMBER_S(str(m.mrgt_name), mrgt_name);
+            if (m.ncomps)       MEMBER_S(int, ncomps);
+            if (m.nregns)       MEMBER_S(int, nregns);
+            if (m.datatype)     MEMBER_S(int, datatype);
+            MEMBER_S(str(m.compnames), compnames);
+            MEMBER_S(str(m.reg_pnames), reg_pnames);
+        } OUTPUT(dbfile, DB_MRGVAR, name, &m);
+
+    } CLEANUP {
+        /*void*/
+    } END_PROTECT;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_GetMrgvar
+ *
+ * Purpose:     Read an mrgvar from a file.
+ *
+ * Programmer: Mark C. Miller
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmrgvar *
+db_hdf5_GetMrgvar(DBfile *_dbfile, const char *name)
+{
+    DBfile_hdf5         *dbfile = (DBfile_hdf5*)_dbfile;
+    static char         *me = "db_hdf5_GetMrgvar";
+    char                *s = 0;
+    hid_t               o=-1, attr=-1;
+    int                 _objtype, i;
+    DBmrgvar_mt         m;
+    DBmrgvar           *mrgv=NULL;
+
+    PROTECT {
+        /* Open object and make sure it's a ucdvar */
+        if ((o=H5Topen(dbfile->cwg, name))<0) {
+            db_perror(name, E_NOTFOUND, me);
+            UNWIND();
+        }
+        if ((attr=H5Aopen_name(o, "silo_type"))<0 ||
+            H5Aread(attr, H5T_NATIVE_INT, &_objtype)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        if (DB_MRGVAR!=(DBObjectType)_objtype) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Read ucdvar data into memory */
+        memset(&m, 0, sizeof m);
+        if ((attr=H5Aopen_name(o, "silo"))<0 ||
+            H5Aread(attr, DBmrgvar_mt5, &m)<0 ||
+            H5Aclose(attr)<0) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+
+        /* Create a mrgvar object and initialize meta data */
+        mrgv = (DBmrgvar *) calloc(1,sizeof(DBmrgvar));
+        mrgv->name = BASEDUP(name);
+        mrgv->mrgt_name = OPTDUP(m.mrgt_name);
+        mrgv->nregns = m.nregns;
+        mrgv->ncomps = m.ncomps;
+        if ((mrgv->datatype = db_hdf5_GetVarType(_dbfile, m.data[0])) < 0)
+            mrgv->datatype = silo2silo_type(m.datatype);
+        if (force_single_g) mrgv->datatype = DB_FLOAT;
+
+        /* Read the raw data */
+        if (m.ncomps>MAX_VARS) {
+            db_perror(name, E_CALLFAIL, me);
+            UNWIND();
+        }
+        mrgv->data = calloc(m.ncomps, sizeof(void*));
+        for (i=0; i<m.ncomps; i++) {
+            mrgv->data[i] = db_hdf5_comprd(dbfile, m.data[i], 0);
+        }
+
+        s = db_hdf5_comprd(dbfile, m.compnames, 1);
+        if (s) mrgv->compnames = DBStringListToStringArray(s, m.ncomps,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        s = db_hdf5_comprd(dbfile, m.reg_pnames, 1);
+        if (s) mrgv->reg_pnames = DBStringListToStringArray(s, -1,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(s);
+
+        H5Tclose(o);
+        
+    } CLEANUP {
+        H5E_BEGIN_TRY {
+            H5Aclose(attr);
+            H5Tclose(o);
+        } H5E_END_TRY;
+        DBFreeMrgvar(mrgv);
+    } END_PROTECT;
+
+    return mrgv;
+}
+
+SILO_CALLBACK int 
+db_hdf5_FreeCompressionResources(DBfile *_dbfile, const char *meshname)
+{
+    FreeNodelists((DBfile_hdf5*)_dbfile, meshname);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_hdf5_SortObjectsByOffset
+ *
+ * Purpose:     Returned array of indexes into an array of object names
+ *              sorted by offset within the file. This can be used by
+ *              readers to 'schedule' reading of objects to minimize
+ *              jumping around the file.
+ *
+ * Programmer: Mark C. Miller, Thu Jul 15 07:42:46 PDT 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* Support type for db_hdf5_SortObjectsByOffset */
+typedef struct _index_offset_pair_t {
+    int index;
+    haddr_t offset;
+} index_offset_pair_t;
+
+/* Support function for db_hdf5_SortObjectsByOffset */
+static int compare_index_offset_pair(const void *a1, const void *a2)
+{
+    index_offset_pair_t *p1 = (index_offset_pair_t*) a1;
+    index_offset_pair_t *p2 = (index_offset_pair_t*) a2;
+    if (p1->index == -1) return 1;
+    if (p2->index == -1) return -1;
+    if (p1->offset < p2->offset) return -1;
+    else if (p1->offset > p2->offset) return 1;
+    else return 0;
+}
+
+SILO_CALLBACK int
+db_hdf5_SortObjectsByOffset(DBfile *_dbfile, int nobjs,
+    const char *const *const names, int *ordering)
+{
+    static char *me = "db_hdf5_SortObjectsByOffset";
+#if HDF5_VERSION_GE(1,8,0)
+    DBfile_hdf5 *dbfile = (DBfile_hdf5*)_dbfile;
+    index_offset_pair_t *iop = (index_offset_pair_t*)
+        malloc(nobjs * sizeof(index_offset_pair_t));
+    int i;
+
+    /* Gather up object addresses. If object names contain colon, ':'
+       this indicates the object is in a different file than current.
+       These will always be pushed to the 'back' of the list */
+    for (i = 0; i < nobjs; i++)
+    {
+        iop[i].index = i;
+        if (strchr(names[i], ':')) iop[i].offset = HADDR_MAX;
+        else
+        {
+            H5O_info_t oinfo;
+            hid_t oid;
+            if ((oid=H5Oopen(dbfile->cwg, names[i], H5P_DEFAULT))<0 ||
+                 H5Oget_info(oid, &oinfo)<0 ||
+                 H5Oclose(oid)<0)
+                iop[i].offset = HADDR_MAX;
+            else
+                iop[i].offset = oinfo.addr;
+        }
+    }
+
+    /* Ok, sort the index/offset pairs */
+    qsort(iop, nobjs, sizeof(index_offset_pair_t), compare_index_offset_pair);
+
+    /* Populate ordering array */
+    for (i = 0; i < nobjs; i++)
+        ordering[i] = iop[i].index;
+
+    free(iop);
+
+    return 0;
+#else
+    return db_perror("H5O API for sort", E_NOTENABLEDINBUILD, me);
+#endif
+}
+
+#else
+/* Stub for when we don't have hdf5 */
+INTERNAL DBfile *
+db_hdf5_Open(char *name, int mode, int subtype)
+{
+    db_perror(name, E_NOTIMP, "db_hdf5_Open");
+    return NULL;
+}
+
+/* Stub for when we don't have hdf5 */
+INTERNAL DBfile *
+db_hdf5_Create(char *name, int mode, int target, int subtype, char *finfo)
+{
+    db_perror(name, E_NOTIMP, "db_hdf5_Create");
+    return NULL;
+}
+
+/* Stub for when we don't have hdf5 */
+INTERNAL int
+db_hdf5_ForceSingle(int satus)
+{
+    return 0; /*no-op, don't fail*/
+}
+
+
+#endif /* defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5) */
diff --git a/src/hdf5_drv/silo_hdf5_private.h b/src/hdf5_drv/silo_hdf5_private.h
new file mode 100644
index 0000000..d165149
--- /dev/null
+++ b/src/hdf5_drv/silo_hdf5_private.h
@@ -0,0 +1,321 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * Programmer:  Robb Matzke <matzke at llnl.gov>
+ *              Tuesday, February 9, 1999
+ *
+ * Purpose:     This header file is included by all silo-hdf5 source files
+ *              and contains constants and prototypes that should be visible
+ *              to the SILO/HDF5 driver but not to the application.
+ *
+ * Note:        This file can be included even if HDF5 is not available.
+ */
+#ifndef SILO_HDF5_PRIVATE_H
+#define SILO_HDF5_PRIVATE_H
+#include "config.h"
+#include "silo_private.h"
+#include "silo_drivers.h"
+#if defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5)
+
+#include "hdf5.h"
+
+#define NDSETTAB        30
+
+/* The private version of the DBfile structure is defined here */
+typedef struct DBfile_hdf5 {
+    DBfile_pub  pub;                    /*public stuff                  */
+    hid_t       fid;                    /*hdf5 file identifier          */
+    hid_t       cwg;                    /*current working group         */
+    char        *cwg_name;              /*full name of cwg or NULL      */
+    hid_t       link;                   /*link group                    */
+    char        *dsettab[NDSETTAB];     /*circular buffer of datasets   */
+    char        compname[NDSETTAB][32]; /*component names for datasets  */
+    int         dsettab_ins;            /*next insert location          */
+    int         dsettab_rem;            /*next remove location          */
+    hid_t       T_char;                 /*target DB_CHAR type           */
+    hid_t       T_short;                /*target DB_SHORT type          */
+    hid_t       T_int;                  /*target DB_INT type            */
+    hid_t       T_long;                 /*target DB_LONG type           */
+    hid_t       T_llong;                /*target DB_LONG_LONG type      */
+    hid_t       T_float;                /*target DB_FLOAT type          */
+    hid_t       T_double;               /*target DB_DOUBLE type         */
+    hid_t       T_str256;               /*target 256-char string        */
+    hid_t       (*T_str)(char*);        /*target character string       */
+} DBfile_hdf5;
+
+#ifndef SILO_NO_CALLBACKS
+
+/* File operations */
+SILO_CALLBACK int db_hdf5_Close (DBfile *);
+SILO_CALLBACK int db_hdf5_Filters(DBfile *_dbfile, FILE *stream);
+
+/* Directory operations */
+SILO_CALLBACK int db_hdf5_MkDir(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_SetDir(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_GetDir(DBfile *_dbfile, char *name/*out*/);
+SILO_CALLBACK int db_hdf5_CpDir(DBfile *_dbfile, const char *srcDir,
+                           DBfile *dstFile, const char *dstDir);
+SILO_CALLBACK int db_hdf5_NewToc(DBfile *_dbfile);
+
+/* Variable inquiries */
+SILO_CALLBACK int db_hdf5_InqVarExists (DBfile *_dbfile, char *varname);
+SILO_CALLBACK int db_hdf5_GetVarLength(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_GetVarByteLength(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_GetVarType(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_GetVarDims(DBfile *_dbfile, char *varname, int maxdims,
+                                int *dims/*out*/);
+
+/* Variable I/O */
+SILO_CALLBACK void *db_hdf5_GetVar(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_ReadVar (DBfile *, char *, void *);
+SILO_CALLBACK int db_hdf5_ReadVarSlice (DBfile *, char *, int *, int *, int *,
+                                   int, void *);
+SILO_CALLBACK int db_hdf5_Write (DBfile *, char *, void *, int *, int, int);
+SILO_CALLBACK int db_hdf5_WriteSlice (DBfile*, char*, void*, int, int[], int[],
+                                 int[], int[], int);
+
+/* Low-level object functions */
+SILO_CALLBACK DBobject *db_hdf5_GetObject(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_GetComponentNames(DBfile *_dbfile, char *objname,
+                                       char ***comp_names, char ***file_names);
+SILO_CALLBACK int db_hdf5_WriteObject(DBfile *_dbfile, DBobject *obj, int flags);
+SILO_CALLBACK int db_hdf5_WriteComponent(DBfile *_dbfile, DBobject *obj,
+                                    char *compname, char *prefix,
+                                    char *datatype, const void *data, int rank,
+                                    long _size[]);
+SILO_CALLBACK int db_hdf5_GetComponentType(DBfile *_dbfile, char *objname,
+                                    char *compname);
+SILO_CALLBACK void *db_hdf5_GetComponent(DBfile *_dbfile, char *objname,
+                                    char *compname);
+SILO_CALLBACK void *db_hdf5_GetComponentStuff(DBfile *_dbfile, char *objname,
+                                    char *compname, int *just_get_datatype);
+SILO_CALLBACK DBObjectType db_hdf5_InqVarType(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_InqMeshName(DBfile *_dbfile, char *name,
+                                 char *meshname/*out*/);
+
+/* Curves */
+SILO_CALLBACK int db_hdf5_PutCurve(DBfile *_dbfile, char *name, void *xvals,
+                              void *yvals, int dtype, int npts,
+                              DBoptlist *opts);
+SILO_CALLBACK DBcurve *db_hdf5_GetCurve(DBfile *_dbfile, char *name);
+
+/* Csgmeshes */
+SILO_CALLBACK int db_hdf5_PutCsgmesh(DBfile *_dbfile, const char *name, int ndims,
+                                int nbounds, const int *typeflags,
+                                const int *bndids/*optional*/,
+                                const void *coeffs, int lcoeffs, int datatype,
+                                const double *extents, const char *zonel_name,
+                                DBoptlist *optlist);
+SILO_CALLBACK DBcsgmesh *db_hdf5_GetCsgmesh(DBfile *_dbfile, const char *name);
+SILO_CALLBACK int db_hdf5_PutCsgvar(DBfile *_dbfile, const char *vname, const char *meshname,
+                               int nvars, char *varnames[], void *vars[],
+                               int nvals, int datatype, int centering, DBoptlist *optlist);
+SILO_CALLBACK DBcsgvar *db_hdf5_GetCsgvar(DBfile *_dbfile, const char *name);
+SILO_CALLBACK int db_hdf5_PutCSGZonelist(DBfile *_dbfile, const char *name, int nregs,
+                                    const int *typeflags,
+                                    const int *leftids, const int *rightids,
+                                    const void *xforms, int lxforms, int datatype,
+                                    int nzones, const int *zonelist, DBoptlist *optlist);
+SILO_CALLBACK DBcsgzonelist *db_hdf5_GetCSGZonelist(DBfile *_dbfile, const char *name);
+
+/* Defvars */
+SILO_CALLBACK int db_hdf5_PutDefvars(DBfile *dbfile, const char *name, int ndefs,
+                                char *names[], const int *types,
+                                char *defns[], DBoptlist *opts[]);
+SILO_CALLBACK DBdefvars *db_hdf5_GetDefvars(DBfile *_dbfile, const char *name);
+
+/* Quadmeshes */
+SILO_CALLBACK int db_hdf5_PutQuadmesh(DBfile *_dbfile, char *name,
+                                 char *coordnames[], DB_DTPTR2 coords,
+                                 int dims[], int ndims, int datatype,
+                                 int coordtype, DBoptlist *optlist);
+SILO_CALLBACK DBquadmesh *db_hdf5_GetQuadmesh (DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutQuadvar(DBfile *_dbfile, char *name, char *meshname,
+                                int nvars, char *varnames[/*nvars*/],
+                                DB_DTPTR2 vars, int dims[/*ndims*/],
+                                int ndims, DB_DTPTR2 mixvars,
+                                int mixlen, int datatype, int centering,
+                                DBoptlist *optlist);
+SILO_CALLBACK DBquadvar *db_hdf5_GetQuadvar(DBfile *_dbfile, char *name);
+
+/* Unstructured meshes */
+SILO_CALLBACK int db_hdf5_PutUcdmesh(DBfile *_dbfile, char *name, int ndims,
+                                char *coordnames[/*ndims*/],
+                                DB_DTPTR2 coords, int nnodes,
+                                int nzones, char *zlname, char *flname,
+                                int datatype, DBoptlist *optlist);
+SILO_CALLBACK int db_hdf5_PutUcdsubmesh(DBfile *_dbfile, char *name,
+                                   char *parentmesh, int nzones, char *zlname,
+                                   char *flname, DBoptlist *optlist);
+SILO_CALLBACK DBucdmesh *db_hdf5_GetUcdmesh(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutUcdvar(DBfile *_dbfile, char *name, char *meshname,
+                               int nvars, char *varnames[/*nvars*/],
+                               DB_DTPTR2 vars, int nels,
+                               DB_DTPTR2 mixvars, int mixlen,
+                               int datatype, int centering,
+                               DBoptlist *optlist);
+SILO_CALLBACK DBucdvar *db_hdf5_GetUcdvar(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutFacelist(DBfile *_dbfile, char *name, int nfaces,
+                                 int ndims, int *nodelist, int lnodelist,
+                                 int origin, int *zoneno, int *shapesize,
+                                 int *shapecnt, int nshapes, int *types,
+                                 int *typelist, int ntypes);
+SILO_CALLBACK DBfacelist *db_hdf5_GetFacelist(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutZonelist(DBfile *_dbfile, char *name, int nzones,
+                                 int ndims, int nodelist[], int lnodelist,
+                                 int origin, int shapesize[], int shapecnt[],
+                                 int nshapes);
+SILO_CALLBACK int db_hdf5_PutZonelist2(DBfile *_dbfile, char *name, int nzones,
+                                  int ndims, int nodelist[], int lnodelist,
+                                  int origin, int lo_offset, int hi_offset,
+                                  int shapetype[], int shapesize[],
+                                  int shapecnt[], int nshapes,
+                                  DBoptlist *optlist);
+SILO_CALLBACK int db_hdf5_PutPHZonelist(DBfile *_dbfile, char *name,
+                                  int nfaces, int *nodecnt, int lnodelist, int *nodelist,
+                                  char *extface,
+                                  int nzones, int *facecnt, int lfacelist, int *facelist,
+                                  int origin, int lo_offset, int hi_offset,
+                                  DBoptlist *optlist);
+SILO_CALLBACK DBzonelist *db_hdf5_GetZonelist(DBfile *_dbfile, char *name);
+SILO_CALLBACK DBphzonelist *db_hdf5_GetPHZonelist(DBfile *_dbfile, char *name);
+
+/* Materials */
+SILO_CALLBACK int db_hdf5_PutMaterial(DBfile *_dbfile, char *name, char *mname,
+                                 int nmat, int matnos[], int matlist[],
+                                 int dims[], int ndims, int mix_next[],
+                                 int mix_mat[], int mix_zone[], DB_DTPTR1 mix_vf,
+                                 int mixlen, int datatype, DBoptlist *optlist);
+SILO_CALLBACK DBmaterial *db_hdf5_GetMaterial(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutMatspecies(DBfile *_dbfile, char *name, char *matname,
+                                   int nmat, int nmatspec[], int speclist[],
+                                   int dims[], int ndims, int nspecies_mf,
+                                   DB_DTPTR1 species_mf, int mix_speclist[],
+                                   int mixlen, int datatype,
+                                   DBoptlist *optlist);
+SILO_CALLBACK DBmatspecies *db_hdf5_GetMatspecies(DBfile *_dbfile, char *name);
+
+/* Point meshes */
+SILO_CALLBACK int db_hdf5_PutPointmesh(DBfile *_dbfile, char *name, int ndims,
+                                  DB_DTPTR2 coords, int nels, int datatype,
+                                  DBoptlist *optlist);
+SILO_CALLBACK DBpointmesh *db_hdf5_GetPointmesh(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutPointvar(DBfile *_dbfile, char *name, char *meshname,
+                                 int nvars, DB_DTPTR2 vars, int nels,
+                                 int datatype, DBoptlist *optlist);
+SILO_CALLBACK DBmeshvar *db_hdf5_GetPointvar(DBfile *_dbfile, char *name);
+
+/* Multiblock meshes */
+SILO_CALLBACK int db_hdf5_PutMultimesh(DBfile *_dbfile, char *name, int nmesh,
+                                  char *meshnames[], int meshtypes[],
+                                  DBoptlist *optlist);
+SILO_CALLBACK int db_hdf5_PutMultimeshadj(DBfile *_dbfile, const char *name, int nmesh,
+                                     const int *meshtypes, const int *nneighbors,
+                                     const int *neighbors, const int *back,
+                                     const int *lnodelists, int *nodelists[],
+                                     const int *lzonelists, int *zonelists[],
+                                     DBoptlist *optlist);
+SILO_CALLBACK DBmultimesh *db_hdf5_GetMultimesh(DBfile *_dbfile, char *name);
+SILO_CALLBACK DBmultimeshadj *db_hdf5_GetMultimeshadj(DBfile *_dbfile, const char *name, int nmesh,
+                                                 const int *block_map);
+SILO_CALLBACK int db_hdf5_PutMultivar(DBfile *_dbfile, char *name, int nvars,
+                                 char *varnames[], int vartypes[],
+                                 DBoptlist *optlist);
+SILO_CALLBACK DBmultivar *db_hdf5_GetMultivar(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutMultimat(DBfile *_dbfile, char *name, int nmats,
+                                 char *matnames[], DBoptlist *optlist);
+SILO_CALLBACK DBmultimat *db_hdf5_GetMultimat(DBfile *_dbfile, char *name);
+SILO_CALLBACK int db_hdf5_PutMultimatspecies(DBfile *_dbfile, char *name, int nspec,
+                                        char *specnames[], DBoptlist *optlist);
+SILO_CALLBACK DBmultimatspecies *db_hdf5_GetMultimatspecies(DBfile *_dbfile,
+                                                       char *name);
+
+/* Compound arrays */
+SILO_CALLBACK int db_hdf5_PutCompoundarray(DBfile *_dbfile, char *name,
+                                      char *elmtnames[], int elmtlen[],
+                                      int nelmts, void *values, int nvalues,
+                                      int datatype, DBoptlist *optlist);
+SILO_CALLBACK DBcompoundarray *db_hdf5_GetCompoundarray(DBfile *_dbfile,
+                                                   char *name);
+
+/* Mrgtree objects */
+SILO_CALLBACK int db_hdf5_PutMrgtree(DBfile *_dbfile, const char *name, const char *mesh_name,
+    DBmrgtree *tree, DBoptlist *optlist);
+SILO_CALLBACK DBmrgtree *db_hdf5_GetMrgtree(DBfile *_dbfile, const char *name);
+
+/* groupel maps */
+SILO_CALLBACK int db_hdf5_PutGroupelmap(DBfile *_dbfile, const char *map_name,
+    int num_segments, int *groupel_types, int *segment_lengths,
+    int *segment_ids, int **segment_data, void **segment_fracs,
+    int fracs_data_type, DBoptlist *opts);
+SILO_CALLBACK DBgroupelmap *db_hdf5_GetGroupelmap(DBfile *dbfile, const char *name);
+
+/* mrgvars */
+SILO_CALLBACK int db_hdf5_PutMrgvar(DBfile *dbfile, const char *name,
+                             const char *mrgt_name,
+                             int ncomps, char **compnames,
+                             int nregns, char **reg_pnames,
+                             int datatype, void **data, DBoptlist *opts);
+SILO_CALLBACK DBmrgvar *db_hdf5_GetMrgvar(DBfile *dbfile, const char *name);
+
+SILO_CALLBACK int db_hdf5_FreeCompressionResources(DBfile *_dbfile,
+                 const char *meshname);
+
+SILO_CALLBACK int db_hdf5_SortObjectsByOffset(DBfile *_dbfile, int nobjs,
+                 const char *const *const names, int *ordering);
+
+#endif /* !SILO_NO_CALLBACKS */
+
+#endif /* defined(HAVE_HDF5_H) && defined(HAVE_LIBHDF5) */
+#endif /* !SILO_HDF5_PRIVATE_H */
diff --git a/src/libsilo.settings.in b/src/libsilo.settings.in
new file mode 100644
index 0000000..975e795
--- /dev/null
+++ b/src/libsilo.settings.in
@@ -0,0 +1,45 @@
+"SUMMARY OF THE Silo CONFIGURATION\n"
+"=================================\n"
+"\n"
+"Silo Version:           @PACKAGE_VERSION@\n"
+"Configured on:          @CONFIG_DATE@\n"
+"Configured by:          @CONFIG_USER@\n"
+"Configure command:      @CONFIG_CMD@\n"
+"Host system:            @host@\n"
+"Build system:           @build@\n"
+"Installation point:     @prefix@\n"
+"Source directory:       @UsingSrcDir@\n"
+"Archiver:               @AR@\n"
+"Ranlib:                 @RANLIB@\n"
+"\n"
+"Configure Summary\n"
+"Compiling Options:\n"
+"                     C Compiler @CC_FULLPATH@\n"
+"                       CPPFLAGS @CPPFLAGS@\n"
+"                         CFLAGS @CFLAGS@\n"
+"                        LDFLAGS @LDFLAGS@\n"
+"                           LIBS @LIBS@\n"
+"               Shared Libraries @UsingShared@\n"
+"               Static Libraries @UsingStatic@\n"
+"                        64 bits @Using64bits@\n"
+"                   Optimization @UsingOpt@\n"
+"Languages:\n"
+"                            C++ @UsingCxx@\n"
+"                   C++ Compiler @CXX_FULLPATH@\n"
+"                       CXXFLAGS @CXXFLAGS@\n"
+"                        Fortran @UsingFortran@\n"
+"               Fortran Compiler @FC_FULLPATH@\n"
+"                        FCFLAGS @FCFLAGS@\n"
+"                         FCLIBS @FCLIBS@\n"
+"Features:\n"
+"                        Browser @UsingBrowser@\n"
+"                       Readline @UsingReadline@\n"
+"                           HDF5 @UsingHDF5@\n"
+"                          Silex @UsingSilex@\n"
+"                             Qt @UsingQt@\n"
+"                Qt moc Compiler @QT_MOC@\n"
+"                    Qt CXXFLAGS @QT_CXXFLAGS@\n"
+"                        Qt LIBS @QT_LIBS@\n"
+"                         Python @UsingPython@\n"
+"                Python Compiler @PYTHON@\n"
+"                Python CPPFLAGS @PYTHON_CPPFLAGS@\n"
diff --git a/src/libsiloh5.settings.in b/src/libsiloh5.settings.in
new file mode 100644
index 0000000..ba5869a
--- /dev/null
+++ b/src/libsiloh5.settings.in
@@ -0,0 +1,39 @@
+"SUMMARY OF THE Silo with HDF5 CONFIGURATION\n"
+"=================================\n"
+"\n"
+"Silo Version:           @PACKAGE_VERSION@\n"
+"Configured on:          @CONFIG_DATE@\n"
+"Configured by:          @CONFIG_USER@\n"
+"Configure command:      @CONFIG_CMD@\n"
+"Host system:            @host@\n"
+"Build system:           @build@\n"
+"Installation point:     @prefix@\n"
+"Source directory:       @UsingSrcDir@\n"
+"Archiver:               @AR@\n"
+"Ranlib:                 @RANLIB@\n"
+"\n"
+"Configure Summary\n"
+"Compiling Options:\n"
+"                     C Compiler @CC_FULLPATH@\n"
+"                       CPPFLAGS @CPPFLAGS@\n"
+"                         CFLAGS @CFLAGS@\n"
+"                        LDFLAGS @LDFLAGS@\n"
+"                           LIBS @LIBS@\n"
+"Languages:\n"
+"                   C++ Compiler @CXX_FULLPATH@\n"
+"                       CXXFLAGS @CXXFLAGS@\n"
+"               Fortran Compiler @FC_FULLPATH@\n"
+"                        FCFLAGS @FCFLAGS@\n"
+"                         FCLIBS @FCLIBS@\n"
+"Features:\n"
+"                        Browser @UsingBrowser@\n"
+"                       Readline @UsingReadline@\n"
+"                           HDF5 @UsingHDF5@\n"
+"                          Silex @UsingSilex@\n"
+"                             Qt @UsingQt@\n"
+"                Qt moc Compiler @QT_MOC@\n"
+"                    Qt CXXFLAGS @QT_CXXFLAGS@\n"
+"                        Qt LIBS @QT_LIBS@\n"
+"                         Python @UsingPython@\n"
+"                Python Compiler @PYTHON@\n"
+"                Python CPPFLAGS @PYTHON_CPPFLAGS@\n"
diff --git a/src/netcdf/Makefile.am b/src/netcdf/Makefile.am
new file mode 100644
index 0000000..d77f49e
--- /dev/null
+++ b/src/netcdf/Makefile.am
@@ -0,0 +1,69 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_netcdf.la
+libsilo_netcdf_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(srcdir)/../pdb -I$(builddir)/../silo -I$(srcdir)/../silo  -I$(srcdir)/../score 
+
+noinst_HEADERS = \
+ silo_netcdf_private.h \
+ table.h
+FILES = \
+ api.c \
+ ent.c \
+ netcdf.c \
+ obj.c \
+ silo_netcdf.c \
+ table.c 
diff --git a/src/netcdf/Makefile.in b/src/netcdf/Makefile.in
new file mode 100644
index 0000000..1fb6f73
--- /dev/null
+++ b/src/netcdf/Makefile.in
@@ -0,0 +1,561 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/netcdf
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_netcdf_la_LIBADD =
+am__objects_1 = api.lo ent.lo netcdf.lo obj.lo silo_netcdf.lo table.lo
+am_libsilo_netcdf_la_OBJECTS = $(am__objects_1)
+libsilo_netcdf_la_OBJECTS = $(am_libsilo_netcdf_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_netcdf_la_SOURCES)
+DIST_SOURCES = $(libsilo_netcdf_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_netcdf.la
+libsilo_netcdf_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(srcdir)/../pdb -I$(builddir)/../silo -I$(srcdir)/../silo  -I$(srcdir)/../score 
+noinst_HEADERS = \
+ silo_netcdf_private.h \
+ table.h
+
+FILES = \
+ api.c \
+ ent.c \
+ netcdf.c \
+ obj.c \
+ silo_netcdf.c \
+ table.c 
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/netcdf/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/netcdf/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_netcdf.la: $(libsilo_netcdf_la_OBJECTS) $(libsilo_netcdf_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_netcdf_la_OBJECTS) $(libsilo_netcdf_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/api.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ent.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netcdf.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/obj.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_netcdf.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/table.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/netcdf/api.c b/src/netcdf/api.c
new file mode 100644
index 0000000..b1c5a66
--- /dev/null
+++ b/src/netcdf/api.c
@@ -0,0 +1,699 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#define SILO_NO_CALLBACKS
+#include "silo_netcdf_private.h"
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                      api.c
+
+  Purpose
+
+        Perform all functions which deal with the application-program
+        interface for the Standard Interfacing Library for scientific
+        Output (SILO).
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Contents
+
+        SILO Routine Summary (User-Level)
+        --------------------------------
+
+
+        dbid = silonetcdf_ncopen   (filename, mode)
+        dbid = silonetcdf_nccreate (filename, mode)
+               silonetcdf_ncclose  (dbid)
+               SILO_ShowErrors (true_false)
+               SILO_SetTarget  (data_std, data_align)
+
+               silonetcdf_ncinqall (dbid, &ndim, &nvar, &nobj, &ndir, &ngatt, &recdim))
+               silonetcdf_ncinquire (dbid, &ndim, &nvar, &ngatt, &recdim)
+
+        id   = silonetcdf_ncdimdef (dbid, name, size)
+        id   = silonetcdf_ncdimid  (dbid, name)
+               silonetcdf_ncdiminq (dbid, dimid, &name, &size)
+
+        id   = silonetcdf_ncdirdef (dbid, name)
+        id   = silonetcdf_ncdirget (dbid)
+               silonetcdf_ncdirset (dbid, dirid)
+               silonetcdf_ncdirinq (dbid, dirid, &name, &parent)
+               silonetcdf_ncdirlist(dbid, dirid, &nchild, &children)
+
+        id   = silonetcdf_ncvardef (dbid, name, datatype, ndims, dimids)
+        id   = silonetcdf_ncvarid  (dbid, name)
+               silonetcdf_ncvarinq (dbid, varid, &name, &datatype, &ndims, &dims, &natts)
+               silonetcdf_ncvarput1(dbid, varid, index[], &value)
+               silonetcdf_ncvarget1(dbid, varid, index[], &value
+               silonetcdf_ncvarput (dbid, varid, start[], count[], &values)
+               silonetcdf_ncvarget (dbid, varid, start[], count[], &values)
+
+               silonetcdf_ncattput (dbid, varid, name, datatype, len, &value)
+               silonetcdf_ncattget (dbid, varid, name, &value)
+               silonetcdf_ncattinq (dbid, varid, name, &datatype, &len)
+
+        id   = silonetcdf_ncobjdef (dbid, name, type, ncomps)
+        id   = silonetcdf_ncobjid  (dbid, name)
+               silonetcdf_ncobjinq (dbid, objid, &name, &type, &ncomps)
+               silonetcdf_ncobjput (dbid, objid, names, ids[], types[], pars[])
+               silonetcdf_ncobjget (dbid, objid, names, ids[], types[], pars[])
+
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*===========================================================
+ * Global Data for this Module
+ *===========================================================*/
+
+char           err_string[256];
+int            _dims[30];
+
+/*----------------------------------------------------------------------
+ *  Routine                                                     silonetcdf_ncopen
+ *
+ *  Purpose
+ *
+ *      Open an existing SILO file for access, returning a database ID
+ *      that can subsequently be used to refer to the SILO file. In
+ *      case of error, the function returns 'OOPS'.
+ *
+ *  Notes
+ *
+ *      This function will do the following:
+ *              (1) Verify input parameters
+ *              (2) Open the given file.
+ *              (3) Read header information describing table sizes.
+ *              (4) Create table data structures.
+ *              (5) Read tables from file.
+ *
+ *  Modifications
+ *      Robb Matzke, Tue Jan 10 17:20:26 EST 1995
+ *      Device independence rewrite.  Explicit return values:
+ *      success: netcdf ID number; failure: -1.  Removed checks for
+ *      file name, file existence, file readability since this is done
+ *      at higher levels.
+ *
+ *      Al Leibee, Thu Jun  9 13:15:37 PDT 1994
+ *      PD_close a PDB file that is not a Silo file.
+ *
+ *---------------------------------------------------------------------
+ */
+/* ARGSUSED */
+INTERNAL int
+silonetcdf_ncopen (char *filename, int mode)
+{
+   PDBfile       *pdb_file;    /* PDB File descriptor. */
+   int            dbid;        /* Database identifier. */
+
+   /* Perform any necessary one-time initializations */
+   silo_Init();
+
+   /* Attempt to open file. */
+   if ((pdb_file = lite_PD_open(filename, "r")) == NULL) {
+      /* Not a SILO file. */
+      /* silo_Error (lite_PD_err, SILO_ERROR); */
+      silo_Error("File is not a SILO file.", SILO_ERROR);
+      return (OOPS);
+   }
+
+   /* Make sure this is a SILO file. */
+   if (!silo_Verify(pdb_file)) {
+      silo_Error("File is not a SILO file", SILO_ERROR);
+      (void)lite_PD_close(pdb_file);
+      return (OOPS);
+   }
+
+   /*------------------------------------------------------------------
+    * File has been opened successfully.  We must now associate an
+    * integer identifier with this file (for caller), save the PDB
+    * file pointer, and set up internal tables.
+    * ---------------------------------------------------------------*/
+
+   if ((dbid = silo_Attach(pdb_file)) == OOPS) {
+      /* (Error message taken care of in silo_Attach) */
+      (void)lite_PD_close(pdb_file);
+      return (OOPS);
+   }
+
+   /* Allocate and read the internal SILO tables. */
+   silo_MakeTables(dbid);
+
+   if (silo_GetTables(dbid) == OOPS) {
+      silo_Release(dbid);
+      silo_Error("SILO file is corrupt. Make sure it was FTP'd in bin mode.",
+		 SILO_ERROR);
+      return (OOPS);
+   }
+   else
+      return (dbid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silonetcdf_ncclose
+ *
+ *  Purpose
+ *
+ *      Close an open SILO file.
+ *
+ *  Notes
+ *
+ *      This function will do the following:
+ *          (1) If file was modified, write current tables to file.
+ *          (2) Close the file.
+ *
+ *  Modified
+ *      Robb Matzke, Wed Jan 11 07:48:31 PST 1995
+ *      This is a read-only driver, so we don't have to worry about
+ *      updating the silo tables.
+ *
+ *      Sean Ahern, Mon Dec 18 17:33:55 PST 2000
+ *      Fixed a typo: changed silonetcdf_silonetcdf_ncclose to
+ *      silonetcdf_ncclose.
+ *
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncclose(int dbid)
+{
+   ASSERT_DBID(dbid, OOPS);
+   silo_Release(dbid);
+   return (TRUE);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                     silonetcdf_ncinqall
+ *
+ *  Purpose
+ *
+ *      Return information about all aspects of an open SILO file,
+ *      given its database ID.  The number of dimension, variables,
+ *      objects, and directories in the current directory is returned.
+ *
+ *  Return Value
+ *
+ *      In case of error, the function returns OOPS.
+ *
+ *---------------------------------------------------------------------
+ */
+INTERNAL int
+silonetcdf_ncinqall(int dbid, int *ndim, int *nvar, int *nobj, int *ndir, int *ngatt,
+	 int *recdim)
+{
+   int            dirid = silonetcdf_ncdirget(dbid);
+
+   *ndim = silo_GetDimCount(dbid, dirid);
+   *nvar = silo_GetVarCount(dbid, dirid);
+   *nobj = silo_GetObjCount(dbid, dirid);
+   *ndir = silo_GetDirCount(dbid, dirid);
+   *ngatt = silo_GetAttCount(dbid, SILO_ROOT_DIR, 0);
+
+   *recdim = -1;               /* Not supported currently */
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncdiminq
+ *
+ *  Purpose
+ *
+ *      Return the name and size of the dimension identified by the
+ *      given ID.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncdiminq (int dbid, int dimid, char *name, int *size)
+{
+   DimEnt        *entry;
+
+   *size = 0;
+
+   if ((entry = silo_GetDimEnt(dbid, silonetcdf_ncdirget(dbid), dimid)) != NULL) {
+      if (name != NULL)
+	 strcpy(name, entry->name);
+      *size = entry->size;
+   }
+   else {
+      return (OOPS);
+   }
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncdirget
+ *
+ *  Purpose
+ *
+ *      Return the directory ID of the current directory in the SILO.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncdirget (int dbid)
+{
+
+   ASSERT_DBID(dbid, OOPS);
+
+   return (silo_table[dbid].curr_dir);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncdirset
+ *
+ *  Purpose
+ *
+ *      Select the current directory.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncdirset (int dbid, int dirid)
+{
+
+   ASSERT_DBID(dbid, OOPS);
+
+   switch (dirid) {
+   case SILO_ROOT_DIR:
+      /* Set directory to root directory. */
+
+      silo_table[dbid].curr_dir = SILO_ROOT_DIR;
+      break;
+
+   default:
+
+      /* Set directory to specified directory (if it IS a directory) */
+      ASSERT_DIR(dbid, dirid, OOPS);
+
+      silo_table[dbid].curr_dir = dirid;
+      break;
+   }
+
+   return (OKAY);
+
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  silonetcdf_ncdirlist
+ *
+ *  Purpose
+ *
+ *      Return a list of all subdirectories beneath given directory.
+ *---------------------------------------------------------------------
+ */
+INTERNAL int
+silonetcdf_ncdirlist (int dbid, int dirid, int *ndirs, int *dirs)
+{
+   int            i, n = 0;
+
+   if (dirs == NULL)
+      return (OOPS);
+
+   for (i = 0; i < dirTable[dbid]->num_used; i++) {
+
+      if (dirTable[dbid]->ent[i]->parent == dirid) {
+
+	 dirs[n++] = dirTable[dbid]->ent[i]->absid;
+      }
+   }
+   *ndirs = n;
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silonetcdf_ncvarid
+ *
+ *  Purpose
+ *
+ *      Return the variable ID of the given variable name.
+ *
+ *  Notes
+ *
+ *      The difficulty with this routine is that there can be multiple
+ *      occurences of 'name' throughout the file. Which one's ID should
+ *      be returned?  Currently, we only look in CURRENT directory.
+ *
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncvarid (int dbid, char *name)
+{
+   int            id;
+
+   id = silo_GetVarId(dbid, silonetcdf_ncdirget(dbid), name);
+
+   return (id);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncvarinq
+ *
+ *  Purpose
+ *
+ *      Return the name, datatype, dimensions, and number of attributes
+ *      associated with the given variable ID.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncvarinq (int dbid, int varid, char *name, int *datatype, int *ndims,
+	  int dimids[], int *natts)
+{
+   int            i, dirid;
+   VarEnt        *ent;
+
+   *datatype = *ndims = *natts = 0;
+
+   dirid = silonetcdf_ncdirget(dbid);
+
+   if ((ent = silo_GetVarEnt(dbid, dirid, varid)) == NULL)
+      return (OOPS);
+
+   *datatype = ent->type;
+   *ndims = ent->ndims;
+   *natts = silo_GetAttCount(dbid, dirid, varid);
+
+   if (name != NULL)
+      strcpy(name, ent->name);
+
+   if (dimids != NULL && ent->dimids != NULL) {
+      for (i = 0; i < ent->ndims; i++)
+	 dimids[i] = ent->dimids[i];
+   }
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  silonetcdf_ncvarget1
+ *
+ *  Purpose
+ *
+ *      Read a single element of the given variable from the SILO file.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncvarget1 (int dbid, int varid, int index[], void *value)
+{
+   VarEnt        *ent;
+   int            iret, i, dirid;
+   long           ind[9];
+
+   ASSERT_DBID(dbid, OOPS);
+   ASSERT_VAR(dbid, varid, OOPS);
+
+   dirid = silonetcdf_ncdirget(dbid);
+
+   ent = silo_GetVarEnt(dbid, dirid, varid);
+   if (ent == NULL)
+      return (OOPS);
+
+   if (ent->iname == NULL)
+      return (OOPS);
+
+   /* Read array from file with offset */
+   for (i = 0; i < ent->ndims; i++) {
+      ind[3 * i] = (long)index[i];
+      ind[3 * i + 1] = (long)index[i];
+      ind[3 * i + 2] = 1;
+   }
+
+   iret = lite_PD_read_alt(silo_table[dbid].pdbfile, ent->iname, value, ind);
+
+   return (iret == TRUE ? OKAY : OOPS);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncvarget
+ *
+ *  Purpose
+ *
+ *      Read a hypercube of values from the SILO file.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncvarget (int dbid, int varid, int start[], int count[], void *values)
+{
+   VarEnt        *ent;
+   char          *tmp;
+   int            i, size, iwhole, dirid;
+
+   ASSERT_DBID(dbid, OOPS);
+   ASSERT_VAR(dbid, varid, OOPS);
+
+   dirid = silonetcdf_ncdirget(dbid);
+
+   ent = silo_GetVarEnt(dbid, dirid, varid);
+   if (ent == NULL) {
+      sprintf(err_string,
+	      "VarGet: Variable not found: # %d", varid);
+      silo_Error(err_string, SILO_DEBUG);
+      return (OOPS);
+   }
+
+   /* Verify variable has been written */
+   if (ent->iname == NULL) {
+
+      silo_Error("VarGet: Variable hasn't been written; cannot read.",
+		 SILO_DEBUG);
+      return (OOPS);
+   }
+
+   /* Verify validity of counts. */
+   for (i = 0; i < ent->ndims; i++) {
+      if (count[i] < 1) {
+	 silo_Error("VarGet: Count <= 0", SILO_ERROR);
+	 return (OOPS);
+      }
+   }
+
+   /* Verify validity of indeces. */
+   for (i = 0; i < ent->ndims; i++) {
+      silonetcdf_ncdiminq(dbid, ent->dimids[i], NULL, &size);
+      if (start[i] < 0 || start[i] > size ||
+	  start[i] + count[i] > size) {
+	 sprintf(err_string,
+		 "VarGet: Invalid hypercube index on var # %d", varid);
+	 silo_Error(err_string, SILO_ERROR);
+	 return (OOPS);
+      }
+   }
+
+   iwhole = 1;
+   for (i = 0; i < ent->ndims; i++) {
+      _dims[i] = silo_GetDimSize(dbid, ent->dimids[i]);
+
+      if (_dims[i] != count[i])
+	 iwhole = 0;
+   }
+
+   /*
+    * If reading whole thing, read it directly into user-provided
+    * space.  If reading hypercube subset, must read entire variable
+    * and extract subset into user's space.
+    */
+   if (iwhole) {
+
+      silo_Read(dbid, ent->iname, values);
+
+   }
+   else {
+
+      /* Read entire array */
+      tmp = (char *)ALLOC_N(char, ent->nels * ent->lenel);
+
+      silo_Read(dbid, ent->iname, tmp);
+      silo_GetHypercube(values, tmp, _dims, ent->ndims,
+			start, count, silo_GetMachDataSize(ent->type));
+      FREE(tmp);
+   }
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncattget
+ *
+ *  Purpose
+ *
+ *      Get an attribute value associated with the given var/dir/obj
+ *      from the SILO file, given the attribute name and var/dir/obj ID.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncattget (int dbid, int varid, char *name, void *value)
+{
+   AttEnt        *ent;
+   int            dirid;
+
+   ASSERT_DBID(dbid, OOPS);
+   ASSERT_NAME(name, OOPS);
+
+   dirid = silonetcdf_ncdirget(dbid);
+
+   /* Return with error if attribute doesn't exist for this variable. */
+   ent = silo_GetAttEnt(dbid, dirid, varid, name);
+   if (ent == NULL)
+      return (OOPS);
+
+   silo_Read(dbid, ent->iname, value);
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncattinq
+ *
+ *  Purpose
+ *
+ *      Return information about an attribute, given its name.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncattinq (int dbid, int varid, char *name, int *datatype, int *len)
+{
+   AttEnt        *ent;
+   int            dirid;
+
+   *datatype = *len = 0;
+
+   dirid = silonetcdf_ncdirget(dbid);
+
+   /* Search all attributes of the variable for 'name' */
+   ent = silo_GetAttEnt(dbid, dirid, varid, name);
+   if (ent == NULL)
+      return (OOPS);
+
+   *datatype = ent->type;
+   *len = ent->nels;
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silonetcdf_ncobjid
+ *
+ *  Purpose
+ *
+ *      Return the object ID of the object with the given name.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncobjid (int dbid, char *name)
+{
+   int            id;
+
+   ASSERT_DBID(dbid, OOPS);
+   ASSERT_NAME(name, OOPS);
+
+   id = silo_GetObjId(dbid, silonetcdf_ncdirget(dbid), name);
+
+   return (id);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncobjinq
+ *
+ *  Purpose
+ *
+ *      Return information about the given object.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncobjinq (int dbid, int objid, char *name, int *type, int *ncomps)
+{
+   ObjEnt        *ent;
+
+   *type = 0;
+   *ncomps = 0;
+
+   if ((ent = silo_GetObjEnt(dbid, silonetcdf_ncdirget(dbid), objid)) == NULL)
+      return (OOPS);
+
+   *type = ent->type;
+   *ncomps = ent->ncomps;
+   if (name != NULL)
+      strcpy(name, ent->name);
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silonetcdf_ncobjget
+ *
+ *  Purpose
+ *
+ *      Read an object description from the SILO file.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silonetcdf_ncobjget (int dbid, int objid, char *comp_names, int comp_ids[],
+	  int comp_types[], int comp_pars[])
+{
+   int            i;
+   ObjEnt        *ent;
+
+   ASSERT_DBID(dbid, OOPS);
+   ASSERT_OBJ(dbid, objid, OOPS);
+   ASSERT_PTR(comp_names, OOPS);
+   ASSERT_PTR(comp_ids, OOPS);
+   ASSERT_PTR(comp_types, OOPS);
+   ASSERT_PTR(comp_pars, OOPS);
+
+   if ((ent = silo_GetObjEnt(dbid, silonetcdf_ncdirget(dbid), objid)) == NULL)
+      return (OOPS);
+
+   for (i = 0; i < ent->ncomps; i++) {
+
+      comp_ids[i] = ent->compids[i];
+      comp_types[i] = ent->comptypes[i];
+      comp_pars[i] = ent->comppars[i];
+   }
+
+   strcpy(comp_names, ent->compnames);
+
+   return (OKAY);
+}
diff --git a/src/netcdf/ent.c b/src/netcdf/ent.c
new file mode 100644
index 0000000..6b5f241
--- /dev/null
+++ b/src/netcdf/ent.c
@@ -0,0 +1,517 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#define SILO_NO_CALLBACKS
+#include "silo_netcdf_private.h"
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                      ent.c
+
+  Purpose
+
+        Handle all activities required to manipulate entries.
+
+  Programmer
+
+        Jeffery Long, LLNL NSSD/B
+
+  Description
+
+        Each type of entity supported by SILO has a table associated
+        with it which contains all pertinent information about it.
+        This simplifies bookkeeping and inquiries.
+
+  Contents
+
+        Table Inquiry Functions
+                silo_GetAttCount
+                silo_GetDimCount
+                silo_GetDirCount
+                silo_GetObjCount
+                silo_GetVarCount
+
+        Identifier Functions
+                silo_GetId
+                silo_GetDimId
+                silo_GetDirId
+                silo_GetObjId
+                silo_GetVarId
+
+        Name Functions
+                silo_GetName
+                silo_GetDimName
+                silo_GetDirName
+                silo_GetObjName
+                silo_GetVarName
+
+        Directory Functions
+                silo_GetDirParent
+
+        Entry Addition Functions
+                silo_AddAtt
+                silo_AddDim
+                silo_AddDir
+                silo_AddObj
+                silo_AddVar
+
+        Entry Retrieval Functions
+                silo_GetAttEnt
+                silo_GetDimEnt
+                silo_GetDirEnt
+                silo_GetObjEnt
+                silo_GetVarEnt
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetAttCount
+ *
+ *  Purpose
+ *
+ *      Return count of attributes in given directory which are
+ *      associated with given variable.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetAttCount(int sid, int dirid, int varid)
+{
+    int            i, num = 0;
+
+    for (i = 0; i < attTable[sid]->num_used; i++)
+        if (attTable[sid]->ent[i]->parent == dirid &&
+            attTable[sid]->ent[i]->varid == varid)
+            num++;
+
+    return (num);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetDimCount
+ *
+ *  Purpose
+ *
+ *      Return count of dimensions in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDimCount(int sid, int dirid)
+{
+    int            i, num = 0;
+
+    for (i = 0; i < dimTable[sid]->num_used; i++)
+        if (dimTable[sid]->ent[i]->parent == dirid)
+            num++;
+
+    return (num);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetDirCount
+ *
+ *  Purpose
+ *
+ *      Return count of directories in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDirCount(int sid, int dirid)
+{
+    int            i, num = 0;
+
+    for (i = 0; i < dirTable[sid]->num_used; i++)
+        if (dirTable[sid]->ent[i]->parent == dirid)
+            num++;
+
+    return (num);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetVarCount
+ *
+ *  Purpose
+ *
+ *      Return count of variables in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetVarCount(int sid, int dirid)
+{
+    int            i, num = 0;
+
+    for (i = 0; i < varTable[sid]->num_used; i++)
+        if (varTable[sid]->ent[i]->parent == dirid)
+            num++;
+
+    return (num);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetObjCount
+ *
+ *  Purpose
+ *
+ *      Return count of objects in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetObjCount(int sid, int dirid)
+{
+    int            i, num = 0;
+
+    for (i = 0; i < objTable[sid]->num_used; i++)
+        if (objTable[sid]->ent[i]->parent == dirid)
+            num++;
+
+    return (num);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetDirid
+ *
+ *  Purpose
+ *
+ *      Return ID of directory in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDirId(int sid, int dirid, char *name)
+{
+    int            i, id = -1;
+
+    for (i = 0; i < dirTable[sid]->num_used; i++) {
+
+        if (dirTable[sid]->ent[i]->parent == dirid &&
+            STR_EQUAL(dirTable[sid]->ent[i]->name, name)) {
+
+            id = dirTable[sid]->ent[i]->absid;
+            break;
+        }
+    }
+
+    return (id);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetVarId
+ *
+ *  Purpose
+ *
+ *      Return relative ID of variable in given directory.
+ *
+ *  Modifications:
+ *
+ *      Jim Reus, 23 Apr 97
+ *      Change to prototype form.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetVarId (int sid, int dirid, char *name)
+{
+    int            i, relid = -1;
+
+    for (i = 0; i < varTable[sid]->num_used; i++) {
+
+        if (varTable[sid]->ent[i]->parent == dirid &&
+            STR_EQUAL(varTable[sid]->ent[i]->name, name)) {
+
+            relid = varTable[sid]->ent[i]->relid;
+            break;
+        }
+    }
+
+    return (relid);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetObjId
+ *
+ *  Purpose
+ *
+ *      Return relative ID of object in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetObjId(int sid, int dirid, char *name)
+{
+    int            i, relid = -1;
+
+    for (i = 0; i < objTable[sid]->num_used; i++) {
+
+        if (objTable[sid]->ent[i]->parent == dirid &&
+            STR_EQUAL(objTable[sid]->ent[i]->name, name)) {
+
+            relid = objTable[sid]->ent[i]->relid;
+            break;
+        }
+    }
+
+    return (relid);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetDirParent
+ *
+ *  Purpose
+ *
+ *      Return PARENT of given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDirParent(int sid, int dirid)
+{
+    int            i, id = -1;
+
+    for (i = 0; i < dirTable[sid]->num_used; i++) {
+        if (dirTable[sid]->ent[i]->absid == dirid) {
+            id = dirTable[sid]->ent[i]->parent;
+            break;
+        }
+    }
+
+    return (id);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetDirName
+ *
+ *  Purpose
+ *
+ *      Return name of directory with given ID.
+ *--------------------------------------------------------------------*/
+INTERNAL char *
+silo_GetDirName(int sid, int dirid)
+{
+    int            i;
+    static char   *name = NULL;
+
+    for (i = 0; i < dirTable[sid]->num_used; i++) {
+
+        if (dirTable[sid]->ent[i]->absid == dirid) {
+
+            name = dirTable[sid]->ent[i]->name;
+            break;
+        }
+    }
+    return (name);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetVarName
+ *
+ *  Purpose
+ *
+ *      Return name of variable with given ID in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL char *
+silo_GetVarName(int sid, int dirid, int id)
+{
+    int            i;
+    static char   *name = NULL;
+
+    for (i = 0; i < varTable[sid]->num_used; i++) {
+
+        if (varTable[sid]->ent[i]->parent == dirid &&
+            varTable[sid]->ent[i]->relid == id) {
+
+            name = varTable[sid]->ent[i]->name;
+            break;
+        }
+    }
+    return (name);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_GetObjName
+ *
+ *  Purpose
+ *
+ *      Return name of object with given ID in given directory.
+ *--------------------------------------------------------------------*/
+INTERNAL char *
+silo_GetObjName(int sid, int dirid, int id)
+{
+    int            i;
+    static char   *name = NULL;
+
+    for (i = 0; i < objTable[sid]->num_used; i++) {
+
+        if (objTable[sid]->ent[i]->parent == dirid &&
+            objTable[sid]->ent[i]->relid == id) {
+
+            name = objTable[sid]->ent[i]->name;
+            break;
+        }
+    }
+    return (name);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_GetAttEnt
+ *
+ *  Purpose
+ *
+ *      Return table entry for requested attribute.
+ *--------------------------------------------------------------------
+ */
+INTERNAL AttEnt *
+silo_GetAttEnt(int sid, int dirid, int varid, char *name)
+{
+    int            i;
+
+    for (i = 0; i < attTable[sid]->num_used; i++) {
+
+        if (attTable[sid]->ent[i]->parent == dirid &&
+            attTable[sid]->ent[i]->varid == varid &&
+            STR_EQUAL(attTable[sid]->ent[i]->name, name)) {
+
+            return (attTable[sid]->ent[i]);
+        }
+    }
+
+    return (NULL);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_GetDimEnt
+ *
+ *  Purpose
+ *
+ *      Return table entry for requested dimension.
+ *--------------------------------------------------------------------*/
+INTERNAL DimEnt *
+silo_GetDimEnt(int sid, int dirid, int id)
+{
+    int            i;
+
+    for (i = 0; i < dimTable[sid]->num_used; i++) {
+
+        if (dimTable[sid]->ent[i]->parent == dirid &&
+            dimTable[sid]->ent[i]->relid == id) {
+
+            return (dimTable[sid]->ent[i]);
+        }
+    }
+
+    return (NULL);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_GetVarEnt
+ *
+ *  Purpose
+ *
+ *      Return table entry for requested variable.
+ *--------------------------------------------------------------------
+ */
+INTERNAL VarEnt *
+silo_GetVarEnt(int sid, int dirid, int id)
+{
+    int            i;
+
+    for (i = 0; i < varTable[sid]->num_used; i++) {
+
+        if (varTable[sid]->ent[i]->parent == dirid &&
+            varTable[sid]->ent[i]->relid == id) {
+
+            return (varTable[sid]->ent[i]);
+        }
+    }
+
+    return (NULL);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_GetObjEnt
+ *
+ *  Purpose
+ *
+ *      Return table entry for requested object.
+ *--------------------------------------------------------------------
+ */
+INTERNAL ObjEnt *
+silo_GetObjEnt(int sid, int dirid, int id)
+{
+    int            i;
+
+    for (i = 0; i < objTable[sid]->num_used; i++) {
+
+        if (objTable[sid]->ent[i]->parent == dirid &&
+            objTable[sid]->ent[i]->relid == id) {
+
+            return (objTable[sid]->ent[i]);
+        }
+    }
+
+    return (NULL);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_GetDirEnt
+ *
+ *  Purpose
+ *
+ *      Return table entry for requested directory.
+ *--------------------------------------------------------------------*/
+INTERNAL DirEnt *
+silo_GetDirEnt(int sid, int id)
+{
+    int            i;
+
+    for (i = 0; i < dirTable[sid]->num_used; i++) {
+
+        if (dirTable[sid]->ent[i]->absid == id) {
+
+            return (dirTable[sid]->ent[i]);
+        }
+    }
+
+    return (NULL);
+}
diff --git a/src/netcdf/netcdf.c b/src/netcdf/netcdf.c
new file mode 100644
index 0000000..a3bc633
--- /dev/null
+++ b/src/netcdf/netcdf.c
@@ -0,0 +1,680 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#define SILO_NO_CALLBACKS
+#include "silo_netcdf_private.h"
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                      netcdf.c
+
+  Purpose
+
+        Perform all functions which deal with the underlying database
+        library, including reading, writing, opening, and closing files.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Contents
+
+        NETCDF Routine Summary (Low-Level)
+
+
+        dbid = netcdf_Attach (pdbfile)
+               netcdf_Release  (dbid)
+        ndx  = netcdf_GetIndex (dbid)
+               netcdf_Error (errmsg, errcode)
+        int  = netcdf_GetNextID(dbid)
+        t_f  = netcdf_Modified (dbid)
+                   netcdf_SetModified (dbid, t_f)
+               netcdf_Setup (dbid)
+               netcdf_Read  (dbid, varname, ptr)
+               netcdf_PartialRead (dbid, varname, ptr, offset, len)
+               netcdf_Write (dbid, varname, datatype, ptr, dims, ndims)
+               netcdf_Write1 (dbid, varname, datatype, ptr)
+               netcdf_GetTables (dbid)
+               netcdf_PutTables (dbid)
+    size = netcdf_GetDataSize (dbid, datatype)
+        size = netcdf_GetMachDataSize (datatype)
+        ndx  = netcdf_GetIndex1 (index, dims, ndims)
+               netcdf_PutHypercube (sink, source, dims, ndims, start, count, lenel)
+               netcdf_GetHypercube (sink, source, dims, ndims, start, count, lenel)
+        size = netcdf_GetDimSize (dbid, dimid)
+        dimid= netcdf_GetDimID (dbid, len)
+        nbyte= netcdf_GetVarSize (dbid, varid, &nels, &nbytes_el)
+        name = netcdf_MakeVarName (dbid, varid)
+        name = netcdf_MakeAttName (dbid, dirid, varid, attname)
+        true = netcdf_Verify (file)
+
+        char *netcdf_GetDatatypeString (type)
+        int   netcdf_GetDatatypeID (typename)
+        char *netcdf_GetEntitytypeString (type)
+
+        int   n_GetVarDatatype (dbid, varname, datatype)
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*===========================================================
+ * Global Data for this Module
+ *===========================================================*/
+
+SILOTable      silo_table[MAX_SILO];
+static int     num_active_dbs = 0;
+static int     header[HEADER_SIZE];
+
+char           silo_err[256];
+
+void silo_Error (char*, int) ;
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silo_Init
+ *
+ *  Purpose
+ *
+ *      Initialize internal tables. This should be called ONCE only.
+ *
+ *--------------------------------------------------------------------*/
+void
+silo_Init (void)
+{
+   int            i;
+   static int     initialized = FALSE;
+
+   if (initialized)
+      return;
+
+   initialized = TRUE;
+
+   for (i = 0; i < MAX_SILO; i++) {
+
+      /* Clear out this entry in table. */
+      silo_table[i].dbid = -1;
+      silo_table[i].pdbfile = (PDBfile *) 0;
+      silo_table[i].curr_dir = 0;
+   }
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   silo_Attach
+ *
+ *  Purpose
+ *
+ *      Add the given PDB to the database list kept locally.
+ *
+ *  Syntax & Parameters
+ *
+ *      int silo_Attach (PDBFile *pdb_file);
+ *
+ *      silo_Attach {Out}   {dbid if successful, else 0}
+ *      pdb_file    {In}    {PDB file identifier}
+ *
+ *  Notes
+ *
+ *      This is NOT a user-level function.
+ *
+ *--------------------------------------------------------------------*/
+int
+silo_Attach (PDBfile *pdb_file)
+{
+   int            next;
+
+   /* Get index of next available entry in internal table. */
+   if ((next = silo_GetIndex(-1)) < 0) {
+      silo_Error("Too many SILO's are open; tables are full.", SILO_ERROR);
+      return (OOPS);
+   }
+
+   /* Update internal SILO table. */
+   silo_table[next].dbid = next;
+   silo_table[next].modified = FALSE;
+   silo_table[next].pdbfile = pdb_file;
+   silo_table[next].curr_dir = 0;
+
+   num_active_dbs++;
+
+   return (silo_table[next].dbid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  silo_Release
+ *
+ *  Purpose
+ *
+ *      Release the given database tables; close the associated PDB.
+ *
+ *  Syntax & Parameters
+ *
+ *      int silo_Release (dbid db_id)
+ *
+ *      silo_Release   {Out}   {TRUE if successful, else FALSE}
+ *      dbid          {In}    {DB identifier}
+ *
+ *  Notes
+ *
+ *      This is NOT a user-level function.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_Release (int dbid)
+{
+   int            index;
+
+   /* Find index of dbid in internal table. */
+   index = silo_GetIndex(dbid);
+
+   /* Close the associated PDB file. */
+   (void)lite_PD_close(silo_table[index].pdbfile);
+
+   /* Clear out this entry in table. */
+   silo_ClearTables(dbid);
+
+   silo_table[index].dbid = -1;
+   silo_table[index].pdbfile = (PDBfile *) 0;
+   silo_table[index].curr_dir = 0;
+
+   num_active_dbs--;
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 silo_GetIndex
+ *
+ *  Purpose
+ *
+ *      Return the index of the given DB in the internal DB table.
+ *
+ *  Notes
+ *
+ *      This is NOT a user-level function.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetIndex (int dbid)
+{
+   int            i, index = -1;
+
+   /*
+    * Search through the internal table for the given dbid.
+    * Return the index of the entry, or else OOPS.
+    */
+   for (i = 0; i < MAX_SILO; i++) {
+      if (silo_table[i].dbid == dbid) {
+	 index = i;
+	 break;
+      }
+   }
+
+   if (index < 0)
+      silo_Error("Cannot find requested SILO.", SILO_ERROR);
+
+   return (index);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silo_Error
+ *
+ *  Purpose
+ *
+ *      Assign the SILO error message.
+ *
+ *  Notes
+ *
+ *      This is NOT a user-level function.
+ *
+ * Modified
+ *
+ *      Robb Matzke, Tue Jan 10 17:12:15 EST 1995
+ *      Error handling is done by SILO-DVI, so this function is
+ *      now a no-op.  Perhaps this function should call db_perror
+ *      directly just in case the caller didn't check return status.
+ *
+ *--------------------------------------------------------------------*/
+/* ARGSUSED */
+void
+silo_Error (char *errmsg, int errcode)
+{
+
+   strcpy(silo_err, errmsg);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    silo_Read
+ *
+ *  Purpose
+ *
+ *      Read the requested variable from the specified DB.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_Read (int dbid, char *varname, void *ptr)
+{
+
+   ASSERT_NAME(varname, 0);
+   ASSERT_PTR(ptr, 0);
+   ASSERT_DBID(dbid, 0);
+
+   if (lite_PD_read(silo_table[dbid].pdbfile, varname, ptr) == 0) {
+      silo_Error("Cannot read requested variable.", SILO_DEBUG);
+      return (OOPS);
+   }
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                silo_GetTables
+ *
+ *  Purpose
+ *
+ *      Read the internal SILO tables from the specified DB.
+ *
+ *  Parameters
+ *
+ *      dbid     =|   Database identifier to write to.
+ *
+ *  Notes
+ *
+ *
+ *
+ *--------------------------------------------------------------------*/
+int
+silo_GetTables (int dbid)
+{
+   DirEnt       **dirents;
+   DimEnt       **diments;
+   AttEnt       **attents;
+   VarEnt       **varents;
+   ObjEnt       **objents;
+
+   dirents = NULL;
+   diments = NULL;
+   attents = NULL;
+   varents = NULL;
+   objents = NULL;
+
+   /* Read header, which contains number of entities per type */
+   if (silo_Read(dbid, HEADER_NAME, header) == OOPS) {
+      silo_Error("SILO header missing from file", SILO_ERROR);
+      return (OOPS);
+   }
+
+   /*
+    *  Read various entity tables.
+    */
+   silo_Read(dbid, DIRENT_NAME, &dirents);
+   if (dirents == NULL && header[3] > 0)
+      return (OOPS);
+   dirTable[dbid]->ent = dirents;
+   dirTable[dbid]->num_used = header[3];
+   dirTable[dbid]->num_alloced = header[3];
+
+   silo_Read(dbid, DIMENT_NAME, &diments);
+   if (diments == NULL && header[4] > 0)
+      return (OOPS);
+   dimTable[dbid]->ent = diments;
+   dimTable[dbid]->num_used = header[4];
+   dimTable[dbid]->num_alloced = header[4];
+
+   silo_Read(dbid, ATTENT_NAME, &attents);
+   if (attents == NULL && header[5] > 0)
+      return (OOPS);
+   attTable[dbid]->ent = attents;
+   attTable[dbid]->num_used = header[5];
+   attTable[dbid]->num_alloced = header[5];
+
+   silo_Read(dbid, VARENT_NAME, &varents);
+   if (varents == NULL && header[6] > 0)
+      return (OOPS);
+   varTable[dbid]->ent = varents;
+   varTable[dbid]->num_used = header[6];
+   varTable[dbid]->num_alloced = header[6];
+
+   silo_Read(dbid, OBJENT_NAME, &objents);
+   if (objents == NULL && header[7] > 0)
+      return (OOPS);
+   objTable[dbid]->ent = objents;
+   objTable[dbid]->num_used = header[7];
+   objTable[dbid]->num_alloced = header[7];
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                              silo_GetDataSize
+ *
+ *  Purpose
+ *
+ *      Return the byte length of the given data type within the
+ *      database (i.e., on the DESTINATION machine).
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Wed Jan 11 07:12:13 PST 1995
+ *      Changed SILO_... data types to DB_... data types.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDataSize (int dbid, int datatype)
+{
+   int            size;
+   char          *type;
+   defstr        *dp;
+
+   switch (datatype) {
+   case DB_INT:
+      type = "integer";
+      break;
+   case DB_SHORT:
+      type = "short";
+      break;
+   case DB_LONG:
+      type = "long";
+      break;
+   case DB_FLOAT:
+      type = "float";
+      break;
+   case DB_DOUBLE:
+      type = "double";
+      break;
+   case DB_CHAR:
+      type = "char";
+      break;
+   default:
+      type = NULL;
+      break;
+   }
+
+   size = 0;
+
+   if (type != NULL) {
+      dp = (defstr *)lite_SC_def_lookup(type, silo_table[dbid].pdbfile->chart);
+      if (dp != NULL)
+	 size = dp->size;
+   }
+
+   return (size);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          silo_GetMachDataSize
+ *
+ *  Purpose
+ *
+ *      Return the byte length of the given data type ON THE CURRENT
+ *      MACHINE.
+ *
+ *  Notes
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetMachDataSize (int datatype)
+{
+   int            size;
+
+   switch (datatype) {
+   case DB_INT:
+      size = sizeof(int);
+
+      break;
+   case DB_SHORT:
+      size = sizeof(short);
+
+      break;
+   case DB_LONG:
+      size = sizeof(long);
+
+      break;
+   case DB_FLOAT:
+      size = sizeof(float);
+
+      break;
+   case DB_DOUBLE:
+      size = sizeof(double);
+
+      break;
+   case DB_CHAR:
+      size = sizeof(char);
+
+      break;
+   default:
+      size = 0;
+      break;
+   }
+
+   return (size);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                silo_GetIndex1
+ *
+ *  Purpose
+ *
+ *      Return the 1D index equivalent of the given index array.
+ *
+ *  Notes
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_GetIndex1 (int index[], int dims[], int ndims)
+{
+   int            i, m, ndx = 0;
+
+   for (m = 1, i = 0; i < ndims - 1; i++)
+      m *= dims[i];
+
+   for (ndx = 0, i = ndims - 1; i >= 0; i--) {
+      ndx += index[i] * m;
+      if (i > 0)
+	 m /= dims[i - 1];
+   }
+
+   return (ndx);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                             silo_GetHypercube
+ *
+ *  Purpose
+ *
+ *      Get a hypercube of data from another (larger)  hypercube.
+ *
+ *  Notes
+ *
+ *      'sink' and 'source' are multi-dimensional arrays of simple
+ *      type (i.e., float, int, double).  This routine copies data
+ *      from some specified location within an ndims-dimensional
+ *      array (source) into another ndims-dimensional array (sink).
+ *
+ *      This is a recursive function.
+ *
+ *  Modifications
+ *      Sean Ahern, Wed Oct  4 14:22:12 PDT 1995
+ *      Changed sink and source to be void pointers.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL void
+silo_GetHypercube(void *sink, void *source, int *dims, int ndims, int *start,
+		  int *count, int  lenel)
+{
+   int            i, isrc, isink;  /* Byte indeces into sink and source */
+   int            sink_start[10],  /* Starting index into sink h-cube */
+                  source_start[10];  /* Starting index into source h-cube */
+   char          *local_sink, *local_source; /* Index by bytes */
+
+   local_sink = (char*)sink;
+   local_source = source;
+
+   /* If sink is 1D, just do a memory copy from source */
+   if (ndims == 1) {
+      isrc = start[0] * lenel;
+      isink = 0;
+
+      memcpy(&local_sink[isink], &local_source[isrc], count[0] * lenel); /*OK*/
+   }
+   else {
+      /* Build index arrays for sink and source */
+      for (i = 0; i < ndims; i++) {
+	 sink_start[i] = 0;
+	 source_start[i] = 0;
+      }
+      source_start[ndims - 1] = start[ndims - 1];
+
+      for (i = 0; i < count[ndims - 1]; i++) {
+
+	 /* Find starting location of given indeces */
+	 isink = lenel * silo_GetIndex1(sink_start, count, ndims);
+	 isrc = lenel * silo_GetIndex1(source_start, dims, ndims);
+
+	 silo_GetHypercube(&local_sink[isink], &local_source[isrc],
+			   dims, ndims - 1, start, count, lenel);
+
+	 sink_start[ndims - 1]++;
+	 source_start[ndims - 1]++;
+      }
+   }
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                               silo_GetDimSize
+ *
+ *  Function
+ *
+ *      Return the size of the given dimension ID.  This is a
+ *      convenience function, so ncdiminq needn't be called.
+ *
+ *  Modifications:
+ *
+ *    Hank Childs, Thu Oct 12 10:26:10 PDT 2000
+ *    Changed ncdiminq to silonetcdf_ncdiminq to take care of unresolved
+ *    symbol.
+ *
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silo_GetDimSize (int dbid, int dimid)
+{
+   int            size;
+
+   silonetcdf_ncdiminq(dbid, dimid, NULL, &size);
+
+   return (size);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                               silo_GetVarSize
+ *
+ *  Function
+ *
+ *      Return the size of the given variable; the number of elements
+ *      and number of bytes per element are returned via arguments.
+ *      The total byte-length is the function return value.
+ *
+ *      This has been provided as a convenience function.
+ *
+ *---------------------------------------------------------------------*/
+INTERNAL int
+silo_GetVarSize (int dbid, int varid, int *nels, int *nbytes_el)
+{
+   VarEnt        *ent;
+
+   *nels = *nbytes_el = 0;
+
+   if ((ent = silo_GetVarEnt(dbid, silonetcdf_ncdirget(dbid), varid)) == NULL)
+      return (OOPS);
+
+   *nels = ent->nels;
+   *nbytes_el = ent->lenel;
+
+   return (*nels * *nbytes_el);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  silo_Verify
+ *
+ *  Function
+ *
+ *      Return TRUE if this is a SILO file.
+ *
+ *  Modifications:
+ *
+ *      Jim Reus, 23 Apr 97
+ *      Change to prototype form.
+ *
+ *---------------------------------------------------------------------*/
+int
+silo_Verify (PDBfile *file)
+{
+   char           whatami[32];
+
+   /* Read the 'whatami' variable and verify that this is a SILO file */
+   if (lite_PD_read(file, WHATAMI_NAME, whatami) == 0)
+      return (FALSE);
+
+   if (STR_BEGINSWITH(whatami, "silo-pdb-2"))
+      return (TRUE);
+   else {
+      if (STR_BEGINSWITH(whatami, "silo-pdb"))
+	 silo_Error("File is out of date (old version of SILO)",
+		    SILO_ERROR);
+
+      return (FALSE);
+   }
+}
diff --git a/src/netcdf/obj.c b/src/netcdf/obj.c
new file mode 100644
index 0000000..2616b66
--- /dev/null
+++ b/src/netcdf/obj.c
@@ -0,0 +1,522 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#define SILO_NO_CALLBACKS
+#include "silo_netcdf_private.h"
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                   object.c
+
+  Purpose
+
+        This module contains functions for easily reading SILO objects.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Description
+
+        The principal function here is SO_GetObject. It operates on a
+        SO_Object data structure, which is simply a set of names,
+        pointers, and data types which describe the components of a
+        SILO object. SO_GetObject interprets the object description and
+        reads the object components into the pointers provided.
+
+        There are two macros defined in silo.h for simplifying the use
+        of SO_GetObject. They are PREP_OBJ and DEF_OBJ.  PREP_OBJ takes
+        a single argument, the address of a SO_Object to manipulate.
+        DEF_OBJECT takes four arguments: the component name, the address
+        of where to store the component, the component data type, and
+        a sentinel indicating whether or not the component is a scalar.
+
+  Contents
+
+        SO_GetObject    (silo_id, obj_id, object)
+        SO_GetComponent (silo_id, ent_id, ent_type, ent_parent)
+
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*
+ *  Module-wide global variables.
+ */
+static int     _so_force_single = FALSE;
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 SO_GetObject
+ *
+ *  Purpose
+ *
+ *      Read the contents of an object, one entity at a time, and store
+ *      each entity into the given structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *      Al Leibee, Thu Oct 21 15:34:21 PDT 1993
+ *      Add datatype arg to SO_ReadComponent to coerce variable from
+ *      datatype in file to datatype in memory.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+SO_GetObject(int sid, int objid, SO_Object *tobj)
+{
+    int            i, j;
+    int            type, ncomps, error;
+    int            compids[50], comptypes[50], comppars[50];
+    char          *s, *name, compnames[512];
+    char           delim[2];
+    int          **ipp;
+    long         **lpp;
+    float        **fpp;
+    double       **dpp;
+    char         **cpp;
+
+    /* Determine number of components in object */
+    silonetcdf_ncobjinq(sid, objid, NULL, &type, &ncomps);
+
+    /* Read object */
+    error = silonetcdf_ncobjget(sid, objid, compnames, compids, comptypes, comppars);
+    if (error)
+        return (-1);
+
+    delim[0] = compnames[0];
+    delim[1] = '\0';
+
+    /* Parse object names and build structure */
+    s = &compnames[1];
+    name = (char *)strtok(s, delim);
+
+    for (i = 0; i < ncomps; i++) {
+
+        for (j = 0; j < tobj->num; j++) {
+
+            if (tobj->ptr[j] != NULL &&
+                STR_EQUAL(name, tobj->name[j])) {
+
+                switch (tobj->alloced[j]) {
+
+                    case TRUE: /* Read directly into space provided */
+
+                        /*-----------------------------------------------------
+                         *  Special case for scalar integer: if component
+                         *  is of type literal, use component ID as a literal.
+                         *----------------------------------------------------*/
+
+                        if (tobj->type[j] == DB_INT &&
+                            comptypes[i] == SILO_TYPE_LIT) {
+
+                            *((int *)tobj->ptr[j]) = compids[i];
+
+                        }
+                        else {
+
+                            SO_ReadComponent(sid, compids[i], comptypes[i],
+                                             comppars[i], tobj->type[j],
+                                             tobj->ptr[j]);
+
+                        }
+                        break;
+
+                    case FALSE:  /* Space not allocated yet, do it. */
+
+                        switch (tobj->type[j]) {
+                            case DB_INT:
+                                ipp = (int **)tobj->ptr[j];
+                                *ipp = (int *)SO_GetComponent(sid, compids[i],
+                                                            comptypes[i],
+                                                            comppars[i]);
+                                break;
+
+                            case DB_LONG:
+                                lpp = (long **)tobj->ptr[j];
+                                *lpp = (long *)SO_GetComponent(sid, compids[i],
+                                                            comptypes[i],
+                                                            comppars[i]);
+                                break;
+
+                            case DB_FLOAT:
+                                fpp = (float **)tobj->ptr[j];
+                                *fpp = (float *)SO_GetComponent(sid, compids[i],
+                                                            comptypes[i],
+                                                            comppars[i]);
+                                break;
+
+                            case DB_DOUBLE:
+                                dpp = (double **)tobj->ptr[j];
+                                *dpp = (double *)SO_GetComponent(sid, compids[i],
+                                                            comptypes[i],
+                                                            comppars[i]);
+                                break;
+
+                            case DB_CHAR:
+                            case DB_NOTYPE:
+                                cpp = (char **)tobj->ptr[j];
+                                *cpp = (char *)SO_GetComponent(sid, compids[i],
+                                                            comptypes[i],
+                                                            comppars[i]);
+                                break;
+
+                            default:
+                                break;
+                        }
+                        break;
+
+                    default:
+                        break;
+                }
+
+                /*
+                 *  If force-single is on, must change datatype
+                 *  field to 'float'.
+                 */
+                if (_so_force_single && STR_EQUAL("datatype", name))
+                    *((int *)tobj->ptr[j]) = DB_FLOAT;
+
+            }
+        }                       /* for-j */
+
+        /*
+         * Note - the preferred way of doing the following would
+         * be with a call to strtok like: "strtok(NULL, ";")".
+         * However, PDBlib also uses strtok, hence messing up
+         * my use of it; thus I must provide the string argument
+         * for each call.
+         */
+        name = (char *)strtok(name + strlen(name) + 1, delim);
+        if (name == NULL)
+            break;
+
+    }                           /* for-i */
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                              SO_GetComponent
+ *
+ *  Purpose
+ *
+ *      Alloc space for and read an entity of arbitrary type from
+ *      a SILO file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *     Al Leibee, Tue Sep  7 11:32:16 PDT 1993
+ *     Replace SCORE mem allocation by system mem allocation
+ *     so that memory returned to application is system
+ *     allocated and can be freed by system memman.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL void *
+SO_GetComponent(int sid, int entid, int enttype, int entpar)
+{
+    int            datatype, ndims, natts, nels;
+    int            i, original_dir;
+    int            dims[20], start[20], count[20], index[5];
+    char          *var;
+    double        *local_d;
+    float         *local_f;
+
+    /*
+     *  Save current dir; restore when done.
+     */
+    original_dir = silonetcdf_ncdirget(sid);
+
+    /*
+     *  Set directory to parent of requested entity.
+     */
+    if (OOPS == silonetcdf_ncdirset(sid, entpar))
+        return (NULL);
+
+    switch (enttype) {
+
+        case SILO_TYPE_DIM:
+
+            var = ALLOC_N(char, sizeof(int));
+
+            if (OOPS == (silonetcdf_ncdiminq(sid, entid, NULL, (int *)var))) {
+                FREE(var);
+                return (NULL);
+            }
+            break;
+
+        case SILO_TYPE_VAR:
+
+            if (OOPS == (silonetcdf_ncvarinq(sid, entid, NULL,
+                                             &datatype, &ndims, dims, &natts)))
+                return (NULL);
+
+            start[0] = 0;
+            index[0] = 0;
+            count[0] = 1;
+            nels = 0;
+
+            if (ndims > 0) {
+                for (nels = 1, i = 0; i < ndims; i++) {
+                    start[i] = 0;
+                    count[i] = silo_GetDimSize(sid, dims[i]);
+                    nels *= count[i];
+                }
+            }
+
+            var = ALLOC_N(char, nels * silo_GetMachDataSize(datatype));
+
+            if (nels == 1) {
+                if (OOPS == (silonetcdf_ncvarget1(sid, entid, index, var))) {
+                    FREE(var);
+                    return (NULL);
+                }
+            }
+            else {
+                if (OOPS == (silonetcdf_ncvarget(sid, entid, start, count, var))) {
+                    FREE(var);
+                    return (NULL);
+                }
+            }
+
+            /*
+             *  Map double precision values to float if force-single flag is TRUE.
+             */
+            if (datatype == DB_DOUBLE && _so_force_single) {
+                local_d = (double *)var;
+                local_f = ALLOC_N(float, nels);
+
+                for (i = 0; i < nels; i++)
+                    local_f[i] = (float)local_d[i];
+
+                FREE(var);
+                var = (char *)local_f;
+            }
+            break;
+
+        default:
+            var = ALLOC_N(char, sizeof(int));
+            memcpy(var, &entid, sizeof(int));
+
+            break;
+    }
+
+    silonetcdf_ncdirset(sid, original_dir);
+
+    return ((void *)var);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                             SO_ReadComponent
+ *
+ *  Purpose
+ *
+ *      Read an entity of arbitrary type from a SILO file into the
+ *      provided space.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *     Al Leibee, Thu Oct 21 15:34:21 PDT 1993
+ *     Added 'vartype' argument -- data type of the space into which
+ *                                 the variable is to be read.
+ *
+ *     Sean Ahern, Wed Oct  4 13:49:54 PDT 1995
+ *     Fixed some pointer type problems.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+SO_ReadComponent(int sid, int entid, int enttype, int entpar, int vartype,
+                 void *var)
+{
+    int            datatype, ndims, natts;
+    int            i, nels, original_dir;
+    int            dims[20], start[20], count[20], index[5];
+    char          *local_var;
+    double        *local_d;
+    float         *local_f;
+
+    /*
+     *  Save current dir; restore when done.
+     */
+    original_dir = silonetcdf_ncdirget(sid);
+
+    /*
+     *  Set directory to parent of requested entity.
+     */
+    if (OOPS == silonetcdf_ncdirset(sid, entpar))
+        return 0 ;
+
+    switch (enttype) {
+
+        case SILO_TYPE_DIM:
+
+            if (OOPS == (silonetcdf_ncdiminq(sid, entid, NULL, (int *)var))) {
+                return (OOPS);
+            }
+            break;
+
+        case SILO_TYPE_VAR:
+
+            if (OOPS == (silonetcdf_ncvarinq(sid, entid, NULL,
+                                             &datatype, &ndims, dims, &natts)))
+                return (OOPS);
+
+            start[0] = 0;
+            index[0] = 0;
+            count[0] = 1;
+            nels = 0;
+
+            if (ndims > 0) {
+                for (nels = 1, i = 0; i < ndims; i++) {
+                    start[i] = 0;
+                    count[i] = silo_GetDimSize(sid, dims[i]);
+                    nels *= count[i];
+                }
+            }
+
+            /*
+             *  Allocate a local double array if requested variable's
+             *  file datatype is DOUBLE and force-single flag is TRUE, or
+             *  the variable's file datatype is DOUBLE and the variable's
+             *  memory space is FLOAT.
+             */
+
+            if ((datatype == DB_DOUBLE && _so_force_single) ||
+                (datatype == DB_DOUBLE && vartype == DB_FLOAT))
+                local_var = (char *)ALLOC_N(double, nels);
+
+            else
+                local_var = (char*)var;
+
+            if (nels == 1) {
+                if (OOPS == (silonetcdf_ncvarget1(sid, entid, index, local_var))) {
+                    return (OOPS);
+                }
+            }
+            else {
+                if (OOPS == (silonetcdf_ncvarget(sid, entid, start, count, local_var))) {
+                    return (OOPS);
+                }
+            }
+
+            /*
+             *  Map double precision values to float if force-single flag
+             *  is TRUE, or
+             *  if if requested variable's file datatype is DOUBLE and
+             *  the variable's memory space is FLOAT.
+             */
+            if ((datatype == DB_DOUBLE && _so_force_single) ||
+                (datatype == DB_DOUBLE && vartype == DB_FLOAT)) {
+                local_d = (double *)local_var;
+                local_f = (float *)var;
+
+                for (i = 0; i < nels; i++)
+                    local_f[i] = (float)local_d[i];
+
+                FREE(local_var);
+            }
+
+            break;
+
+        default:
+            memcpy(var, &entid, sizeof(int));
+
+            break;
+    }
+
+    silonetcdf_ncdirset(sid, original_dir);
+
+    return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                               SO_ForceSingle
+ *
+ *  Purpose
+ *
+ *      Set an internal sentinel stating whether or not real data should
+ *      be forced to single precision before being returned.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modified
+ *      Robb Matzke, Wed Jan 11 07:25:59 PST 1995
+ *      Device independence rewrite.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+SO_ForceSingle(int on_off)
+{
+    _so_force_single = on_off ? TRUE : FALSE;
+    return 0;
+}
diff --git a/src/netcdf/silo_netcdf.c b/src/netcdf/silo_netcdf.c
new file mode 100644
index 0000000..56ac1d2
--- /dev/null
+++ b/src/netcdf/silo_netcdf.c
@@ -0,0 +1,2096 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * silo_netcdf.c -- The NetCDF driver.  This is now a read-only
+ * driver since the NetCDF interface is frozen.
+ */
+
+#include "silo_netcdf_private.h"
+#undef DEREF
+#include "pdb.h"
+#undef DEREF
+
+static SO_Object *_to;
+
+static char   *_valstr[10] =
+{"value[0]", "value[1]", "value[2]",
+ "value[3]", "value[4]", "value[5]",
+ "value[6]", "value[7]", "value[8]",
+ "value[9]"};
+
+static char   *_mixvalstr[10] =
+{"mixed_value[0]", "mixed_value[1]",
+ "mixed_value[2]", "mixed_value[3]",
+ "mixed_value[4]", "mixed_value[5]",
+ "mixed_value[6]", "mixed_value[7]",
+ "mixed_value[8]", "mixed_value[9]"};
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_InitCallbacks
+ *
+ * Purpose:     Initialize the callbacks in a DBfile structure.
+ *
+ * Return:      Success:        void
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:06:35 PST 1995
+ *
+ * Modifications:
+ *
+ *    Eric Brugger, Mon Sep 18 14:36:12 PDT 1995
+ *    I added the call back db_cdf_InqVarExists.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *    Eric Brugger, Mon Mar  1 09:02:41 PST 2004
+ *    Implemented DBInqVarType.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+db_cdf_InitCallbacks (DBfile *dbfile)
+{
+    dbfile->pub.close = db_cdf_Close;
+    dbfile->pub.g_dir = db_cdf_GetDir;
+    dbfile->pub.g_attr = db_cdf_GetAtt;
+    dbfile->pub.g_ma = db_cdf_GetMaterial;
+    dbfile->pub.g_ms = db_cdf_GetMatspecies;
+    dbfile->pub.g_comp = db_cdf_GetComponent;
+    dbfile->pub.g_mm = db_cdf_GetMultimesh;
+    dbfile->pub.g_pm = db_cdf_GetPointmesh;
+    dbfile->pub.g_pv = db_cdf_GetPointvar;
+    dbfile->pub.g_qm = db_cdf_GetQuadmesh;
+    dbfile->pub.g_qv = db_cdf_GetQuadvar;
+    dbfile->pub.g_um = db_cdf_GetUcdmesh;
+    dbfile->pub.g_uv = db_cdf_GetUcdvar;
+    dbfile->pub.g_var = db_cdf_GetVar;
+    dbfile->pub.g_varbl = db_cdf_GetVarByteLength;
+    dbfile->pub.g_varlen = db_cdf_GetVarLength;
+    dbfile->pub.g_vartype = db_cdf_GetVarType;
+    dbfile->pub.i_meshname = db_cdf_InqMeshname;
+    dbfile->pub.exist = db_cdf_InqVarExists;
+    dbfile->pub.inqvartype = db_cdf_InqVarType;
+    dbfile->pub.i_meshtype = db_cdf_InqMeshtype;
+    dbfile->pub.r_att = db_cdf_ReadAtt;
+    dbfile->pub.r_var = db_cdf_ReadVar;
+    dbfile->pub.r_var1 = db_cdf_ReadVar1;
+    dbfile->pub.cd = db_cdf_SetDir;
+    dbfile->pub.cdid = db_cdf_SetDirID;
+    dbfile->pub.newtoc = db_cdf_NewToc;
+    dbfile->pub.module = db_cdf_Filters;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_Close
+ *
+ * Purpose:     Close a NetCDF file and free the memory associated with
+ *              the file.
+ *
+ * Return:      Success:        NULL, usually assigned to the file
+ *                              pointer being closed as in:
+ *                                      dbfile = db_cdf_Close (dbfile) ;
+ *
+ *              Failure:        Never fails
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:07:29 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Feb 27 15:09:10 PST 1995
+ *    I changed the return value to be an integer instead of a pointer
+ *    to a DBfile.
+ *
+ *    Sean Ahern, Mon Dec 18 17:30:17 PST 2000
+ *    Fixed a typo: changed silonetcdf_silonetcdf_ncclose to
+ *    silonetcdf_ncclose.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_Close(DBfile *_dbfile)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+
+    if (dbfile) {
+        /*
+         * Free the private parts of the file.
+         */
+        silonetcdf_ncclose(dbfile->cdf);
+        dbfile->cdf = 0;
+
+        /*
+         * Free the public parts of the file.
+         */
+        silo_db_close(_dbfile);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_Open
+ *
+ * Purpose:     Opens a NetCDF file that already exists.
+ *
+ * Return:      Success:        ptr to the file structure
+ *
+ *              Failure:        NULL, db_errno set.
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:10:35 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_cdf_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:30:36 EST 1995
+ *    I changed the call db_cdf_GetToc to DBNewToc.
+ *
+ *    Sean Ahern, Wed Oct  4 11:51:39 PDT 1995
+ *    Fixed a parameter type problem.  Cast dbfile to a DBfile*.
+ *
+ *    Sean Ahern, Mon Jan  8 17:39:30 PST 1996
+ *    Added the mode parameter.  The mode information is not yet
+ *    used in the function.
+ *
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+INTERNAL DBfile *
+db_cdf_Open(char *name, int mode, int subtype)
+{
+    char          *me = "db_cdf_Open";
+    int            cdf;
+    DBfile_cdf    *dbfile;
+
+    if (!SW_file_exists(name)) {
+        db_perror(name, E_NOFILE, me);
+        return NULL;
+    }
+    else if (!SW_file_readable(name)) {
+        db_perror("not readable", E_NOFILE, me);
+        return NULL;
+    }
+
+    if ((cdf = silonetcdf_ncopen(name, 1)) < 0) {
+        db_perror(NULL, E_NOFILE, me);
+        return NULL;
+    }
+
+    dbfile = ALLOC(DBfile_cdf);
+    memset(dbfile, 0, sizeof(DBfile_cdf));
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_NETCDF;
+    dbfile->cdf = cdf;
+    db_cdf_InitCallbacks((DBfile*)dbfile);
+    DBNewToc((DBfile *) dbfile);
+    return (DBfile *) dbfile;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_Filters
+ *
+ * Purpose:     Print the name of this device driver to the specified
+ *              stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:09:29 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK int
+db_cdf_Filters(DBfile *dbfile, FILE *stream)
+{
+    fprintf(stream, "NetCDF Device Driver\n");
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_ForceSingle
+ *
+ * Purpose:     Set an internal sentinel stating whether or not real
+ *              data should be forced to single precision before being
+ *              returned.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 07:27:21 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+db_cdf_ForceSingle(int status)
+{
+    return SO_ForceSingle(status);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetDir
+ *
+ * Purpose:     Return the name of the current directory by copying the
+ *              name to the output buffer supplied by the caller.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:24:23 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_GetDir(DBfile *_dbfile, char *result)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char           str[256], str2[256], *name;
+    int            dirid, n;
+
+    /* Must build path from bottom to top, hence str and str2 */
+    str[0] = str2[0] = '\0';
+    dirid = silonetcdf_ncdirget(dbfile->cdf);
+    while (dirid >= 0) {
+        name = silo_GetDirName(dbfile->cdf, dirid);
+        if (dirid == 0)
+            sprintf(str, "/%s", str2);
+        else
+            sprintf(str, "%s/%s", name, str2);
+        strcpy(str2, str);
+        dirid = silo_GetDirParent(dbfile->cdf, dirid);
+    }
+
+    /* Don't leave an extra '/' at end of pathname. */
+    n = strlen(str);
+    if (n > 1 && str[n - 1] == '/')
+        str[n - 1] = '\0';
+
+    strcpy(result, str);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_NewToc
+ *
+ * Purpose:     Read the table of contents from the current directory
+ *              and make it the current table of contents for the file
+ *              pointer, freeing any previously existing table of contents.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:29:43 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I made it into an internal routine.
+ *
+ *    Eric Brugger, Thu Feb  9 15:16:05 PST 1995
+ *    I modified the routine to handle the obj in the table of contents.
+ *
+ *    Robb Matzke, Tue Feb 21 16:21:20 EST 1995
+ *    Removed references to the `id' fields of the DBtoc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:31:19 EST 1995
+ *    Changed this function's name from db_cdf_GetToc to db_cdf_NewToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:38:14 EST 1995
+ *    Fixed numerous errors where we forgot to increment counters.  This
+ *    caused null pointers that caused problems elsewhere.
+ *
+ *    Robb Matzke, Tue Mar 7 11:20:04 EST 1995
+ *    Made this a callback routine.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_NewToc(DBfile *_dbfile)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    int            dbid = dbfile->cdf;
+    DBtoc         *toc;
+
+    int            i, dirid;
+    int            type;
+    int            children[100], nchild, ncomps;
+    int            nvar, ndir, ndim, nobj;
+    int            ivar, iqmesh, iqvar, iumesh, iuvar, icurve, idir, iarray,
+                   imat, imatspecies, imultimesh, imultivar, ipmesh, iptvar,
+                   iobj;
+    int            ng, rec;
+    char          *name, oname[128];
+
+    db_FreeToc(_dbfile);
+    dbfile->pub.toc = toc = db_AllocToc();
+
+    /* Get count of each entity (var, dir, curve, etc.) */
+    dirid = silonetcdf_ncdirget(dbid);
+
+    silonetcdf_ncinqall(dbid, &ndim, &nvar, &nobj, &ndir, &ng, &rec);
+    toc->nvar = nvar;
+    toc->ndir = ndir;
+
+    /*
+     *  Loop over all objects, counting each specific type.
+     */
+    for (i = 0; i < nobj; i++) {
+        silonetcdf_ncobjinq(dbid, i, NULL, &type, &ncomps);
+
+        switch (type) {
+            case DB_MULTIMESH:
+                toc->nmultimesh++;
+                break;
+            case DB_MULTIVAR:
+                toc->nmultivar++;
+                break;
+            case DB_QUADMESH:
+            case DB_QUAD_RECT:
+            case DB_QUAD_CURV:
+                toc->nqmesh++;
+                break;
+            case DB_QUADVAR:
+                toc->nqvar++;
+                break;
+            case DB_UCDMESH:
+                toc->nucdmesh++;
+                break;
+            case DB_UCDVAR:
+                toc->nucdvar++;
+                break;
+            case DB_POINTMESH:
+                toc->nptmesh++;
+                break;
+            case DB_POINTVAR:
+                toc->nptvar++;
+                break;
+            case DB_CURVE:
+                toc->ncurve++;
+                break;
+            case DB_MATERIAL:
+                toc->nmat++;
+                break;
+            case DB_MATSPECIES:
+                toc->nmatspecies++;
+                break;
+            case DB_ARRAY:
+                toc->narrays++;
+                break;
+            default:
+                toc->nobj++;
+                break;
+        }
+    }                           /* for-i */
+
+    /* Now all the counts have been made; allocate space */
+    if (toc->nvar > 0) {
+        toc->var_names = ALLOC_N(char *, toc->nvar);
+    }
+
+    if (toc->ndir > 0) {
+        toc->dir_names = ALLOC_N(char *, toc->ndir);
+    }
+
+    if (toc->ncurve > 0) {
+        toc->curve_names = ALLOC_N(char *, toc->ncurve);
+    }
+
+    if (toc->nmultimesh > 0) {
+        toc->multimesh_names = ALLOC_N(char *, toc->nmultimesh);
+    }
+
+    if (toc->nmultivar > 0) {
+        toc->multivar_names = ALLOC_N(char *, toc->nmultivar);
+    }
+
+    if (toc->nqmesh > 0) {
+        toc->qmesh_names = ALLOC_N(char *, toc->nqmesh);
+    }
+
+    if (toc->nqvar > 0) {
+        toc->qvar_names = ALLOC_N(char *, toc->nqvar);
+    }
+
+    if (toc->nucdmesh > 0) {
+        toc->ucdmesh_names = ALLOC_N(char *, toc->nucdmesh);
+    }
+
+    if (toc->nucdvar > 0) {
+        toc->ucdvar_names = ALLOC_N(char *, toc->nucdvar);
+    }
+
+    if (toc->nptmesh > 0) {
+        toc->ptmesh_names = ALLOC_N(char *, toc->nptmesh);
+    }
+
+    if (toc->nptvar > 0) {
+        toc->ptvar_names = ALLOC_N(char *, toc->nptvar);
+    }
+
+    if (toc->nmat > 0) {
+        toc->mat_names = ALLOC_N(char *, toc->nmat);
+    }
+
+    if (toc->nmatspecies > 0) {
+        toc->matspecies_names = ALLOC_N(char *, toc->nmatspecies);
+    }
+
+    if (toc->narrays > 0) {
+        toc->array_names = ALLOC_N(char *, toc->narrays);
+    }
+
+    if (toc->nobj > 0) {
+        toc->obj_names = ALLOC_N(char *, toc->nobj);
+    }
+
+    /*
+     *  Now loop over all the items in the directory and store the
+     *  names.
+     */
+    icurve = ivar = iqmesh = iqvar = iumesh = iuvar = idir = iarray = 0;
+    imultimesh = imultivar = imat = imatspecies = ipmesh = iptvar = 0;
+    iobj = 0;
+
+    /* ----  Loop over variables  ---- */
+
+    for (i = 0; i < nvar; i++) {
+        name = silo_GetVarName(dbid, dirid, i);
+        toc->var_names[ivar++] = STRDUP(name);
+    }
+
+    /* ----  Loop over directories  ---- */
+
+    silonetcdf_ncdirlist(dbid, dirid, &nchild, children);
+    for (i = 0; i < nchild; i++) {
+        name = silo_GetDirName(dbid, children[i]);
+        toc->dir_names[idir++] = STRDUP(name);
+    }
+
+    /* ----  Loop over objects  ---- */
+
+    for (i = 0; i < nobj; i++) {
+        silonetcdf_ncobjinq(dbid, i, oname, &type, &ncomps);
+        switch (type) {
+            case DB_MULTIMESH:
+                toc->multimesh_names[imultimesh++] = STRDUP(oname);
+                break;
+
+            case DB_MULTIVAR:
+                toc->multivar_names[imultivar++] = STRDUP(oname);
+                break;
+
+            case DB_QUADMESH:
+            case DB_QUAD_RECT:
+            case DB_QUAD_CURV:
+                toc->qmesh_names[iqmesh++] = STRDUP(oname);
+                break;
+
+            case DB_QUADVAR:
+                toc->qvar_names[iqvar++] = STRDUP(oname);
+                break;
+
+            case DB_UCDMESH:
+                toc->ucdmesh_names[iumesh++] = STRDUP(oname);
+                break;
+
+            case DB_UCDVAR:
+                toc->ucdvar_names[iuvar++] = STRDUP(oname);
+                break;
+
+            case DB_POINTMESH:
+                toc->ptmesh_names[ipmesh++] = STRDUP(oname);
+                break;
+
+            case DB_POINTVAR:
+                toc->ptvar_names[iptvar++] = STRDUP(oname);
+                break;
+
+            case DB_CURVE:
+                toc->curve_names[icurve++] = STRDUP(oname);
+                break;
+
+            case DB_MATERIAL:
+                toc->mat_names[imat++] = STRDUP(oname);
+                break;
+
+            case DB_MATSPECIES:
+                toc->matspecies_names[imatspecies++] = STRDUP(oname);
+                break;
+
+            case DB_ARRAY:
+                toc->array_names[iarray++] = STRDUP(oname);
+                break;
+
+            default:
+                toc->obj_names[iobj++] = STRDUP(oname);
+                break;
+        }
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetAtt
+ *
+ * Purpose:     Allocate space for, and read, the given attribute of the
+ *              given variable.
+ *
+ * Return:      Success:        pointer to result
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:39:25 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_cdf_GetAtt(DBfile *_dbfile, char *varname, char *attname)
+{
+    void          *result;
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetAtt";
+    int            varid, datatype, len, nbytes;
+
+    /*  Convert ascii name into SILO variable id. */
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, varname)) < 0) {
+        db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+        return NULL;
+    }
+
+    /* Get size of attribute and allocate space for it. */
+    silonetcdf_ncattinq(dbfile->cdf, varid, attname, &datatype, &len);
+
+    nbytes = len * silo_GetDataSize(dbfile->cdf, datatype);
+    result = ALLOC_N(char, nbytes);
+
+    silonetcdf_ncattget(dbfile->cdf, varid, attname, result);
+    return result;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetMaterial
+ *
+ * Purpose:     Read a material-data object from a NetCDF file and return
+ *              a ptr to the new structure.
+ *
+ * Return:      Success:        ptr to new DBmaterial struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:43:52 PST 1995
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 13:09:52 PDT 2001
+ *      Added support for the read mask stuff.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBmaterial *
+db_cdf_GetMaterial(DBfile *_dbfile, char *name)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetMaterial";
+    DBmaterial    *ma = DBAllocMaterial();
+    int            objid;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, name)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return NULL;
+    }
+
+    /*------------------------------------------------------------*
+     *          Comp. Name        Comp. Address     Data Type     * 
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("ndims", &ma->ndims, DB_INT);
+    DEFINE_OBJ("dims", ma->dims, DB_INT);
+    DEFINE_OBJ("major_order", &ma->major_order, DB_INT);
+    DEFINE_OBJ("origin", &ma->origin, DB_INT);
+
+    DEFINE_OBJ("nmat", &ma->nmat, DB_INT);
+    DEFINE_OBJ("mixlen", &ma->mixlen, DB_INT);
+    DEFINE_OBJ("datatype", &ma->datatype, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBMatMatnos)
+        DEFALL_OBJ("matnos", &ma->matnos, DB_INT);
+    if (SILO_Globals.dataReadMask & DBMatMatlist)
+        DEFALL_OBJ("matlist", &ma->matlist, DB_INT);
+    if (SILO_Globals.dataReadMask & DBMatMixList)
+    {
+        DEFALL_OBJ("mix_mat", &ma->mix_mat, DB_INT);
+        DEFALL_OBJ("mix_next", &ma->mix_next, DB_INT);
+        DEFALL_OBJ("mix_zone", &ma->mix_zone, DB_INT);
+        DEFALL_OBJ("mix_vf", &ma->mix_vf, DB_FLOAT);
+    }
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    _DBQQCalcStride(ma->stride, ma->dims, ma->ndims, ma->major_order);
+
+    ma->id = objid;
+    ma->name = STRDUP(name);
+    ma->datatype = DB_FLOAT;
+
+    return ma;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetMatspecies
+ *
+ * Purpose:     Read a matspecies-data object from a SILO file and return the
+ *              SILO structure for this type.
+ *
+ * Return:      Success:        ptr to a new DBmatspecies struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Fri Jan  6 16:49:20 PST 1995
+ *
+ * Modifications:
+ *
+ *    Jeremy Meredith, Wed Jul  7 12:15:31 PDT 1999
+ *    I removed the origin value from the species object.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmatspecies *
+db_cdf_GetMatspecies(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    DBmatspecies  *mm = DBAllocMatspecies();
+    int            objid;
+    SO_Object      tmp_obj;
+    char           tmpstr[512];
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    objid = silonetcdf_ncobjid(dbfile->cdf, objname);
+    if (objid == OOPS) {
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------* 
+     *          Comp. Name        Comp. Address     Data Type     * 
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("ndims", &mm->ndims, DB_INT);
+    DEFINE_OBJ("dims", mm->dims, DB_INT);
+    DEFINE_OBJ("major_order", &mm->major_order, DB_INT);
+    DEFINE_OBJ("datatype", &mm->datatype, DB_INT);
+    DEFINE_OBJ("nmat", &mm->nmat, DB_INT);
+    DEFINE_OBJ("mixlen", &mm->mixlen, DB_INT);
+    DEFINE_OBJ("nspecies_mf", &mm->nspecies_mf, DB_INT);
+
+    DEFALL_OBJ("matname", &mm->matname, DB_CHAR);
+    DEFALL_OBJ("nmatspec", &mm->nmatspec, DB_INT);
+    DEFALL_OBJ("speclist", &mm->speclist, DB_INT);
+    DEFALL_OBJ("mix_speclist", &mm->mix_speclist, DB_FLOAT);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    /*
+     *  Read the remainder of the object: species_mf
+     */
+
+    INIT_OBJ(&tmp_obj);
+
+    if (mm->datatype == 0) {
+        strcpy(tmpstr, objname);
+        strcat(tmpstr, "_data");
+        mm->datatype = DBGetVarType(_dbfile, tmpstr);
+
+        if (OOPS == mm->datatype) {
+            /* Not found. Assume float. */
+            mm->datatype = DB_FLOAT;
+        }
+    }
+
+    DEFALL_OBJ("species_mf", &mm->species_mf, mm->datatype);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    _DBQQCalcStride(mm->stride, mm->dims, mm->ndims, mm->major_order);
+
+    mm->id = objid;
+    mm->name = STRDUP(objname);
+
+    return (mm);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetComponent
+ *
+ * Purpose:     Read a component value from the data file.
+ *
+ * Return:      Success:        pointer to component
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 06:49:13 PST 1995
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, d Feb  2 07:59:53 PST 2005
+ *   Initialized result
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_cdf_GetComponent(DBfile *_dbfile, char *objname, char *compname)
+{
+    void          *result = NULL;
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetComponent";
+    int            objid;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return NULL;
+    }
+
+    /* Read just the requeseted component of the given object */
+    INIT_OBJ(&tmp_obj);
+    DEFALL_OBJ(compname, &result, DB_NOTYPE);
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+    return result;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetMultimesh
+ *
+ * Purpose:     Read a multi-block mesh structure from the given database.
+ *
+ * Return:      Success:        ptr to new multimesh object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 06:53:50 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 09:33:44 PST 1995
+ *    I modified the routine to return NULL unless the variable is
+ *    a multimesh.
+ *
+ *    Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *    Initialized mm 
+ *
+ *    Mark C. Miller, Mon Jan 12 17:28:42 PST 2009
+ *    Handle topo_dim member correctly.
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmultimesh *
+db_cdf_GetMultimesh(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetMultimesh";
+    int            objid, type, ncomps;
+    int            i;
+    int            dbid = dbfile->cdf;
+    DBmultimesh   *mm = NULL;
+    char          *tmpnames, delim[2], *s, *name;
+    SO_Object      tmp_obj;
+
+    /*--------------------------------------------------
+     *  Convert ascii name into SILO object id.
+     *-------------------------------------------------*/
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    silonetcdf_ncobjinq(dbid, objid, NULL, &type, &ncomps);
+    if (type == DB_MULTIMESH) {
+
+        mm = DBAllocMultimesh(1);
+
+        /* Read multi-block object */
+        INIT_OBJ(&tmp_obj);
+        DEFINE_OBJ("nblocks", &mm->nblocks, DB_INT);
+        DEFALL_OBJ("meshids", &mm->meshids, DB_INT);
+        DEFALL_OBJ("meshtypes", &mm->meshtypes, DB_INT);
+        DEFALL_OBJ("meshnames", &tmpnames, DB_CHAR);
+        DEFALL_OBJ("meshdirs", &mm->dirids, DB_INT);
+
+        SO_GetObject(dbid, objid, &tmp_obj);
+
+        /* The value we store to the file for 'topo_dim' member is
+           designed such that zero indicates a value that was NOT
+           specified in the file. Since zero is a valid topological
+           dimension, when we store topo_dim to a file, we always
+           add 1. So, we have to subtract it here. */
+        mm->topo_dim = mm->topo_dim - 1;
+
+        /*----------------------------------------
+         *  Internally, the meshnames are stored
+         *  in a single character string as a
+         *  delimited set of names. Here we break
+         *  them into separate names.
+         *----------------------------------------*/
+
+        if (tmpnames != NULL && mm->nblocks > 0) {
+            mm->meshnames = ALLOC_N(char *, mm->nblocks);
+
+            delim[0] = tmpnames[0];
+            delim[1] = '\0';
+            s = &tmpnames[1];
+            name = (char *)strtok(s, delim);
+
+            for (i = 0; i < mm->nblocks; i++) {
+                mm->meshnames[i] = STRDUP(name);
+                name = (char *)strtok(NULL, ";");
+            }
+            FREE(tmpnames);
+        }
+    }
+
+    return (mm);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetPointmesh
+ *
+ * Purpose:     Read a point mesh object from the database, allocate
+ *              space for it, and return a ptr.
+ *
+ * Return:      Success:        ptr to new DBpointmesh struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:01:42 PST 1995
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 13:12:12 PDT 2001
+ *      Added support for the read mask stuff.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBpointmesh *
+db_cdf_GetPointmesh(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetPointmesh";
+    DBpointmesh   *pm = NULL;
+    int            objid;
+    SO_Object      tmp_obj;
+
+    pm = DBAllocPointmesh();
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------* 
+     *          Comp. Name        Comp. Address     Data Type     * 
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("block_no", &pm->block_no, DB_INT);
+    DEFINE_OBJ("cycle", &pm->cycle, DB_INT);
+    DEFINE_OBJ("time", &pm->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &pm->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &pm->datatype, DB_INT);
+    DEFINE_OBJ("ndims", &pm->ndims, DB_INT);
+    DEFINE_OBJ("nels", &pm->nels, DB_INT);
+    DEFINE_OBJ("origin", &pm->origin, DB_INT);
+
+    DEFINE_OBJ("min_extents", pm->min_extents, DB_FLOAT);
+    DEFINE_OBJ("max_extents", pm->max_extents, DB_FLOAT);
+
+    if (SILO_Globals.dataReadMask & DBPMCoords)
+    {
+        DEFALL_OBJ("coord[0]", &pm->coords[0], DB_FLOAT);
+        DEFALL_OBJ("coord[1]", &pm->coords[1], DB_FLOAT);
+        DEFALL_OBJ("coord[2]", &pm->coords[2], DB_FLOAT);
+    }
+    DEFALL_OBJ("label[0]", &pm->labels[0], DB_CHAR);
+    DEFALL_OBJ("label[1]", &pm->labels[1], DB_CHAR);
+    DEFALL_OBJ("label[2]", &pm->labels[2], DB_CHAR);
+    DEFALL_OBJ("units[0]", &pm->units[0], DB_CHAR);
+    DEFALL_OBJ("units[1]", &pm->units[1], DB_CHAR);
+    DEFALL_OBJ("units[2]", &pm->units[2], DB_CHAR);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    pm->id = objid;
+    pm->name = STRDUP(objname);
+    pm->datatype = DB_FLOAT;
+
+    return (pm);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetPointvar
+ *
+ * Purpose:     Read a point-var object from a database and return the
+ *              pointer.
+ *
+ * Return:      Success:        ptr to a new DBmeshvar struct.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:05:40 PST 1995
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 13:13:05 PDT 2001
+ *      Added support for the read mask stuff.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBmeshvar *
+db_cdf_GetPointvar(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetPointvar";
+    DBmeshvar     *mv = DBAllocMeshvar();
+    int            objid, i;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------* 
+     *          Comp. Name        Comp. Address     Data Type     * 
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("meshid", &mv->meshid, DB_INT);
+    DEFINE_OBJ("cycle", &mv->cycle, DB_INT);
+    DEFINE_OBJ("time", &mv->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &mv->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &mv->datatype, DB_INT);
+    DEFINE_OBJ("ndims", &mv->ndims, DB_INT);
+    DEFINE_OBJ("nels", &mv->nels, DB_INT);
+    DEFINE_OBJ("nvals", &mv->nvals, DB_INT);
+    DEFINE_OBJ("origin", &mv->origin, DB_INT);
+
+    DEFALL_OBJ("label", &mv->label, DB_CHAR);
+    DEFALL_OBJ("units", &mv->units, DB_CHAR);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    /*
+     *  Read the remainder of the object: loop over all values
+     *  associated with this variable.
+     */
+    if ((mv->nvals > 0) && (SILO_Globals.dataReadMask & DBPVData)) {
+        INIT_OBJ(&tmp_obj);
+        mv->vals = ALLOC_N(DB_DTPTR*, mv->nvals);
+
+        for (i = 0; i < mv->nvals; i++) {
+            DEFALL_OBJ(_valstr[0], &mv->vals[i], DB_FLOAT);
+        }
+        SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+    }
+
+    mv->id = objid;
+    mv->name = STRDUP(objname);
+
+    if (mv->datatype == 0 || mv->datatype == DB_DOUBLE)
+        mv->datatype = DB_FLOAT;
+
+    return (mv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetQuadmesh
+ *
+ * Purpose:     Read a quad-mesh object from a database, allocate memory,
+ *              and return a ptr to the new struct.
+ *
+ * Return:      Success:        ptr to the new DBquadmesh struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:09:34 PST 1995
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 13:14:25 PDT 2001
+ *      Added support for the read mask stuff.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBquadmesh *
+db_cdf_GetQuadmesh(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetQuadmesh";
+    DBquadmesh    *qm = DBAllocQuadmesh();
+    int            objid;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------*
+     *          Comp. Name        Comp. Address     Data Type     *
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("block_no", &qm->block_no, DB_INT);
+    DEFINE_OBJ("cycle", &qm->cycle, DB_INT);
+    DEFINE_OBJ("time", &qm->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &qm->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &qm->datatype, DB_INT);
+    DEFINE_OBJ("coord_sys", &qm->coord_sys, DB_INT);
+    DEFINE_OBJ("coordtype", &qm->coordtype, DB_INT);
+    DEFINE_OBJ("facetype", &qm->facetype, DB_INT);
+    DEFINE_OBJ("planar", &qm->planar, DB_INT);
+    DEFINE_OBJ("ndims", &qm->ndims, DB_INT);
+    DEFINE_OBJ("nspace", &qm->nspace, DB_INT);
+    DEFINE_OBJ("nnodes", &qm->nnodes, DB_INT);
+    DEFINE_OBJ("major_order", &qm->major_order, DB_INT);
+    DEFINE_OBJ("origin", &qm->origin, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBQMCoords)
+    {
+        DEFALL_OBJ("coord[0]", &qm->coords[0], DB_FLOAT);
+        DEFALL_OBJ("coord[1]", &qm->coords[1], DB_FLOAT);
+        DEFALL_OBJ("coord[2]", &qm->coords[2], DB_FLOAT);
+    }
+    DEFALL_OBJ("label[0]", &qm->labels[0], DB_CHAR);
+    DEFALL_OBJ("label[1]", &qm->labels[1], DB_CHAR);
+    DEFALL_OBJ("label[2]", &qm->labels[2], DB_CHAR);
+    DEFALL_OBJ("units[0]", &qm->units[0], DB_CHAR);
+    DEFALL_OBJ("units[1]", &qm->units[1], DB_CHAR);
+    DEFALL_OBJ("units[2]", &qm->units[2], DB_CHAR);
+
+    DEFINE_OBJ("dims", qm->dims, DB_INT);
+    DEFINE_OBJ("min_index", qm->min_index, DB_INT);
+    DEFINE_OBJ("max_index", qm->max_index, DB_INT);
+    DEFINE_OBJ("min_extents", qm->min_extents, DB_FLOAT);
+    DEFINE_OBJ("max_extents", qm->max_extents, DB_FLOAT);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    qm->id = objid;
+    qm->name = STRDUP(objname);
+    qm->datatype = DB_FLOAT;
+
+    _DBQMSetStride(qm);
+    return (qm);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetQuadvar
+ *
+ * Purpose:     Read a quad-var object form a database file and return
+ *              a pointer to the new structure.
+ *
+ * Return:      Success:        ptr to a new DBquadvar struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:13:32 PST 1995
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 13:15:04 PDT 2001
+ *      Added support for the read mask stuff.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBquadvar *
+db_cdf_GetQuadvar(DBfile *_dbfile, char *objname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetQuadvar";
+    char           tmpstr[256];
+    DBquadvar     *qv = DBAllocQuadvar();
+    int            objid, i;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, objname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------*
+     *          Comp. Name        Comp. Address     Data Type     *
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    /* Scalars */
+    DEFINE_OBJ("meshid", &qv->meshid, DB_INT);
+    DEFINE_OBJ("cycle", &qv->cycle, DB_INT);
+    DEFINE_OBJ("time", &qv->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &qv->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &qv->datatype, DB_INT);
+    DEFINE_OBJ("ndims", &qv->ndims, DB_INT);
+    DEFINE_OBJ("major_order", &qv->major_order, DB_INT);
+    DEFINE_OBJ("nels", &qv->nels, DB_INT);
+    DEFINE_OBJ("nvals", &qv->nvals, DB_INT);
+    DEFINE_OBJ("origin", &qv->origin, DB_INT);
+    DEFINE_OBJ("mixlen", &qv->mixlen, DB_INT);
+    DEFINE_OBJ("use_specmf", &qv->use_specmf, DB_INT);
+
+    /* Arrays */
+    DEFINE_OBJ("min_index", qv->min_index, DB_INT);
+    DEFINE_OBJ("max_index", qv->max_index, DB_INT);
+    DEFINE_OBJ("dims", qv->dims, DB_INT);
+    DEFINE_OBJ("label", qv->label, DB_CHAR);
+    DEFINE_OBJ("units", qv->units, DB_CHAR);
+    DEFINE_OBJ("align", qv->align, DB_FLOAT);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    /*
+     *  Read the remainder of the object: loop over all values
+     *  associated with this variable.
+     */
+
+    if ((qv->nvals > 0) && (SILO_Globals.dataReadMask & DBQVData)) {
+        INIT_OBJ(&tmp_obj);
+
+        qv->vals = ALLOC_N(DB_DTPTR*, qv->nvals);
+
+        if (qv->mixlen > 0) {
+            qv->mixvals = ALLOC_N(DB_DTPTR*, qv->nvals);
+        }
+        if (qv->datatype == 0) {
+            strcpy(tmpstr, objname);
+            strcat(tmpstr, "_data");
+            if ((qv->datatype = DBGetVarType(_dbfile, tmpstr)) < 0) {
+                /* Not found. Assume float. */
+                qv->datatype = DB_FLOAT;
+            }
+        }
+
+        for (i = 0; i < qv->nvals; i++) {
+            DEFALL_OBJ(_valstr[i], &qv->vals[i], qv->datatype);
+            if (qv->mixlen > 0) {
+                DEFALL_OBJ(_mixvalstr[i], &qv->mixvals[i], qv->datatype);
+            }
+        }
+
+        SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+    }
+
+    qv->id = objid;
+    qv->name = STRDUP(objname);
+
+    _DBQQCalcStride(qv->stride, qv->dims, qv->ndims, qv->major_order);
+
+    return (qv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetUcdmesh
+ *
+ * Purpose:     Read and allocate a UCD mesh from a database.
+ *
+ * Return:      Success:        ptr to new DBucdmesh structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:19:00 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Mar  2 13:32:49 PST 1999
+ *    I added code to set the min_index and max_index fields of the
+ *    zonelist appropriately.
+ *
+ *    Sean Ahern, Fri Aug  3 13:15:49 PDT 2001
+ *    Added support for the read mask stuff.
+ *
+ *    Mark C. Miller, Mon Jan 12 17:29:05 PST 2009
+ *    Handle topo_dim member correctly.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBucdmesh *
+db_cdf_GetUcdmesh(DBfile *_dbfile, char *meshname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetUcdmesh";
+    DBucdmesh     *um = DBAllocUcdmesh();
+    int            objid;
+    int            fl_id = -1, zl_id = -1, el_id = -1;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, meshname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------*
+     *          Comp. Name        Comp. Address     Data Type     *
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("block_no", &um->block_no, DB_INT);
+    DEFINE_OBJ("cycle", &um->cycle, DB_INT);
+    DEFINE_OBJ("time", &um->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &um->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &um->datatype, DB_INT);
+    DEFINE_OBJ("coord_sys", &um->coord_sys, DB_INT);
+    DEFINE_OBJ("ndims", &um->ndims, DB_INT);
+    DEFINE_OBJ("nnodes", &um->nnodes, DB_INT);
+    DEFINE_OBJ("origin", &um->origin, DB_INT);
+
+    DEFINE_OBJ("min_extents", um->min_extents, DB_FLOAT);
+    DEFINE_OBJ("max_extents", um->max_extents, DB_FLOAT);
+
+   if (SILO_Globals.dataReadMask & DBUMCoords)
+   {
+        DEFALL_OBJ("coord[0]", &um->coords[0], DB_FLOAT);
+        DEFALL_OBJ("coord[1]", &um->coords[1], DB_FLOAT);
+        DEFALL_OBJ("coord[2]", &um->coords[2], DB_FLOAT);
+   }
+    DEFALL_OBJ("label[0]", &um->labels[0], DB_CHAR);
+    DEFALL_OBJ("label[1]", &um->labels[1], DB_CHAR);
+    DEFALL_OBJ("label[2]", &um->labels[2], DB_CHAR);
+    DEFALL_OBJ("units[0]", &um->units[0], DB_CHAR);
+    DEFALL_OBJ("units[1]", &um->units[1], DB_CHAR);
+    DEFALL_OBJ("units[2]", &um->units[2], DB_CHAR);
+
+    /* Get SILO ID's for other UCD mesh components */
+    DEFINE_OBJ("facelist", &fl_id, DB_INT);
+    DEFINE_OBJ("zonelist", &zl_id, DB_INT);
+    DEFINE_OBJ("edgelist", &el_id, DB_INT);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    um->id = objid;
+    um->name = STRDUP(meshname);
+    um->datatype = DB_FLOAT;
+
+    /* The value we store to the file for 'topo_dim' member is
+       designed such that zero indicates a value that was NOT
+       specified in the file. Since zero is a valid topological
+       dimension, when we store topo_dim to a file, we always
+       add 1. So, we have to subtract it here. */
+    um->topo_dim = um->topo_dim - 1;
+
+    /* Read facelist, zonelist, and edgelist */
+
+    if ((fl_id >= 0) && (SILO_Globals.dataReadMask & DBUMFacelist)) {
+        um->faces = DBAllocFacelist();
+
+        /*------------------------------------------------------------*
+         *          Comp. Name        Comp. Address     Data Type     *
+         *------------------------------------------------------------*/
+        INIT_OBJ(&tmp_obj);
+
+        DEFINE_OBJ("ndims", &um->faces->ndims, DB_INT);
+        DEFINE_OBJ("nfaces", &um->faces->nfaces, DB_INT);
+        DEFINE_OBJ("lnodelist", &um->faces->lnodelist, DB_INT);
+        DEFINE_OBJ("nshapes", &um->faces->nshapes, DB_INT);
+        DEFINE_OBJ("ntypes", &um->faces->ntypes, DB_INT);
+        DEFINE_OBJ("origin", &um->faces->origin, DB_INT);
+
+        DEFALL_OBJ("nodelist", &um->faces->nodelist, DB_INT);
+        DEFALL_OBJ("shapesize", &um->faces->shapesize, DB_INT);
+        DEFALL_OBJ("shapecnt", &um->faces->shapecnt, DB_INT);
+        DEFALL_OBJ("typelist", &um->faces->typelist, DB_INT);
+        DEFALL_OBJ("types", &um->faces->types, DB_INT);
+        DEFALL_OBJ("zoneno", &um->faces->zoneno, DB_INT);
+
+        SO_GetObject(dbfile->cdf, fl_id, &tmp_obj);
+
+    }
+
+    if ((zl_id >= 0) && (SILO_Globals.dataReadMask & DBUMZonelist)) {
+        um->zones = DBAllocZonelist();
+
+        /*------------------------------------------------------------*
+         *          Comp. Name        Comp. Address     Data Type     *
+         *------------------------------------------------------------*/
+        INIT_OBJ(&tmp_obj);
+
+        DEFINE_OBJ("ndims", &um->zones->ndims, DB_INT);
+        DEFINE_OBJ("nzones", &um->zones->nzones, DB_INT);
+        DEFINE_OBJ("nshapes", &um->zones->nshapes, DB_INT);
+        DEFINE_OBJ("lnodelist", &um->zones->lnodelist, DB_INT);
+        DEFINE_OBJ("origin", &um->zones->origin, DB_INT);
+
+        DEFALL_OBJ("nodelist", &um->zones->nodelist, DB_INT);
+        DEFALL_OBJ("shapesize", &um->zones->shapesize, DB_INT);
+        DEFALL_OBJ("shapecnt", &um->zones->shapecnt, DB_INT);
+
+        SO_GetObject(dbfile->cdf, zl_id, &tmp_obj);
+
+        um->zones->min_index = 0;
+        um->zones->max_index = um->zones->nzones - 1;
+    }
+
+    if (el_id >= 0) {
+        um->edges = DBAllocEdgelist();
+
+        /*------------------------------------------------------------*
+         *          Comp. Name        Comp. Address     Data Type     *
+         *------------------------------------------------------------*/
+        INIT_OBJ(&tmp_obj);
+        DEFINE_OBJ("ndims", &um->edges->ndims, DB_INT);
+        DEFINE_OBJ("nedges", &um->edges->nedges, DB_INT);
+        DEFINE_OBJ("origin", &um->edges->origin, DB_INT);
+
+        DEFALL_OBJ("edge_beg", &um->edges->edge_beg, DB_INT);
+        DEFALL_OBJ("edge_end", &um->edges->edge_end, DB_INT);
+
+        SO_GetObject(dbfile->cdf, el_id, &tmp_obj);
+    }
+
+    return (um);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_cdf_GetUcdvar
+ *
+ *  Purpose
+ *
+ *      Read a ucd-var object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Jul 20 07:56:37 PDT 1994
+ *      Get mixlen and mixvars components.
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Sean Ahern, Fri Aug  3 13:18:37 PDT 2001
+ *      Added support for the read mask stuff.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBucdvar *
+db_cdf_GetUcdvar(DBfile *_dbfile, char *varname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetUcdvar";
+    DBucdvar      *uv = DBAllocUcdvar();
+    int            objid, i;
+    SO_Object      tmp_obj;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, varname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return (NULL);
+    }
+
+    /*------------------------------------------------------------*
+     *          Comp. Name        Comp. Address     Data Type     * 
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("meshid", &uv->meshid, DB_INT);
+    DEFINE_OBJ("cycle", &uv->cycle, DB_INT);
+    DEFINE_OBJ("time", &uv->time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &uv->dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &uv->datatype, DB_INT);
+    DEFINE_OBJ("centering", &uv->centering, DB_INT);
+    DEFINE_OBJ("ndims", &uv->ndims, DB_INT);
+    DEFINE_OBJ("nels", &uv->nels, DB_INT);
+    DEFINE_OBJ("nvals", &uv->nvals, DB_INT);
+    DEFINE_OBJ("origin", &uv->origin, DB_INT);
+    DEFINE_OBJ("mixlen", &uv->mixlen, DB_INT);
+    DEFINE_OBJ("use_specmf", &uv->use_specmf, DB_INT);
+
+    DEFALL_OBJ("label", &uv->label, DB_CHAR);
+    DEFALL_OBJ("units", &uv->units, DB_CHAR);
+
+    SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+
+    /*
+     *  Read the remainder of the object: loop over all values
+     *  associated with this variable.
+     */
+
+    if ((uv->nvals > 0) && (SILO_Globals.dataReadMask & DBUVData)) {
+        INIT_OBJ(&tmp_obj);
+
+        uv->vals = ALLOC_N(DB_DTPTR*, uv->nvals);
+
+        if (uv->mixlen > 0) {
+            uv->mixvals = ALLOC_N(DB_DTPTR*, uv->nvals);
+        }
+
+        for (i = 0; i < uv->nvals; i++) {
+            DEFALL_OBJ(_valstr[i], &uv->vals[i], DB_FLOAT);
+
+            if (uv->mixlen > 0) {
+                DEFALL_OBJ(_mixvalstr[i], &uv->mixvals[i], DB_FLOAT);
+            }
+        }
+
+        SO_GetObject(dbfile->cdf, objid, &tmp_obj);
+    }
+
+    uv->id = objid;
+    uv->name = STRDUP(varname);
+    uv->datatype = DB_FLOAT;
+
+    return (uv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetVar
+ *
+ * Purpose:     Allocates space for a variable and reads the variable
+ *              from the database.
+ *
+ * Return:      Success:        ptr to variable data
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:29:06 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_cdf_GetVar(DBfile *_dbfile, char *name)
+{
+    char          *me = "db_cdf_GetVar";
+    char          *data;
+    int            n;
+
+    /* Find out how long (in bytes) requested variable is. */
+
+    if ((n = DBGetVarByteLength(_dbfile, name)) == 0) {
+        db_perror(name, E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    /* Read it and return. */
+    data = ALLOC_N(char, n);
+    if (DBReadVar(_dbfile, name, data) < 0) {
+        db_perror("DBReadVar", E_CALLFAIL, me);
+        FREE(data);
+        return (NULL);
+    }
+
+    return data;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetVarByteLength
+ *
+ * Purpose:     Returns the length of the given variable in bytes.
+ *
+ * Return:      Success:        length of variable in bytes
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:32:21 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_GetVarByteLength(DBfile *_dbfile, char *varname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetVarByteLength";
+    int            varid, number, size;
+
+    /*  Convert ascii name into SILO variable id. */
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, varname)) < 0) {
+        db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+        return (OOPS);
+    }
+
+    (void)silo_GetVarSize(dbfile->cdf, varid, &number, &size);
+    return number * size;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_GetVarLength
+ *
+ * Purpose:     Returns the number of elements in the requested variable.
+ *
+ * Return:      Success:        number of elements
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:35:21 PST 1995
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Feb  2 07:59:53 PST 2005
+ *   Initialized number
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_GetVarLength(DBfile *_dbfile, char *varname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetVarLength";
+    int            varid, number=-1, size;
+
+    /*  Convert ascii name into SILO variable id. */
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, varname)) < 0) {
+        db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+        return (OOPS);
+    }
+
+    (void)silo_GetVarSize(dbfile->cdf, varid, &number, &size);
+    return number;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_InqVarType
+ *
+ * Purpose:     Return the DBObjectType for a given object name
+ *
+ * Return:      Success:        the ObjectType for the given object
+ *
+ *              Failure:        DB_INVALID_OBJECT
+ *
+ * Programmer:  Eric Brugger,
+ *              Mon Mar  1 09:02:41 PST 2004
+ *
+ * Modifications:
+ *
+ *--------------------------------------------------------------------
+ */
+SILO_CALLBACK DBObjectType
+db_cdf_InqVarType(DBfile *_dbfile, char *varname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_InqVarType";
+    int            type, ncomps, objid;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, varname)) < 0) {
+        db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+        return DB_INVALID_OBJECT;
+    }
+    silonetcdf_ncobjinq(dbfile->cdf, objid, NULL, &type, &ncomps);
+
+    return((DBObjectType)type);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_InqMeshname
+ *
+ * Purpose:     Returns the name of a mesh associated with a mesh-variable.
+ *              Caller must allocate space for mesh name.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Jan  9 07:37:33 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_InqMeshname(DBfile *_dbfile, char *vname, char *mname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    int            meshid;
+    char          *name;
+    void          *v;
+
+    if ((v = DBGetComponent(_dbfile, vname, "meshid"))) {
+        meshid = *(int *)v;
+        name = silo_GetObjName(dbfile->cdf, silonetcdf_ncdirget(dbfile->cdf), meshid);
+        strcpy(mname, name);
+        FREE(v);
+    }
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_cdf_InqMeshtype
+ *
+ *  Purpose
+ *
+ *      Inquire the type of the mesh associated with the given mesh
+ *      object.
+ *
+ *  Notes
+ *
+ *      This function will return DB_UCDMESH for an unstructured mesh,
+ *      either DB_COLLINEAR or DB_NONCOLLINEAR for a quad mesh,
+ *      and DB_MULTI for a multi-block mesh.
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Mon Jan 9 07:42:40 PST 1995
+ *      Rewrite for device independence.
+ *
+ *  Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *  Changed FREE to SCFREE to be consistant with allocation.
+ *--------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_InqMeshtype(DBfile *_dbfile, char *meshname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_InqMeshtype";
+    int            type, ncomps, objid;
+    void          *v;
+
+    /*
+     *  Convert ascii name into SILO object id.
+     */
+    if ((objid = silonetcdf_ncobjid(dbfile->cdf, meshname)) < 0) {
+        return db_perror("silonetcdf_ncobjid", E_CALLFAIL, me);
+    }
+    silonetcdf_ncobjinq(dbfile->cdf, objid, NULL, &type, &ncomps);
+
+    switch (type) {
+
+        case DB_UCDMESH:
+        case DB_MULTIMESH:
+            break;
+
+        case DB_QUADMESH:
+
+            /* Read just the coordtype component of the given object */
+            v = DBGetComponent(_dbfile, meshname, "coordtype");
+
+            if (v == NULL) {
+                type = -1;
+            }
+            else {
+                type = *(int *)v;
+                FREE(v);
+            }
+            break;
+
+        default:
+            break;
+    }
+
+    return (type);
+
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_cdf_InqVarExists
+ *
+ *  Purpose
+ *      Check whether the variable exists and return non-zero if so,
+ *      and 0 if not
+ *
+ *  Programmer
+ *      Eric Brugger, Mon Sep 18 14:13:04 PDT 1995
+ *
+ *  Modifications
+ *
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_cdf_InqVarExists(DBfile *_dbfile, char *varname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+
+    /*  If the var id is less than zero the variable doesn't exist. */
+    if (silonetcdf_ncvarid(dbfile->cdf, varname) < 0)
+         return (0);
+    else
+         return (1);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                       db_cdf_GetVarType
+ *
+ *  Purpose
+ *
+ *      Return the datatype of the given variable.
+ *
+ *  Notes
+ *
+ * Modified
+ *
+ *      Robb Matzke Tue Jan 10 17:53:43 EST 1995
+ *      Device independence rewrite.
+ *
+ *--------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_GetVarType(DBfile *_dbfile, char *vname)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_GetVarType";
+    int            varid, datatype, ndims, natts;
+    int            dimids[5];
+
+    datatype = -1;
+
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, vname)) < 0) {
+        return db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+    }
+
+    silonetcdf_ncvarinq(dbfile->cdf, varid, NULL, &datatype, &ndims, dimids, &natts);
+    return (datatype);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_ReadAtt
+ *
+ * Purpose:     Reads the given attribute value into the provided space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:14:11 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_ReadAtt(DBfile *_dbfile, char *vname, char *aname, void *results)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_ReadAtt";
+    int            varid;
+
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, vname)) < 0) {
+        return db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+    }
+
+    if (silonetcdf_ncattget(dbfile->cdf, varid, aname, results) < 0) {
+        return db_perror("silonetcdf_ncattget", E_CALLFAIL, me);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_ReadVar
+ *
+ * Purpose:     Reads a variable into the given space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:19:06 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_ReadVar(DBfile *_dbfile, char *name, void *result)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_ReadVar";
+    int            varid, type, ndims, natts, i, size;
+    int            start[10], count[10], dimids[10];
+
+    if ((varid = silonetcdf_ncvarid(dbfile->cdf, name)) < 0) {
+        return db_perror("silonetcdf_ncvarid", E_CALLFAIL, me);
+    }
+    silonetcdf_ncvarinq(dbfile->cdf, varid, NULL, &type, &ndims, dimids, &natts);
+
+    for (i = 0; i < ndims; i++) {
+        silonetcdf_ncdiminq(dbfile->cdf, dimids[i], NULL, &size);
+        start[i] = 0;
+        count[i] = size;
+    }
+
+    if (silonetcdf_ncvarget(dbfile->cdf, varid, start, count, result) < 0) {
+        return db_perror("silonetcdf_ncvarget", E_CALLFAIL, me);
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_ReadVar1
+ *
+ * Purpose:     Reads one element from a variable into the provided
+ *              space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:24:27 PST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK int
+db_cdf_ReadVar1(DBfile *_dbfile, char *vname, int offset, void *result)
+{
+    char          *me = "db_cdf_ReadVar1";
+
+    return db_perror("mismatched parameters to `silonetcdf_ncvarget1'", E_NOTIMP, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_setdir
+ *
+ * Purpose:     Set the current directory to the given directory name iff
+ *              the database allows it.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:56:36 PST 1995
+ *
+ * Modifications:
+ *
+ *              Jim Reus, 23 Apr 97
+ *              Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_setdir (DBfile_cdf *dbfile, char *dirname)
+{
+    int            dirid, new_dir = -1;
+
+    dirid = silonetcdf_ncdirget(dbfile->cdf);
+
+    /*
+     *  Determine ID of new directory.
+     */
+    if (STR_EQUAL("/", dirname)) {
+
+        /* Get ID of root directory */
+        new_dir = SILO_ROOT_DIR;
+
+    }
+    else if (STR_EQUAL(".", dirname)) {
+
+        /* No-op */
+        new_dir = silonetcdf_ncdirget(dbfile->cdf);
+
+    }
+    else if (STR_EQUAL("..", dirname)) {
+
+        /* Get ID of parent directory */
+        new_dir = silo_GetDirParent(dbfile->cdf, dirid);
+
+    }
+    else {
+
+        /* Get ID of directory with given name */
+        new_dir = silo_GetDirId(dbfile->cdf, dirid, dirname);
+
+    }
+
+    return (silonetcdf_ncdirset(dbfile->cdf, new_dir));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_SetDir
+ *
+ * Purpose:     Change to the specified directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:30:14 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_cdf_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:31:56 EST 1995
+ *    I changed the call db_cdf_GetToc to DBNewToc.
+ *
+ *    Lisa J. Nafziger, Thurs Feb 29, 1996
+ *    Initialized ierr to zero since it was being read in the
+ *    while loop before being set.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_SetDir(DBfile *_dbfile, char *path)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_SetDir";
+    int            orig_dir = dbfile->pub.dirid;
+    int            ierr=0, dirid;
+    char          *subpath=NULL;
+
+    if (STR_EQUAL(path, "/") || STR_EQUAL(path, " ")) {
+        db_setdir(dbfile, "/");
+    }
+    else {
+
+        /*
+         *  Break path into slash-separated tokens, and 'cd'
+         *  into each subpath.
+         */
+
+        if (path[0] == '/')
+            db_setdir(dbfile, "/");
+        subpath = (char *)strtok(path, "/");
+        while (subpath != NULL && !ierr) {
+            if (db_setdir(dbfile, subpath) < 0)
+                ierr = 1;
+            else
+                subpath = (char *)strtok(NULL, "/");
+        }
+    }
+
+    dirid = silonetcdf_ncdirget(dbfile->cdf);
+    if (ierr) {
+        silonetcdf_ncdirset(dbfile->cdf, orig_dir);
+        return db_perror(NULL, E_NOTDIR, me);
+    }
+    else {
+        dbfile->pub.dirid = dirid;
+        DBNewToc(_dbfile);
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_cdf_SetDirID
+ *
+ * Purpose:     Sets the current directory withing the database.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Wed Jan 11 09:39:38 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_cdf_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:32:45 EST 1995
+ *    I changed the call db_cdf_GetToc to DBNewToc.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_cdf_SetDirID(DBfile *_dbfile, int dirid)
+{
+    DBfile_cdf    *dbfile = (DBfile_cdf *) _dbfile;
+    char          *me = "db_cdf_SetDirID";
+
+    if (silonetcdf_ncdirset(dbfile->cdf, dirid) < 0) {
+        return db_perror(NULL, E_NOTDIR, me);
+    }
+
+    /* Update directory ID and TOC */
+    dbfile->pub.dirid = silonetcdf_ncdirget(dbfile->cdf);
+    DBNewToc(_dbfile);
+
+    return 0;
+}
diff --git a/src/netcdf/silo_netcdf_private.h b/src/netcdf/silo_netcdf_private.h
new file mode 100644
index 0000000..2d33922
--- /dev/null
+++ b/src/netcdf/silo_netcdf_private.h
@@ -0,0 +1,343 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef SILO_NETCDF_PRIVATE_H
+#define SILO_NETCDF_PRIVATE_H
+
+
+/*
+ * SILO NetCDF Private header file.
+ *
+ * This header file is included by all silo-netcdf source files and
+ * contains constants and prototypes that should be visible to
+ * the SILO-NetCDF source files, but not to the application.
+ */
+
+#include "pdb.h"
+#include "silo_private.h"
+
+/*
+ * The private version of the DBfile structure is defined here.
+ */
+typedef struct DBfile_cdf {
+    DBfile_pub     pub;
+    int            cdf;
+} DBfile_cdf;
+
+typedef struct {
+    char          *name[80];    /* Component name */
+    void          *ptr[80];     /* Address of component value */
+    int            type[80];    /* Datatype of component */
+    unsigned char  alloced[80]; /* Sentinel: 1 == space already alloc'd */
+    int            num;         /* Number of components defined */
+} SO_Object;
+
+typedef struct {
+    int            relid;       /* Relative ID within directory */
+    int            parent;      /* Directory ID of parent */
+    int            varid;       /* Variable this attribute is associated with */
+    int            type;        /* Attribute data type */
+    int            nels;        /* Number of elements for this attribute */
+    int            lenel;       /* Byte length of each element */
+    char          *iname;       /* Att's internal name within database */
+    char          *name;        /* Name by which entity is known */
+} AttEnt;
+
+typedef struct {
+    int            relid;       /* Relative ID within directory */
+    int            parent;      /* Directory ID of parent */
+    int            type;        /* Variable data type */
+    int            nels;        /* Number of elements for this variable */
+    int            lenel;       /* Byte length of each element */
+    int            ndims;       /* Number of associated dimensions */
+    int           *dimids;      /* List of associated dimension IDs */
+    char          *iname;       /* Var's internal name within database */
+    char          *name;        /* Name by which entity is known */
+} VarEnt;
+
+typedef struct {
+    int            absid;       /* Absolute ID within database */
+    int            parent;      /* Directory ID of parent */
+    char          *name;        /* Name by which entity is known */
+} DirEnt;
+
+typedef struct {
+    int            relid;       /* Relative ID within directory */
+    int            parent;      /* Directory ID of parent */
+    int            type;        /* Object type */
+    int            ncomps;      /* Number of components for this object */
+    int           *compids;     /* List of component ID's */
+    int           *comptypes;   /* List of component types */
+    int           *comppars;    /* List of component parents */
+    char          *compnames;   /* List of delimited component names
+                                 * (delimiter = compnames[0]) */
+    char          *name;        /* Name by which entity is known */
+} ObjEnt;
+
+/*-------------------------------------------------------------------------
+ * Callbacks...
+ *-------------------------------------------------------------------------
+ */
+#ifndef SILO_NO_CALLBACKS
+SILO_CALLBACK int db_cdf_Close(DBfile *);
+SILO_CALLBACK int db_cdf_InqVarExists(DBfile *, char *);
+SILO_CALLBACK int db_cdf_GetDir(DBfile *, char *);
+SILO_CALLBACK void *db_cdf_GetAtt(DBfile *, char *, char *);
+
+SILO_CALLBACK void *db_cdf_GetComponent(DBfile *, char *, char *);
+SILO_CALLBACK DBmaterial *db_cdf_GetMaterial(DBfile *, char *);
+SILO_CALLBACK DBmatspecies *db_cdf_GetMatspecies(DBfile *, char *);
+SILO_CALLBACK DBmultimesh *db_cdf_GetMultimesh(DBfile *, char *);
+SILO_CALLBACK DBpointmesh *db_cdf_GetPointmesh(DBfile *, char *);
+SILO_CALLBACK DBmeshvar *db_cdf_GetPointvar(DBfile *, char *);
+SILO_CALLBACK DBquadmesh *db_cdf_GetQuadmesh(DBfile *, char *);
+SILO_CALLBACK DBquadvar *db_cdf_GetQuadvar(DBfile *, char *);
+SILO_CALLBACK DBucdmesh *db_cdf_GetUcdmesh(DBfile *, char *);
+SILO_CALLBACK DBucdvar *db_cdf_GetUcdvar(DBfile *, char *);
+SILO_CALLBACK void *db_cdf_GetVar(DBfile *, char *);
+SILO_CALLBACK int db_cdf_GetVarByteLength(DBfile *, char *);
+SILO_CALLBACK int db_cdf_GetVarLength(DBfile *, char *);
+SILO_CALLBACK int db_cdf_GetVarType(DBfile *, char *);
+SILO_CALLBACK DBObjectType db_cdf_InqVarType(DBfile *, char *);
+SILO_CALLBACK int db_cdf_InqMeshname(DBfile *, char *, char *);
+SILO_CALLBACK int db_cdf_InqMeshtype(DBfile *, char *);
+SILO_CALLBACK int db_cdf_ReadAtt(DBfile *, char *, char *, void *);
+SILO_CALLBACK int db_cdf_ReadVar(DBfile *, char *, void *);
+SILO_CALLBACK int db_cdf_ReadVar1(DBfile *, char *, int, void *);
+SILO_CALLBACK int db_cdf_SetDir(DBfile *, char *);
+SILO_CALLBACK int db_cdf_SetDirID(DBfile *, int);
+SILO_CALLBACK int db_cdf_Filters(DBfile *, FILE *);
+SILO_CALLBACK int db_cdf_NewToc(DBfile *);
+
+#endif
+
+/*-------------------------------------------------------------------------
+ * Macros...
+ *-------------------------------------------------------------------------
+ */
+#define  SILO_TYPE_NONE         0
+#define  SILO_TYPE_DIR          1
+#define  SILO_TYPE_DIM          2
+#define  SILO_TYPE_ATT          3
+#define  SILO_TYPE_VAR          4
+#define  SILO_TYPE_OBJ          5
+#define  SILO_TYPE_LIT          6
+#define  SILO_TYPE_ARY          7
+
+#if 0
+#define OBJDEF_DECL     static char comp_names[1024], *cdelim=";";      \
+                        static int comp_ids[64], comp_types[64] ;       \
+                        static int comp_pars[64], ncomps
+
+#define CLEAR_COMPONENTS {strcpy(comp_names,cdelim);ncomps=0;}
+#define NUM_COMPONENTS  ncomps
+#define ADD_DIM(n,id)   {if (n != NULL) {                       \
+                         strcat(comp_names, n);                 \
+                         strcat(comp_names, cdelim);            \
+                         comp_pars[ncomps]= dirid;              \
+                         comp_types[ncomps] = SILO_TYPE_DIM;    \
+                         comp_ids[ncomps] = id; ncomps++;}}
+
+#define ADD_DIR(n,id)   {if (n != NULL) {                       \
+                         strcat(comp_names, n);                 \
+                         strcat(comp_names, cdelim);            \
+                         comp_pars[ncomps]= dirid;              \
+                         comp_types[ncomps] = SILO_TYPE_DIR;    \
+                         comp_ids[ncomps] = id; ncomps++;}}
+
+#define ADD_VAR(n,id)   {if (n != NULL) {                       \
+                         strcat(comp_names, n);                 \
+                         strcat(comp_names, cdelim);            \
+                         comp_pars[ncomps]= dirid;              \
+                         comp_types[ncomps] = SILO_TYPE_VAR;    \
+                         comp_ids[ncomps] = id; ncomps++;}}
+
+#define ADD_OBJ(n,id)   {if (n != NULL) {                       \
+                         strcat(comp_names, n);                 \
+                         strcat(comp_names, cdelim);            \
+                         comp_pars[ncomps]= dirid;              \
+                         comp_types[ncomps] = SILO_TYPE_OBJ;    \
+                         comp_ids[ncomps] = id; ncomps++;}}
+
+#define ADD_LIT(n,id)   {if (n != NULL) {                       \
+                         strcat(comp_names, n);                 \
+                         strcat(comp_names, cdelim);            \
+                         comp_pars[ncomps]= dirid;              \
+                         comp_types[ncomps] = SILO_TYPE_LIT;    \
+                         comp_ids[ncomps] = id; ncomps++;}}
+#endif
+
+#define MAX_SILO        32             /*Max number of open files */
+#define HEADER_SIZE     32
+#define SILO_ERROR      64
+#define SILO_DEBUG      65
+#define SILO_ROOT_DIR   0
+#define HEADER_NAME     "_silo_header"
+#define TYPES_NAME      "_silo_types"
+#define PARS_NAME       "_silo_parents"
+#define NAMES_NAME      "_silo_names"
+#define DIRENT_NAME     "_silo_dirents"
+#define DIMENT_NAME     "_silo_diments"
+#define ATTENT_NAME     "_silo_attents"
+#define VARENT_NAME     "_silo_varents"
+#define OBJENT_NAME     "_silo_objents"
+#define WHATAMI_NAME    "_whatami"
+#define bad_index_msg   "Bad SILO index"
+#define bad_name_msg    "Invalid file or variable name"
+#define bad_ptr_msg     "Attempted to use NULL pointer"
+#define bad_type_msg    "Wrong entity type"
+#define INIT_OBJ(A)     {_to=(A);_to->num=0;}
+#define DEFINE_OBJ(NM,PP,TYP) DEF_OBJ(NM,PP,TYP,1)
+#define DEFALL_OBJ(NM,PP,TYP) DEF_OBJ(NM,PP,TYP,0)
+#define DEF_OBJ(NM,PP,TYP,AL) {                                         \
+                         _to->name[_to->num]=(NM);                      \
+                         _to->ptr[_to->num]=(void*)(PP);                \
+                         _to->type[_to->num]=(TYP);                     \
+                         _to->alloced[_to->num]=(AL);                   \
+                         _to->num++;}
+#define ASSERT_DBID(ID,RET)                                             \
+                        if ((silo_GetIndex(ID)<0)) {                    \
+                           silo_Error (bad_index_msg, SILO_ERROR) ;     \
+                           return (RET);}
+#define ASSERT_NAME(NM,RET)                                             \
+                        if (!(NM) || !*(NM)) {                          \
+                           silo_Error (bad_name_msg, SILO_ERROR) ;      \
+                           return (RET);}
+#define ASSERT_PTR(P,RET)                                               \
+                        if (!(P)) {                                     \
+                           silo_Error (bad_ptr_msg, SILO_ERROR) ;       \
+                           return (RET);}
+#define ASSERT_OBJ(ID,OBJ,RET)                                          \
+                        if (!silo_GetObjEnt(ID,silonetcdf_ncdirget(ID),OBJ)) {     \
+                           silo_Error (bad_type_msg, SILO_ERROR) ;      \
+                           return (RET);}
+#define ASSERT_DIR(ID,DIR,RET)                                          \
+                        if (!silo_GetDirEnt(ID,DIR)) {                  \
+                           silo_Error (bad_type_msg, SILO_ERROR) ;      \
+                           return (RET);}
+#define ASSERT_VAR(ID,VAR,RET)                                          \
+                        if (!silo_GetVarEnt(ID,silonetcdf_ncdirget(ID),VAR)) {     \
+                           silo_Error (bad_type_msg, SILO_ERROR) ;      \
+                           return (RET);}
+
+/*-------------------------------------------------------------------------
+ * Private functions...
+ *-------------------------------------------------------------------------
+ */
+#include "table.h"
+
+/*netcdf.c */
+extern int silo_Attach(PDBfile *);
+extern void silo_Error(char *,int);
+extern int silo_GetDataSize(int, int);
+extern int silo_GetVarSize(int, int, int *, int *);
+extern void silo_Init(void);
+extern int silo_Release(int);
+extern int silo_GetIndex(int);
+extern int silo_Read(int, char *, void *);
+extern int silo_GetDimSize(int, int);
+extern int silo_GetMachDataSize(int);
+extern void silo_GetHypercube(void*, void*, int[], int, int[], int[], int);
+extern void silo_PutHypercube(void*, void*, int[], int, int[], int[], int);
+extern int silo_GetIndex1(int *, int *, int);
+extern int silo_Verify(PDBfile *);
+
+/*api.c */
+extern int silonetcdf_ncopen(char *, int);
+extern int silonetcdf_ncinqall(int, int *, int *, int *, int *, int *, int *);
+extern int silonetcdf_ncobjinq(int, int, char *, int *, int *);
+extern int silonetcdf_ncdirlist(int, int, int *, int *);
+extern int silonetcdf_ncvarid(int, char *);
+extern int silonetcdf_ncattinq(int, int, char *, int *, int *);
+extern int silonetcdf_ncobjid(int, char *);
+extern int silonetcdf_ncattget(int, int, char *, void *);
+extern int silonetcdf_ncdirget(int);
+extern int silonetcdf_ncclose(int);
+extern int silonetcdf_ncvarinq(int, int, char *, int *, int *, int *, int *);
+extern int silonetcdf_ncobjget(int, int, char *, int *, int *, int *);
+extern int silonetcdf_ncdirset(int, int);
+extern int silonetcdf_ncdiminq(int, int, char *, int *);
+extern int silonetcdf_ncvarget1(int, int, int *, void *);
+extern int silonetcdf_ncvarget(int, int, int *, int *, void *);
+
+/*ent.c */
+extern int silo_GetDirParent(int, int);
+extern char   *silo_GetDirName(int, int);
+extern char   *silo_GetVarName(int, int, int);
+extern char   *silo_GetObjName(int, int, int);
+extern VarEnt *silo_GetVarEnt(int, int, int);
+extern AttEnt *silo_GetAttEnt(int, int, int, char *);
+extern ObjEnt *silo_GetObjEnt(int, int, int);
+extern DimEnt *silo_GetDimEnt(int, int, int);
+extern DirEnt *silo_GetDirEnt(int, int);
+extern int silo_GetAttCount(int, int, int);
+extern int silo_GetDimCount(int, int);
+extern int silo_GetDirCount(int, int);
+extern int silo_GetDirId(int, int, char *);
+extern int silo_GetObjCount(int, int);
+extern int silo_GetObjId(int, int, char *);
+extern int silo_GetTables(int);
+extern int silo_GetVarCount(int, int);
+extern int silo_GetVarId(int, int, char *);
+
+/*obj.c */
+extern int SO_GetObject(int, int, SO_Object *);
+extern int SO_ForceSingle(int);
+extern int SO_ReadComponent(int, int, int, int, int, void *);
+extern void   *SO_GetComponent(int, int, int, int);
+
+/*table.c */
+extern int silo_MakeTables(int);
+extern int silo_ClearTables(int);
+
+#endif /* !SILO_NETCDF_PRIVATE_H */
diff --git a/src/netcdf/table.c b/src/netcdf/table.c
new file mode 100644
index 0000000..73a73d7
--- /dev/null
+++ b/src/netcdf/table.c
@@ -0,0 +1,227 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#define SILO_NO_CALLBACKS
+#include "silo_netcdf_private.h"
+#include "table.h"
+
+DirTable      *dirTable[MAX_SILO];
+DimTable      *dimTable[MAX_SILO];
+AttTable      *attTable[MAX_SILO];
+VarTable      *varTable[MAX_SILO];
+ObjTable      *objTable[MAX_SILO];
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                    table.c
+
+  Purpose
+
+        Handle all activities required to manipulate entity tables.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Description
+
+        Each type of entity supported by SILO has a table associated
+        with it which contains all pertinent information about it.
+        This simplifies bookkeeping and inquiries.
+
+  Contents
+
+        Table Manipulation Functions
+                silo_InitTables
+                silo_MakeTables
+                silo_AllocTable
+                silo_ExtendTable
+                silo_InqTable
+
+        Table Output Functions
+                silo_DumpAttTable
+                silo_DumpDimTable
+                silo_DumpDirTable
+                silo_DumpVarTable
+                silo_DumpObjTable
+
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*--------------------------------------------------------------------
+ *  Routine                                             silo_MakeTables
+ *
+ *  Purpose
+ *
+ *      Allocate space for each of the entity tables.
+ *
+ *  Notes
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_MakeTables(int dbid)
+{
+
+    if (dirTable[dbid] == NULL)
+        dirTable[dbid] = ALLOC(DirTable);
+    if (dimTable[dbid] == NULL)
+        dimTable[dbid] = ALLOC(DimTable);
+    if (attTable[dbid] == NULL)
+        attTable[dbid] = ALLOC(AttTable);
+    if (varTable[dbid] == NULL)
+        varTable[dbid] = ALLOC(VarTable);
+    if (objTable[dbid] == NULL)
+        objTable[dbid] = ALLOC(ObjTable);
+
+    return (OKAY);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                           silo_ClearTables
+ *
+ *  Purpose
+ *
+ *      Clear the contents of each table associated with the given
+ *      dbid.
+ *
+ *  Notes
+ *
+ *  Modified
+ *      Robb Matzke, Wed Jan 11 08:33:12 PST 1995
+ *      Removed the call to silo_AddDir since this is a read-only driver.
+ *
+ *      Eric Brugger, Wed Mar 15 09:18:44 PST 1995
+ *      I replace the calls to FREE with calls to SFREE, since all
+ *      the variables being freed came from pdb.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+silo_ClearTables(int dbid)
+{
+    int            i;
+
+    if (dbid >= MAX_SILO)
+        return (OOPS);
+
+     /*-----------------------------------------------------------------
+      *  Release storage in entity tables associated with this dbid.
+      *----------------------------------------------------------------*/
+    for (i = 0; i < dirTable[dbid]->num_alloced; i++) {
+        if (dirTable[dbid]->ent[i] != NULL) {
+            SFREE(dirTable[dbid]->ent[i]->name);
+            SFREE(dirTable[dbid]->ent[i]);
+        }
+    }
+    SFREE(dirTable[dbid]->ent);
+    dirTable[dbid]->ent = NULL;
+    dirTable[dbid]->num_used = 0;
+    dirTable[dbid]->num_alloced = 0;
+
+    for (i = 0; i < dimTable[dbid]->num_alloced; i++) {
+        if (dimTable[dbid]->ent[i] != NULL) {
+            SFREE(dimTable[dbid]->ent[i]->name);
+            SFREE(dimTable[dbid]->ent[i]);
+        }
+    }
+    SFREE(dimTable[dbid]->ent);
+    dimTable[dbid]->ent = NULL;
+    dimTable[dbid]->num_used = 0;
+    dimTable[dbid]->num_alloced = 0;
+
+    for (i = 0; i < objTable[dbid]->num_alloced; i++) {
+        if (objTable[dbid]->ent[i] != NULL) {
+            SFREE(objTable[dbid]->ent[i]->compids);
+            SFREE(objTable[dbid]->ent[i]->comptypes);
+            SFREE(objTable[dbid]->ent[i]->comppars);
+            SFREE(objTable[dbid]->ent[i]->compnames);
+            SFREE(objTable[dbid]->ent[i]->name);
+            SFREE(objTable[dbid]->ent[i]);
+        }
+    }
+    SFREE(objTable[dbid]->ent);
+    objTable[dbid]->ent = NULL;
+    objTable[dbid]->num_used = 0;
+    objTable[dbid]->num_alloced = 0;
+
+    for (i = 0; i < attTable[dbid]->num_alloced; i++) {
+        if (attTable[dbid]->ent[i] != NULL) {
+            SFREE(attTable[dbid]->ent[i]->name);
+            SFREE(attTable[dbid]->ent[i]->iname);
+            SFREE(attTable[dbid]->ent[i]);
+        }
+    }
+    SFREE(attTable[dbid]->ent);
+    attTable[dbid]->ent = NULL;
+    attTable[dbid]->num_used = 0;
+    attTable[dbid]->num_alloced = 0;
+
+    for (i = 0; i < varTable[dbid]->num_alloced; i++) {
+        if (varTable[dbid]->ent[i] != NULL) {
+            SFREE(varTable[dbid]->ent[i]->name);
+            SFREE(varTable[dbid]->ent[i]->iname);
+            SFREE(varTable[dbid]->ent[i]->dimids);
+            SFREE(varTable[dbid]->ent[i]);
+        }
+    }
+    SFREE(varTable[dbid]->ent);
+    varTable[dbid]->ent = NULL;
+    varTable[dbid]->num_used = 0;
+    varTable[dbid]->num_alloced = 0;
+
+    return (OKAY);
+}
diff --git a/src/netcdf/table.h b/src/netcdf/table.h
new file mode 100644
index 0000000..e6da6c5
--- /dev/null
+++ b/src/netcdf/table.h
@@ -0,0 +1,138 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef TABLE_H
+#define TABLE_H
+
+
+/*==================================================
+ *
+ * Data Structure Definitions
+ *
+ *==================================================
+ *                      W A R N I N G
+ *
+ *  If any of these data structures are changed,
+ *  they must also be changed in the lite_PD_defstr
+ *  invocations in silo_Setup.
+ *
+ *                      W A R N I N G
+ *==================================================*/
+
+typedef struct {
+    int            relid;       /* Relative ID within directory */
+    int            parent;      /* Directory ID of parent */
+    int            size;        /* Dimension size */
+    char          *name;        /* Name by which entity is known */
+} DimEnt;
+
+/*==================================================
+ * Table declarations.
+ *==================================================*/
+
+typedef struct {
+    DirEnt       **ent;
+    int            num_alloced;
+    int            num_used;
+} DirTable;
+
+typedef struct {
+    DimEnt       **ent;
+    int            num_alloced;
+    int            num_used;
+} DimTable;
+
+typedef struct {
+    AttEnt       **ent;
+    int            num_alloced;
+    int            num_used;
+} AttTable;
+
+typedef struct {
+    VarEnt       **ent;
+    int            num_alloced;
+    int            num_used;
+} VarTable;
+
+typedef struct {
+    ObjEnt       **ent;
+    int            num_alloced;
+    int            num_used;
+} ObjTable;
+
+typedef struct {
+    void         **ent;
+    int            num_alloced;
+    int            num_used;
+} Table;
+
+/*
+ *  Structure containing list of active DB's, as well as the association
+ *   between PDB and SILO Id's. For internal use only.
+ */
+
+typedef struct {
+    int            dbid;        /* Database identifier */
+    int            modified;    /* Sentinel indicating file was modified */
+    PDBfile       *pdbfile;     /* PDB file pointer */
+    int            curr_dir;    /* Current active directory in SILO */
+} SILOTable;
+
+extern DirTable *dirTable[MAX_SILO];
+extern DimTable *dimTable[MAX_SILO];
+extern AttTable *attTable[MAX_SILO];
+extern VarTable *varTable[MAX_SILO];
+extern ObjTable *objTable[MAX_SILO];
+extern SILOTable silo_table[MAX_SILO];
+
+#endif /* TABLE_H */
diff --git a/src/pdb/Makefile.am b/src/pdb/Makefile.am
new file mode 100644
index 0000000..f13bd9f
--- /dev/null
+++ b/src/pdb/Makefile.am
@@ -0,0 +1,89 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_pdb.la
+libsilo_pdb_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(srcdir)/../score
+
+EXTRA_DIST = \
+ detect.c
+
+noinst_HEADERS = \
+ pdb.h
+nodist_noinst_HEADERS = \
+ pdform.h
+FILES = \
+ pdb.c \
+ pdbdir.c \
+ pdbio.c \
+ pdbmm.c \
+ pdbx.c \
+ pdconv.c \
+ pdlow.c \
+ pdmemb.c \
+ pdpath.c \
+ pdrdwr.c
+
+BUILT_SOURCES = detect pdform.h
+CLEANFILES = detect pdform.h
+pdform.h: detect
+	@echo "/*" > $@
+	- at echo " * Generated by $(USER)@`hostname` on `date`" >>$@
+	- at echo " * for `uname -a`" >>$@
+	@echo " */" >> $@
+	./detect >> $@
+
+detect: detect.o
+	$(CC) $(CFLAGS) -o $@ detect.o
diff --git a/src/pdb/Makefile.in b/src/pdb/Makefile.in
new file mode 100644
index 0000000..32a6f15
--- /dev/null
+++ b/src/pdb/Makefile.in
@@ -0,0 +1,591 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/pdb
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_pdb_la_LIBADD =
+am__objects_1 = pdb.lo pdbdir.lo pdbio.lo pdbmm.lo pdbx.lo pdconv.lo \
+	pdlow.lo pdmemb.lo pdpath.lo pdrdwr.lo
+am_libsilo_pdb_la_OBJECTS = $(am__objects_1)
+libsilo_pdb_la_OBJECTS = $(am_libsilo_pdb_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_pdb_la_SOURCES)
+DIST_SOURCES = $(libsilo_pdb_la_SOURCES)
+HEADERS = $(nodist_noinst_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_pdb.la
+libsilo_pdb_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(srcdir)/../score
+EXTRA_DIST = \
+ detect.c
+
+noinst_HEADERS = \
+ pdb.h
+
+nodist_noinst_HEADERS = \
+ pdform.h
+
+FILES = \
+ pdb.c \
+ pdbdir.c \
+ pdbio.c \
+ pdbmm.c \
+ pdbx.c \
+ pdconv.c \
+ pdlow.c \
+ pdmemb.c \
+ pdpath.c \
+ pdrdwr.c
+
+BUILT_SOURCES = detect pdform.h
+CLEANFILES = detect pdform.h
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/pdb/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/pdb/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_pdb.la: $(libsilo_pdb_la_OBJECTS) $(libsilo_pdb_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_pdb_la_OBJECTS) $(libsilo_pdb_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdbdir.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdbio.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdbmm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdbx.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdconv.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdlow.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdmemb.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdpath.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pdrdwr.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+pdform.h: detect
+	@echo "/*" > $@
+	- at echo " * Generated by $(USER)@`hostname` on `date`" >>$@
+	- at echo " * for `uname -a`" >>$@
+	@echo " */" >> $@
+	./detect >> $@
+
+detect: detect.o
+	$(CC) $(CFLAGS) -o $@ detect.o
+# 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/src/pdb/detect.c b/src/pdb/detect.c
new file mode 100644
index 0000000..ae43eb8
--- /dev/null
+++ b/src/pdb/detect.c
@@ -0,0 +1,509 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * DETECT.C - decipher the basic C binary data formats
+ *          - adapted and completed from the Dave Munro original
+ *          - this is constructed to be absolutely vanilla C and
+ *          - should compile correctly with ANSI, PCC, and many Joe's
+ *          - compilers
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ */
+
+#include "config.h"
+#include <stdio.h>
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* DIFFER_BYTE - find the location of the differing byte */
+
+int differ_byte( int n, int k, int *fb, unsigned char *a, unsigned char *b)
+{int i;
+
+fb[k] = 0;
+
+for (i = 0; i < n; i++)
+   {if (a[i] != b[i])
+      {fb[k] = i + 1;
+      break;};};
+
+return(i);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* FIX_ORDER - determine the byte order assuming that the mantissa byte
+ *           - pattern implies the entire ordering
+ */
+
+int fix_order ( int n, int *fb, int first, int last )
+{int i;
+static int ordering = -1;
+
+if ((ordering == -1) && (last > first + 1))
+
+/* left to right or normal ordering */
+   {if ((fb[last] > fb[last-1]) && (fb[last-1] > fb[last-2]))
+      ordering = 0;
+
+/* right to left or reverse ordering (INTEL) */
+   else if ((fb[last] < fb[last-1]) && (fb[last-1] < fb[last-2]))
+      ordering = 1;
+
+/* middle endian machine (VAX) */
+   else
+      ordering = 2;};
+
+switch (ordering)
+
+/* left to right or normal ordering */
+   {case 0 :
+      for (i = 0; i < n; i++)
+	 fb[i] = i + 1;
+   break;
+
+/* right to left or reverse ordering (INTEL) */
+   case 1 :
+      for (i = 0; i < n; i++)
+	 fb[i] = n - i;
+      break;
+
+/* middle endian machine (VAX)
+ * NOTE: this assumes that only the VAX does this!
+ */
+   case 2 :
+      for (i = 0; i < n; i += 2)
+	 {fb[i]   = n + 2;
+	 fb[i+1] = n + 1;};
+      break;};
+
+return(1);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* GUARD_BIT - check for the existence of a mantissa guard bit */
+
+int guard_bit ( int n, int k, int *fb, long *ff, unsigned char *a
+              , unsigned char *b
+              )
+{int i, j, l;
+unsigned char byt, nxt;
+
+ff[k] = 0L;
+
+/* xor the two arrays - they should differ by one bit */
+for (i = 0; i < n; i++)
+   {l   = fb[i] - 1;
+   byt = a[l] ^ b[l];
+   if (byt == 1)
+      {if (b[l+1])
+	 {ff[k] = 1L;
+	 return(1);};}
+
+   else if (byt != 0)
+
+/* find the location of the bit */
+      for (j = 0; j < 8; j++)
+	 {if (byt == 0x80)
+
+/* if the next bit of the second one is on there is a guard bit */
+	    {nxt = b[l] << (j+1);
+	    if (nxt)
+	       {ff[k] = 1L;
+	       return(1);};};
+
+	 byt <<= 1;};};
+
+return(0);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* DIFFER_BIT - find the location of the differing bit */
+
+int differ_bit ( int n, int k, int *fb, long *ff, unsigned char *a
+               , unsigned char *b
+               )
+{unsigned char byt;
+int i, j, l;
+
+for (i = 0; i < n; i++)
+   {l = fb[i] - 1;
+   if (a[l] != b[l])
+      {byt   = a[l] ^ b[l];
+      for (j = 0; j < 8; j++)
+	 {if (byt == 0x80)
+	    {ff[k] = j + i*8;
+	    break;};
+	 byt <<= 1;};};};
+
+return(1);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* FIND_EXP - find the exponent bias */
+
+int find_exp ( int *fb, long *ff, unsigned char *a )
+{int i, l, nbits, sbyte, ebyte;
+long exp;
+
+sbyte = ff[4]/8;
+ebyte = ff[5]/8;
+exp   = 0L;
+for (i = sbyte; i <= ebyte; i++)
+   {l = fb[i] - 1;
+   exp <<= 8;
+   exp |= a[l];};
+
+nbits = (ebyte + 1)*8 - ff[5];
+exp >>= nbits;
+
+ff[7] = exp;
+
+return(1);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* DERIVE_FP_FORMAT - figure out the floating point format */
+
+int derive_fp_format ( int *fb, int *db, long *ff, long *df )
+{int j, szf, szd, first, last;
+union ucf {unsigned char c[32]; float f[2];} bofa, bofb, bofc;
+union ucd {unsigned char c[32]; double d[2];} boda, bodb, bodc;
+float fval, dfv;
+double dval, ddv;
+
+szd = sizeof(double);
+szf = sizeof(float);
+
+df[0] = szd*8;
+ff[0] = szf*8;
+
+/* get the byte ordering from the double mantissa bytes */
+dval  = 0.0;
+ddv   = 1.0;
+first = -1;
+for (j = 1; j < szd; j++)
+   {bodb.d[0] = dval;
+
+   dval += ddv;
+   ddv  /= 256.0;
+   boda.d[0] = dval;
+
+   if (j > 1)
+      {if (differ_byte(szd, j, db, bodb.c, boda.c) < szd)
+	 last = j;
+      if (first == -1)
+	 first = last;};};
+
+fix_order(szd, db, first, last);
+
+/* get the byte ordering from the float mantissa bytes */
+fval  = 0.0;
+dfv   = 1.0;
+first = -1;
+for (j = 1; j < szf; j++)
+   {bofb.f[0] = fval;
+
+   fval += dfv;
+   dfv  /= 256.0;
+   bofa.f[0] = fval;
+
+   if (j > 1)
+      {if (differ_byte(szf, j, fb, bofb.c, bofa.c) < szf)
+	 last = j;
+      if (first == -1)
+	 first = last;};};
+
+fix_order(szf, fb, first, last);
+
+/* find the mantissa guard bit for existence */
+boda.d[0] = 0.5;
+bodb.d[0] = 1.0;
+guard_bit(szd, 6, db, df, boda.c, bodb.c);
+
+bofa.f[0] = 0.5;
+bofb.f[0] = 1.0;
+guard_bit(szf, 6, fb, ff, bofa.c, bofb.c);
+
+/* find the sign bit */
+boda.d[0] = -1.0;
+bodb.d[0] = 1.0;
+differ_bit(szd, 3, db, df, boda.c, bodb.c);
+
+bofa.f[0] = -1.0;
+bofb.f[0] = 1.0;
+differ_bit(szf, 3, fb, ff, bofa.c, bofb.c);
+
+df[4] = df[3] + 1;
+ff[4] = ff[3] + 1;
+
+bodc.d[0] = 1.5;
+differ_bit(szd, 5, db, df, bodc.c, bodb.c);
+
+bofc.f[0] = 1.5;
+differ_bit(szf, 5, fb, ff, bofc.c, bofb.c);
+
+/* adjust loc(mantissa) */
+df[5] -= df[6];
+ff[5] -= ff[6];
+
+/* #exponent_bits = loc(mantissa) - loc(exponent) */
+df[1] = df[5] - df[4];
+ff[1] = ff[5] - ff[4];
+
+/* #mantissa_bits = #bits - #exponent_bits - 1 */
+df[2] = df[0] - df[1] - 1;
+ff[2] = ff[0] - ff[1] - 1;
+
+find_exp(db, df, bodb.c);
+find_exp(fb, ff, bofb.c);
+
+/* adjust exponent */
+df[7] -= df[6];
+ff[7] -= ff[6];
+
+return(0);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* MAIN - start here */
+
+int main()
+{int size[9], align[9], ssize[9], i;
+char int_order[80];
+int fb[40], db[40];
+long ff[8], df[8];
+
+/* these structs will help determine alignment of the primitive types */
+struct cchar {
+   char c;
+   char x;
+} cc;
+
+struct cptr {
+   char c;
+   char *x;
+} cp;
+
+struct cshort {
+   char c;
+   short x;
+} cs;
+
+struct cint {
+   char c;
+   int x;
+} ci;
+
+struct clong {
+   char c;
+   long x;
+} cl;
+
+struct cllong {
+   char c;
+   long long x;
+} cll;
+
+struct cfloat {
+   char c;
+   float x;
+} cf;
+
+struct cdouble {
+   char c;
+   double x;
+} cd;
+
+/*
+ * Some machines have an additional alignment for structs.
+ * This struct will test for such a "feature".
+ */
+struct cstruct {
+   struct LevOne {
+      char one;
+   } a;
+   struct LevTwo {
+      char two;
+   } b;
+} ct;
+
+/*
+ * This union will be used to determine the integer types
+ * parameters especially the byte order.
+ */
+union ucsil {
+   unsigned char c[32];
+   short s[2];
+   int i[2];
+   long l[2];
+} bo;
+
+/*
+ * Data type sizes are straightforward.
+ */
+size[0] = sizeof(char);
+size[1] = sizeof(char *);
+size[2] = sizeof(short);
+size[3] = sizeof(int);
+size[4] = sizeof(long);
+size[5] = sizeof(long long);
+size[6] = sizeof(float);
+size[7] = sizeof(double);
+size[8] = 2*sizeof(char);
+
+ssize[0] = sizeof(cc);
+ssize[1] = sizeof(cp);
+ssize[2] = sizeof(cs);
+ssize[3] = sizeof(ci);
+ssize[4] = sizeof(cl);
+ssize[5] = sizeof(cll);
+ssize[6] = sizeof(cf);
+ssize[7] = sizeof(cd);
+ssize[8] = sizeof(ct);
+
+printf ("/* THIS FILE IS GENERATED BY `detect' -- DO NOT EDIT */\n") ;
+printf ("#ifndef _PDFORM_H\n") ;
+printf ("#define _PDFORM_H\n") ;
+
+/* first possibility: align <= size (usual case)
+ * alignment is difference between struct length and member size:
+ */
+for (i = 0; i < 9; i++)
+   align[i] = ssize[i] - size[i];
+
+/* second possibility: align > size (e.g. Cray char)
+ * alignment is half of structure size:
+ */
+for (i = 0; i < 9; i++)
+   if (align[i] > (ssize[i] >> 1))
+      align[i] = ssize[i] >> 1;
+
+bo.i[0] = 1;
+if (bo.c[0] == 1)
+   strcpy(int_order, "REVERSE_ORDER");
+else
+   strcpy(int_order, "NORMAL_ORDER");
+
+derive_fp_format(fb, db, ff, df);
+
+/* print the floating point ordering info */
+printf("\nint\n");
+printf(" lite_int_ord_f[] = {%d", fb[0]);
+for (i = 1; i < size[6]; i++)
+   printf(", %d", fb[i]);
+printf("}, \n");
+printf(" lite_int_ord_d[] = {%d", db[0]);
+for (i = 1; i < size[7]; i++)
+   printf(", %d", db[i]);
+printf("};\n");
+
+/* print the floating point format info */
+printf("\nlong\n");
+printf(" lite_int_frm_f[] = {");
+for (i = 0; i < 7; i++)
+   printf("%2ldL, ", ff[i]);
+printf("0x%lXL}, \n", ff[7]);
+printf(" lite_int_frm_d[] = {");
+for (i = 0; i < 7; i++)
+   printf("%2ldL, ", df[i]);
+printf("0x%lXL};\n", df[7]);
+
+printf("\n/* Internal DATA_STANDARD */\n");
+printf("data_standard\n");
+printf(" lite_INT_STD = {%d, /* size of pointer */\n", 
+       size[1]);
+printf("            %d, %s, /* size and order of short */\n", 
+       size[2], int_order);
+printf("            %d, %s, /* size and order of int */\n", 
+       size[3], int_order);
+printf("            %d, %s, /* size and order of long */\n", 
+       size[4], int_order);
+printf("            %d, %s, /* size and order of long long */\n", 
+       size[5], int_order);
+printf("            %d, lite_int_frm_f, lite_int_ord_f, /* float definition */\n", size[6]);
+printf("            %d, lite_int_frm_d, lite_int_ord_d}, /* double definition */\n", size[7]);
+printf(" *lite_INT_STANDARD = &lite_INT_STD;\n");
+
+printf("\n/* Internal DATA_ALIGNMENT */\n");
+printf("data_alignment\n");
+printf(" lite_INT_ALG = {%d, %d, %d, %d, %d, %d, %d, %d, %d},\n", 
+       align[0], align[1], align[2], align[3], 
+       align[4], align[5], align[6], align[7], align[8]);
+printf(" *lite_INT_ALIGNMENT = &lite_INT_ALG;\n");
+
+printf ("\n") ;
+printf ("#endif /* !_PDFORM_H */\n") ;
+return(0);}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
diff --git a/src/pdb/pdb.c b/src/pdb/pdb.c
new file mode 100644
index 0000000..3037913
--- /dev/null
+++ b/src/pdb/pdb.c
@@ -0,0 +1,1761 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDB.C - Portable Data Base Library
+ *       - a collection of file manipulation routines with the following
+ *       - aims:
+ *       -      (1) Portable, therefore written in C
+ *       -      (2) Machine Independent, carries information about objects
+ *       -          in the file so that the implementation can extract
+ *       -          the data even if on a wholely different machine type
+ *       -      (3) Simplicity, for ease of implementation and so that
+ *       -          linkable modules in another language can use these
+ *       -          routines
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+
+#include "config.h" /* For a possible redefinition of setjmp/longjmp. */
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#if !defined(_WIN32)
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+#include <assert.h>
+#include "pdb.h"
+
+
+/*
+ * PDB header token to uniquely identify as PDB file.
+ */
+#define HeadTok              "!<<PDB:II>>!"
+#define OldHeadTok           "!<><PDB><>!"
+#define PDB_ATTRIBUTE_TABLE  "!pdb_att_tab!"
+
+#define PAD_SIZE ((size_t) 128)
+
+jmp_buf		_lite_PD_open_err ;
+jmp_buf		_lite_PD_print_err;
+jmp_buf		_lite_PD_read_err ;
+jmp_buf		_lite_PD_trace_err ;
+jmp_buf		_lite_PD_close_err ;
+jmp_buf		_lite_PD_write_err ;
+jmp_buf		_lite_PD_create_err ;
+char		lite_PD_err[MAXLINE];
+int		lite_PD_buffer_size = -1;
+ReaderFuncType	lite_pdb_rd_hook = NULL;
+WriterFuncType	lite_pdb_wr_hook = NULL;
+
+#ifdef PDB_WRITE
+static int	_append_flag = FALSE ;
+data_standard	*lite_REQ_STANDARD = NULL;
+data_alignment	*lite_REQ_ALIGNMENT = NULL;
+static syment *	_PD_write (PDBfile*,char*,char*,char*,byte*,dimdes*,int);
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_close
+ *
+ * Purpose:	Close a PDB file.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from the PACT PDB library
+ *		Mar  4, 1996 10:46 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_close(PDBfile *file) {
+   FILE		*fp;
+   int		ret = TRUE ;
+
+   switch (setjmp(_lite_PD_close_err)) {
+   case ABORT:
+      return(FALSE);
+   case ERR_FREE:
+      return(TRUE);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   fp  = file->stream;
+
+   /*
+    * Position the file pointer at the greater of the current position and
+    * the location of the chart.
+    */
+#ifdef PDB_WRITE
+   if (PD_CREATE==file->mode || PD_APPEND==file->mode) {
+      ret = lite_PD_flush (file) ;
+   }
+#endif
+   if (io_close(fp) != 0) {
+      lite_PD_error("CAN'T CLOSE FILE - PD_CLOSE", PD_CLOSE);
+   }
+
+   /*
+    * Free the space
+    */
+   _lite_PD_rl_pdb(file);
+   return ret ;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_defncv
+ *
+ * Purpose:	Define a new primitive type that will be format converted.
+ *		Do it in both charts.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:42 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+defstr *
+lite_PD_defncv (PDBfile *file, char *name, long bytespitem, int align) {
+
+   defstr *dp;
+
+   dp = _lite_PD_mk_defstr(name, NULL, bytespitem, align, -1, FALSE,
+			   NULL, NULL);
+   if (dp == NULL) {
+      sprintf(lite_PD_err, "ERROR: DEFINITION FAILED - PD_DEFNCV\n");
+   } else {
+      _lite_PD_d_install(name, dp, file->chart);
+
+      /*
+       * Install an independent copy in the host chart - garbage collection!
+       */
+      dp = _lite_PD_mk_defstr(name, NULL, bytespitem, align, -1,
+			      -1, NULL, NULL);
+      _lite_PD_d_install(name, dp, file->host_chart);
+   }
+
+   return(dp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_error
+ *
+ * Purpose:	Signal an error.  
+ *
+ * Return:	__NORETURN void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:44 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+lite_PD_error(char *s, int n) {
+
+   if (lite_PD_err[0] == '\0') sprintf(lite_PD_err, "ERROR: %s\n", s);
+   switch (n) {
+   case PD_OPEN:
+      longjmp(_lite_PD_open_err, ABORT);
+   case PD_TRACE:
+      longjmp(_lite_PD_trace_err, ABORT);   
+   case PD_CLOSE:
+      longjmp(_lite_PD_close_err, ABORT);   
+   case PD_READ:
+      longjmp(_lite_PD_read_err, ABORT);   
+   case PD_PRINT:
+      longjmp(_lite_PD_print_err, ABORT);
+   case PD_WRITE:
+      longjmp(_lite_PD_write_err, ABORT);
+   case PD_CREATE:
+      longjmp(_lite_PD_create_err, ABORT);
+   default:
+      abort() ;
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_open
+ *
+ * Purpose:	Open an existing PDB file, extract the symbol table and
+ *		structure chart.
+ *
+ * Return:	Success:	Ptr to the PDB file structure
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from the PACT PDB library
+ *		Mar  4, 1996 10:26 AM EST
+ *
+ * Modifications:
+ *
+ * 	Robb Matzke, 4 Mar 1996
+ *	Fixed indentation.  Files can only be opened with mode `r'.
+ *
+ * 	Robb Matzke, 17 Apr 1996
+ *	Added write capability back into the function, but it is protected
+ *	with #ifdef PDB_WRITE.
+ *
+ *-------------------------------------------------------------------------
+ */
+PDBfile *
+lite_PD_open (char *name, char *mode) {
+
+   char		str[MAXLINE], *token;
+   PDBfile 	*file=NULL;
+   static FILE 	*fp;
+   syment 	*ep;
+
+#ifdef PDB_WRITE
+   /*
+    * If opened in write mode use PD_CREATE instead.
+    */
+   if (*mode == 'w') return lite_PD_create (name);
+#else
+   assert (!strcmp(mode,"r")) ;
+#endif
+
+   switch (setjmp(_lite_PD_open_err)) {
+   case ABORT:
+      io_close(fp);
+      return(NULL);
+   case ERR_FREE:
+      return(file);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * Open the file
+    */
+   strcpy(str, name);
+
+#ifdef PDB_WRITE
+   fp = io_open(str, BINARY_MODE_RPLUS);
+   if (fp == NULL) {
+      if (*mode == 'r') {
+#endif
+	 fp = io_open(str, BINARY_MODE_R);
+	 if (fp == NULL) {
+	    lite_PD_error("CAN'T OPEN FILE IN READ-ONLY MODE - PD_OPEN",
+			  PD_OPEN);
+	 }
+#ifdef PDB_WRITE
+      } else if (*mode == 'a') {
+	 return lite_PD_create (name);
+      } else {
+	 lite_PD_error("CAN'T OPEN FILE - PD_OPEN", PD_OPEN);
+      }
+   }
+#endif
+
+   if (lite_PD_buffer_size != -1) {
+      if (io_setvbuf(fp, NULL, _IOFBF, (size_t) lite_PD_buffer_size)) {
+	 lite_PD_error("CAN'T SET FILE BUFFER - PD_OPEN", PD_OPEN);
+      }
+   }
+
+   file = _lite_PD_mk_pdb(str);
+   if (file == NULL) {
+      lite_PD_error("CAN'T ALLOCATE PDBFILE - PD_OPEN", PD_OPEN);
+   }
+   file->stream = fp;
+#ifdef PDB_WRITE
+   if (*mode == 'a') file->mode = PD_APPEND;
+   else file->mode = PD_OPEN;
+#else
+   file->mode = PD_OPEN ;
+#endif
+
+   /*
+    * Attempt to read an ASCII header.
+    */
+   if (io_seek(fp, 0L, SEEK_SET)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("FSEEK FAILED TO FIND ORIGIN - PD_OPEN", PD_OPEN);
+   }
+   if (_lite_PD_rfgets(str, MAXLINE, fp) == NULL) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T READ THE FILE HEADER - PD_OPEN", PD_OPEN);
+   }
+
+   /*
+    * The first token should be the identifying header token.
+    */
+   token = strtok(str, " ");
+   if (token == NULL) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("FILE HEADER NOT ASCII - PD_OPEN", PD_OPEN);
+   }
+
+
+   if (strcmp(token, HeadTok) == 0) {
+      /*
+       * This is a PDB_SYSTEM_VERSION 2 or later file.
+       * Read the primitive data type formats which set the standard.
+       */
+      if (!_lite_PD_rd_format(file)) {
+         _lite_PD_rl_pdb(file); 
+	 lite_PD_error("FAILED TO READ FORMATS - PD_OPEN", PD_OPEN);
+      }
+      
+   } else if (strcmp(token, OldHeadTok) == 0) {
+      /*
+       * This is a pre-PDB_SYSTEM_VERSION 2 style file. The second token
+       * is the machine type that wrote the file.  Set the file->std for
+       * machine type for PD_open the file->std is always the PDBfile standard.
+       * Alignment issues are not properly handled before PDB_SYSTEM_VERSION 3
+       * but do the best that we can.
+       */
+      token = strtok(NULL, " ");
+      if (token == NULL)
+      {
+         _lite_PD_rl_pdb(file); 
+         lite_PD_error("INCOMPLETE HEADER - PD_OPEN", PD_OPEN);
+      }
+      switch (atoi(token)) {
+      case IEEE_32_64:
+	 file->std   = _lite_PD_copy_standard(&lite_IEEEA_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_M68000_ALIGNMENT);
+	 break;
+      case IEEE_32_96:
+	 file->std   = _lite_PD_copy_standard(&lite_IEEEB_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_M68000_ALIGNMENT);
+	 break;
+      case INTEL_X86:
+	 file->std   = _lite_PD_copy_standard(&lite_INTELA_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_INTELA_ALIGNMENT);
+	 break;
+      case CRAY_64:
+	 file->std   = _lite_PD_copy_standard(&lite_CRAY_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_UNICOS_ALIGNMENT);
+	 break;
+      case VAX_11:
+	 file->std   = _lite_PD_copy_standard(&lite_VAX_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_DEF_ALIGNMENT);
+	 break;
+      default:
+	 file->std   = _lite_PD_copy_standard(&lite_DEF_STD);
+	 file->align = _lite_PD_copy_alignment(&lite_DEF_ALIGNMENT);
+	 break;
+      }
+
+      /*
+       * To correctly handle the situation in which many PDBfiles are open
+       * at the same time always try to latch on to the file->host_std.
+       * Alignment issues are not properly handled before PDB_SYSTEM_VERSION 3
+       * but do the best that we can
+       */
+      if (_lite_PD_compare_std(file->host_std, file->std,
+			       file->host_align, file->align)) {
+	 _lite_PD_rl_standard(file->std);
+	 file->std   = _lite_PD_copy_standard(file->host_std);
+	 _lite_PD_rl_alignment(file->align);
+	 file->align = _lite_PD_copy_alignment(file->host_align);
+      }
+   } else {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("BAD FILE HEADER - PD_OPEN", PD_OPEN);
+   }
+
+   /*
+    * Record the current file position as the location of the symbol table
+    * address and sequentially the chart address.
+    */
+   file->headaddr = io_tell(fp);
+   if (file->headaddr == -1L) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T FIND HEADER ADDRESS - PD_OPEN", PD_OPEN);
+   }
+
+   /*
+    * Read the address of the symbol table and structure chart.
+    */
+   if (_lite_PD_rfgets(str, MAXLINE, fp) == NULL) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T READ SYMBOL TABLE ADDRESS - PD_OPEN", PD_OPEN);
+   }
+
+   token = strtok(str, "\001");
+   if (token == NULL) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("BAD STRUCTURE CHART ADDRESS - PD_OPEN", PD_OPEN);
+   }
+   file->chrtaddr = atol(token);
+
+   token = strtok(NULL, "\001");
+   if (token == NULL) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("BAD SYMBOL TABLE ADDRESS - PD_OPEN", PD_OPEN);
+   }
+   file->symtaddr = atol(token);
+
+   /*
+    * Read the symbol table first so that the file pointer is positioned
+    * to the "extra" information, then read the "extra's" to get the
+    * alignment data, and finish with the structure chart which needs
+    * the alignment data
+    */
+
+   /*
+    * Read the symbol table.
+    */
+   if (io_seek(fp, file->symtaddr, SEEK_SET)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("FSEEK FAILED SYMBOL TABLE - PD_OPEN", PD_OPEN);
+   }
+   if (!_lite_PD_rd_symt(file)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T READ SYMBOL TABLE - PD_OPEN", PD_OPEN);
+   }
+
+   /*
+    * Read the miscellaneous data.
+    */
+   if (!_lite_PD_rd_extras(file)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T READ MISCELLANEOUS DATA - PD_OPEN", PD_OPEN);
+   }
+
+   /*
+    * Initialize the pdb system defs and structure chart.
+    */
+   _lite_PD_init_chrt(file);
+
+   /*
+    * Read the structure chart.
+    */
+   if (io_seek(fp, file->chrtaddr, SEEK_SET)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("FSEEK FAILED STRUCTURE CHART - PD_OPEN", PD_OPEN);
+   }
+   if (!_lite_PD_rd_chrt(file)) {
+      _lite_PD_rl_pdb(file); 
+      lite_PD_error("CAN'T READ STRUCTURE CHART - PD_OPEN", PD_OPEN);
+   }
+
+   ep = lite_PD_inquire_entry(file, PDB_ATTRIBUTE_TABLE, TRUE, NULL);
+   if (ep != NULL) {
+      if (!lite_PD_read(file, PDB_ATTRIBUTE_TABLE, &file->attrtab)) {
+	 lite_PD_close(file);
+	 lite_PD_error("FAILED TO READ ATTRIBUTE TABLE - PD_OPEN", PD_OPEN);
+      }
+      _lite_PD_convert_attrtab(file);
+      file->chrtaddr = PD_entry_address(ep);
+      _lite_PD_rl_syment(ep);
+      lite_SC_hash_rem(_lite_PD_fixname(file, PDB_ATTRIBUTE_TABLE),
+		       file->symtab);
+   } else {
+      file->attrtab = NULL;
+   }
+
+   /*
+    * Position the file pointer to the location of the structure chart.
+    */
+   if (io_seek(fp, file->chrtaddr, SEEK_SET)) {
+      lite_PD_close(file);
+      lite_PD_error("FSEEK FAILED CHART - PD_OPEN", PD_OPEN);
+   }
+
+   return(file);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_read
+ *
+ * Purpose:	Read an entry from the PDB file pointed to by the
+ *		symbol table into the location pointer to by VR.
+ *
+ * Note:	VR must be a pointer to an object with the type
+ *		given by TYPE (PDBLib will allocate space if necessary)!
+ *
+ * Return:	Success:	The number of items successfully read.
+ *
+ *		Failure:	0
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:54 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_read (PDBfile *file, char *name, byte *vr) {
+
+   return lite_PD_read_as (file, name, NULL, vr);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_read_alt
+ *
+ * Purpose:	Read part of an entry from the PDB file pointed to by
+ *		the symbol table into the location pointed to by VR.  IND
+ *		contains one triplen of long ints per variable dimension
+ *		specifying start, stop, and step for the index.
+ *
+ * Note:	VR must be a pointer to an object with the type given
+ *		by TYPE (PDBLib will allocate space if necessary)!
+ *
+ * Return:	Success:	Number of items successfully read.
+ *
+ *		Failure:	0
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:47 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_read_alt (PDBfile *file, char *name, byte *vr, long *ind) {
+
+   return lite_PD_read_as_alt (file, name, NULL, vr, ind) ;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_read_as
+ *
+ * Purpose:	Read an entry from the PDB file pointed to by the
+ *		symbol table into the location pointed to by VR.  Convert
+ *		to type TYPE regardless of symbol entry type.
+ *
+ * Note:	VR must be a pointer to an object with the type given
+ *		by TYPE (PDBLib will allocate space if necessary)!
+ *
+ * Return:	Success:	Number of items successfully read.
+ *
+ *		Failure:	0
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:55 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_read_as (PDBfile *file, char *name, char *type, byte *vr) {
+
+   int		err;
+   syment	*ep;
+   char 	msg[MAXLINE], fullpath[MAXLINE];
+
+   switch (setjmp(_lite_PD_read_err)) {
+   case ABORT:
+      return(FALSE);
+   case ERR_FREE:
+      return(TRUE);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * Find the effective symbol table entry for the named item.
+    */
+   ep = _lite_PD_effective_ep(file, name, TRUE, fullpath);
+   if (ep == NULL) {
+      sprintf(msg, "UNREADABLE OR MISSING ENTRY \"%s\" - PD_READ_AS",fullpath);
+      lite_PD_error(msg, PD_READ);
+   }
+
+   if (type == NULL) type = PD_entry_type(ep);
+
+   err = _lite_PD_hyper_read(file, fullpath, type, ep, vr);
+   _lite_PD_rl_syment_d(ep);
+
+   return(err);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_read_as_alt
+ *
+ * Purpose:	Read part of an entry from the PDB file pointed to by the
+ *		symbol table into the location pointed to by VR.  IND contains
+ *		one triplet of long ints per variable dimension specifying
+ *		start, stop, and step for the index.
+ *
+ * Note:	The entry must be an array (either a static array or
+ *		a pointer)
+ *
+ * Note:	VR must be a pointer to an object with the type of
+ *		the object associated with NAME (PDBLib will allocate space
+ *		if necessary)!
+ *
+ * Return:	Success:	Number of items successfully read.
+ *
+ *		Failure:	0
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:49 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_read_as_alt (PDBfile *file, char *name, char *type, byte *vr,
+		     long *ind) {
+
+   char		fullpath[MAXLINE];
+   dimdes	*pd, *dims;
+   syment	*ep;
+   int		nd;
+
+   switch (setjmp(_lite_PD_read_err)) {
+   case ABORT:
+      return(FALSE);
+   case ERR_FREE:
+      return(TRUE);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * Look up the variable name and return FALSE if it is not there.
+    */
+   ep = _lite_PD_effective_ep(file, name, TRUE, fullpath);
+   if (ep == NULL)
+      lite_PD_error("ENTRY NOT IN SYMBOL TABLE - PD_READ_AS_ALT", PD_READ);
+
+   dims = PD_entry_dimensions(ep);
+   for (nd = 0, pd = dims; pd != NULL; pd = pd->next, nd++) /*void*/ ;
+
+   return _lite_PD_indexed_read_as (file, fullpath, type, vr, nd, ind, ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_typedef
+ *
+ * Purpose:	Define an alias for a type which exists in the host
+ *		chart.  The indented use is to provide a correspondence
+ *		between a type that has been defined to PDBLib (ONAME) and
+ *		a typedef'd type in programs (TNAME).  Can be used in
+ *		conjunction with PD_defix and PD_defloat to have a primitive
+ *		type known to both charts.
+ *
+ * Return:	Success:	ptr to the original type's defstr
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:47 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:36:49 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.
+ *
+ *-------------------------------------------------------------------------
+ */
+defstr *
+lite_PD_typedef (PDBfile *file, char *oname, char *tname) {
+
+   defstr *dp;
+
+   dp = PD_inquire_host_type(file, oname);
+   if (dp == NULL) {
+      sprintf(lite_PD_err, "ERROR: HOST TYPE %s UNKNOWN - PD_TYPEDEF\n",
+	      oname);
+   } else {
+      if (PD_inquire_host_type(file, tname) == NULL) {
+	 _lite_PD_d_install(tname, dp, file->host_chart);
+         lite_SC_mark(dp, 1);
+         lite_SC_mark(dp->order, 1);
+      }
+   }
+
+   dp = PD_inquire_type(file, oname);
+   if (dp == NULL) {
+      sprintf(lite_PD_err, "ERROR: FILE TYPE %s UNKNOWN - PD_TYPEDEF\n",
+	      oname);
+   } else {
+      if (PD_inquire_type(file, tname) == NULL) {
+	 _lite_PD_d_install(tname, dp, file->chart);
+         lite_SC_mark(dp, 1);
+         lite_SC_mark(dp->order, 1);
+      }
+   }
+
+   return(dp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_write
+ *
+ * Purpose:	Write NUMBER VAR's ofj type TYPE to the PDB file, FILE.
+ *		Make an entry in the file's symbol table.  VR must be
+ *		a pointer to an object with the type given by TYPE!
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_write (PDBfile *file, char *name, char *type, byte *vr) {
+
+   return lite_PD_write_as (file, name, type, type, vr) ;
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_write_as
+ *
+ * Purpose:	Write NUMBER VAR's of type INTYPE to the pdb file FILE as
+ *		type OUTTYPE.  Make an entry in the file's symbol table.  VR
+ *		must be a pointer to an object with the type given by TYPE!
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_write_as (PDBfile *file, char *name, char *intype, char *outtype,
+		  byte *vr) {
+   
+   syment *ep;
+   dimdes *dims;
+   char *lname, fullpath[MAXLINE];
+
+   strcpy(fullpath, _lite_PD_fixname(file, name));
+   lname = lite_SC_firsttok(fullpath, ".");
+
+   dims = _lite_PD_ex_dims(lname, file->default_offset, FALSE);
+   ep   = _PD_write(file, name, intype, outtype, vr, dims, _append_flag);
+   if (ep != NULL) {
+      _lite_PD_rl_syment_d(ep);
+      return(TRUE);
+   } else {
+      return(FALSE);
+   }
+}
+#endif /* PDB_WRITE */
+   
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_write_alt
+ *
+ * Purpose:	Write an entry of type TYPE to the PDB file, FILE.  Make
+ *		an entry in the file's symbol table.  The entry is named
+ *		by NAME has ND dimensions and IND contains the min and max
+ *		(pairwise) of each dimensions range.  Return the syment
+ * 		if successful and NULL otherwise.  VR must be a pointer
+ *		to an object with the type given by TYPE.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_write_alt (PDBfile *file, char *name, char *type, byte *vr, int nd,
+		   long *ind) {
+
+   return lite_PD_write_as_alt (file, name, type, type, vr, nd, ind) ;
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_write_as_alt
+ *
+ * Purpose:	Write an entry of type INTYPE to the PDB file, FILE as
+ *		type OUTTYPE.  Make an entry in the file's symbol table.
+ *		The entry has name, NAME, ND dimensions, and the ranges
+ *		of the dimensions are given (min,max) pairwise in IND.
+ *		VR must be a pointer to an object with the type given
+ *		by TYPE.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:36:49 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *    Mark C. Miller, Mon Mar 13 10:51:44 PST 2006
+ *    Added code to release dimensions just prior to returning false to
+ *    fix a memory leak
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_write_as_alt (PDBfile *file, char *name, char *intype, char *outtype,
+		      byte *vr, int nd, long *ind) {
+   int i;
+   long start, stop, step, leng;
+   char expr[MAXLINE], index[MAXLINE], hname[MAXLINE];
+   dimdes *dims, *next, *prev;
+   syment *ep;
+
+   prev = NULL;
+   dims = NULL;
+
+   strcpy(index, "(");
+
+   for (i = 0; i < nd; i++) {
+      start = ind[0];
+      stop  = ind[1];
+      step  = ind[2];
+      ind += 3;
+
+      sprintf(expr, "%ld:%ld:%ld,", start, stop, step);
+      strcat(index, expr);
+
+      leng = stop - start + 1L;
+      next = _lite_PD_mk_dimensions(start, leng);
+      if (dims == NULL) {
+	 dims = next;
+      } else {
+	 prev->next = next;
+      }
+
+      prev = next;
+   }
+
+   if (strlen(index) > 1) {
+      index[strlen(index)-1] = ')';
+      sprintf(hname, "%s%s", name, index);
+   } else {
+      strcpy(hname, name);
+   }
+
+   ep  = _PD_write(file, hname, intype, outtype, vr, dims, _append_flag);
+
+   if (ep != NULL) {
+      _lite_PD_rl_syment_d(ep);
+      return(TRUE);
+   } else {
+      _lite_PD_rl_dimensions(dims);
+      return(FALSE);
+   }
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_PD_write
+ *
+ * Purpose:	Primitive write to PDBfile which is used by PD_WRITE and
+ *		PD_WRITE_AS.  VR must be a pointer to an object with the
+ *		type given by TYPE!
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Mar 13 10:51:44 PST 2006
+ *   Added code to release dimensions in case we're overwriting
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static syment *
+_PD_write (PDBfile *file, char *name, char *intype, char *outtype,
+	   byte *vr, dimdes *dims, int appnd) {
+
+   int reset;
+   syment *ep;
+   long number, addr;
+   char bf[MAXLINE], fullpath[MAXLINE], *lname;
+
+   _append_flag = FALSE;
+
+   ep = NULL;
+
+   switch (setjmp(_lite_PD_write_err)) {
+   case ABORT    : return(NULL);
+   case ERR_FREE : return(ep);
+   default       : memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   if (file->mode == PD_OPEN) {
+      lite_PD_error("FILE OPENED IN READ-ONLY MODE - _PD_WRITE", PD_WRITE);
+   }
+
+   strcpy(fullpath, _lite_PD_fixname(file, name));
+
+   /*
+    * Append a new block to an existing entry if TRUE.
+    */
+   if (appnd) {
+      strcpy(bf, fullpath);
+
+      /*
+       * Do this so that things such as a[20:20].b work properly
+       * NOTE: this also implies that a[20:20].b.c works while
+       *       a.b[20:20].c doesn't
+       * for now this defines the semantics of append (10/6/93)
+       */
+      lname = lite_SC_firsttok(bf, ".()[]");
+
+      ep = lite_PD_inquire_entry(file, lname, FALSE, NULL);
+      if (ep == NULL) {
+	 lite_PD_error("CAN'T APPEND TO NON-EXISTING ENTRY - _PD_WRITE",
+		       PD_WRITE);
+      }
+      _lite_PD_adj_dimensions(file, fullpath, ep);
+
+      /*
+       * Extend the syment.
+       */
+      _lite_PD_add_block(file, ep, dims);
+   }
+
+   addr = file->chrtaddr;
+   ep   = _lite_PD_effective_ep(file, fullpath, FALSE, NULL);
+
+   if (ep != NULL) {
+      /*
+       * If the variable already exists use the existing file info.
+       */
+      addr   = PD_entry_address(ep);
+      _lite_PD_rl_dimensions(dims);
+#if 0
+      number = PD_entry_number(ep);
+#endif
+      lname  = fullpath;
+      reset  = FALSE;
+   } else {
+      /*
+       * If the variable doesn't exist define it to the file.
+       */
+      number = _lite_PD_comp_num(dims);
+      ep     = _lite_PD_mk_syment(outtype, number, addr, NULL, dims);
+
+      strcpy(bf, fullpath);
+      lname = lite_SC_firsttok(bf, ".([ ");
+      _lite_PD_e_install(lname, ep, file->symtab);
+
+      reset = TRUE;
+   }
+
+   if (file->virtual_internal) {
+      SC_address ad;
+
+      ad.memaddr = vr;
+      ep->blocks->diskaddr = ad.diskaddr;
+      lite_SC_mark(vr, 1);
+      ep = lite_PD_copy_syment(ep);
+   } else {
+      if (outtype == NULL) outtype = PD_entry_type(ep);
+
+      if (intype == NULL) intype = outtype;
+
+      /*
+       * Go to the correct address.
+       */
+      if (io_seek(file->stream, addr, SEEK_SET)) {
+	 lite_PD_error("FSEEK FAILED TO FIND CURRENT ADDRESS - _PD_WRITE",
+		       PD_WRITE);
+      }
+
+      /*
+       * Do the low level write.
+       */
+      if (!_lite_PD_hyper_write(file, lname, ep, vr, intype)) {
+	 lite_PD_error("CAN'T WRITE VARIABLE - _PD_WRITE", PD_WRITE);
+      }
+
+      /*
+       * If the variable didn't previously exist we're at the end
+       * of the file.
+       */
+      if (reset) {
+	 file->chrtaddr = io_tell(file->stream);
+	 if (file->chrtaddr == -1L) {
+	    lite_PD_error("CAN'T FIND ADDRESS OF NEXT VARIABLE - _PD_WRITE",
+			  PD_WRITE);
+	 }
+
+	 /*
+	  * Make a releasable copy of the entry
+	  * SX depends on this critically!!
+	  */
+	 ep = lite_PD_copy_syment(ep);
+      }
+   }
+
+   return(ep);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_create
+ *
+ * Purpose:	Create a PDB file.
+ *
+ * Return:	Success:	Initialized PDBfile structure
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+PDBfile *
+lite_PD_create (char *name) {
+
+   char str[MAXLINE];
+   PDBfile *file;
+   static FILE *fp;
+
+   file = NULL;
+
+   switch (setjmp(_lite_PD_create_err)) {
+   case ABORT:
+      io_close(fp);
+      return(NULL);
+   case ERR_FREE:
+      return(file);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * Open the file.
+    */
+   strcpy(str, name);
+   fp = io_open(str, BINARY_MODE_WPLUS);
+   if (!fp) lite_PD_error("CAN'T CREATE FILE - PD_CREATE", PD_CREATE);
+
+   if (lite_PD_buffer_size != -1) {
+      if (io_setvbuf(fp, NULL, _IOFBF, (size_t) lite_PD_buffer_size)) {
+	 lite_PD_error("CAN'T SET FILE BUFFER - PD_CREATE", PD_OPEN);
+      }
+   }
+
+   /*
+    * Make the PDBfile.
+    */
+   file = _lite_PD_mk_pdb(str);
+   if (file == NULL) {
+      lite_PD_error("CAN'T ALLOCATE PDBFILE - PD_CREATE", PD_OPEN);
+   }
+
+   file->stream = fp;
+   file->mode   = PD_CREATE;
+
+   /*
+    * Set the file data conversion standard - and yes someone might pick
+    * a target standard which is the current standard
+    */
+   file->std   = _lite_PD_copy_standard(file->host_std);
+   file->align = _lite_PD_copy_alignment(file->host_align);
+   if (lite_REQ_STANDARD != NULL) {
+      if (!_lite_PD_compare_std(lite_REQ_STANDARD, file->std,
+				lite_REQ_ALIGNMENT, file->align)) {
+	 _lite_PD_rl_standard(file->std);
+	 file->std   = _lite_PD_copy_standard(lite_REQ_STANDARD);
+	 _lite_PD_rl_alignment(file->align);
+	 file->align = _lite_PD_copy_alignment(lite_REQ_ALIGNMENT);
+      }
+      lite_REQ_STANDARD = NULL;
+   }
+
+   /*
+    * Write the ASCII header.
+    */
+   io_printf(fp, "%s\n", HeadTok);
+   if (io_flush(fp)) {
+      lite_PD_error("FFLUSH FAILED BEFORE HEADER - PD_CREATE", PD_CREATE);
+   }
+
+   /*
+    * Write the primitive data type formats.
+    */
+   if (!_lite_PD_wr_format(file)) {
+      lite_PD_error("FAILED TO WRITE FORMATS - PD_CREATE", PD_CREATE);
+   }
+
+   /*
+    * Record the current file position as the location of the symbol table
+    * address and sequentially the chart address
+    */
+   if ((file->headaddr = io_tell(fp)) == -1L) {
+      lite_PD_error("CAN'T FIND HEADER ADDRESS - PD_CREATE", PD_CREATE);
+   }
+
+   /*
+    * Initialize the pdb system defs and structure chart.
+    */
+   _lite_PD_init_chrt(file);
+
+   if (io_flush(fp)) {
+      lite_PD_error("FFLUSH FAILED AFTER HEADER - PD_CREATE", PD_CREATE);
+   }
+
+   memset(str, 0, PAD_SIZE);
+   if (io_write(str, (size_t) 1, PAD_SIZE, fp) != PAD_SIZE) {
+      lite_PD_error("FAILED TO PAD FILE FOR MPW - PD_CREATE", PD_CREATE);
+   }
+
+   file->chrtaddr = file->headaddr + 128L;
+   if (io_seek(fp, file->chrtaddr, SEEK_SET)) {
+      lite_PD_error("FAILED TO FIND START OF DATA - PD_CREATE", PD_CREATE);
+   }
+
+   file->system_version = PDB_SYSTEM_VERSION;
+   file->date           = lite_SC_date();
+
+   return(file);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_defstr
+ *
+ * Purpose:	A structure definition mechanism for PDB.
+ *              sample syntax:                                                 
+ *		                                                               
+ *		  lite_PD_defstr(<PDB file>, "<struct name>",
+ *		                        "<member1>", "<member2>",              
+ *		                ...     "<membern>", lite_LAST);
+ *		                                                               
+ *		where                                                          
+ *		                                                               
+ *		  <member> := <primitive type> <member name>[(<dimensions>)] | 
+ *		              <derived type> <member name>[(<dimensions>)]     
+ *		                                                               
+ *		  <dimensions> := <non-negative int> |                         
+ *		                  <non-negative int>,<dimensions> |            
+ *		                  <non-negative int>, <dimensions> |           
+ *		                  <non-negative int> <dimensions>              
+ *		                                                               
+ *		  <primitive type> := short | integer | long | float |         
+ *		                      double | char | short * | integer *      
+ *		                      long * | float * | double * | char *     
+ *		                                                               
+ *		  <derived type> := any defstr'd type | any defstr'd type *    
+ *		                                                               
+ *		lite_LAST is a pointer to a integer zero and is specifically
+ *		allocated by PDBLib to be used to terminate argument lists     
+ *		which consist of pointers                                      
+ *		                                                               
+ *		Returns NULL if member types are unknown
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+defstr *
+lite_PD_defstr (PDBfile *file, char *name, ...) {
+
+   char 	*nxt, *ptype;
+   int 		doffs;
+   HASHTAB 	*fchrt;
+   memdes 	*desc, *lst, *prev;
+   defstr 	*dp;
+   va_list	ap ;
+
+   va_start (ap, name);
+
+   prev  = NULL;
+   lst   = NULL;
+   fchrt = file->chart;
+   doffs = file->default_offset;
+   for (nxt = va_arg(ap, char*); (int) *nxt != 0; nxt = va_arg(ap, char*)) {
+      desc  = _lite_PD_mk_descriptor(nxt, doffs);
+      ptype = desc->base_type;
+      if (lite_SC_lookup(ptype, fchrt) == NULL) {
+	 if ((strcmp(ptype, name) != 0) || !_lite_PD_indirection(nxt)) {
+	    sprintf(lite_PD_err, "ERROR: %s BAD MEMBER TYPE - PD_DEFSTR\n",
+		    nxt);
+	    return(NULL);
+	 }
+      }
+
+      if (lst == NULL) lst = desc;
+      else prev->next = desc;
+      prev = desc;
+   }
+
+   va_end (ap) ;
+
+   /*
+    * Install the type in both charts.
+    */
+   dp = _lite_PD_defstr_inst(name, lst, -1, NULL, NULL, fchrt,
+			     file->host_chart, file->align, file->host_align,
+			     FALSE);
+   if (dp == NULL) {
+      sprintf(lite_PD_err, "ERROR: CAN'T HANDLE PRIMITIVE TYPE - PD_DEFSTR\n");
+   }
+
+   return(dp);
+}
+#endif /* PDB_WRITE */
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_cast
+ *
+ * Purpose:	Tell PDB that the type of a particular member (which must
+ *		e a pointer) is specified by another member (which must
+ *		be a character pointer)
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_cast (PDBfile *file, char *type, char *memb, char *contr) {
+
+   HASHTAB *tab;
+   hashel *hp;
+   defstr *dp;
+   memdes *desc, *lst;
+
+   /*
+    * Add the cast to the file->chart.
+    */
+   tab = file->chart;
+   for (hp = *(tab->table); hp != NULL; hp = hp->next) {
+      dp = (defstr *) hp->def;
+      if (strcmp(type, dp->type) != 0) continue;
+
+      /*
+       * Check that the contr is right.
+       */
+      for (desc = dp->members; desc != NULL; desc = desc->next) {
+	 if (strcmp(contr, desc->name) != 0) continue;
+
+	 /*
+	  * Do this once, don't repeat in other chart.
+	  */
+	 if ((strcmp(desc->base_type, "char") != 0) ||
+	     !_lite_PD_indirection(desc->type)) {
+	    sprintf(lite_PD_err, "BAD CAST CONTROLLER - PD_CAST");
+	    return(FALSE);
+	 }
+	 break;
+      }
+   }
+
+   /*
+    * Add the cast to the file->host_chart.
+    */
+   tab = file->host_chart;
+   for (hp = *(tab->table); hp != NULL; hp = hp->next) {
+      dp = (defstr *) hp->def;
+      if (strcmp(type, dp->type) != 0) continue;
+      for (desc = dp->members; desc != NULL; desc = desc->next) {
+	 if (strcmp(memb, desc->name) != 0) continue;
+
+	 /*
+	  * Make an independent copy in case the one in the file
+	  * chart is released.
+	  */
+	 desc->cast_memb = lite_SC_strsavef(contr, "char*:PD_CAST:membh");
+	 desc->cast_offs = _lite_PD_member_location(contr, tab, dp, &lst);
+      }
+   }
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_target
+ *
+ * Purpose:	Setup for the target machine data formats and alignments.
+ *		This information is recorded in the PDBfiles to correctly
+ *		handle things when many files are open at once.
+ *		To correctly handle the situation in which there are
+ *		PD_OPEN'd files around (this may reset previously set
+ *		file->std) remember a standard specifically requested
+ *		with PD_TARGET (note that PD_OPEN sets file->std and
+ *		file->align).
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.matzke.cioe.com
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_target (data_standard *data, data_alignment *align) {
+
+   lite_REQ_STANDARD  = data;
+   lite_REQ_ALIGNMENT = align;
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_flush
+ *
+ * Purpose:	Dump the data description tables containing the current
+ *		state of the PDB file.  The tables are:
+ *
+ * 		* Structure chart
+ * 		* Symbol table
+ * 		* Extras table
+ * 		
+ * 		The table addresses are also updated.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 18, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 10:53:08 PST 1998
+ *    Removed call to lite_PD_reset_ptr_list since it was removed.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_flush (PDBfile *file) {
+
+   FILE *fp;
+
+   if (file->flushed) return(TRUE);
+
+   if (file->attrtab != NULL) {
+      lite_PD_cd(file, NULL);
+      if (!lite_PD_write(file, PDB_ATTRIBUTE_TABLE, "HASHTAB *",
+			 &file->attrtab)) {
+	 return(FALSE);
+      }
+   }
+
+   switch (setjmp(_lite_PD_write_err)) {
+   case ABORT:
+      return(FALSE);
+   case ERR_FREE:
+      return(TRUE);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   fp = file->stream;
+   if (io_flush(fp)) {
+      lite_PD_error("FFLUSH FAILED BEFORE CHART - PD_FLUSH", PD_WRITE);
+   }
+
+   /*
+    * Seek the place to write the structure chart.
+    */
+   if (io_seek(fp, file->chrtaddr, SEEK_SET)) {
+      lite_PD_error("FSEEK FAILED TO FIND CHART  - PD_FLUSH", PD_WRITE);
+   }
+
+   /*
+    * Write the structure chart.
+    */
+   file->chrtaddr = _lite_PD_wr_chrt(file);
+   if (file->chrtaddr == -1L) {
+      lite_PD_error("CAN'T WRITE STRUCTURE CHART - PD_FLUSH", PD_WRITE);
+   }
+
+   /*
+    * Write the symbol table.
+    */
+   file->symtaddr = _lite_PD_wr_symt(file);
+   if (file->symtaddr == -1L) {
+      lite_PD_error("CAN'T WRITE SYMBOL TABLE - PD_FLUSH", PD_WRITE);
+   }
+
+   /*
+    * Write the extras table.
+    */
+   if (!_lite_PD_wr_extras(file)) {
+      lite_PD_error("CAN'T WRITE MISCELLANEOUS DATA - PD_FLUSH", PD_WRITE);
+   }
+
+   if (io_tell(fp) == -1L) {
+      lite_PD_error("CAN'T FIND HEADER ADDRESS - PD_FLUSH", PD_WRITE);
+   }
+
+   if (io_flush(fp)) {
+      lite_PD_error("FFLUSH FAILED AFTER CHART - PD_FLUSH", PD_WRITE);
+   }
+
+   /*
+    * Update the header.
+    */
+   if (io_seek(fp, file->headaddr, SEEK_SET)) {
+      lite_PD_error("FSEEK FAILED - PD_FLUSH", PD_WRITE);
+   }
+
+   if (file->headaddr != io_tell(fp)) {
+      lite_PD_error("FSEEK FAILED TO FIND HEADER - PD_FLUSH", PD_WRITE);
+   }
+
+   io_printf(fp, "%ld\001%ld\001\n", file->chrtaddr, file->symtaddr);
+
+   if (io_flush(fp)) {
+      lite_PD_error("FFLUSH FAILED AFTER HEADER - PD_FLUSH", PD_WRITE);
+   }
+
+   file->flushed = TRUE;
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_defent_alt
+ *
+ * Purpose:	Define an entry in the PDB file symbol table and stake out
+ *		the disk space but write nothing.  Dimensional information is
+ *		specified by the number of dimensions, ND, and the array of
+ *		(min,max) pairs of long ints in IND.
+ *
+ * Return:	Success:	The new symbol table entry.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT
+ *		May  9, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:36:49 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+syment *
+lite_PD_defent_alt (PDBfile *file, char *name, char *outtype,
+		    int nd, long *ind) {
+
+   int		i;
+   long 	number, maxi, mini, leng;
+   dimdes	*dims, *next, *prev;
+
+   /*
+    * Compute the disk address, the number of items, and the dimensions.
+    */
+   number = 1L;
+   dims   = NULL;
+   for (i = 0; i < nd; i++) {
+      mini = ind[0];
+      maxi = ind[1];
+      ind += 2;
+
+      leng    = maxi - mini + 1L;
+      number *= leng;
+
+      next = _lite_PD_mk_dimensions(mini, leng);
+      if (dims == NULL) {
+	 dims = next;
+      } else {
+	 prev->next = next;
+      }
+
+      prev = next;
+   }
+
+   return _lite_PD_defent (file, name, outtype, number, dims);
+}
+#endif /* PDB_WRITE */
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_defent
+ *
+ * Purpose:	Define an entry in the PDB file symbol table and
+ *              stake out the disk space but write nothing.
+ *              any dimensional information is the NAME string.
+ *
+ * Return:	Success:	New symbol table entry
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT
+ *		May  9, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+syment *
+_lite_PD_defent (PDBfile *file, char *name, char *outtype, long number,
+		 dimdes *dims) {
+
+   long		addr, bytespitem;
+   defstr	*dp;
+   syment	*ep;
+   char		bf[MAXLINE], *lname;
+
+   ep = NULL;
+
+   switch (setjmp(_lite_PD_write_err)) {
+   case ABORT:
+      return(NULL);
+   case ERR_FREE:
+      return ep;
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * If there are pointers involved it is an error.
+    */
+   dp = PD_inquire_type(file, outtype);
+   if (dp == NULL)
+      lite_PD_error("UNKNOWN FILE TYPE - _PD_DEFENT", PD_WRITE);
+
+   if (dp->n_indirects) {
+      lite_PD_error("CAN'T DEFINE ENTRY WITH INDIRECTS - _PD_DEFENT",
+		    PD_WRITE);
+   }
+
+   ep = lite_PD_inquire_entry (file, name, FALSE, NULL);
+
+   if (ep == NULL) {
+      /*
+       * If this is a new entry.
+       */
+      addr = file->chrtaddr;
+      ep   = _lite_PD_mk_syment (outtype, number, addr, NULL, dims);
+
+      strcpy(bf, _lite_PD_fixname(file, name));
+      lname = lite_SC_firsttok(bf, ".([ ");
+      _lite_PD_e_install(lname, ep, file->symtab);
+
+      bytespitem = _lite_PD_lookup_size(outtype, file->chart);
+
+      ep = _lite_PD_extend_file(file, number*bytespitem) ? ep : NULL;
+      
+   } else {
+      /*
+       * If this is only a new block.
+       */
+      ep = _lite_PD_add_block(file, ep, dims) ? ep : NULL;
+   }
+
+   return ep;
+}
+#endif /* PDB_WRITE */
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_entry_number
+ *
+ * Purpose:     Query entry number        
+ *
+ * Programmer:  Adapted from PACT, Burl Hall, 26Feb08
+ *
+ *-------------------------------------------------------------------------
+ */
+int lite_PD_entry_number(syment* entry) {
+    return (PD_entry_number(entry));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_get_file_length
+ *
+ * Purpose:     Return current file size 
+ *
+ * Programmer:  Adapted from PACT, Mark C. Miller, 26Feb08
+ *
+ *-------------------------------------------------------------------------
+ */
+long  lite_PD_get_file_length(PDBfile *file) {
+    off_t caddr, flen;
+
+    caddr = io_tell(file->stream);
+    io_seek(file->stream, 0, SEEK_END);
+
+    flen = io_tell(file->stream);
+    io_seek(file->stream, caddr, SEEK_SET);
+
+    return((long)flen);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_append_alt
+ *
+ * Purpose:      - append a new block of data to an existing entry
+ *               - NOTE: VR must be a pointer to an object with the type
+ *               - of the existing entry
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT, Burl Hall, 26Feb08
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int lite_PD_append_alt(PDBfile *file, char *name, void *vr, int nd, long *ind) {
+  _append_flag = TRUE;
+  return(lite_PD_write_as_alt(file, name, NULL, NULL, vr, nd, ind));
+}
+#endif /* PDB_WRITE */
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_set_major_order
+ *
+ * Purpose:     Set major storage order.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT, Burl Hall, 26Feb08
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+void lite_PD_set_major_order( PDBfile* file, int type) {
+  PD_set_major_order( file, type ) ;
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb/pdb.h b/src/pdb/pdb.h
new file mode 100644
index 0000000..ce26c69
--- /dev/null
+++ b/src/pdb/pdb.h
@@ -0,0 +1,621 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDB.H - header file supporting PDBLIB routines
+ *       -
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+
+#ifndef _PDB_H
+#define _PDB_H
+
+#include <setjmp.h> /* For the setjmp/long structure jmp_buf. */
+#include <stdio.h>
+#include "score.h" /* For type definitions */ 
+
+/* The MAXLINE macro is defined in score.h and taken from stdio.h's */
+/* FILENAME_MAX.  HP's is only 14, so correct that here. */
+
+#ifndef MAXLINE
+  #define MAXLINE 1024
+#else
+  #if MAXLINE < 1024
+     #undef MAXLINE
+     #define MAXLINE 1024
+  #endif
+#endif
+
+#define PDB_SYSTEM_VERSION  14
+#define PDB_WRITE /*Include code to write to pdb files*/
+
+/* PDBFile Layout:
+ *       
+ *       Header (ASCII)
+ *         Identifying token
+ *         Data Formats
+ *         Structure Chart Address
+ *         Symbol Table Address
+ *       Data
+ *       Structure Chart
+ *       Symbol Table
+ *       Extensions
+ *       EOF
+ */
+
+#define NORMAL_ORDER    1
+#define REVERSE_ORDER   2  /* this must not be -1 which turns out to be EOF */
+
+#define IEEE_32_64   1        /* IEEE standard 32 bit float : 64 bit double */
+#define INTEL_X86    2                        /* Intel 80x86 class machines */
+#define CRAY_64      3                               /* CRAY class machines */
+#define VAX_11       4                                /* VAX class machines */
+#define IEEE_32_96   6        /* IEEE standard 32 bit float : 96 bit double */
+#define NSTD         6       /* Number of standards currently in the system 
+                                            should be same as last standard */
+
+#define PD_READ   0
+#define PD_WRITE  1
+#define PD_APPEND 2
+#define PD_OPEN   3
+#define PD_CREATE 4
+#define PD_CLOSE  5
+#define PD_TRACE  6
+#define PD_PRINT  7
+
+#define ROW_MAJOR_ORDER     101
+#define COLUMN_MAJOR_ORDER  102
+
+#define PF_ALPHABETIC 1
+#define PF_DISK_ORDER 2
+
+#define X_AND_Y 1
+#define X_ONLY  2
+#define Y_ONLY  3
+
+/*--------------------------------------------------------------------------*/
+/* Macros								    */
+/*--------------------------------------------------------------------------*/
+
+#define PN_sizeof(type, tab)  _lite_PD_lookup_size(type, tab)
+
+#define PD_get_mode(file)        ((file)->mode)
+#define PD_set_mode(file, v)     (file)->mode = (v)
+#define PD_get_offset(file)      ((file)->default_offset)
+#define PD_set_offset(file, v)   (file)->default_offset = (v)
+
+/* #define PD_file_maximum_size(file) file->maximum_size           */
+/* replaced by PD_get_max_file_size and PD_set_max_file_size below */
+
+#define PD_get_max_file_size(file)    ((file)->maximum_size)
+#define PD_set_max_file_size(file, v) (file)->maximum_size = (v)
+
+
+#define PD_entry_type(ep)          ((ep)->type)
+#define PD_entry_dimensions(ep)    ((ep)->dimensions)
+#define PD_entry_address(ep)       ((ep)->blocks[0].diskaddr)
+#define PD_entry_number(ep)        ((ep)->number)
+#define PD_entry_indirects(ep)     ((ep)->indirects)
+#define PD_entry_blocks(ep)        ((ep)->blocks)
+#define PD_block_address(ep, n)    ((ep)->blocks[n].diskaddr)
+#define PD_block_number(ep, n)     ((ep)->blocks[n].number)
+#define PD_n_blocks(ep)         (lite_SC_arrlen((ep)->blocks)/sizeof(symblock))
+
+#define PD_get_major_order(file)       ((file)->major_order)
+#define PD_set_major_order(file, type) (file)->major_order = (type)
+
+#define PD_has_directories(file)                                             \
+ (lite_SC_def_lookup("Directory", file->chart) != NULL)
+
+#define PD_inquire_type(file, name)                                          \
+ (defstr *) lite_SC_def_lookup(name, file->chart)
+
+#define PD_inquire_host_type(file, name)                                     \
+ (defstr *) lite_SC_def_lookup(name, file->host_chart)
+
+#define PD_inquire_table_type(table, name)                                   \
+ (defstr *) lite_SC_def_lookup(name, table)
+
+#define PD_hyper_refp(name, commnd)                                          \
+   {char c, s[MAXLINE];                                                      \
+    strcpy(s, name);                                                         \
+    c = s[strlen(s) - 1];                                                    \
+    if ((c == ')') || (c == ']'))                                            \
+       (commnd);}
+
+#define PD_hyper_ref(s, name)                                                \
+   {char c;                                                                  \
+    strcpy(s, name);                                                         \
+    c = s[strlen(s) - 1];                                                    \
+    if ((c == ')') || (c == ']'))                                            \
+       {s[strlen(s) - 1] = '\0';                                             \
+        lite_SC_lasttok(s, "[]()");};}
+
+#define PD_INQUIRE_ATTRIBUTE(x)                                              \
+    ((attribute *) lite_SC_def_lookup((x), file->attrtab))
+
+#define PD_INQUIRE_ATTRIBUTE_VALUE(x)                                        \
+    ((attribute_value *) lite_SC_def_lookup((x), file->attrtab))
+
+#define PD_CAST_TYPE(t, d, vg, vl, err_fnc, err_msg, err_arg)                \
+    {if (d->cast_offs < 0L)                                                  \
+        t = d->type;                                                         \
+     else                                                                    \
+        {t = DEREF(vl + d->cast_offs);                                       \
+         if (t == NULL)                                                      \
+            {if (DEREF(vg) != NULL)                                          \
+                {err_fnc(err_msg, err_arg);}                                 \
+             else                                                            \
+                t = d->type;};};}
+
+/*--------------------------------------------------------------------------*/
+/*                          TYPEDEFS AND STRUCTS                            */
+/*--------------------------------------------------------------------------*/
+
+struct s_data_alignment {
+   int char_alignment;
+   int ptr_alignment;
+   int short_alignment;
+   int int_alignment;
+   int long_alignment;
+   int longlong_alignment;
+   int float_alignment;
+   int double_alignment;
+   int struct_alignment;
+};
+
+typedef struct s_data_alignment data_alignment;
+
+
+struct s_data_standard {
+   int ptr_bytes;
+   int short_bytes;
+   int short_order;
+   int int_bytes;
+   int int_order;
+   int long_bytes;
+   int long_order;
+   int longlong_bytes;
+   int longlong_order;
+   int float_bytes;
+   long *float_format;
+   int *float_order;
+   int double_bytes;
+   long *double_format;
+   int *double_order;
+};
+
+typedef struct s_data_standard data_standard;
+
+
+struct s_PDBfile {
+   FILE *stream;
+   char *name;
+   char *type;                        /* used by files masqerading as PDB */
+   HASHTAB *symtab;
+   HASHTAB *chart;
+   HASHTAB *host_chart;
+   HASHTAB *attrtab;
+   long maximum_size;                  /* for file family bookkeeping */
+   char *previous_file;                /* for file family bookkeeping */
+   int mode;
+   int default_offset;
+   data_standard *std;
+   data_standard *host_std;
+   data_alignment *align;
+   data_alignment *host_align;
+   char *current_prefix;
+   int flushed;
+   int virtual_internal;
+   int system_version;
+   int major_order;
+   char *date;
+   long headaddr;
+   long symtaddr;
+   long chrtaddr;
+};
+
+typedef struct s_PDBfile PDBfile;
+
+
+/*
+ * Dimension descriptor - describe an array dimension range
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_dimdes {
+   long index_min;
+   long index_max;
+   long number;
+   struct s_dimdes *next;
+};
+
+typedef struct s_dimdes dimdes;
+
+
+/*
+ * Member descriptor - describe a member efficiently
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_memdes {
+   char *member;
+   long member_offs;
+   char *cast_memb;
+   long cast_offs;
+   char *type;
+   char *base_type;
+   char *name;
+   dimdes *dimensions;
+   long number;
+   struct s_memdes *next;
+};
+
+typedef struct s_memdes memdes;
+
+/*
+ * Symbol table entry block - manage discontiguous data items
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_symblock {
+   long number;
+   long diskaddr;
+};
+
+typedef struct s_symblock symblock;
+
+
+/*
+ * Symbol table entry indirects
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_symindir {
+   long addr;
+   long n_ind_type;
+   long arr_offs;
+};
+
+typedef struct s_symindir symindir;
+
+
+/*
+ * Symbol table entry - the def member of a hashel
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_syment {
+   char *type;
+   dimdes *dimensions;
+   long number;
+   symindir indirects;
+   symblock *blocks;
+};
+
+typedef struct s_syment syment;
+
+
+/*
+ * Structure chart entry - the def member of a hashel
+ * NOTE: changes here must be reflected in sxhook.c
+ */
+struct s_defstr {
+   char *type;
+   long size_bits;
+   long size;
+   int alignment;   /* type begins on byte boundary divisible by alignment */
+   int n_indirects;                              /* number of indirections */
+   int convert;
+   int onescmp;      /* TRUE iff ones complement arithmetic - old machines */
+   int unsgned;                  /* TRUE iff the integral type is unsigned */
+   int order_flag;
+   int *order;
+   long *format;
+   memdes *members;
+};
+
+typedef struct s_defstr defstr;
+
+typedef memdes	*(*PFPmemdes)() ;
+typedef memdes	*(*ReaderFuncType)(memdes *);
+typedef memdes	*(*WriterFuncType)(PDBfile *,char *,defstr *);
+
+/*
+ * Indirect reference tag.
+ */
+struct s_PD_itag {
+   long nitems;                              /* number of items pointed to */
+   char *type;                                  /* type of item pointed to */
+   long addr;                           /* address of the itag owning data */
+   int flag;                            /* TRUE if this itag owns the data */
+};
+
+typedef struct s_PD_itag PD_itag;
+
+
+/*
+ * Hyper-index support structure
+ */
+struct s_dimind {
+   long stride;
+   long start;
+   long stop;
+   long step;
+};
+
+typedef struct s_dimind dimind;
+
+
+struct s_attribute {
+   char *name;
+   char *type;
+   byte **data;
+   long size;
+   long indx;
+};
+
+typedef struct s_attribute attribute;
+
+
+struct s_attribute_value {
+   attribute *attr;
+   long indx;
+   struct s_attribute_value *next;
+};
+
+typedef struct s_attribute_value attribute_value;
+
+
+/*
+ * PD_IMAGE is a faithful shadow of the PG_image which is not defined yet
+ * any changes to PG_image must be reflected here
+ */
+struct s_PD_image {
+   int version_id;
+   char *label;
+   double xmin;
+   double xmax;
+   double ymin;
+   double ymax;
+   double zmin;
+   double zmax;
+   char *element_type;
+   unsigned char *buffer;
+   int kmax;
+   int lmax;
+   long size;
+   int bits_pixel;
+   char *palette;
+};
+
+typedef struct s_PD_image PD_image;
+
+/*--------------------------------------------------------------------------*/
+/*                            PDBLIB VARIABLES                              */
+/*--------------------------------------------------------------------------*/
+
+extern jmp_buf		_lite_PD_close_err ;
+extern jmp_buf		_lite_PD_print_err ;
+extern jmp_buf		_lite_PD_read_err ;
+extern jmp_buf		_lite_PD_trace_err ;
+extern char		lite_PD_err[] ;
+extern int		lite_PD_buffer_size ;
+extern int		lite_FORMAT_FIELDS ;
+extern data_standard	lite_IEEEA_STD ;
+extern data_standard	lite_IEEEB_STD ;
+extern data_standard	lite_INTELA_STD ;
+extern data_standard	lite_CRAY_STD ;
+extern data_standard	lite_VAX_STD ;
+extern data_standard	lite_DEF_STD ;
+extern data_standard	*lite_INT_STANDARD ;
+extern data_alignment	lite_M68000_ALIGNMENT ;
+extern data_alignment 	lite_INTELA_ALIGNMENT ;
+extern data_alignment 	lite_UNICOS_ALIGNMENT ;
+extern data_alignment	lite_SPARC_ALIGNMENT ;
+extern data_alignment	lite_RS6000_ALIGNMENT ;
+extern data_alignment	lite_MIPS_ALIGNMENT ;
+extern data_alignment 	lite_DEF_ALIGNMENT ;
+extern data_alignment	*lite_INT_ALIGNMENT ;
+extern ReaderFuncType	lite_pdb_rd_hook;
+extern WriterFuncType	lite_pdb_wr_hook;
+
+
+/*--------------------------------------------------------------------------*/
+/*                            PDBLIB FUNCTIONS                              */
+/*--------------------------------------------------------------------------*/
+
+SILO_API extern int	lite_PD_cd (PDBfile*,char*);
+SILO_API extern int	lite_PD_close (PDBfile*);
+SILO_API extern int	lite_PD_convert (char**,char**,char*,char*,long,
+					 data_standard*,data_standard*,
+					 data_standard*,long*,long*,HASHTAB*,
+					 HASHTAB*,int,int);
+SILO_API extern dimdes *lite_PD_copy_dims (dimdes*);
+SILO_API extern memdes *lite_PD_copy_members (memdes*);
+SILO_API extern syment *lite_PD_copy_syment (syment*);
+SILO_API extern defstr *lite_PD_defncv (PDBfile*,char*,long,int);
+SILO_API extern char *	lite_PD_dereference (char*);
+SILO_API extern void	lite_PD_error (char*,int);
+SILO_API extern byte *	lite_PD_get_attribute (PDBfile*,char*,char*);
+SILO_API extern long	lite_PD_hyper_number (PDBfile*,char*,syment*);
+SILO_API extern syment *lite_PD_inquire_entry (PDBfile*,char*,int,char*);
+SILO_API extern char **	lite_PD_ls (PDBfile*,char*,char*,int*);
+SILO_API extern PDBfile *lite_PD_open (char*,char*);
+SILO_API extern char *	lite_PD_pwd (PDBfile*);
+SILO_API extern int	lite_PD_read (PDBfile*,char*,byte*);
+SILO_API extern int	lite_PD_read_alt (PDBfile*,char*,byte*,long*);
+SILO_API extern int	lite_PD_read_as (PDBfile*,char*,char*,byte*);
+SILO_API extern int	lite_PD_read_as_alt (PDBfile*,char*,char*,byte*,long*);
+SILO_API extern defstr *lite_PD_typedef (PDBfile*,char*,char*);
+extern int		_lite_PD_align (long,char*,HASHTAB*,int*);
+extern void		_lite_PD_check_casts (HASHTAB*,char**,long);
+extern void		_lite_PD_clr_table (HASHTAB*,FreeFuncType);
+extern long		_lite_PD_comp_num (dimdes*);
+extern int		_lite_PD_compare_std (data_standard*,data_standard*,
+					      data_alignment*,data_alignment*);
+extern int		_lite_PD_convert (char**,char**,long,int,defstr*,
+					  defstr*,data_standard*,long*,long*);
+extern void		_lite_PD_convert_ascii (char*,char*,long,int,int);
+extern data_alignment *	_lite_PD_copy_alignment (data_alignment*);
+extern data_standard *	_lite_PD_copy_standard (data_standard*);
+extern void		_lite_PD_d_install (char*,defstr*,HASHTAB*);
+extern defstr *		_lite_PD_defstr_inst (char*,memdes*,int,int*,long*,
+					      HASHTAB*,HASHTAB*,
+					      data_alignment*,
+					      data_alignment*,int);
+extern void		_lite_PD_e_install (char*,syment*,HASHTAB*);
+extern syment *		_lite_PD_effective_ep (PDBfile*,char*,int,char*);
+extern dimdes *		_lite_PD_ex_dims (char*,int,int);
+extern long		_lite_PD_extract_field (char*,int,int,int,int*);
+extern void		_lite_PD_fconvert (char**,char**,long,int,long*,int*,
+					   long*,int*,int,int,int);
+extern char *		_lite_PD_fixname (PDBfile*,char*);
+extern long		_lite_PD_hyper_number (PDBfile*,char*,long,dimdes*,
+					       long*);
+extern int		_lite_PD_hyper_read (PDBfile*,char*,char*,syment*,
+					     byte*);
+extern void		_lite_PD_iconvert (char**,char**,long,long,int,long,
+					   int,int);
+extern int		_lite_PD_indexed_read_as (PDBfile*,char*,char*,byte*,
+						  int,long*,syment*);
+extern int		_lite_PD_indirection (char*);
+extern void		_lite_PD_init_chrt (PDBfile*);
+extern void		_lite_PD_init_dimind (dimind*,long,long,char*);
+extern long		_lite_PD_lookup_size (char*,HASHTAB*);
+extern defstr *		_lite_PD_lookup_type (char*,HASHTAB*);
+extern char *		_lite_PD_member_base_type (char*);
+extern long		_lite_PD_member_items (char*);
+extern long		_lite_PD_member_location (char*,HASHTAB*,defstr*,
+						  memdes**);
+extern char *		_lite_PD_member_name (char*);
+extern char *		_lite_PD_member_type (char*);
+extern data_alignment *	_lite_PD_mk_alignment (char*);
+extern defstr *		_lite_PD_mk_defstr (char*,memdes*,long,int,int,int,
+					    int*,long*);
+extern memdes *		_lite_PD_mk_descriptor (char*,int);
+extern dimdes *		_lite_PD_mk_dimensions (long,long);
+extern PDBfile *	_lite_PD_mk_pdb (char*);
+extern data_standard *	_lite_PD_mk_standard (void);
+extern syment *		_lite_PD_mk_syment (char*,long,long,symindir*,dimdes*);
+extern int		_lite_PD_null_pointer (char*,int);
+extern int		_lite_PD_pio_close (FILE*);
+extern int		_lite_PD_pio_printf (FILE*,char*,...);
+extern int		_lite_PD_pio_seek (FILE*,long,int);
+extern int		_lite_PD_prim_typep (char*,HASHTAB*,int);
+extern int		_lite_PD_rd_chrt (PDBfile*);
+extern int		_lite_PD_rd_extras (PDBfile*);
+extern int		_lite_PD_rd_format (PDBfile*);
+extern int		_lite_PD_rd_itag (PDBfile*,PD_itag*);
+extern void		_lite_PD_rd_prim_extras (PDBfile*,int,int,char*);
+extern long		_lite_PD_rd_syment (PDBfile*,syment*,char*,byte*);
+extern int		_lite_PD_rd_symt (PDBfile*);
+extern char *		_lite_PD_rfgets (char*,int,FILE*);
+extern void		_lite_PD_rl_alignment (data_alignment*);
+extern void		_lite_PD_rl_defstr (defstr*);
+extern void		_lite_PD_rl_descriptor (memdes*);
+extern void		_lite_PD_rl_dimensions (dimdes*);
+extern void		_lite_PD_rl_pdb (PDBfile*);
+extern void		_lite_PD_rl_standard (data_standard*);
+extern void		_lite_PD_rl_syment (syment*);
+extern void		_lite_PD_rl_syment_d (syment*);
+extern void		_lite_PD_setup_chart (HASHTAB*,data_standard*,
+					      data_standard*,data_alignment*,
+					      data_alignment*,int);
+extern long		_lite_PD_skip_over (PDBfile*,long,int);
+extern long		_lite_PD_str_size (memdes*,HASHTAB*);
+extern int		_lite_PD_unp_bits (char*,char*,int,int,int,int,long,
+					   long);
+
+/* added 26Feb08 as per request from Burl Hall */
+SILO_API extern int     lite_PD_entry_number(syment*);
+SILO_API extern long    lite_PD_get_file_length(PDBfile *file);
+
+extern char            *lite_PD_SYMENT_S;
+extern char            *lite_PD_DEFSTR_S;
+
+#ifdef PDB_WRITE
+SILO_API extern int	lite_PD_mkdir (PDBfile*,char*);
+SILO_API extern int	lite_PD_write (PDBfile*,char*,char*,byte*);
+SILO_API extern int	lite_PD_write_as (PDBfile*,char*,char*,char*,byte*);
+SILO_API extern int	lite_PD_write_alt (PDBfile*,char*,char*,byte*,int,
+			 		   long*);
+SILO_API extern int	lite_PD_write_as_alt (PDBfile*,char*,char*,char*,byte*,
+					      int,long*);
+SILO_API extern PDBfile *lite_PD_create (char*);
+extern int		_lite_PD_adj_dimensions (PDBfile*,char*,syment*);
+extern int		_lite_PD_add_block (PDBfile*,syment*,dimdes*);
+extern int		_lite_PD_hyper_write (PDBfile*,char*,syment*,byte*,
+					      char*);
+extern void		_lite_PD_convert_attrtab (PDBfile*);
+extern int		_lite_PD_wr_format (PDBfile*);
+SILO_API extern defstr *lite_PD_defstr (PDBfile*,char*,...);
+SILO_API extern int	lite_PD_cast (PDBfile*,char*,char*,char*);
+extern int		_lite_PD_extend_file (PDBfile*,long);
+extern long		_lite_PD_wr_syment (PDBfile*,char*,long,char*,char*);
+extern long		_lite_PD_number_refd (byte*,char*,HASHTAB*);
+extern int		_lite_PD_wr_itag (PDBfile*,long,char*,long,int);
+extern void		_lite_PD_eod (PDBfile*);
+SILO_API extern int	lite_PD_target (data_standard*,data_alignment*);
+SILO_API extern int	lite_PD_flush (PDBfile*);
+extern long		_lite_PD_wr_chrt (PDBfile*);
+extern long		_lite_PD_wr_symt (PDBfile*);
+extern int		_lite_PD_wr_extras (PDBfile*);
+extern int		_lite_PD_rev_chrt (PDBfile*);
+extern void		_lite_PD_wr_prim_extras (FILE*,HASHTAB*,int,int);
+SILO_API extern syment 	*lite_PD_defent_alt (PDBfile*,char*,char*,int,long*);
+extern syment		*_lite_PD_defent (PDBfile*,char*,char*,long,dimdes*);
+
+/* added 26Feb08 as per request from Burl Hall */
+SILO_API extern int      lite_PD_append_alt(PDBfile*,char*,void*,int,long*);
+SILO_API extern void     lite_PD_set_major_order(PDBfile*,int);
+#endif /* PDB_WRITE */
+   
+#endif /* !_PDB_H */
diff --git a/src/pdb/pdbdir.c b/src/pdb/pdbdir.c
new file mode 100644
index 0000000..0a6f419
--- /dev/null
+++ b/src/pdb/pdbdir.c
@@ -0,0 +1,525 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDBDIR.C - provides a directory capability for PDBLib
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include "pdb.h"
+#include <string.h>
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_cd
+ *
+ * Purpose:	Change the current working directory.  The directory
+ *		may be specified by an absolute or relative path.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:41 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_cd (PDBfile *file, char *dirname) {
+
+   char name[MAXLINE];
+   syment *ep;
+
+   lite_PD_err[0] = '\0';
+
+   if (file == NULL) {
+      sprintf(lite_PD_err, "ERROR: BAD FILE ID - PD_CD\n");
+      return(FALSE);
+   }
+     
+   if (dirname == NULL) {
+      strcpy(name, "/");
+   } else {
+      strcpy(name, _lite_PD_fixname(file, dirname));
+      if (name[strlen(name) - 1] != '/') strcat(name, "/");
+   }
+
+   ep = lite_PD_inquire_entry(file, name, FALSE, NULL);
+   if (ep == NULL) {
+      if (dirname == NULL) {
+	 return(FALSE);
+      } else {
+	 if (strcmp(name, "/") != 0) {
+	    name[strlen(name) - 1] = '\0';
+	    ep = lite_PD_inquire_entry(file, name, FALSE, NULL);
+	    strcat(name, "/");
+	 }
+
+	 if (ep == NULL) {
+	    sprintf(lite_PD_err, "ERROR: DIRECTORY %s NOT FOUND - PD_CD\n",
+		    dirname);
+	    return(FALSE);
+	 }
+      }
+   }
+
+   if (strcmp(ep->type, "Directory") != 0) {
+      sprintf(lite_PD_err, "ERROR: BAD DIRECTORY %s - PD_CD\n", dirname);
+      return(FALSE);
+   } else {
+      if (file->current_prefix) SFREE(file->current_prefix);
+      file->current_prefix = lite_SC_strsavef(name, "char*:PD_CD:name");
+   }
+
+   return(TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_ls
+ *
+ * Purpose:	Return a list of all variables and directories of the
+ *		specified type in the specified directory.  If type is
+ *		NULL, all types are returned.  If path is NULL, the root
+ *		directory is searched.  Directories are terminated with
+ *		a slash.
+ *
+ * Return:	Success:	Returns an array of pointers to strings.
+ *				The array and the strings are allocated
+ *				with score.  The vector of pointers is
+ *				terminated with the null pointer.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:17 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Dec 10 11:38:43 PST 1998
+ *    I moved a free to be inside a loop to eliminate a memory leak.
+ *
+ *    Mark Miller, Wed Jun 11 16:42:09 PDT 2008
+ *    Fixed valgrind error of src/dst overlap in strcpy
+ *-------------------------------------------------------------------------
+ */
+char **
+lite_PD_ls (PDBfile *file, char *path, char *type, int *num) {
+   syment	*ep;
+   char		**varlist, **outlist;
+   char		*name;
+   char		pattern[MAXLINE];
+   int		nvars, i, has_dirs, head, pass;
+     
+   lite_PD_err[0] = '\0';
+
+   *num = 0;
+
+   if (file == NULL) {
+      sprintf(lite_PD_err, "ERROR: BAD FILE ID - PD_LS\n");
+      return(NULL);
+   }
+
+   if (num == NULL) {
+      sprintf(lite_PD_err, "ERROR: LAST ARGUMENT NULL - PD_LS\n");
+      return(NULL);
+   }
+
+   if (file->symtab->nelements == 0) return(NULL);
+    
+   /*
+    * Determine if file contains directories and
+    * build a pattern which names must match e.g., '/dir/abc*'
+    */
+   if (PD_has_directories(file)) {
+      has_dirs = TRUE;
+      if (path == NULL) {
+	 if (strcmp(lite_PD_pwd(file), "/") == 0) strcpy(pattern, "/*");
+	 else sprintf(pattern, "%s/*", lite_PD_pwd(file));
+      } else {
+	 strcpy(pattern, _lite_PD_fixname(file, path));
+	 ep = lite_PD_inquire_entry(file, pattern, FALSE, NULL);
+	 if ((ep != NULL) && (strcmp(ep->type, "Directory") == 0)) {
+	    if (pattern[strlen(pattern) - 1] == '/') strcat(pattern, "*");
+	    else strcat(pattern, "/*");
+	 } else {
+	    if (pattern[strlen(pattern) - 1] != '/') {
+	       strcat(pattern, "/");
+	       ep = lite_PD_inquire_entry(file, pattern, FALSE, NULL);
+	       if ((ep != NULL) && (strcmp(ep->type, "Directory") == 0))
+		  strcat(pattern, "*");
+	       else
+		  pattern[strlen(pattern) - 1] = '\0';
+	    } else {
+	       pattern[strlen(pattern) - 1] = '\0';
+	       ep = lite_PD_inquire_entry(file, pattern, FALSE, NULL);
+	       if ((ep != NULL) && (strcmp(ep->type, "Directory") == 0))
+		  strcat(pattern, "/*");
+	       else
+		  strcat(pattern, "/");
+	    }
+	 }
+      }
+   } else {
+      has_dirs = FALSE;
+      if (path == NULL) strcpy(pattern, "*");
+      else strcpy(pattern, path);
+   }
+     
+   /*
+    * Generate the list of matching names. Note that this returns items which
+    * are in the requested directory AND items which are in sub-directories of
+    * the requested directory. In other words, all names which BEGIN with the
+    * requested pattern are returned.
+    */
+   nvars = 0;
+   outlist = FMAKE_N(char *, file->symtab->nelements + 1, "PD_LS:outlist");
+     
+   /*
+    * The second pass is in case variables were written to the file before
+    * the first directory was created. Such variables lack an initial slash.
+    */
+   for (pass = 1; pass <= 2; pass++) {
+      if (pass == 2) {
+	 if (has_dirs && (strchr(pattern + 1, '/') == NULL)) {
+            memmove(pattern, pattern+1, strlen(pattern+1)+1);
+	 } else {
+	    break;
+	 }
+      }
+
+      varlist = lite_SC_hash_dump(file->symtab, pattern);
+      if ((varlist == NULL) || (varlist[0] == NULL)) continue;
+     
+      /*
+       * Save only those variables which are IN the requested directory
+       * (not in sub-directories), and are of the requested type
+       */
+      for (i=0; (i<file->symtab->nelements) && (varlist[i]!=NULL); i++) {
+	 /*
+	  * The entry '/' (the root directory) is a special case. It
+	  * is not a child of any directory, so should be ignored.
+	  */
+	 if (strcmp("/", varlist[i]) == 0) continue;
+          
+	 /*
+	  * Check to see if type of this variable matches request.
+	  */
+	 if (type != NULL) {
+	    ep = lite_PD_inquire_entry(file, varlist[i], FALSE, NULL);
+	    if (strcmp(ep->type, type) != 0) continue;
+	 }
+
+	 /*
+	  * If here, then variable is of right type. If this file has
+	  * directories, check for any more slashes (/'s) in the
+	  * name. If any are found, this is not a leaf element. NOTE:
+	  * if directories are not used, slashes are valid charcters
+	  * in file names.
+	  */
+	 if (has_dirs) {
+	    if (pattern[0] != '/') head = 0;
+	    else head = strlen(pattern) - strlen(strrchr(pattern, '/')) + 1;
+	    name = &(varlist[i])[head];
+	    if ((strlen(name) == 0) ||
+		((pass == 2) && (name[0] == '/')) ||
+		((strchr(name, '/') != NULL) &&
+		 (strchr(name, '/') != ((name + strlen(name) - 1)))))
+	       continue;
+	 } else {
+	    name = varlist[i];
+	 }
+          
+	 /*
+	  * Variable is of right type and is a leaf in the requested
+	  * directory.
+	  */
+	 outlist[nvars++] = name;
+      }
+      SFREE(varlist);
+   }
+     
+   /*
+    * Store a null string to terminate list (just a precaution)
+    */
+   outlist[nvars] = NULL;
+
+   if (has_dirs) lite_SC_string_sort(outlist, nvars);
+   *num = nvars;
+     
+   return(outlist);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_pwd
+ *
+ * Purpose:	Returns the current working directory.
+ *
+ * Return:	Success:	A ptr to a statically allocated buffer
+ *				which contains the name of the current
+ *				directory.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:31 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_PD_pwd(PDBfile *file) {
+
+   static char		cwd[MAXLINE];
+
+   lite_PD_err[0] = '\0';
+
+   if (file == NULL) {
+      sprintf(lite_PD_err, "ERROR: BAD FILE ID - PF_PWD\n");
+      return(NULL);
+   }
+
+   if ((file->current_prefix == NULL) ||
+       (strcmp(file->current_prefix, "/") == 0)) {
+      strcpy(cwd, "/");
+   } else {
+      strcpy(cwd, file->current_prefix);
+      cwd[strlen(cwd) - 1] = '\0';
+   }
+   return(cwd);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_fixname
+ *
+ * Purpose:	Make full pathname from current working directory
+ *		and the given pathname (absolute or relative)
+ *
+ * Return:	Success:	Ptr to a static character buffer which
+ *				holds the name.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996  4:40 PM EST
+ *
+ * Modifications:
+ *  Sean Ahern, Thu Jul  2 11:01:32 PDT 1998
+ *  Fixed some indexing problems on strings.
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_PD_fixname (PDBfile *file, char *inname) {
+
+   static char	outname[MAXLINE];
+   char 	*node;
+   char 	tmpstr[MAXLINE];
+
+   if ((file == NULL) || (inname == NULL)) return(NULL);
+
+   outname[0] = '\0';
+
+   if (!PD_has_directories(file)) {
+      /*
+       * If no directories, just copy verbatim.
+       */
+      strcpy(outname, inname);
+   } else {
+      /*
+       * Break path into slash-separated tokens.
+       * Process each node individually.
+       */
+      if (inname[0] != '/') strcpy(outname, lite_PD_pwd(file));
+      strcpy(tmpstr, inname);
+      node = (char *) strtok(tmpstr, "/");
+          
+      while (node != NULL) {
+	 if (strcmp(".",  node) == 0) {
+	    /*void*/
+	 } else if (strcmp("..", node) == 0) {
+	    /*
+	     *	Go up one level, unless already at top.
+	     */
+	    if (strcmp("/", outname) != 0) {
+	       char  *s;
+	       if (outname[strlen(outname) - 1] == '/') {
+		  outname[strlen(outname) - 1] = '\0';
+	       }
+	       s = strrchr(outname, '/');
+	       if (s != NULL) s[0] = '\0';
+	    }
+	 } else {
+	    /*
+	     * Append to end of current path.
+	     */
+	    if ((strlen(outname) == 0) ||
+                (outname[strlen(outname) - 1] != '/'))
+                strcat(outname, "/");
+	    strcat(outname, node);
+	 }
+	 node = (char *) strtok(NULL, "/");
+      }
+
+      if ((strlen(inname) > 0) &&
+          (inname[strlen(inname) - 1] == '/') &&
+	  (outname[strlen(outname) - 1] != '/'))
+	 strcat(outname, "/");
+   }
+
+   if (outname[0] == '\0') strcpy(outname, "/");
+   return(outname);
+}
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_mkdir
+ *
+ * Purpose:	Create a directory.  The directory may be specified by an
+ *		absolute or relative path.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+lite_PD_mkdir (PDBfile *file, char *dirname) {
+
+   int dir;
+   char name[MAXLINE], head[MAXLINE];
+   char *s;
+   static int dir_num = 0;
+     
+   lite_PD_err[0] = '\0';
+
+   if (file == NULL) {
+      sprintf(lite_PD_err, "ERROR: BAD FILE ID - PD_MKDIR\n");
+      return(FALSE);
+   }
+
+   if (dirname == NULL) {
+      sprintf(lite_PD_err, "ERROR: DIRECTORY NAME NULL - PD_MKDIR\n");
+      return(FALSE);
+   }
+     
+   /*
+    * Define type "Directory", if it hasn't been already.
+    */
+   if (!PD_has_directories(file)) {
+      if ((lite_PD_defncv(file, "Directory", 1, 0)) == NULL) return FALSE;
+          
+      /*
+       * Write out the root directory.
+       */
+      dir  = dir_num;
+      if (!lite_PD_write(file, "/", "Directory", &dir)) return(FALSE);
+      dir_num++;
+   }
+
+   /*
+    * Build an absolute pathname.
+    */
+   strcpy(name, _lite_PD_fixname(file, dirname));
+   if (name[strlen(name) - 1] != '/') strcat(name, "/");
+
+   /*
+    * Make sure this directory hasn't already been created.
+    */
+   if (lite_PD_inquire_entry(file, name, FALSE, NULL) != NULL) {
+      sprintf(lite_PD_err, "ERROR: DIRECTORY %s ALREADY EXISTS - PD_MKDIR\n",
+	      name);
+      return(FALSE);
+   }
+
+   /*
+    * Make sure the next higher level directory already exists.
+    */
+   strcpy(head, name);
+   head[strlen(head) - 1] = '\0';
+   s = strrchr(head, '/');
+   if (s != NULL) {
+      s[1] = '\0';
+      if (lite_PD_inquire_entry(file, head, FALSE, NULL) == NULL) {
+	 head[strlen(head) - 1] = '\0';
+	 sprintf(lite_PD_err, "ERROR: DIRECTORY %s DOES NOT EXIST - "
+		 "PD_MKDIR\n", head);
+	 return(FALSE);
+      }
+   }
+
+   /*
+    * Write the directory variable.
+    */
+   dir = dir_num;
+   if (!lite_PD_write(file, name, "Directory", &dir)) return(FALSE);
+   dir_num++;
+     
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb/pdbio.c b/src/pdb/pdbio.c
new file mode 100644
index 0000000..7a81593
--- /dev/null
+++ b/src/pdb/pdbio.c
@@ -0,0 +1,158 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDBIO.C - handle file I/O for PDBLib
+ *         - do things so that it can work over networks and so on
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include "config.h"
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#include "pdb.h"
+
+static char 	Pbuffer[LRG_TXT_BUFFER];
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_pio_close
+ *
+ * Purpose:	Close the file wherever it is.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:26 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_pio_close (FILE *stream) {
+
+   int ret;
+
+   if (stream == NULL) return(EOF);
+   
+   ret = fclose(stream);
+   return(ret);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_pio_seek
+ *
+ * Purpose:	Do an fseek on the file wherever it is.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	nonzero
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:29 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_pio_seek (FILE *stream, long addr, int offset) {
+
+   int ret;
+
+   if (stream == NULL) return(EOF);
+   
+   ret = fseek(stream, addr, offset);
+
+   return(ret);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_pio_printf
+ *
+ * Purpose:	Do an fprintf style write to the given file, wherever it is.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:27 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_pio_printf(FILE *fp, char *fmt, ...) {
+
+   va_list	ap ;
+   size_t	ni, nw;
+
+   va_start (ap, fmt);
+   vsprintf (Pbuffer, fmt, ap);
+   va_end (ap) ;
+
+   ni = strlen(Pbuffer);
+   nw = io_write(Pbuffer, (size_t) 1, ni, fp);
+
+   return((int) nw);
+}
diff --git a/src/pdb/pdbmm.c b/src/pdb/pdbmm.c
new file mode 100644
index 0000000..125dfe3
--- /dev/null
+++ b/src/pdb/pdbmm.c
@@ -0,0 +1,996 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDBMM.C - memory management for the PDB library system
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include <limits.h>
+#include "pdb.h"
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_pdb
+ *
+ * Purpose:	Construct and return a pointer to a PDBFile
+ *
+ * Return:	Success:	Ptr to a new PDB file
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996 11:45 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 09:50:45 PST 1998
+ *    Remove the caching of pointer references.
+ *
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+PDBfile *
+_lite_PD_mk_pdb (char *name) {
+
+   PDBfile *file;
+
+   file = FMAKE(PDBfile, "_PD_MK_PDB:file");
+   if (file == NULL) return(NULL);
+
+   file->stream     = NULL;
+   file->name       = lite_SC_strsavef(name, "char*:_PD_MK_PDB:name");
+   file->type       = NULL;
+
+   file->symtab     = lite_SC_make_hash_table(HSZLARGE, NODOC);
+   file->chart      = lite_SC_make_hash_table(1, NODOC);
+   file->host_chart = lite_SC_make_hash_table(1, NODOC);
+   file->attrtab    = NULL;
+   file->mode       = 0;            /* read only, write only, read-write ? */
+
+   file->maximum_size     = LONG_MAX;                       /* family info */
+   file->previous_file    = NULL;
+
+   file->flushed          = FALSE;                       /* born unflushed */
+   file->virtual_internal = FALSE;                 /* disk file by default */
+   file->current_prefix   = NULL;       /* read/write variable name prefix */
+   file->system_version   = 0;
+
+   file->default_offset = 0;           /* default offset for array indexes */
+   file->major_order    = ROW_MAJOR_ORDER;
+
+   file->std   = NULL;
+   file->align = NULL;
+   file->host_std   = _lite_PD_copy_standard(lite_INT_STANDARD);
+   file->host_align = _lite_PD_copy_alignment(lite_INT_ALIGNMENT);
+
+   file->symtaddr = 0L;
+   file->chrtaddr = 0L;
+   file->headaddr = 0L;
+
+   return(file);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_pdb
+ *
+ * Purpose:	Release the storage associated with the PDBfile
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996 12:03 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 10:51:58 PST 1998
+ *    Removed call to lite_PD_reset_ptr_list since it was removed.  I
+ *    added a call to free current_prefix to close a memory leak.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_pdb (PDBfile *file) {
+
+   SFREE(file->date);
+
+   _lite_PD_rl_standard(file->std);
+   _lite_PD_rl_standard(file->host_std);
+   _lite_PD_rl_alignment(file->align);
+   _lite_PD_rl_alignment(file->host_align);
+
+   if (file->attrtab != NULL) _lite_PD_clr_table(file->attrtab, NULL);
+
+   _lite_PD_clr_table(file->host_chart,(FreeFuncType)_lite_PD_rl_defstr);
+   _lite_PD_clr_table(file->chart,(FreeFuncType)_lite_PD_rl_defstr);
+   _lite_PD_clr_table(file->symtab,(FreeFuncType)_lite_PD_rl_syment_d);
+
+   if (file->previous_file != NULL) SFREE(file->previous_file);
+
+   if (file->current_prefix != NULL) SFREE(file->current_prefix);
+
+   if (file->type != NULL) SFREE(file->type);
+
+   if (lite_LAST != NULL) SFREE(lite_LAST);
+
+   if (lite_PD_DEFSTR_S != NULL) SFREE(lite_PD_DEFSTR_S);
+   lite_PD_DEFSTR_S = NULL;
+
+   if (lite_PD_SYMENT_S != NULL) SFREE(lite_PD_SYMENT_S);
+   lite_PD_SYMENT_S = NULL;
+
+   if (lite_io_close_hook == (PFfclose) _lite_PD_pio_close)
+      lite_io_close_hook = (PFfclose) fclose;
+
+   if (lite_io_seek_hook == (PFfseek) _lite_PD_pio_seek)
+      lite_io_seek_hook = (PFfseek) fseek;
+
+   if (lite_io_printf_hook == (PFfprintf) _lite_PD_pio_printf)
+      lite_io_printf_hook = (PFfprintf) fprintf;
+
+   SFREE(file->name);
+   SFREE(file);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_clr_table
+ *
+ * Purpose:	Release the storage associated with a homogeneous hash
+ *		table.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  1:36 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_clr_table (HASHTAB *tab, FreeFuncType rel) {
+
+   int i, n;
+   hashel **tb, *hp, *nxt;
+
+   n  = tab->size;
+   tb = tab->table;
+   for (i = 0; i < n; i++) {
+      for (hp = tb[i]; hp != NULL; hp = nxt) {
+	 nxt = hp->next;
+	 SFREE(hp->name);
+	 if (rel != NULL) (*rel)(hp->def);
+	 SFREE(hp);
+      }
+      tb[i] = NULL;
+   }
+
+   lite_SC_rl_hash_table(tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_standard
+ *
+ * Purpose:	Allocate, initialize, and return a pointer to a
+ *		data standard.
+ *
+ * Return:	Success:	Ptr to the new data standard struct.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:15 PM EST
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ *-------------------------------------------------------------------------
+ */
+data_standard *
+_lite_PD_mk_standard (void) {
+
+   data_standard *std;
+
+   std = FMAKE(data_standard, "_PD_MK_STANDARD:std");
+
+   std->ptr_bytes     = 0;
+   std->short_bytes   = 0;
+   std->short_order   = 0;
+   std->int_bytes     = 0;
+   std->int_order     = 0;
+   std->long_bytes    = 0;
+   std->long_order    = 0;
+   std->longlong_bytes = 0;
+   std->longlong_order = 0;
+   std->float_bytes   = 0;
+   std->float_format  = NULL;
+   std->float_order   = NULL;
+   std->double_bytes  = 0;
+   std->double_format = NULL;
+   std->double_order  = NULL;
+
+   return(std);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_copy_standard
+ *
+ * Purpose:	Copy the given data standard.
+ *
+ * Return:	Success:	Ptr to the new data standard struct.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 12:59 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ *-------------------------------------------------------------------------
+ */
+data_standard *
+_lite_PD_copy_standard (data_standard *src) {
+
+   data_standard *std;
+   int 		j, n;
+   int 		*ostd, *osrc;
+   long 	*fstd, *fsrc;
+
+   std = FMAKE(data_standard, "_PD_COPY_STANDARD:std");
+
+   std->ptr_bytes    = src->ptr_bytes;
+   std->short_bytes  = src->short_bytes;
+   std->short_order  = src->short_order;
+   std->int_bytes    = src->int_bytes;
+   std->int_order    = src->int_order;
+   std->long_bytes   = src->long_bytes;
+   std->long_order   = src->long_order;
+   std->longlong_bytes = src->longlong_bytes;
+   std->longlong_order = src->longlong_order;
+   std->float_bytes  = src->float_bytes;
+   std->double_bytes = src->double_bytes;
+   
+   n    = lite_FORMAT_FIELDS;
+   std->float_format  = FMAKE_N(long, n, "_PD_COPY_STANDARD:float_format");
+   fstd = std->float_format;
+   fsrc = src->float_format;
+   for (j = 0; j < n; j++, *(fstd++) = *(fsrc++)) /*void*/ ;
+
+   n    = std->float_bytes;
+   std->float_order   = FMAKE_N(int,  n, "_PD_COPY_STANDARD:float_order");
+   ostd = std->float_order;
+   osrc = src->float_order;
+   for (j = 0; j < n; j++, *(ostd++) = *(osrc++)) /*void*/ ;
+
+   n    = lite_FORMAT_FIELDS;
+   std->double_format = FMAKE_N(long, n, "_PD_COPY_STANDARD:double_format");
+   fstd = std->double_format;
+   fsrc = src->double_format;
+   for (j = 0; j < n; j++, *(fstd++) = *(fsrc++)) /*void*/ ;
+
+   n    = std->double_bytes;
+   std->double_order  = FMAKE_N(int,  n, "_PD_COPY_STANDARD:double_order");
+   ostd = std->double_order;
+   osrc = src->double_order;
+   for (j = 0; j < n; j++, *(ostd++) = *(osrc++)) /*void*/ ;
+
+   return(std);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_standard
+ *
+ * Purpose:	Release a data standard structure.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996  1:01 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void 
+_lite_PD_rl_standard (data_standard *std) {
+
+   if (lite_SC_arrlen(std) > 0) {
+      SFREE(std->float_format);
+      SFREE(std->float_order);
+      SFREE(std->double_format);
+      SFREE(std->double_order);
+      SFREE(std);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_alignment
+ *
+ * Purpose:	Allocate, initialize and return a pointer to a
+ *		data_alignment.
+ *
+ * Return:	Success:	Ptr to the new data_alignment struct.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:04 PM EST
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ *-------------------------------------------------------------------------
+ */
+data_alignment *
+_lite_PD_mk_alignment (char *vals) {
+
+   data_alignment *align;
+
+   align = FMAKE(data_alignment, "_PD_MK_ALIGNMENT:align");
+
+   align->char_alignment   = vals[0];
+   align->ptr_alignment    = vals[1];
+   align->short_alignment  = vals[2];
+   align->int_alignment    = vals[3];
+   align->long_alignment   = vals[4];
+   align->longlong_alignment = vals[4]; /* default same as long */
+   align->float_alignment  = vals[5];
+   align->double_alignment = vals[6];
+
+   if (strlen(vals) > 7) align->struct_alignment = vals[7];
+   else align->struct_alignment = 0;
+
+
+   return(align);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_copy_alignment
+ *
+ * Purpose:	Copies a data_alignment structure.
+ *
+ * Return:	Success:	Ptr to new data alignment.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 12:56 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+data_alignment *
+_lite_PD_copy_alignment (data_alignment *src) {
+
+   data_alignment *align;
+
+   align = FMAKE(data_alignment, "_PD_COPY_ALIGNMENT:align");
+   *align = *src;
+   return(align);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_alignment
+ *
+ * Purpose:	Release a data alignment structure.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 12:57 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_alignment (data_alignment *align) {
+
+   if (lite_SC_arrlen(align) > 0) {
+      SFREE(align);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_copy_dims
+ *
+ * Purpose:	Make and return a copy of the given dimension list.
+ *
+ * Return:	Success:	copy of dimension list.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  8, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+dimdes *
+lite_PD_copy_dims (dimdes *odims) {
+
+   dimdes *od, *ndims, *prev, *next;
+
+   prev  = NULL;
+   ndims = NULL;
+    
+   for (od = odims; od != NULL; od = od->next) {
+      next  = FMAKE(dimdes, "PD_COPY_DIMS:next");
+      *next = *od;
+      next->next = NULL;
+
+      if (ndims == NULL) {
+	 ndims = next;
+      } else {
+	 prev->next = next;
+      }
+
+      prev = next;
+   }
+
+   return(ndims);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_copy_syment
+ *
+ * Purpose:	Make and return a copy of the given syment.
+ *
+ * Return:	Success:	a new syment
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:39 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+syment *
+lite_PD_copy_syment (syment *osym) {
+
+   int i, n;
+   char *ntype;
+   syment *nsym;
+   symblock *nsp, *osp;
+   dimdes *ndims;
+
+   if (osym == NULL) return(NULL);
+
+   nsym = FMAKE(syment, "PD_COPY_SYMENT:nsym");
+
+   n   = PD_n_blocks(osym);
+   osp = PD_entry_blocks(osym);
+   nsp = FMAKE_N(symblock, n, "PD_COPY_SYMENT:blocks");
+   for (i = 0; i < n; i++) nsp[i] = osp[i];
+
+   ntype = lite_SC_strsavef(PD_entry_type(osym),
+			    "char*:PD_COPY_SYMENT:type");
+   ndims = lite_PD_copy_dims(PD_entry_dimensions(osym));
+
+   PD_entry_blocks(nsym)     = nsp;
+   PD_entry_type(nsym)       = ntype;
+   PD_entry_dimensions(nsym) = ndims;
+   PD_entry_number(nsym)     = PD_entry_number(osym);
+   PD_entry_indirects(nsym)  = PD_entry_indirects(osym);
+
+   return(nsym);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_syment
+ *
+ * Purpose:	Make and return a pointer to an entry for the symbol table.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:16 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+syment *
+_lite_PD_mk_syment (char *type, long numb, long addr,
+		    symindir *indr, dimdes *dims) {
+
+   syment *ep;
+   symblock *sp;
+   char *t;
+
+   ep = FMAKE(syment, "_PD_MK_SYMENT:ep");
+   sp = FMAKE(symblock, "_PD_MK_SYMENT:sp");
+
+   PD_entry_blocks(ep) = sp;
+
+   sp->number   = numb;
+   sp->diskaddr = addr;
+
+   if (type == NULL) {
+      t = NULL;
+   } else {
+      t = lite_SC_strsavef(type, "char*:_PD_MK_SYMENT:type");
+   }
+   
+   PD_entry_type(ep)       = t;
+   PD_entry_number(ep)     = numb;
+   PD_entry_dimensions(ep) = dims;
+
+   if (indr == NULL) {
+      symindir iloc;
+      iloc.addr       = 0L;
+      iloc.n_ind_type = 0L;
+      iloc.arr_offs = 0L;
+      PD_entry_indirects(ep) = iloc;
+   } else {
+      PD_entry_indirects(ep)  = *indr;
+   }
+
+   return(ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_syment
+ *
+ * Purpose:	Reclaim the space of the given syment.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996 12:05 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_syment (syment *ep) {
+
+   SFREE(PD_entry_type(ep));
+   SFREE(PD_entry_blocks(ep));
+   SFREE(ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_syment_d
+ *
+ * Purpose:	Reclaim the space of the given syment including its
+ *		dimensions.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996 12:06 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_syment_d (syment *ep) {
+
+   if (ep == NULL) return;
+    
+   _lite_PD_rl_dimensions(PD_entry_dimensions(ep));
+   _lite_PD_rl_syment(ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_defstr
+ *
+ * Purpose:	Make a defstr entry for the structure chart.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:45 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+defstr *
+_lite_PD_mk_defstr (char *type, memdes *lst, long sz, int align, int flg,
+		    int conv, int *ordr, long *formt) {
+
+   defstr *dp;
+   memdes *desc;
+   int n;
+
+   dp = FMAKE(defstr, "_PD_MK_DEFSTR:dp");
+
+   dp->type       = lite_SC_strsavef(type, "char*:_PD_MK_DEFSTR:type");
+   dp->alignment  = align;
+   dp->convert    = conv;
+   dp->onescmp    = 0;
+   dp->unsgned    = 0;
+   dp->order_flag = flg;
+   dp->order      = ordr;
+   dp->format     = formt;
+   dp->members    = lst;
+
+   if (sz >= 0) {
+      dp->size_bits = 0L;
+      dp->size      = sz;
+   } else {
+      dp->size_bits = -sz;
+      dp->size      = (-sz + 7) >> 3L;
+      dp->unsgned   = TRUE;
+   }
+
+   /*
+    * Find the number of indirects.
+    */
+   for (n = 0, desc = lst; desc != NULL; desc = desc->next) {
+      if (_lite_PD_indirection(desc->type)) n++;
+   }
+   dp->n_indirects = n;
+
+   return(dp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_defstr
+ *
+ * Purpose:	Free up the storage associated with a defstr.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  3:18 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_defstr (defstr *dp) {
+
+   memdes *desc, *next;
+   int *ord;
+   long *frm;
+
+   for (desc = dp->members; desc != NULL; desc = next) {
+      next = desc->next;
+      _lite_PD_rl_descriptor(desc);
+   }
+
+   ord = dp->order;
+   if ((ord != NULL) && (lite_SC_arrlen(ord) > -1)) SFREE(ord);
+
+   frm = dp->format;
+   if ((frm != NULL) && (lite_SC_arrlen(frm) > -1)) SFREE(dp->format);
+
+   SFREE(dp->type);
+   SFREE(dp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_copy_members
+ *
+ * Purpose:	Copy a linked list of members.
+ *
+ * Return:	Success:	ptr to the new list
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:38 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+memdes *
+lite_PD_copy_members (memdes *desc) {
+
+   memdes *newm, *nnxt, *thism, *prevm;
+   char *ms, *ts, *bs, *ns, *cs;
+   dimdes *nd;
+
+   newm  = NULL;
+   prevm = NULL;
+   for (thism = desc; thism != NULL; thism = thism->next) {
+      nnxt = FMAKE(memdes, "PD_COPY_MEMBERS:nnxt");
+
+      ms = lite_SC_strsavef(thism->member,
+			    "char*:PD_COPY_MEMBERS:member");
+      ts = lite_SC_strsavef(thism->type,
+			    "char*:PD_COPY_MEMBERS:type");
+      bs = lite_SC_strsavef(thism->base_type,
+			    "char*:PD_COPY_MEMBERS:base_type");
+      ns = lite_SC_strsavef(thism->name,
+			    "char*:PD_COPY_MEMBERS:name");
+      nd = lite_PD_copy_dims(thism->dimensions);
+
+      nnxt->member      = ms;
+      nnxt->type        = ts;
+      nnxt->base_type   = bs;
+      nnxt->name        = ns;
+      nnxt->dimensions  = nd;
+      nnxt->next        = NULL;
+
+      nnxt->member_offs = thism->member_offs;
+      nnxt->cast_offs   = thism->cast_offs;
+      nnxt->number      = thism->number;
+
+      if (thism->cast_memb != NULL) {
+	 cs = lite_SC_strsavef(thism->cast_memb,
+			       "char*:PD_COPY_MEMBERS:cast_memb");
+	 nnxt->cast_memb  = cs;
+      } else {
+	 nnxt->cast_memb = NULL;
+      }
+
+      if (newm == NULL) {
+	 newm = nnxt;
+      } else {
+	 prevm->next = nnxt;
+      }
+
+      prevm = nnxt;
+   }
+
+   return(newm);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_descriptor
+ *
+ * Purpose:	Build a member descriptor out of the given string.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:06 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:16:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+memdes *
+_lite_PD_mk_descriptor (char *member, int defoff) {
+
+   memdes *desc;
+   char *ms, *ts, *bs, *ns, *p;
+   dimdes *nd;
+
+   desc = FMAKE(memdes, "_PD_MK_DESCRIPTOR:desc");
+
+   /*
+    * Get rid of any leading white space.
+    */
+   for (p = member; strchr(" \t\n\r\f", *p) != NULL; p++) /*void*/ ;
+
+   ms = lite_SC_strsavef(p, "char*:_PD_MK_DESCRIPTOR:member");
+   ts = _lite_PD_member_type(p);
+   bs = _lite_PD_member_base_type(p);
+   ns = _lite_PD_member_name(p);
+   nd = _lite_PD_ex_dims(p, defoff, FALSE);
+
+   desc->member      = ms;
+   desc->type        = ts;
+   desc->base_type   = bs;
+   desc->name        = ns;
+   desc->dimensions  = nd;
+
+   desc->number      = _lite_PD_comp_num(desc->dimensions);
+   desc->member_offs = -1L;
+   desc->cast_offs   = -1L;
+   desc->cast_memb   = NULL;
+   desc->next        = NULL;
+
+   return(desc);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_descriptor
+ *
+ * Purpose:	Release a member descriptor
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:55 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_descriptor (memdes *desc) {
+
+   SFREE(desc->member);
+   SFREE(desc->name);
+   SFREE(desc->type);
+   SFREE(desc->base_type);
+   SFREE(desc->cast_memb);
+
+   _lite_PD_rl_dimensions(desc->dimensions);
+
+   SFREE(desc);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_mk_dimensions
+ *
+ * Purpose:	Build a dimension descriptor out of the given members
+ *
+ *              struct s_dimdes             
+ *		   {long index_min;         
+ *		    long index_max;         
+ *		    long number;            
+ * 		    struct s_dimdes *next;};
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:08 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+dimdes *
+_lite_PD_mk_dimensions (long mini, long leng) {
+
+   dimdes *dims;
+
+   dims            = FMAKE(dimdes, "_PD_MK_DIMENSIONS:dims");
+   dims->index_min = mini;
+   dims->index_max = mini + leng - 1L;
+   dims->number    = leng;
+   dims->next      = NULL;
+   
+   return(dims);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rl_dimensions
+ *
+ * Purpose:	Release a dimension descriptor.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  3:19 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rl_dimensions (dimdes *dims) {
+
+   dimdes *pp, *nxt;
+   int nc;
+
+   for (pp = dims; pp != NULL; pp = nxt) {
+      nxt = pp->next;
+      nc  = lite_SC_ref_count(pp);
+      SFREE(pp);
+      if (nc > 1) break;
+   }
+}
diff --git a/src/pdb/pdbx.c b/src/pdb/pdbx.c
new file mode 100644
index 0000000..36c9d91
--- /dev/null
+++ b/src/pdb/pdbx.c
@@ -0,0 +1,197 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDBX.C - a set of higher level library routines on top of PDBLib
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include "pdb.h"
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_get_attribute
+ *
+ * Purpose:	Get the value of the specified attribute for the specified
+ *		variable.
+ *
+ * Return:	Success:	Ptr to the attribute value
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:38 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+byte *
+lite_PD_get_attribute (PDBfile *file, char *vr, char *at) {
+   byte 	*vl, **data;
+   attribute 	*attr;
+   attribute_value *avl;
+   char 	fullname[MAXLINE];
+
+   attr = PD_INQUIRE_ATTRIBUTE(at);
+   if (attr == NULL) {
+      sprintf(lite_PD_err, "ATTRIBUTE %s DOESN'T EXIST - PD_GET_ATTR", at);
+      return(NULL);
+   }
+
+   strcpy(fullname, _lite_PD_fixname(file, vr));
+   avl = PD_INQUIRE_ATTRIBUTE_VALUE(fullname);
+   if (avl == NULL) {
+      sprintf(lite_PD_err, "VARIABLE %s HAS NO ATTRIBUTES - PD_GET_ATTR",
+	      fullname);
+      return(NULL);
+   }
+
+   data = attr->data;
+   if (data == NULL) {
+      sprintf(lite_PD_err, "ATTRIBUTE DATA %s DOESN'T EXIST - PD_GET_ATTR",
+	      at);
+      return(NULL);
+   }
+
+   for (/*void*/; avl != NULL; avl = avl->next) {
+      if (strcmp(at, avl->attr->name) == 0) break;
+   }
+
+   if (avl == NULL) {
+      sprintf(lite_PD_err, "VARIABLE %s DOESN'T HAVE ATTRIBUTE %s - "
+	      "PD_GET_ATTR", vr, at);
+      return(NULL);
+   }
+   vl = data[avl->indx];
+
+   return(vl);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_convert_attrtab
+ *
+ * Purpose:	Convert old format attribute table to new format.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+void
+_lite_PD_convert_attrtab (PDBfile *file) {
+
+   int i, sz;
+   defstr *dp;
+   hashel *np, *prev;
+   memdes *desc;
+
+   struct ohashel {
+      char *name;
+      char *type;
+      byte *def;
+      struct ohashel *next;
+   } *onp, *nxt, **otb;
+
+   dp  = PD_inquire_type(file, "hashel");
+   for (desc = dp->members; desc != 0; desc = desc->next) {
+      if (strcmp(desc->member, "integer free") == 0) return;
+   }
+
+   sz  = file->attrtab->size;
+   otb = (struct ohashel **) file->attrtab->table;
+   for (i = 0; i < sz; i++) {
+      prev = NULL;
+      for (onp = otb[i]; onp!= NULL; onp = nxt) {
+	 np = FMAKE(hashel, "_PD_CONVERT_ATTRTAB:np");
+	 np->name = onp->name;
+	 np->type = onp->type;
+	 np->def  = onp->def;
+#ifdef FIX_ME
+	 np->free = TRUE;
+#endif
+	 np->next = NULL;
+	 if (prev == NULL) otb[i]   = (struct ohashel *) np;
+	 else prev->next = np;
+	 prev = np;
+	 nxt  = onp->next;
+	 SFREE(onp);
+      }
+   }
+
+   _lite_PD_rl_defstr(dp);
+   lite_SC_hash_rem("hashel", file->host_chart);
+   lite_SC_hash_rem("hashel", file->chart);
+
+   dp = lite_PD_defstr(file, "hashel",
+		       "char *name", 
+		       "char *type", 
+		       "char *def", 
+		       "integer free", 
+		       "hashel *next", 
+		       lite_LAST);
+   if (dp == NULL) {
+      lite_PD_error("COULDN'T DEFINE HASHEL - _PD_CONVERT_ATTRTAB", PD_OPEN);
+   }
+
+   lite_PD_cast(file, "hashel", "def", "type");
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb/pdconv.c b/src/pdb/pdconv.c
new file mode 100644
index 0000000..316b375
--- /dev/null
+++ b/src/pdb/pdconv.c
@@ -0,0 +1,1478 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDCONV.C - routines to do conversions between data formats
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include <limits.h>
+#include "pdb.h"
+#include "pdform.h"
+
+#define ONES_COMP_NEG(n, nb, incr)                                           \
+    {if (nb == 8*sizeof(long))                                               \
+        n = ~n + incr;                                                       \
+     else                                                                    \
+        {long msk;                                                           \
+         msk = (1L << nb) - 1L;                                              \
+         n   = (~n + incr) & msk;};}
+
+/*
+ * Forward declarations...
+ */
+static void             _PD_btrvout (char*,long,long);
+static int              _PD_get_bit (char*,int,int,int*);
+static void             _PD_insert_field (long,int,char*,int,int,int);
+static void             _PD_ncopy (char**,char**,long,long);
+static void             _PD_ones_complement (char*,long,int);
+static void             _PD_reorder (char*,long,int,int*);
+static void             _PD_set_bit (char*,int);
+static void             _PD_sign_extend (char*,long,int,int,int*);
+
+/*--------------------------------------------------------------------------*/
+/*                             DATA_STANDARDS                               */
+/*--------------------------------------------------------------------------*/
+
+/*
+ * Floating Point Format Descriptor
+ *
+ * -   format[0] = # of bits per number
+ * -   format[1] = # of bits in exponent
+ * -   format[2] = # of bits in mantissa
+ * -   format[3] = start bit of sign
+ * -   format[4] = start bit of exponent
+ * -   format[5] = start bit of mantissa
+ * -   format[6] = high order mantissa bit
+ * -   format[7] = bias of exponent
+ *
+ */
+
+int     lite_FORMAT_FIELDS = 8 ;
+
+int     lite_def_float_order[]    = {1, 2, 3, 4};
+int     lite_def_double_order[]   = {1, 2, 3, 4, 5, 6, 7, 8};
+int     lite_ieee_float_order[]   = {1, 2, 3, 4};
+int     lite_ieeea_double_order[] = {1, 2, 3, 4, 5, 6, 7, 8};
+int     lite_ieeeb_double_order[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
+int     lite_intel_float_order[]  = {4, 3, 2, 1};
+int     lite_intel_double_order[] = {8, 7, 6, 5, 4, 3, 2, 1};
+int     lite_vax_float_order[]    = {2, 1, 4, 3};
+int     lite_vax_double_order[]   = {2, 1, 4, 3, 6, 5, 8, 7};
+int     lite_cray_float_order[]   = {1, 2, 3, 4, 5, 6, 7, 8};
+
+long    lite_def_float[]    = {32L,  8L, 23L, 0L, 1L,  9L, 0L,   0x7FL};
+long    lite_def_double[]   = {64L, 11L, 52L, 0L, 1L, 12L, 0L,  0x3FFL};
+long    lite_ieee_float[]   = {32L,  8L, 23L, 0L, 1L,  9L, 0L,   0x7FL};
+long    lite_ieeea_double[] = {64L, 11L, 52L, 0L, 1L, 12L, 0L,  0x3FFL};
+long    lite_ieeeb_double[] = {96L, 15L, 64L, 0L, 1L, 32L, 1L, 0x3FFEL};
+long    lite_intel_float[]  = {32L,  8L, 23L, 0L, 1L,  9L, 0L,   0x7FL};
+long    lite_intel_double[] = {64L, 11L, 52L, 0L, 1L, 12L, 0L,  0x3FFL};
+long    lite_cray_float[]   = {64L, 15L, 48L, 0L, 1L, 16L, 1L, 0x4000L};
+
+#ifdef GFLOAT
+long    lite_vax_float[]    = {32L,  8L, 23L, 0L, 1L,  9L, 0L,   0x81L};
+long    lite_vax_double[]   = {64L, 11L, 52L, 0L, 1L, 12L, 0L,  0x401L};
+#else
+long    lite_vax_float[]    = {32L,  8L, 23L, 0L, 1L,  9L, 0L,   0x81L};
+long    lite_vax_double[]   = {64L,  8L, 55L, 0L, 1L,  9L, 0L,   0x81L};
+#endif
+
+
+/*
+ * Data standard for the different architectures
+ *
+ *   struct s_data_standard
+ *      {int ptr_bytes;
+ *       int short_bytes;
+ *       int short_order;
+ *       int int_bytes;
+ *       int int_order;
+ *       int long_bytes;
+ *       int long_order;
+ *       int float_bytes;
+ *       long *float_format;
+ *       int *float_order;
+ *       int double_bytes;
+ *       long *double_format;
+ *       int *double_order;};
+ *
+ *   typedef struct s_data_standard data_standard;
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ */
+
+data_standard
+ lite_DEF_STD    = {4,                                    /* size of pointer */
+                    2, NORMAL_ORDER,              /* size and order of short */
+                    4, NORMAL_ORDER,                /* size and order of int */
+                    4, NORMAL_ORDER,               /* size and order of long */
+                    4, NORMAL_ORDER,          /* size and order of long long */
+                    4, lite_def_float,                   /* float definition */
+                    lite_def_float_order,
+                    8, lite_def_double,                 /* double definition */
+                    lite_def_double_order},
+ lite_IEEEA_STD  = {4,                                    /* size of pointer */
+                    2, NORMAL_ORDER,              /* size and order of short */
+                    4, NORMAL_ORDER,                /* size and order of int */
+                    4, NORMAL_ORDER,               /* size and order of long */
+                    8, NORMAL_ORDER,          /* size and order of long long */
+                    4, lite_ieee_float,                  /* float definition */
+                    lite_ieee_float_order,
+                    8, lite_ieeea_double,               /* double definition */
+                    lite_ieeea_double_order},
+ lite_IEEEB_STD  = {4,                                    /* size of pointer */
+                    2, NORMAL_ORDER,              /* size and order of short */
+                    2, NORMAL_ORDER,                /* size and order of int */
+                    4, NORMAL_ORDER,               /* size and order of long */
+                    4, NORMAL_ORDER,          /* size and order of long long */
+                    4, lite_ieee_float,                  /* float definition */
+                    lite_ieee_float_order,
+                    12, lite_ieeeb_double,              /* double definition */
+                    lite_ieeeb_double_order},
+ lite_INTELA_STD = {4,                                    /* size of pointer */
+                    2, REVERSE_ORDER,             /* size and order of short */
+                    2, REVERSE_ORDER,               /* size and order of int */
+                    4, REVERSE_ORDER,              /* size and order of long */
+                    4, REVERSE_ORDER,         /* size and order of long long */
+                    4, lite_intel_float,                 /* float definition */
+                    lite_intel_float_order,
+                    8, lite_intel_double,               /* double definition */
+                    lite_intel_double_order},
+ lite_VAX_STD    = {4,                                    /* size of pointer */
+                    2, REVERSE_ORDER,             /* size and order of short */
+                    4, REVERSE_ORDER,               /* size and order of int */
+                    4, REVERSE_ORDER,              /* size and order of long */
+                    4, REVERSE_ORDER,         /* size and order of long long */
+                    4, lite_vax_float,                   /* float definition */
+                    lite_vax_float_order,
+                    8, lite_vax_double,                 /* double definition */
+                    lite_vax_double_order},
+ lite_CRAY_STD   = {8,                                    /* size of pointer */
+                    8, NORMAL_ORDER,              /* size and order of short */
+                    8, NORMAL_ORDER,                /* size and order of int */
+                    8, NORMAL_ORDER,               /* size and order of long */
+                    8, NORMAL_ORDER,          /* size and order of long long */
+                    8, lite_cray_float,                  /* float definition */
+                    lite_cray_float_order,
+                    8, lite_cray_float,                 /* double definition */
+                    lite_cray_float_order};
+
+
+/*--------------------------------------------------------------------------*/
+/*                            DATA_ALIGNMENTS                               */
+/*--------------------------------------------------------------------------*/
+
+/*
+ * Word Alignment for the different architectures
+ *
+ *
+ *   struct s_data_alignment
+ *      {int char_alignment;
+ *       int ptr_alignment;
+ *       int short_alignment;
+ *       int int_alignment;
+ *       int long_alignment;
+ *       int float_alignment;
+ *       int double_alignment;
+ *       int struct_alignment;};
+ *
+ *   typedef struct s_data_alignment data_alignment;
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ */
+
+/*
+                                     long long
+                                         |          
+                                         |
+                                         V
+                          0  1  2  3  4  5  6  7  8
+*/
+data_alignment
+ lite_RS6000_ALIGNMENT = {1, 4, 2, 4, 4, 8, 4, 4, 0},
+ lite_SPARC_ALIGNMENT  = {1, 4, 2, 4, 4, 4, 4, 8, 0},
+ lite_MIPS_ALIGNMENT   = {1, 4, 2, 4, 4, 8, 4, 8, 0},
+ lite_M68000_ALIGNMENT = {1, 2, 2, 2, 2, 2, 2, 2, 0},
+ lite_INTELA_ALIGNMENT = {1, 2, 2, 2, 2, 2, 2, 2, 0},
+ lite_UNICOS_ALIGNMENT = {4, 8, 8, 8, 8, 8, 8, 8, 8},
+ lite_DEF_ALIGNMENT    = {1, 4, 4, 4, 4, 4, 4, 4, 0};
+
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_convert
+ *
+ * Purpose:     Convert from one machine format to another NITEMS of type
+ *              TYPE from IN and put them in OUT.  ISTD and OSTD are the
+ *              data format standards of IN and OUT respectively.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:34 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_PD_convert (char **out, char **in, char *intype, char *outtype,
+                 long nitems, data_standard *istd, data_standard *ostd,
+                 data_standard *hstd, long *pin_offs, long *pout_offs,
+                 HASHTAB *in_chart, HASHTAB *out_chart, int boffs, int error) {
+
+   int ret, tmp;
+   long i, mitems, in_incr, out_incr;
+   char *mtype;
+   defstr *idp, *odp, *midp, *modp;
+   memdes *desc;
+
+   if (_lite_PD_indirection(outtype)) {
+      in_incr     = _lite_PD_align(*pin_offs, intype, in_chart, &tmp);
+      out_incr    = _lite_PD_align(*pout_offs, outtype, out_chart, &tmp);
+      *pin_offs  += in_incr;
+      *pout_offs += out_incr;
+      *in        += istd->ptr_bytes + in_incr;
+      *out       += ostd->ptr_bytes + out_incr;
+      return(TRUE);
+   }
+
+   idp = PD_inquire_table_type(in_chart, intype);
+   if (idp == NULL)
+      lite_PD_error("BAD TYPE IN_CHART - PD_CONVERT", error);
+
+   odp = PD_inquire_table_type(out_chart, outtype);
+   if (odp == NULL)
+      lite_PD_error("BAD TYPE OUT_CHART - PD_CONVERT", error);
+
+   /*
+    * If members is non-NULL then it is a derived type.
+    */
+   if (odp->members != NULL) {
+      for (i = 0L; i < nitems; i++) {
+         in_incr     = _lite_PD_align(*pin_offs, intype, in_chart, &tmp);
+         out_incr    = _lite_PD_align(*pout_offs, outtype, out_chart, &tmp);
+         *pin_offs  += in_incr;
+         *pout_offs += out_incr;
+         *in        += in_incr;
+         *out       += out_incr;
+
+         for (desc = odp->members; desc != NULL; desc = desc->next) {
+            mitems   = desc->number;
+            mtype    = desc->type;
+            in_incr  = _lite_PD_align(*pin_offs, mtype, in_chart, &tmp);
+            out_incr = _lite_PD_align(*pout_offs, mtype, out_chart, &tmp);
+
+            /*
+             * Increment the offsets to the alignments.
+             */
+            *pin_offs  += in_incr;
+            *pout_offs += out_incr;
+            *in        += in_incr;
+            *out       += out_incr;
+
+            if (_lite_PD_indirection(mtype)) {
+               /*
+                * Don't even think about converting pointers - they will be
+                * recomputed. However, don't throw away information about
+                * whether or not pointer is null.
+                */
+               if (!_lite_PD_null_pointer(*in, istd->ptr_bytes)) **out = 1;
+               *in        += istd->ptr_bytes;
+               *out       += ostd->ptr_bytes;
+               *pin_offs  += istd->ptr_bytes;
+               *pout_offs += ostd->ptr_bytes;
+               ret         = TRUE;
+
+            } else if (_lite_PD_prim_typep(desc->base_type, in_chart, error)) {
+               /*
+                * Check for direct primitives.
+                */
+               modp = PD_inquire_table_type(out_chart, mtype);
+               if (modp == NULL)
+                  lite_PD_error("BAD OUT TYPE IN STRUCT - PD_CONVERT", error);
+
+               midp = PD_inquire_table_type(in_chart, mtype);
+               if (midp == NULL)
+                  lite_PD_error("BAD IN TYPE IN STRUCT - PD_CONVERT", error);
+
+               ret = _lite_PD_convert((char **) out, in, mitems, boffs,
+                                      midp, modp, hstd, pin_offs, pout_offs);
+
+            } else {
+               /*
+                * Recurse for direct derived types.
+                */
+               ret = lite_PD_convert(out, in, mtype, mtype, mitems,
+                                     istd, ostd, hstd, pin_offs, pout_offs,
+                                     in_chart, out_chart, boffs, error);
+            }
+
+            if (!ret)
+               lite_PD_error("STRUCT CONVERSION FAILED - PD_CONVERT",
+                             error);
+         }
+      }
+
+   } else {
+      /*
+       * if members is NULL then it is a primitive type.
+       */
+      ret = _lite_PD_convert((char **) out, in, nitems, boffs, idp, odp,
+                             hstd, pin_offs, pout_offs);
+      if (!ret)
+         lite_PD_error("PRIMITIVE CONVERSION FAILED - PD_CONVERT", error);
+   }
+
+   return(ret);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_null_pointer
+ *
+ * Purpose:     Does input contain only null bytes?
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:02 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_null_pointer (char *in, int bytes) {
+
+   int i;
+
+   for (i = 0; i < bytes; i++) {
+      if (*in++) return(FALSE);
+   }
+
+   return(TRUE);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_prim_typep
+ *
+ * Purpose:     Is the given struct member a primitive data type?
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:03 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_prim_typep (char *memb, HASHTAB *chrt, int error) {
+
+   defstr *pd;
+
+   pd = PD_inquire_table_type(chrt, memb);
+   if (pd == NULL)
+      lite_PD_error("BAD TYPE FROM STRUCTURE CHART - _PD_PRIM_TYPEP", error);
+
+   return((pd->members == NULL));
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_convert
+ *
+ * Purpose:     Convert primitive types from one machine format to another.
+ *              Guaranteed that there will be no indirects here. Convert
+ *              NITEMS of type TYPE from IN and put them in OUT.  ISTD
+ *              defines the data format of the data from IN.  PIN_OFFS and
+ *              POUT_OFFS are pointers to external offset counters and
+ *              they are incremented to account for data alignment.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:58 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_convert (char **out, char **in, long nitems, int boffs,
+                  defstr *idp, defstr *odp, data_standard *hstd,
+                  long *pin_offs, long *pout_offs) {
+
+   int l_order, l_bytes, in_bits, onescmp, unsgned, ret;
+   long in_bytes, out_bytes;
+   int in_flag, out_flag, *in_order, *out_order;
+   long *in_format, *out_format;
+   char *in_type, *out_type;
+
+   in_type    = idp->type;
+   out_type   = odp->type;
+   in_bits    = idp->size_bits;
+   in_bytes   = idp->size;
+   out_bytes  = odp->size;
+   in_order   = idp->order;
+   out_order  = odp->order;
+   in_flag    = idp->order_flag;
+   out_flag   = odp->order_flag;
+   in_format  = idp->format;
+   out_format = odp->format;
+   onescmp    = idp->onescmp;
+   unsgned    = idp->unsgned;
+
+   if ((strchr(in_type, '*') != NULL) || (strchr(out_type, '*') != NULL))
+      return(FALSE);
+
+   l_order = hstd->long_order;
+   l_bytes = hstd->long_bytes;
+
+   ret = TRUE;
+   if ((in_format != NULL) && (out_format != NULL)) {
+      /*
+       * Handle floating point conversions.
+       */
+      _lite_PD_fconvert(out, in, nitems, boffs, in_format, in_order,
+                        out_format, out_order, l_order, l_bytes, onescmp);
+
+      *pin_offs  += in_bytes*nitems;
+      *pout_offs += out_bytes*nitems;
+   } else if (in_bits > 0) {
+      /*
+       * Handle integral bitstreams.
+       */
+      int ityp;
+
+      if (out_bytes == sizeof(char)) ityp = SC_CHAR_I;
+      else if (out_bytes == sizeof(short)) ityp = SC_SHORT_I;
+      else if (out_bytes == sizeof(int)) ityp = SC_INTEGER_I;
+      else if (out_bytes == sizeof(long)) ityp = SC_LONG_I;
+      else return(FALSE);
+
+      /*
+       * Unpack the bitstream into a bytestream.
+       */
+      ret = _lite_PD_unp_bits(*out, *in, ityp, in_bits,
+                              0, nitems, nitems, boffs);
+
+      if (strcmp(in_type, lite_SC_CHAR_S) == 0) {
+         /*
+          * Convert characters.
+          */
+         _lite_PD_convert_ascii(*out, *in, nitems, in_bits, 0);
+
+      } else {
+         /*
+          * Convert integers.
+          */
+         if (!unsgned)
+            _PD_sign_extend(*out, nitems, out_bytes,
+                            in_bits, out_order);
+
+         *in  += in_bytes*nitems;
+         *out += out_bytes*nitems;
+         *pin_offs  += in_bytes*nitems;
+         *pout_offs += out_bytes*nitems;
+      }
+
+   } else if ((in_flag != -1) && (out_flag != -1)) {
+      /*
+       * Handle integer conversions.
+       */
+      _lite_PD_iconvert(out, in, nitems,
+                        (int) in_bytes, in_flag,
+                        (int) out_bytes, out_flag, onescmp);
+
+      *pin_offs  += in_bytes*nitems;
+      *pout_offs += out_bytes*nitems;
+
+   } else {
+      /*
+       * Handle character or unconverted types.
+       */
+      _PD_ncopy(out, in, nitems, in_bytes);
+
+      *pin_offs  += in_bytes*nitems;
+      *pout_offs += out_bytes*nitems;
+   }
+
+   return(ret);
+}
+
+/*--------------------------------------------------------------------------*/
+/*                           ASCII CONVERSION ROUTINES                      */
+/*--------------------------------------------------------------------------*/
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_convert_ascii
+ *
+ * Purpose:     Translate characters fromBCPI bit ASCII to 8-bit ASCII.
+ *              This is only here to allow PDB to read old machine data
+ *              which may not be 8-bit ASCII.
+ *
+ * Inputs:      IN:     Input buffer.
+ *              NITEMS: Number of fields to translate.
+ *              BCPI:   Bits per character on input.
+ *              OFFS:   Zero-origin bit offset from IN to start of data.
+ *
+ * Output:      OUT:    Output buffer.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:05 PM EST
+ *
+ * Modifications:
+ *      Sean Ahern, Wed Apr 12 10:44:26 PDT 2000
+ *      Put in an ARGSUSED comment to prevent compiler warnings.  I don't want
+ *      to remove the parameters, since I don't know how this is called.
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+void
+_lite_PD_convert_ascii (char *out, char *in, long nitems, int bpci, int offs) {
+
+   long i;
+
+   /*
+    * Stretch input characters into 8 bits right-justified
+    * with left bits 0.
+    */
+
+   /* translate chars by adding a blank (0x20) character
+    * to give upper-case letters then or-ing the sum with a blank
+    * to give lower-case letters
+    */
+   for (i = 0; i < nitems; i++) out[i] = (out[i] + ' ') | ' ';
+}
+
+/*--------------------------------------------------------------------------*/
+/*                      INTEGER CONVERSION ROUTINES                         */
+/*--------------------------------------------------------------------------*/
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_iconvert
+ *
+ * Purpose:     Convert integers of nbi bytes to integers of nbo bytes.
+ *              The number of bytes for each integer are give.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:14 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_iconvert (char **out, char **in, long nitems, long nbi, int ordi,
+                   long nbo, int ordo, int onescmp) {
+
+   long i;
+   int j;
+   char *lout, *lin, *po, *pi;
+
+   lin = *in;
+   lout = *out;
+
+   /*
+    * Convert nitems integers.
+    * test sign bit to properly convert negative integers
+    */
+   if (nbi < nbo) {
+      if (ordi == REVERSE_ORDER) {
+         for (j = nbi; j < nbo; j++) {
+            po = lout + j - nbi;
+            pi = lin + nbi - 1;
+            for (i = 0L; i < nitems; i++) {
+               *po = (*pi & 0x80) ? 0xff : 0;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+         for (j = nbi; j > 0; j--) {
+            po = lout + nbo - j;
+            pi = lin + j - 1;
+            for (i = 0L; i < nitems; i++) {
+               *po = *pi;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+      } else {
+         for (j = nbi; j < nbo; j++) {
+            po = lout + j - nbi;
+            pi = lin;
+            for (i = 0L; i < nitems; i++) {
+               *po = (*pi & 0x80) ? 0xff : 0;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+         for (j = 0; j < nbi; j++) {
+            po = lout + j + nbo - nbi;
+            pi = lin + j;
+            for (i = 0L; i < nitems; i++) {
+               *po = *pi;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+      }
+
+   } else if (nbi >= nbo) {
+      if (ordi == REVERSE_ORDER) {
+         for (j = nbo; j > 0; j--) {
+            po = lout + nbo - j;
+            pi = lin + j - 1;
+            for (i = 0L; i < nitems; i++) {
+               *po = *pi;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+      } else {
+         for (j = nbi - nbo; j < nbi; j++) {
+            po = lout + j - nbi + nbo;
+            pi = lin + j;
+            for (i = 0L; i < nitems; i++) {
+               *po = *pi;
+               po += nbo;
+               pi += nbi;
+            }
+         }
+      }
+   }
+
+   /*
+    * If the input used ones complement arithmetic
+    * convert to twos complement.
+    */
+   if (onescmp) _PD_ones_complement(*out, nitems, nbo);
+
+   if (ordo == REVERSE_ORDER) _PD_btrvout(*out, nbo, nitems);
+
+   *in  += nitems*nbi;
+   *out += nitems*nbo;
+}
+
+/*--------------------------------------------------------------------------*/
+/*                       FLOAT CONVERSION ROUTINES                          */
+/*--------------------------------------------------------------------------*/
+
+/* Parametrized Data Conversion Method
+ *
+ * Floating point formats are characterized by a set of parameters which
+ * describe the fundamental elements of a floating point number. These are
+ *
+ *  Sign     - always assumed to be a single bit
+ *           - requires bit offset
+ *  Exponent - assumed to be a biased integer smaller than 32 bits
+ *           - (this allows the conversion to use a long on all known
+ *           - platforms - an exponent greater than 32 bits long would
+ *           - allow much larger numbers than should be needed for
+ *           - scientific computations)
+ *           - requires a bit offset, a bit length, and a bias
+ * Mantissa  - assumed to be a bitstream of arbitrary length
+ *           - requires a bit offset and a bit length
+ * HMB       - in all floating point representations the mantissa is
+ *           - normalized so that the most significant bit is one.
+ *           - in some formats the one is explicitly included in the
+ *           - representation and in others it is only implicit
+ *           - this gives some formats an extra bit of precision.
+ *           - requires a flag which is TRUE if the HMB is explicit
+ *
+ * Two other factors involved are: the byte order which could be
+ * mixed with the bit layout of the numbers but isn't in actual practice
+ * on current machines; and whether one's complement or two's complement
+ * arithmetic is used. Modern machines all use two's complement arithmetic
+ * and the model used here and now is that data from one's complement
+ * machines is to be read only.  This restriction is relatively easy
+ * to relax, but there is no evidence that it should be.
+ *
+ * An issue which is not a problem in the current implementation is that
+ * old machines with byte sizes other than 8 bits can be accomodated
+ * because the conversions treat the input and output as bitstreams
+ * instead of bytestreams.
+ *
+ * The conversion process is summarized as follows:
+ *   1) Extract the sign bit and exponent field from the input number
+ *   2) Subtract the bias of the source format and add the bias
+ *      of the target format
+ *   3) Check for overflow in the exponent
+ *   4) Insert the new exponent and the sign bit in the target stream
+ *   5) Copy the mantissa bits from the source to the target
+ *      compensating for differences in the HMB between the two
+ *      formats
+ *   6) Take care of any known anomalies - e.g. CRAY format is
+ *      inconsistent in that the HMB is explicitly on for all numbers
+ *      with the exception of 0.0
+ *   7) Reorder the bytes of the target stream appropriately
+ *
+ * The floating point formats for a variety of platforms are supplied by
+ * PDBLib and are defined at the top of this file
+ *
+ */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_fconvert
+ *
+ * Purpose:     General floating point conversion routine.  Convert from
+ *              floating point format specified by infor to format
+ *              specified by outfor.
+ *
+ *              floating point format specification:
+ *
+ *                format[0] = # of bits per number
+ *                format[1] = # of bits in exponent
+ *                format[2] = # of bits in mantissa
+ *                format[3] = start bit of sign
+ *                format[4] = start bit of exponent
+ *                format[5] = start bit of mantissa
+ *                format[6] = high order mantissa bit (CRAY needs this)
+ *                format[7] = bias of exponent
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:08 PM EST
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Mar  2 09:39:53 PST 2001
+ *      Added a logic path suggested by Dan Schikore for when the formats
+ *      are the same.
+ *
+ *      Sean Ahern, Fri Mar  2 09:40:15 PST 2001
+ *      Reformatted some of the code.
+ *
+ *-------------------------------------------------------------------------*/
+void
+_lite_PD_fconvert (char **out, char **in, long nitems, int boffs, long *infor,
+                   int *inord, long *outfor, int *outord, int l_order,
+                   int l_bytes, int onescmp) {
+
+   long i, expn, expn_max, hexpn, mant, DeltaBias, hmbo, hmbi;
+   int nbits, inbytes, outbytes, sign;
+   int indxin, indxout, inrem, outrem, dindx;
+   int bi_sign, bo_sign, bi_exp, bo_exp, bi_mant, bo_mant;
+   int nbi_exp, nbo_exp, nbi, nbo;
+   char *lout, *lin;
+   unsigned char *rout;
+   static int BitsMax = 8*sizeof(long);
+
+   nbi     = infor[0];
+   nbo     = outfor[0];
+   nbi_exp = infor[1];
+   nbo_exp = outfor[1];
+
+   bi_sign = infor[3] + boffs;
+   bo_sign = outfor[3];
+   bi_exp  = infor[4] + boffs;
+   bo_exp  = outfor[4];
+   bi_mant = infor[5] + boffs;
+   bo_mant = outfor[5];
+
+   hmbo    = (outfor[6] & 1L);
+   hmbi    = (infor[6] & 1L);
+
+   inbytes   = (nbi + 7) >> 3;
+   outbytes  = (nbo + 7) >> 3;
+   DeltaBias = outfor[7] + hmbo - infor[7] - hmbi;
+   hexpn     = 1L << (outfor[1] - 1L);
+   expn_max  = (1L << outfor[1]) - 1L;
+
+    if ( (inord[0] != outord[0]) ||
+         (infor[0] != outfor[0]) || (infor[1] != outfor[1]) ||
+         (infor[2] != outfor[2]) || (infor[3] != outfor[3]) ||
+         (infor[4] != outfor[4]) || (infor[5] != outfor[5]) ||
+         (infor[6] != outfor[6]) || (infor[7] != outfor[7]) )
+   {
+       /*
+        * Zero out the output buffer.
+        */
+       memset(*out, 0, nitems*outbytes);
+
+       lout = *out;
+       lin  = *in;
+       for (i = 0L; i < nitems; i++) {
+          /*
+           * Move the exponent over.
+           */
+          expn = _lite_PD_extract_field(lin, bi_exp, nbi_exp, inbytes, inord);
+          sign = _PD_get_bit(lin, bi_sign, inbytes, inord);
+
+          /*
+           * If we have a negative number and ones complement arithmetic on the
+           * input side (won't have it on the output side with modern data)
+           * take the complement of the exponent and mantissa.
+           */
+          if (onescmp) {
+             if (sign) {
+                ONES_COMP_NEG(expn, nbi_exp, 1L);
+             } else {
+                expn += (expn < hexpn);
+             }
+          }
+
+          if (expn != 0) expn += DeltaBias;
+
+          if ((0 <= expn) && (expn < expn_max)) {
+             _PD_insert_field(expn, nbo_exp, lout, bo_exp,
+                              l_order, l_bytes);
+
+             if (sign) _PD_set_bit(lout, bo_sign);
+
+             indxin  = bi_mant;
+             inrem   = infor[2];
+             indxout = bo_mant;
+             outrem  = outfor[2];
+
+             dindx = hmbo - hmbi;
+             if (dindx > 0) {
+                /*
+                 * If input high mantissa bit (HMB) is assumed 1 and not written
+                 * (e.g. IEEE) but output HMB is assumed 0 (e.g. CRAY) write the
+                 * input starting at the output HMB+1 and set the HMB.
+                 */
+                _PD_set_bit(lout, indxout);
+                indxout += dindx;
+                outrem  -= dindx;
+             } else if (dindx < 0) {
+                /*
+                 * If input HMB is assumed 0 (e.g. CRAY) but output HMB is assumed
+                 * 1 and not written (e.g. IEEE) take the input from HMB+1 and
+                 * write it to output HMB.
+                 */
+                indxin -= dindx;
+                inrem  += dindx;
+             }
+
+             /*
+              * Move the mantissa over in sizeof(long) packets.
+              */
+             while ((inrem > 0) && (outrem > 0)) {
+                nbits = MIN(BitsMax, inrem);
+                nbits = MIN(nbits, outrem);
+                mant  = _lite_PD_extract_field(lin, indxin, nbits,
+                                               inbytes, inord);
+
+                /*
+                 * Do complement for negative ones complement data.
+                 */
+                if (onescmp && sign) ONES_COMP_NEG(mant, nbits, 0L);
+
+                _PD_insert_field(mant, nbits, lout, indxout,
+                                 l_order, l_bytes);
+
+                indxin  += nbits;
+                indxout += nbits;
+                inrem   -= nbits;
+                outrem  -= nbits;
+             }
+          } else if (expn_max <= expn) {
+             /*
+              * In case of overflow use 1.0e+(expn_max)
+              */
+             _PD_insert_field(expn_max, nbo_exp, lout, bo_exp,
+                              l_order, l_bytes);
+
+             if (_PD_get_bit(lin, bi_sign, inbytes, inord))
+                _PD_set_bit(lout, bo_sign);
+          }
+
+          bi_sign += nbi;
+          bi_exp  += nbi;
+          bi_mant += nbi;
+          bo_sign += nbo;
+          bo_exp  += nbo;
+          bo_mant += nbo;
+       }
+
+       /*
+        * Handle CRAY inconsistency which has zero as the only floating point
+        * number with a 0 in the HMB. Also problem for IEEE 96 bit float.
+        * Fixed by Dave Munro
+        */
+       if (hmbo) {
+          int j, mask = (1 << (7 - bo_mant % 8));
+
+          indxout = outfor[5]/8;
+          rout    = (unsigned char *) *out;
+          for (i = 0L; i < nitems; i++, rout += outbytes) {
+             for (j = 0; j < outbytes; j++) {
+                if ((j == indxout) ? (rout[j] != mask) : rout[j]) break;
+             }
+             if (j == outbytes) rout[indxout] = 0;
+          }
+       }
+    }
+    else
+       memcpy(*out, *in, nitems*outbytes);
+
+   /*
+    * Put the output bytes into the specified order.
+    */
+    for (i=0; i<outbytes; i++)
+       if (inord[i] != outord[i])
+          break;
+    if (i != outbytes)
+       _PD_reorder(*out, nitems, outbytes, outord);
+
+   *in  += nitems*inbytes;
+   *out += nitems*outbytes;
+}
+
+/*--------------------------------------------------------------------------*/
+/*                             HELPER ROUTINES                              */
+/*--------------------------------------------------------------------------*/
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_ncopy
+ *
+ * Purpose:     Copy the NITEMS of size BYTEPITEM from IN to OUT
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:22 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_ncopy (char **out, char **in, long nitems, long bytepitem) {
+
+   long nbytes;
+
+   nbytes = nitems*bytepitem;
+   memcpy(*out, *in, nbytes);
+
+   *in  += nbytes;
+   *out += nbytes;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_unp_bits
+ *
+ * Purpose:     Unpack an array that contains a bitstream.  Arguments are
+ *
+ *              ITYP    the target type of the data when unpacked
+ *              NBITS   the number of bits per item
+ *              PADSZ   the number of bits of pad preceding the fields
+ *              FPP     the number of fields per pad
+ *              NITEMS  the number of items expected
+ *              OFFS    the bit offset of the first pad
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:26 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_unp_bits (char *out, char *in, int ityp, int nbits, int padsz,
+                   int fpp, long nitems, long offs) {
+
+   long i, bita, fld, np, *pl;
+   char *pc;
+   int *pi;
+   short *ps;
+
+   switch (ityp) {
+   case SC_CHAR_I :
+      pc = (char *) out;
+      break;
+   case SC_SHORT_I :
+      ps = (short *) out;
+      break;
+   case SC_INTEGER_I :
+      pi = (int *) out;
+      break;
+   case SC_LONG_I :
+      pl = (long *) out;
+      break;};
+
+   for (i = 0L; i < nitems; i++) {
+      np   = 1 + i/fpp;
+      bita = np*padsz + i*nbits + offs;
+      fld  = _lite_PD_extract_field(in, bita, nbits, INT_MAX, NULL);
+
+      switch (ityp) {
+      case SC_CHAR_I :
+         pc[i] = (char) fld;
+         break;
+      case SC_SHORT_I :
+         ps[i] = (short) fld;
+         break;
+      case SC_INTEGER_I :
+         pi[i] = (int) fld;
+         break;
+      case SC_LONG_I :
+         pl[i] = (long) fld;
+         break;
+      }
+   }
+
+   return(TRUE);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_sign_extend
+ *
+ * Purpose:     Sign extend integers which may come from odd bit
+ *              sized sources.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:23 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_sign_extend (char *out, long nitems, int nbo, int nbti, int *ord) {
+
+   int i, j, sba, mask, sign, indx;
+   unsigned char *lout;
+
+   sba = 8*nbo - nbti;
+
+   /*
+    * If sba is less than zero we have truncated the integers and really
+    * don't know about the sign.
+    */
+   if (sba < 0) return;
+
+   lout = (unsigned char *) out;
+   for (i = 0L; i < nitems; i++) {
+      sign = _PD_get_bit((char *) lout, sba, nbo, ord);
+      if (sign) {
+         for (j = 0; (sba > 8); j++) {
+            indx = (ord != NULL) ? ord[j] : j;
+            lout[indx] = 0xFF;
+         }
+
+         mask = ((1 << sba) - 1) << nbti;
+         indx = (ord != NULL) ? ord[j] : j;
+         lout[indx] |= mask;
+      }
+      lout += nbo;
+   }
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_ones_complement
+ *
+ * Purpose:     Convert ones complement integers to twos complement.
+ *              Note: modern machines use two's complement arithmetic
+ *                    and therefore this is a one way conversion.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:40 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_ones_complement (char *out, long nitems, int nbo) {
+
+   int i, j;
+   unsigned int carry;
+   signed char *lout;
+
+   lout = (signed char *) out;
+   for (i = 0L; i < nitems; i++) {
+      if (*lout < 0) {
+         carry = 1;
+         for (j = nbo-1; (j >= 0) && (carry > 0); j--) {
+            carry  += lout[j];
+            lout[j] = carry & 0xFF;
+            carry   = (carry > 0xFF);
+         }
+      }
+
+      lout += nbo;
+   }
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_btrvout
+ *
+ * Purpose:     Byte reverse nitems words each word is nb bytes long
+ *              where nb is even.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:31 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_btrvout (char *out, long nb, long nitems) {
+
+   long i, jl, jh, nbo2;
+   char tmp;
+   char *p1, *p2;
+
+   nbo2 = nb >> 1;
+   for (jl = 0; jl < nbo2; jl++) {
+      jh = nb - jl - 1;
+      p1 = out + jh;
+      p2 = out + jl;
+      for (i = 0L; i < nitems; i++) {
+         tmp = *p1;
+         *p1 = *p2;
+         *p2 = tmp;
+         p1 += nb;
+         p2 += nb;
+      }
+   }
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_extract_field
+ *
+ * Purpose:     Make a copy of the bit field specified by the starting
+ *              bit OFFS and the number of bits NBI from the byte array
+ *              pointed to by IN.  All indexing is zero based.  The copy
+ *              is to be put in a long and returned.  This imposes a 32
+ *              bit limit (minimum) so repeated calls must be made for
+ *              longer fields.
+ *
+ * Return:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:32 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_extract_field (char *in, int offs, int nbi, int nby, int *ord) {
+
+   long n, bit_field;
+   int offy, tgt, ind;
+   unsigned char mask, bpb;
+
+   bit_field = 0L;
+
+   /*
+    * Move past the apropriate number of bytes so that the start bit is
+    * in the first byte.  OFFY is the offset of the byte containing the
+    * bit OFFS.
+    */
+   n    = offs >> 3;
+   offy = n % nby;
+   n   -= offy;
+   offs = offs % 8;
+
+   /*
+    * Advance the pointer past the unneeded items.
+    */
+   in += n;
+
+   bpb  = 8 - offs;
+   if (ord == NULL) {
+      ind = offy++;
+   } else {
+      if (offy >= nby) {
+         offy -= nby;
+         in += nby;
+      }
+      ind = (ord[offy++] - 1);
+   }
+
+   tgt  = in[ind];
+   mask = (1 << bpb) - 1;
+   bit_field = ((bit_field << bpb) | (tgt & mask));
+   nbi -= bpb;
+   if (nbi < 0) {
+      bit_field = bit_field >> (-nbi);
+   } else {
+      for (; nbi > 0; nbi -= bpb) {
+         if (ord == NULL) {
+            ind = offy++;
+         } else {
+            if (offy >= nby) {
+               offy -= nby;
+               in += nby;
+            }
+            ind = (ord[offy++] - 1);
+         }
+
+         tgt  = in[ind];
+         bpb  = MIN(nbi, 8);
+         mask = (1 << bpb) - 1;
+         bit_field = ((bit_field << bpb) |
+                      ((tgt >> (8 - bpb)) & mask));
+      }
+   }
+   return(bit_field);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_insert_field
+ *
+ * Purpose:     Copy the least significatn NB bits from the given long
+ *              into the byte array pointed to by OUT.  All indexint
+ *              is zero based. OFFS is the offst from the beginning of
+ *              OUT in bits.  This assumes that the output bit array is
+ *              initialized to all zeros after offs.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:35 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_insert_field (long in_long, int nb, char *out, int offs,
+                  int l_order, int l_bytes) {
+
+   int mi, n, dm;
+   long longmask;
+   static int MaxBits = 8*sizeof(long);
+   unsigned char fb;
+   char *in;
+
+   in = (char *) &in_long;
+
+   /*
+    * If the output start bit is not in the first byte move past the apropriate
+    * number of bytes so that the start bit is in the first byte.
+    */
+   if (offs > 7) {
+      out  += (offs >> 3);
+      offs %= 8;
+   }
+
+   /*
+    * If mi is less than offs, copy the first dm bits over, reset offs to 0,
+    * advance mi by dm, and handle the rest as if mi >= offs.
+    */
+   mi = MaxBits - nb;
+   if (mi < offs) {
+      dm = MaxBits - (8 - offs);
+      if (nb == MaxBits) {
+         longmask = ~((1L << dm) - 1L);
+      } else {
+         longmask = ((1L << nb) - 1L) ^ ((1L << dm) - 1L);
+      }
+
+      fb = ((in_long & longmask) >> dm) & ((1L << (nb - dm)) - 1L);
+      *(out++) |= fb;
+
+      mi  += 8 - offs;
+      offs = 0;
+   }
+
+   /*
+    * Assuming mi >= offs, left shift the input so that it is bit aligned
+    * with the output.
+    */
+   dm = mi - offs;
+   longmask = ~((1L << dm) - 1L);
+   in_long  = (in_long << dm) & longmask;
+
+   /*
+    * Reorder the bytes apropriately.
+    */
+   if (l_order == REVERSE_ORDER) _PD_btrvout(in, l_bytes, 1L);
+
+   /*
+    * Copy the remaining aligned bytes over.
+    */
+   for (n = (offs+nb+7)/8; n > 0; n--, *(out++) |= *(in++)) /*void*/ ;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_set_bit
+ *
+ * Purpose:     Set the bit specified as o offset from the given pointer.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:37 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_set_bit (char *base, int offs) {
+
+   int nbytes, mask;
+
+   nbytes  = offs >> 3;
+   base   += nbytes;
+   offs   -= 8*nbytes;
+
+   mask    = (1 << (7 - offs));
+   *base  |= mask;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_get_bit
+ *
+ * Purpose:     Return the bit specified as on offst from the given ptr.
+ *
+ * Return:      Success:        0 or 1
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:38 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_get_bit (char *base, int offs, int nby, int *ord) {
+
+   int nbytes, mask, n;
+
+   n      = offs >> 3;
+   nbytes = n % nby;
+   n     -= nbytes;
+   offs   = offs % 8;
+
+   if (ord == NULL) base += (n + nbytes);
+   else base += (n + (ord[nbytes] - 1));
+
+   mask = (1 << (7 - offs));
+
+   return((*base & mask) != 0);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_reorder
+ *
+ * Purpose:     Given a pointer to an array ARR with NITEMS of NBYTES each
+ *              put them in the order defined by ORD.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 12:39 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_reorder (char *arr, long nitems, int nbytes, int *ord) {
+
+   char local[MAXLINE];
+   int j;
+
+   for (; nitems > 0; nitems--) {
+      arr--;
+      for (j = 0; j < nbytes; local[j] = arr[ord[j]], j++) /*void*/ ;
+      arr++;
+      for (j = 0; j < nbytes; *(arr++) = local[j++]) /*void*/ ;
+   }
+}
diff --git a/src/pdb/pdlow.c b/src/pdb/pdlow.c
new file mode 100644
index 0000000..4ddb022
--- /dev/null
+++ b/src/pdb/pdlow.c
@@ -0,0 +1,2302 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDLOW.C - low level routines for PDBlib
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 17 Apr 1997
+ *      Includes config.h for the HAVE_F*_POINTER feature test results.
+ */
+#include "config.h"
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#if !defined(_WIN32)
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+#include "pdb.h"
+
+/* These prototypes are only included if we can't get them any other place.
+ * We need them for their pointers, below.
+ */
+#ifndef HAVE_FCLOSE_POINTER
+extern int fclose(FILE*);
+#endif
+#ifndef HAVE_FSEEK_POINTER
+extern int fseek(FILE*, long, int);
+#endif
+#ifndef HAVE_FPRINTF_POINTER
+extern int fprintf(FILE*, const char*, ...);
+#endif
+
+#define BUFINCR         4096
+#define N_CASTS_INCR    30
+
+
+#define PD_REVERSE_LIST(type, var, member)                                  \
+   {type *ths, *nxt, *prv;                                                  \
+    for (ths = NULL, nxt = var; nxt != NULL; )                              \
+        {prv = ths;                                                         \
+         ths = nxt;                                                         \
+         nxt = ths->member;                                                 \
+         ths->member = prv;};                                               \
+    var = ths;}
+
+#define PD_COMPARE_PTR_STD(eq, a, b, c, d)                                   \
+    eq = (a->ptr_bytes != b->ptr_bytes) ||                                   \
+         (c->ptr_alignment != d->ptr_alignment)
+
+#define PD_COMPARE_CHAR_STD(eq, a, b, c, d)                                  \
+    eq = (c->char_alignment != d->char_alignment)
+
+#define PD_COMPARE_SHORT_STD(eq, a, b, c, d)                                 \
+   PD_COMPARE_FIX_STD(eq,                                                    \
+                      a->short_bytes,     b->short_bytes,                    \
+                      a->short_order,     b->short_order,                    \
+                      c->short_alignment, d->short_alignment)
+
+#define PD_COMPARE_INT_STD(eq, a, b, c, d)                                   \
+   PD_COMPARE_FIX_STD(eq,                                                    \
+                      a->int_bytes,     b->int_bytes,                        \
+                      a->int_order,     b->int_order,                        \
+                      c->int_alignment, d->int_alignment)
+
+#define PD_COMPARE_LONG_STD(eq, a, b, c, d)                                  \
+   PD_COMPARE_FIX_STD(eq,                                                    \
+                      a->long_bytes,     b->long_bytes,                      \
+                      a->long_order,     b->long_order,                      \
+                      c->long_alignment, d->long_alignment)
+
+#define PD_COMPARE_LONGLONG_STD(eq, a, b, c, d)                              \
+   PD_COMPARE_FIX_STD(eq,                                                    \
+                      a->longlong_bytes,     b->longlong_bytes,              \
+                      a->longlong_order,     b->longlong_order,              \
+                      c->longlong_alignment, d->longlong_alignment)
+
+#define PD_COMPARE_FIX_STD(eq, na, nb, oa, ob, la, lb)                       \
+    eq = (na != nb) || (oa != ob) || (la != lb)
+
+#define PD_COMPARE_FLT_STD(eq, a, b, c, d)                                   \
+   PD_COMPARE_FP_STD(eq,                                                     \
+                     a->float_bytes,     b->float_bytes,                     \
+                     a->float_order,     b->float_order,                     \
+                     a->float_format,    b->float_format,                    \
+                     c->float_alignment, d->float_alignment)
+
+#define PD_COMPARE_DBL_STD(eq, a, b, c, d)                                   \
+   PD_COMPARE_FP_STD(eq,                                                     \
+                     a->double_bytes,     b->double_bytes,                   \
+                     a->double_order,     b->double_order,                   \
+                     a->double_format,    b->double_format,                  \
+                     c->double_alignment, d->double_alignment)
+
+#define PD_COMPARE_FP_STD(eq, na, nb, oa, ob, fa, fb, la, lb)                \
+   {int j, *poa, *pob;                                                       \
+    long *pfa, *pfb;                                                         \
+    poa = oa;                                                                \
+    pob = ob;                                                                \
+    pfa = fa;                                                                \
+    pfb = fb;                                                                \
+    eq  = (na != nb) || (la != lb);                                          \
+    if (!eq)                                                                 \
+       {for (j = 0; j < na; j++, eq |= (*(poa++) != *(pob++)));              \
+        for (j = 0; j < lite_FORMAT_FIELDS; j++, eq |= (*(pfa++) != *(pfb++)));};}
+
+
+char            *_lite_PD_tbuffer = NULL;
+char            *lite_PD_SYMENT_S = NULL;
+char            *lite_PD_DEFSTR_S = NULL;
+
+static long     _PD_n_casts = 0L;
+static int      _PD_has_dirs = FALSE;
+static char     local[LRG_TXT_BUFFER];
+static char     **_PD_cast_lst ;
+
+static defstr * _lite_PD_defstr (HASHTAB*,char*,int,long,int,int,int*,long*);
+static char *   _PD_get_tok (char*,int,FILE*,int);
+static char *   _PD_get_token (char*,char*,int,int);
+static int      _PD_consistent_dims (PDBfile*,syment*,dimdes*);
+
+#ifdef PDB_WRITE
+static int      _PD_put_string (int,char*,...);
+#endif /* PDB_WRITE */
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_format
+ *
+ * Purpose:     Read the primitive data format information from the
+ *              file header block.
+ *
+ *              Floating Point Format Descriptor                        
+ *                format[0] = # of bits per number                      
+ *                format[1] = # of bits in exponent                     
+ *                format[2] = # of bits in mantissa                     
+ *                format[3] = start bit of sign                         
+ *                format[4] = start bit of exponent                     
+ *                format[5] = start bit of mantissa                     
+ *                format[6] = high order mantissa bit (CRAY needs this) 
+ *                format[7] = bias of exponent
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 11:55 AM EST
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:25:58 PST 2009
+ *   Moved support for long long to 'extras' to match more closely
+ *   what PDB proper would do.
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_rd_format (PDBfile *file) {
+
+   int j, n, *order;
+   long *format;
+   char infor[MAXLINE], *p;
+   data_standard *std;
+
+   /*
+    * Read the number of bytes worth of format data.
+    */
+   if (io_read(infor, (size_t) 1, (size_t) 1, file->stream) != 1)
+      lite_PD_error("FAILED TO READ FORMAT HEADER - _PD_RD_FORMAT", PD_OPEN);
+    
+   n = infor[0] - 1;
+
+   /*
+    * Read the format data
+    */
+   if (io_read(infor+1, (size_t) 1, (size_t) n, file->stream) != n)
+      lite_PD_error("FAILED TO READ FORMAT DATA - _PD_RD_FORMAT", PD_OPEN);
+    
+   /*
+    * Decipher the format data.
+    */
+   p             = infor + 1;
+   std           = _lite_PD_mk_standard();
+
+   /*
+    * Get the byte lengths in.
+    */
+   std->ptr_bytes    = *(p++);
+   std->short_bytes  = *(p++);
+   std->int_bytes    = *(p++);
+   std->long_bytes   = *(p++);
+   std->float_bytes  = *(p++);
+   std->double_bytes = *(p++);
+
+   /*
+    * Get the integral types byte order in.
+    */
+   std->short_order = (char) *(p++);
+   std->int_order   = (char) *(p++);
+   std->long_order  = (char) *(p++);
+
+   /*
+    * Get the float byte order in.
+    */
+   n     = std->float_bytes;
+   order = std->float_order = FMAKE_N(int, n, "_PD_RD_FORMAT:float_order");
+   for (j = 0; j < n; j++, *(order++) = *(p++)) /*void*/ ;
+
+   /*
+    * Get the double byte order in.
+    */
+   n     = std->double_bytes;
+   order = std->double_order = FMAKE_N(int, n, "_PD_RD_FORMAT:double_order");
+   for (j = 0; j < n; j++, *(order++) = *(p++)) /*void*/ ;
+
+   /*
+    * Get the float format data in.
+    */
+   n = lite_FORMAT_FIELDS;
+   format = std->float_format = FMAKE_N(long, n, "_PD_RD_FORMAT:float_format");
+   n--;
+   for (j = 0; j < n; j++, *(format++) = *(p++)) /*void*/ ;
+
+   /*
+    * Get the double format data in.
+    */
+   n = lite_FORMAT_FIELDS;
+   format = std->double_format = FMAKE_N(long, n,
+                                         "_PD_RD_FORMAT:double_format");
+   n--;
+   for (j = 0; j < n; j++, *(format++) = *(p++)) /*void*/ ;
+
+   /*
+    * Read the biases.
+    */
+   if (_lite_PD_rfgets(infor, MAXLINE, file->stream) == NULL)
+      lite_PD_error("CAN'T READ THE BIASES - _PD_RD_FORMAT", PD_OPEN);
+
+   format    = std->float_format;
+   format[7] = lite_SC_stol(strtok(infor, "\001"));
+   format    = std->double_format;
+   format[7] = lite_SC_stol(strtok(NULL, "\001"));
+
+   file->std = std;
+
+   return(TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_compare_std
+ *
+ * Purpose:     Compare two data_standards and the associated alignments.
+ *
+ * Return:      Success:        TRUE if all elements are equal
+ *                              FALSE otherwise
+ *
+ *              Failure:        Never fails.
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  4, 1996 12:50 PM EST
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:26:49 PST 2009
+ *   Fixed missing comparison for longlong_order.
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_compare_std (data_standard *a, data_standard *b,
+                      data_alignment *c, data_alignment *d) {
+
+   int          j, n, *oa, *ob, eq;
+   long         *fa, *fb;
+
+   eq = ((a->ptr_bytes    == b->ptr_bytes) &&
+         (a->short_bytes  == b->short_bytes) &&
+         (a->int_bytes    == b->int_bytes) &&
+         (a->long_bytes   == b->long_bytes) &&
+         (a->longlong_bytes == b->longlong_bytes) &&
+         (a->float_bytes  == b->float_bytes) &&
+         (a->double_bytes == b->double_bytes) &&
+         (a->short_order  == b->short_order) &&
+         (a->int_order    == b->int_order) &&
+         (a->long_order   == b->long_order) &&
+         (a->longlong_order == b->longlong_order));
+   
+   if (!eq) return(FALSE);
+
+   /*
+    * Check the float byte order.
+    */
+   n  = a->float_bytes;
+   oa = a->float_order;
+   ob = b->float_order;
+   for (j = 0; j < n; j++, eq &= (*(oa++) == *(ob++))) /*void*/ ;
+
+   /*
+    * Check the double byte order.
+    */
+   n  = a->double_bytes;
+   oa = a->double_order;
+   ob = b->double_order;
+   for (j = 0; j < n; j++, eq &= (*(oa++) == *(ob++))) /*void*/ ;
+
+   /*
+    * Check the float format data.
+    */
+   n  = lite_FORMAT_FIELDS;
+   fa = a->float_format;
+   fb = b->float_format;
+   for (j = 0; j < n; j++, eq &= (*(fa++) == *(fb++))) /*void*/ ;
+
+   /*
+    * Check the double format data.
+    */
+   n  = lite_FORMAT_FIELDS;
+   fa = a->double_format;
+   fb = b->double_format;
+   for (j = 0; j < n; j++, eq &= (*(fa++) == *(fb++))) /*void*/ ;
+
+   /*
+    * Check alignments.
+    */
+   eq &= ((c->char_alignment   == d->char_alignment) &&
+          (c->ptr_alignment    == d->ptr_alignment) &&
+          (c->short_alignment  == d->short_alignment) &&
+          (c->int_alignment    == d->int_alignment) &&
+          (c->long_alignment   == d->long_alignment) &&
+          (c->longlong_alignment == d->longlong_alignment) &&
+          (c->float_alignment  == d->float_alignment) &&
+          (c->double_alignment == d->double_alignment));
+
+   return(eq);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_symt
+ *
+ * Purpose:     Read the symbol table from the PDB file into a hash table
+ *              of the PDB for future lookup.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 11:59 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:53:07 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_rd_symt (PDBfile *file) {
+
+   char *name, *type, *tmp, *pbf;
+   long numb, addr, mini, leng, symt_sz;
+   FILE *fp;
+   syment *ep;
+   HASHTAB *tab;
+   dimdes *dims, *next, *prev;
+
+   fp = file->stream;
+
+   /*
+    * Find the overall file length.
+    */
+   addr = io_tell(fp);
+   io_seek(fp, 0, SEEK_END);
+   numb = io_tell(fp);
+   io_seek(fp, addr, SEEK_SET);
+
+   /*
+    * Read in the symbol table and extras table as a single block.
+    */
+   symt_sz     = numb - file->symtaddr + 1;
+   _lite_PD_tbuffer = MAKE_N(char, symt_sz);
+   numb        = io_read(_lite_PD_tbuffer, 1, symt_sz, fp) + 1;
+   if (numb != symt_sz) return(FALSE);
+   _lite_PD_tbuffer[symt_sz-1] = (char) EOF;
+
+   pbf  = _lite_PD_tbuffer;
+   prev = NULL;
+   tab  = file->symtab;
+   while (_PD_get_token(pbf, local, LRG_TXT_BUFFER, '\n')) {
+      pbf  = NULL;
+      name = strtok(local, "\001");
+      if (name == NULL) break;
+      type = strtok(NULL, "\001");
+      numb = lite_SC_stol(strtok(NULL, "\001"));
+      addr = lite_SC_stol(strtok(NULL, "\001"));
+      dims = NULL;
+      while ((tmp = strtok(NULL, "\001\n")) != NULL) {
+         mini = lite_SC_stol(tmp);
+         leng = lite_SC_stol(strtok(NULL, "\001\n"));
+         next = _lite_PD_mk_dimensions(mini, leng);
+         if (dims == NULL) {
+            dims = next;
+         } else {
+            prev->next = next;
+         }
+
+         prev = next;
+      }
+      ep = _lite_PD_mk_syment(type, numb, addr, NULL, dims);
+      _lite_PD_e_install(name, ep, tab);
+   }
+   return(TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_chrt
+ *
+ * Purpose:     Read the structure chart from the PDB file into the
+ *              internal structure chart.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 11:47 AM EST
+ *
+ * Modifications:
+ *      Sean Ahern, Wed Apr 12 10:49:15 PDT 2000
+ *      Removed some compiler warnings.
+ *-------------------------------------------------------------------------*/
+int
+_lite_PD_rd_chrt (PDBfile *file) {
+
+   char *nxt, type[MAXLINE], *pbf;
+   FILE *fp;
+   memdes *desc, *lst, *prev;
+   long i, chrt_sz;
+
+   fp = file->stream;
+
+   /*
+    * Read the entire chart into memory to speed processing.
+    */
+   chrt_sz     = file->symtaddr - file->chrtaddr + 1;
+   _lite_PD_tbuffer = MAKE_N(char, chrt_sz);
+   if (io_read(_lite_PD_tbuffer, 1, chrt_sz, fp) != chrt_sz) return(FALSE);
+   _lite_PD_tbuffer[chrt_sz-1] = (char) EOF;
+
+   prev = NULL;
+   pbf  = _lite_PD_tbuffer;
+   while (_PD_get_token(pbf, type, MAXLINE, '\001')) {
+      pbf = NULL;
+      if (type[0] == '\002') break;
+      _PD_get_token(pbf, local, MAXLINE, '\001');
+      lst  = NULL;
+      while ((nxt = _PD_get_token(pbf, local, MAXLINE, '\001')) != NULL) {
+         if (*nxt == '\0') break;
+         desc = _lite_PD_mk_descriptor(nxt, file->default_offset);
+         if (lst == NULL) lst = desc;
+         else prev->next = desc;
+         prev = desc;
+      }
+
+      /*
+       * Install the type in both charts.
+       */
+      _lite_PD_defstr_inst(type, lst, -1, NULL, NULL,
+                           file->chart, file->host_chart,
+                           file->align, file->host_align,
+                           FALSE);};
+
+   /*
+    * Complete the setting of the directory indicator.
+    */
+   if (_PD_has_dirs) lite_PD_defncv(file, "Directory", 1, 0);
+   _PD_has_dirs = FALSE;
+
+   /*
+    * Check the casts for the file->chart.
+    */
+   _lite_PD_check_casts(file->chart, _PD_cast_lst, _PD_n_casts);
+
+   /*
+    * Check the casts for the file->host_chart.
+    */
+   _lite_PD_check_casts(file->host_chart, _PD_cast_lst, _PD_n_casts);
+
+   /*
+    * Clean up the mess.
+    */
+   for (i = 0L; i < _PD_n_casts; i += 3) {
+      SFREE(_PD_cast_lst[i]);
+      SFREE(_PD_cast_lst[i+1]);
+   }
+   SFREE(_PD_cast_lst);
+   _PD_n_casts = 0L;
+
+   SFREE(_lite_PD_tbuffer);
+
+   return(TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_check_casts
+ *
+ * Purpose:     Complete the set up of the casts in the given chart.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:32 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_check_casts (HASHTAB *chrt, char **lst, long n) {
+
+   memdes *memb, *desc;
+   long i;
+   hashel *hp;
+   defstr *dp;
+
+   for (hp = *(chrt->table); hp != NULL; hp = hp->next) {
+      dp = (defstr *) hp->def;
+      for (desc = dp->members; desc != NULL; desc = desc->next) {
+         for (i = 0L; i < n; i += 3) {
+            if ((strcmp(dp->type, lst[i]) == 0) &&
+                (strcmp(desc->member, lst[i+1]) == 0)) {
+               desc->cast_memb = lst[i+2];
+               desc->cast_offs = _lite_PD_member_location(desc->cast_memb,
+                                                          chrt, dp, &memb);
+            }
+         }
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_extras
+ *
+ * Purpose:     Read any extraneous data from the file. This is essentially
+ *              a place for expansion of the file.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 11:49 AM EST
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 17 22:27:19 PST 2009
+ *   Added support for long long datatype in a manner that matches how
+ *   PDB proper does it.
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_rd_extras (PDBfile *file) {
+
+   char *token;
+   data_alignment *pa;
+
+   _PD_n_casts = 0L;
+
+   file->default_offset = 0;
+   file->system_version = 0;
+   file->date           = NULL;
+
+   /*
+    * Read the default offset.
+    */
+   while (_PD_get_token(NULL, local, LRG_TXT_BUFFER, '\n')) {
+      token = lite_SC_firsttok(local, ":\n");
+      if (token == NULL) break;
+
+      /*
+       * Get the default offset.
+       */
+      if (strcmp(token, "Offset") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL) file->default_offset = atoi(token);
+         
+      } else if (strcmp(token, "Alignment") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL) pa = _lite_PD_mk_alignment(token);
+         else return(FALSE);
+
+      } else if (strcmp(token, "Struct-Alignment") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL) pa->struct_alignment = atoi(token);
+
+      } else if (strcmp(token, "Longlong-Format-Alignment") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL) {
+             data_standard *ps = file->std;
+             ps->longlong_bytes     = token[0];
+             ps->longlong_order     = token[1];
+             pa->longlong_alignment = token[2];
+         }
+
+      } else if (strcmp(token, "Casts") == 0) {
+         long n_casts, i;
+         char **pl;
+
+         n_casts = N_CASTS_INCR;
+         pl      = FMAKE_N(char *, N_CASTS_INCR, "_PD_RD_EXTRAS:cast-list");
+         i       = 0L;
+         while (_PD_get_token(NULL, local, LRG_TXT_BUFFER, '\n')) {
+            if (*local == '\002') break;
+            pl[i++] = lite_SC_strsavef(strtok(local, "\001\n"),
+                                       "char*:_PD_RD_EXTRAS:local1");
+            pl[i++] = lite_SC_strsavef(strtok(NULL, "\001\n"),
+                                       "char*:_PD_RD_EXTRAS:local2");
+            pl[i++] = lite_SC_strsavef(strtok(NULL, "\001\n"),
+                                       "char*:_PD_RD_EXTRAS:local3");
+            if (i >= n_casts) {
+               n_casts += N_CASTS_INCR;
+               REMAKE_N(pl, char *, n_casts);
+            }
+         }
+         _PD_cast_lst = pl;
+         _PD_n_casts  = i;
+
+      } else if (strcmp(token, "Blocks") == 0) {
+         long j, n, nt, addr, numb, stride;
+         char *name;
+         symblock *sp;
+         syment *ep;
+         dimdes *dim;
+
+         while (_PD_get_token(NULL, local, LRG_TXT_BUFFER, '\n')) {
+            if (*local == '\002') break;
+
+            name = strtok(local, "\001\n");
+            n    = lite_SC_stoi(strtok(NULL, " \n"));
+            ep   = lite_PD_inquire_entry(file, name, FALSE, NULL);
+            sp   = REMAKE_N(PD_entry_blocks(ep), symblock, n);
+            nt   = 0L;
+            for (j = 0L; j < n; j++) {
+               addr = lite_SC_stoi(strtok(NULL, " \n"));
+               numb = lite_SC_stoi(strtok(NULL, " \n"));
+               if ((addr == 0L) || (numb == 0L)) {
+                  _PD_get_token(NULL, local, LRG_TXT_BUFFER, '\n');
+                  addr = lite_SC_stoi(strtok(local, " \n"));
+                  numb = lite_SC_stoi(strtok(NULL, " \n"));
+               }
+                         
+               sp[j].diskaddr = addr;
+               sp[j].number   = numb;
+
+               nt += numb;
+            }
+
+            /*
+             * Adjust the slowest varying dimension to reflect the
+             * entire entry.
+             */
+            dim = PD_entry_dimensions(ep);
+            if (PD_get_major_order(file) == COLUMN_MAJOR_ORDER) {
+               for (/*void*/; dim->next != NULL; dim = dim->next) /*void*/;
+            }
+
+            stride = PD_entry_number(ep)/dim->number;
+            stride = nt/stride;
+            dim->number    = stride;
+            dim->index_max = dim->index_min + stride - 1L;
+
+            /*
+             * Adjust the number to reflect the entire entry.
+             */
+            PD_entry_number(ep) = nt;
+
+            PD_entry_blocks(ep) = sp;
+         }
+
+      } else if (strcmp(token, "Primitive-Types") == 0) {
+         /*
+          * Read in the primitives.
+          */
+         _lite_PD_rd_prim_extras(file, '\001', '\002', NULL);
+
+      } else if (strcmp(token, "Major-Order") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL) file->major_order = atoi(token);
+
+      } else if (strcmp(token, "Has-Directories") == 0) {
+         if (lite_SC_stoi(lite_SC_firsttok(local, "\n"))) _PD_has_dirs = TRUE;
+
+      } else if (strcmp(token, "Previous-File") == 0) {
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL)
+            file->previous_file = lite_SC_strsavef(token,
+                                                   "char*:_PD_RD_EXTRAS:prev");
+
+      } else if (strcmp(token, "Version") == 0) {
+         token = lite_SC_firsttok(local, "|");
+         if (token != NULL) file->system_version = atoi(token);
+
+         token = lite_SC_firsttok(local, "\n");
+         if (token != NULL)
+            file->date = lite_SC_strsavef(token,
+                                          "char*:_PD_RD_EXTRAS:date");
+      }
+   }
+
+   /*
+    * Set the file->align (if pre-PDB_SYSTEM_VERSION 3 use the default
+    * alignment.
+    */
+   if (pa != NULL) file->align = pa;
+   else file->align = _lite_PD_copy_alignment(&lite_DEF_ALIGNMENT);
+
+   /*
+    * Release the buffer which held both the symbol table and the extras.
+    */
+   SFREE(_lite_PD_tbuffer);
+
+   return(TRUE);
+}
+
+
+/*--------------------------------------------------------------------------*/
+/*                     PRIMITIVE TYPE I/O ROUTINES                          */
+/*--------------------------------------------------------------------------*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_prim_extras
+ *
+ * Purpose:     Read the primitive types from the extras table.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  2:49 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_rd_prim_extras (PDBfile *file, int dc, int rec, char *bf) {
+
+   char *token, *type, delim[10];
+   int align, flg;
+   long i, size;
+   int *ordr;
+   long *formt;
+
+   sprintf(delim, "%c\n", dc);
+
+   if (bf != NULL) _PD_get_token(bf, local, LRG_TXT_BUFFER, '\n');
+
+   while (_PD_get_token(NULL, local, LRG_TXT_BUFFER, '\n')) {
+      if (*local == rec) break;
+      type  = lite_SC_strsavef(strtok(local, delim),
+                               "char*:_PD_RD_PRIM_EXTRAS:type");
+      size  = lite_SC_stol(strtok(NULL, delim));
+      align = lite_SC_stol(strtok(NULL, delim));
+      flg   = lite_SC_stol(strtok(NULL, delim));
+      ordr  = NULL;
+      formt = NULL;
+
+      token = strtok(NULL, delim);
+      if (strcmp(token, "ORDER") == 0) {
+         ordr = FMAKE_N(int, size, "_PD_RD_PRIM_EXTRAS:order");
+         for (i=0L; i<size; i++) ordr[i] = lite_SC_stol(strtok(NULL, delim));
+      }
+                    
+      token = strtok(NULL, delim);
+      if (strcmp(token, "FLOAT") == 0) {
+         formt = FMAKE_N(long, 8, "_PD_RD_PRIM_EXTRAS:format");
+         for (i = 0L; i < 8; i++) formt[i] = lite_SC_stol(strtok(NULL, delim));
+      } else if (strcmp(token, "NO-CONV") == 0) {
+         _lite_PD_defstr(file->host_chart, type, align, size, flg, FALSE,
+                         ordr, formt);
+      }
+
+      _lite_PD_defstr(file->chart, type, align, size, flg, TRUE, ordr, formt);
+
+      SFREE(type);
+   }
+}
+
+/*--------------------------------------------------------------------------*/
+/*                            SUPPORT ROUTINES                              */
+/*--------------------------------------------------------------------------*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_e_install
+ *
+ * Purpose:     Install a syment in the given hash table.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:50 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_e_install (char *name, syment *entr, HASHTAB *tab) {
+
+   syment *ep;
+
+   /*
+    * We can leak a lot of memory if we don't check this!!
+    */
+   ep = (syment *) lite_SC_def_lookup(name, tab);
+   if (ep != NULL) {
+      lite_SC_hash_rem(name, tab);
+      _lite_PD_rl_syment_d(ep);
+   }
+
+   lite_SC_install(name, entr, lite_PD_SYMENT_S, tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_d_install
+ *
+ * Purpose:     Install a defstr in the given hash table.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:04 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Dec  4 17:39:22 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_d_install (char *name, defstr *def, HASHTAB *tab) {
+
+   defstr *dp;
+
+   /*
+    * We can leak a lot of memory if we don't check this!!
+    */
+   dp = PD_inquire_table_type(tab, name);
+   if (dp != NULL) {
+      if (strcmp(name, dp->type) == 0) {
+         /*
+          * Increase the reference count on dp, since lite_SC_hash_rem
+          * will try to delete it.
+          */
+         lite_SC_mark(dp, 1);
+         lite_SC_hash_rem(name, tab);
+         _lite_PD_rl_defstr(dp);
+      }
+   }
+
+   lite_SC_install(name, def, lite_PD_DEFSTR_S, tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_defstr
+ *
+ * Purpose:     Primitive defstruct used to install the primitive types
+ *              in the specified chart.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:05 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static defstr *
+_lite_PD_defstr (HASHTAB *chart, char *name, int align, long sz, int flg,
+                 int conv, int *ordr, long *formt) {
+
+   defstr *dp;
+
+   dp = _lite_PD_mk_defstr(name, NULL, sz, align, flg, conv, ordr, formt);
+   _lite_PD_d_install(name, dp, chart);
+
+   return(dp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_defstr_inst
+ *
+ * Purpose:     Install the defstr in both chargs.
+ *
+ * Return:      Success:        The file defstr if FLAG is TRUE
+ *                              The file host_chart defstr if FLAG is FALSE
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:39 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+defstr *
+_lite_PD_defstr_inst (char *name, memdes *desc, int flg, int *ordr,
+                      long *formt, HASHTAB *chrt, HASHTAB *host_chart,
+                      data_alignment *align, data_alignment *host_align,
+                      int flag) {
+
+   int algn, conv;
+   long sz;
+   defstr *dp, *Sdp;
+   memdes *pd, *memb;
+
+   if (desc == NULL) return(NULL);
+
+   dp = flag ? PD_inquire_table_type(chrt, name) :
+      PD_inquire_table_type(host_chart, name);
+   if (dp != NULL) return(dp);
+
+   /*
+    * Install the type in the file->chart.
+    */
+   sz   = _lite_PD_str_size(desc, chrt);
+   conv = FALSE;
+   algn = align->struct_alignment;
+   for (pd = desc; pd != NULL; pd = pd->next) {
+      dp = PD_inquire_table_type(chrt, pd->base_type);
+      if (_lite_PD_indirection(pd->type) || (dp == NULL)) {
+         algn = MAX(algn, align->ptr_alignment);
+         conv = TRUE;
+      } else {
+         algn  = MAX(algn, dp->alignment);
+         conv |= (dp->convert > 0);
+      }
+
+      /*
+       * In case we are installing this defstr having read it from
+       * another file (as in a copy type operation) redo the cast offsets
+       */
+      if (pd->cast_memb != NULL)
+         pd->cast_offs = _lite_PD_member_location(pd->cast_memb, chrt, dp,
+                                                  &memb);
+   }
+
+   dp = _lite_PD_mk_defstr(name, desc, sz, algn, flg, conv, ordr, formt);
+   _lite_PD_d_install(name, dp, chrt);
+
+   /*
+    * Install the type in the host_chart.
+    */
+   desc = lite_PD_copy_members(desc);
+   sz   = _lite_PD_str_size(desc, host_chart);
+
+   algn = host_align->struct_alignment;
+   for (pd = desc; pd != NULL; pd = pd->next) {
+      dp = PD_inquire_table_type(host_chart, pd->base_type);
+      if (_lite_PD_indirection(pd->type) || (dp == NULL)) {
+         algn = MAX(algn, host_align->ptr_alignment);
+      } else {
+         algn = MAX(algn, dp->alignment);
+      }
+
+      /*
+       * In case we are installing this defstr having read it from
+       * another file (as in a copy type operation) redo the cast offsets
+       */
+      if (pd->cast_memb != NULL) {
+         pd->cast_offs =  _lite_PD_member_location(pd->cast_memb,
+                                                   host_chart, dp, &memb);
+      }
+   }
+
+   /*
+    * NOTE: ordr, formt, and conv apply only to the file chart
+    *       never to the host chart!!!
+    *       these are for non-default primitive types which
+    *       have no host representation
+    */
+   Sdp = _lite_PD_mk_defstr(name, desc, sz, algn, -1, FALSE, NULL, NULL);
+   _lite_PD_d_install(name, Sdp, host_chart);
+
+   return(flag ? dp : Sdp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rfgets
+ *
+ * Purpose:     Our fgets looks for specified line separator in addition
+ *              to the given system version.  It is also guaranteed to not
+ *              split tokens in the input stream.
+ *
+ * Return:      same as _PD_get_tok
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 12:02 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_PD_rfgets(char *s, int n, FILE *fp) {
+
+   return _PD_get_tok(s, n, fp, '\n') ;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_get_tok
+ *
+ * Purpose:     An fgets clone looks for specified char in addition to
+ *              the newline.  It is also guaranteed to not split tokens
+ *              in the input stream.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:55 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+_PD_get_tok (char *s, int n, FILE *fp, int ch) {
+
+   int i, c, LineSep;
+   long loc, nb;
+   char *ps;
+
+   /*
+    * This is for old NLTSS generated files - sigh!
+    */
+   LineSep = 0x1f;
+    
+   /*
+    * Find the current location and remember it.
+    */
+   loc = io_tell(fp);
+   nb  = io_read(s, (size_t) 1, (size_t) n, fp);
+   ps  = s;
+
+   /*
+    * Check for EOF and reset the file pointer if at EOF.
+    */
+   if (((c = *(ps++)) == EOF) || (nb == 0)) {
+      io_seek(fp, loc, SEEK_SET);
+      *s = '\0';
+      return(NULL);
+   }
+   ps--;
+
+   /*
+    * Search for \n, EOF, LineSep, or given delimiter.
+    */
+   n = nb - 1;
+   for (i = 0; i < n; i++) {
+      c = *(ps++);
+      if ((c == '\n') || (c == LineSep) || (c == ch)) {
+         ps--;
+         *ps++ = '\0';
+         loc += (long) (ps - s);
+         break;
+      } else if (c == EOF) {
+         ps--;
+         *ps++ = '\0';
+         loc += (long) (ps - s + 1);
+         break;
+      }
+   }
+
+   /*
+    * If we got a full buffer backup to the last space so as to not split
+    * a token.
+    */
+   if ((i >= n) && (c != '\n') && (c != LineSep) && (c == ch)) {
+      ps--;
+      n >>= 1;
+      for (; i > n; i--) {
+         c = *(--ps);
+         loc--;
+         if ((c == '\t') || (c == ' ')) {
+            *ps = '\0';
+            break;
+         }
+      }
+   }
+
+   /*
+    * Reset the file pointer to the end of the string.
+    */
+   io_seek(fp, loc, SEEK_SET);
+
+   return(s);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_get_token
+ *
+ * Purpose:     Get a token from a buffer which is handled like strtok().
+ *              Each time BF is non-NULL it is remembered for the next call.
+ *              The return buffer is handled like fgets with the spce
+ *              and maximum size being passed in.  This function is
+ *              guaranteed to not split tokens in the input buffer.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:57 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+_PD_get_token (char *bf, char *s, int n, int ch) {
+
+   int i, c;
+   char *ps;
+   static char *t = NULL;
+
+   /*
+    * This is for old NLTSS generated files - sigh!
+    */
+   static int LineSep = 0x1f;
+
+   if (bf != NULL) t = bf;
+
+   ps = s;
+
+   /*
+    * Check for EOF and reset the file pointer if at EOF.
+    */
+   c = *ps++ = *t++;
+   if ((c == EOF) || (n == 0)) {
+      t--;
+      *s = '\0';
+      return(NULL);
+   }
+   ps--;
+   t--;
+
+   /*
+    * Search for \n, EOF, LineSep, or given delimiter.
+    */
+   n--;
+   for (i = 0; i < n; i++) {
+      c = *ps++ = *t++;
+      if ((c == '\n') || (c == LineSep) || (c == ch)) {
+         ps--;
+         *ps++ = '\0';
+         break;
+      } else if (c == EOF) {
+         ps--;
+         t--;
+         *ps++ = '\0';
+         break;
+      }
+   }
+
+   /*
+    * If we got a full buffer backup to the last space so as to not split
+    * a token
+    */
+   if ((i >= n) && (c != '\n') && (c != LineSep) && (c == ch)) {
+      ps--;
+      t--;
+      n >>= 1;
+      for (; i > n; i--) {
+         c = *(--ps) = *(--t);
+         if ((c == '\t') || (c == ' ')) {
+            *ps = '\0';
+            break;
+         }
+      }
+   }
+
+   return(s);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_init_chrt
+ *
+ * Purpose:     Initialize the charts with the primitives.
+ *
+ * Note:        Define both int and integer!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996 11:41 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_init_chrt (PDBfile *file) {
+
+   HASHTAB        *fchrt, *hchrt;
+   defstr         *ret;
+   data_standard  *fstd, *hstd;
+   data_alignment *falign, *halign;
+
+   /*
+    * If the first time initialize some PDBLib stuff.
+    */
+   if (lite_PD_DEFSTR_S == NULL) {
+      lite_LAST        = FMAKE(int, "_PD_INIT_CHART:LAST");
+      *lite_LAST       = 0;
+
+      if (lite_io_close_hook == (PFfclose) fclose)
+         lite_io_close_hook = (PFfclose) _lite_PD_pio_close;
+
+      if (lite_io_seek_hook == (PFfseek) fseek)
+         lite_io_seek_hook = (PFfseek) _lite_PD_pio_seek;
+
+      if (lite_io_printf_hook == (PFfprintf) fprintf)
+         lite_io_printf_hook = (PFfprintf) _lite_PD_pio_printf;
+
+      lite_PD_DEFSTR_S = lite_SC_strsavef("defstr *",
+                                          "char*:_PD_INT_CHRT:defstr");
+      lite_PD_SYMENT_S = lite_SC_strsavef("syment *",
+                                          "char*:_PD_INIT_CHRT:syment");
+   }
+
+   fchrt  = file->chart;
+   fstd   = file->std;
+   falign = file->align;
+
+   hchrt  = file->host_chart;
+   hstd   = file->host_std;
+   halign = file->host_align;
+
+   _lite_PD_setup_chart(fchrt, fstd, hstd, falign, halign, TRUE);
+   _lite_PD_setup_chart(hchrt, hstd, NULL, halign, NULL, FALSE);
+
+   if (sizeof(double) == sizeof(double)) {
+      lite_PD_typedef(file, "double", "REAL");
+   } else {
+      lite_PD_typedef(file, "float", "REAL");
+   }
+
+   ret  = PD_inquire_host_type(file, "*");
+   lite_PD_defncv(file, "function", ret->size, ret->alignment);
+
+   return;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_setup_chart
+ *
+ * Purpose:     Setup a structure and chart with the conversions selected
+ *              and the types installed.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  3:21 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:53:07 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_setup_chart (HASHTAB *chart, data_standard *fstd, data_standard *hstd,
+                      data_alignment *falign, data_alignment *halign,
+                      int flag) {
+
+   int conv;
+
+   if (flag) {
+      PD_COMPARE_PTR_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "*", falign->ptr_alignment,
+                   (long) fstd->ptr_bytes, -1, conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_CHAR_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "char", falign->char_alignment,
+                   1L, -1, conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_SHORT_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "short", falign->short_alignment,
+                   (long) fstd->short_bytes, fstd->short_order,
+                   conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_INT_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "int", falign->int_alignment,
+                   (long) fstd->int_bytes, fstd->int_order,
+                   conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_INT_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "integer", falign->int_alignment,
+                   (long) fstd->int_bytes, fstd->int_order,
+                   conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_LONG_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "long", falign->long_alignment,
+                   (long) fstd->long_bytes, fstd->long_order,
+                   conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_LONGLONG_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "long_long", falign->longlong_alignment,
+                   (long) fstd->longlong_bytes, fstd->longlong_order,
+                   conv, NULL, NULL);
+   _lite_PD_defstr(chart, "u_long_long", falign->longlong_alignment,
+                   (long) fstd->longlong_bytes, fstd->longlong_order,
+                   conv, NULL, NULL);
+
+   if (flag) {
+      PD_COMPARE_FLT_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "float", falign->float_alignment,
+                   (long) fstd->float_bytes, -1, conv, fstd->float_order,
+                   fstd->float_format);
+   lite_SC_mark(fstd->float_order, 1);
+   lite_SC_mark(fstd->float_format, 1);
+
+   if (flag) {
+      PD_COMPARE_DBL_STD(conv, fstd, hstd, falign, halign);
+   } else {
+      conv = FALSE;
+   }
+   _lite_PD_defstr(chart, "double", falign->double_alignment,
+                   (long) fstd->double_bytes, -1, conv, fstd->double_order,
+                   fstd->double_format);
+   lite_SC_mark(fstd->double_order, 1);
+   lite_SC_mark(fstd->double_format, 1);
+
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_add_block
+ *
+ * Purpose:     Add a new block to an entry.  This does nothing to the file,
+ *              only the syment.  The file extension operations are left to
+ *              _PD_write or to _PD_defent.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_add_block (PDBfile *file, syment *ep, dimdes *dims) {
+
+   symblock *sp;
+   int n;
+   long addr, bytespitem;
+
+   if (!_PD_consistent_dims(file, ep, dims)) {
+      lite_PD_error("INCONSISTENT DIMENSION CHANGE - _PD_ADD_BLOCK", PD_WRITE);
+   }
+
+   addr = file->chrtaddr;
+
+   sp = PD_entry_blocks(ep);
+   n  = PD_n_blocks(ep);
+   REMAKE_N(sp, symblock, n+1);
+
+   sp[n].diskaddr = addr;
+   sp[n].number   = _lite_PD_comp_num(dims);
+
+   PD_entry_blocks(ep) = sp;
+   bytespitem = _lite_PD_lookup_size(PD_entry_type(ep), file->chart);
+
+   /*
+    * We are through with the dimensions
+    * their information has been moved into the entry dimensions
+    */
+   _lite_PD_rl_dimensions(dims);
+
+   return(_lite_PD_extend_file(file, sp[n].number*bytespitem));
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_format
+ *
+ * Purpose:     Write the primitive data format information to the file
+ *              header block
+ *
+ *              - Floating Point Format Descriptor                       
+ *              -   format[0] = # of bits per number                     
+ *              -   format[1] = # of bits in exponent                    
+ *              -   format[2] = # of bits in mantissa                    
+ *              -   format[3] = start bit of sign                        
+ *              -   format[4] = start bit of exponent                    
+ *              -   format[5] = start bit of mantissa                    
+ *              -   format[6] = high order mantissa bit (CRAY needs this)
+ *              -   format[7] = bias of exponent                         
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:28:13 PST 2009
+ *   Moved support for long long from here to 'extras'.
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_wr_format (PDBfile *file) {
+
+   int j, n, *order;
+   long *format, float_bias, double_bias;
+   char outfor[MAXLINE], *p;
+   data_standard *std;
+
+   p   = outfor + 1;
+   std = file->std;
+
+   /*
+    * Get the byte lengths in.
+    */
+   *(p++) = std->ptr_bytes;
+   *(p++) = std->short_bytes;
+   *(p++) = std->int_bytes;
+   *(p++) = std->long_bytes;
+   *(p++) = std->float_bytes;
+   *(p++) = std->double_bytes;
+
+   /*
+    * Get the integral types byte order in.
+    */
+   *(p++) = std->short_order;
+   *(p++) = std->int_order;
+   *(p++) = std->long_order;
+
+   /*
+    * Get the float byte order in.
+    */
+   order = std->float_order;
+   n     = std->float_bytes;
+   for (j = 0; j < n; j++, *(p++) = *(order++)) /*void*/ ;
+
+   /*
+    * Get the double byte order in.
+    */
+   order = std->double_order;
+   n     = std->double_bytes;
+   for (j = 0; j < n; j++, *(p++) = *(order++)) /*void*/ ;
+
+   /*
+    * Get the float format data in.
+    */
+   format = std->float_format;
+   n = lite_FORMAT_FIELDS - 1;
+   for (j = 0; j < n; j++, *(p++) = *(format++)) /*void*/ ;
+
+   /*
+    * Get the float bias in.
+    */
+   float_bias = *format;
+
+   /*
+    * Get the double format data in.
+    */
+   format = std->double_format;
+   n      = lite_FORMAT_FIELDS - 1;
+   for (j = 0; j < n; j++, *(p++) = *(format++)) /*void*/ ;
+
+   /*
+    * Get the double bias in.
+    */
+   double_bias = *format;
+
+   n         = (int) (p - outfor);
+   outfor[0] = n;
+
+   if (io_write(outfor, (size_t) 1, (size_t) n, file->stream) != n) {
+      lite_PD_error("FAILED TO WRITE FORMAT DATA - _PD_WR_FORMAT", PD_CREATE);
+   }
+    
+   /*
+    * Write out the biases.
+    */
+   sprintf(outfor, "%ld\001%ld\001\n", float_bias, double_bias);
+   n = strlen(outfor);
+   if (io_write(outfor, (size_t) 1, (size_t) n, file->stream) != n) {
+      lite_PD_error("FAILED TO WRITE BIASES - _PD_WR_FORMAT", PD_CREATE);
+   }
+    
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_consistent_dims
+ *
+ * Purpose:     Check two sets of dimensions for consistency of the non-
+ *              changing sector and proper updating of the chaning dimension.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static int
+_PD_consistent_dims (PDBfile *file, syment *ep, dimdes *ndims) {
+
+   dimdes *odims, *od, *nd;
+
+   odims = PD_entry_dimensions(ep);
+
+   /*
+    * Check the dimensions for consistency.
+    */
+   if (file->major_order == COLUMN_MAJOR_ORDER) {
+      for (od = odims, nd = ndims;
+           (od != NULL) && (nd != NULL) && (nd->next != NULL);
+           od = od->next, nd = nd->next) {
+         if ((od->index_min != nd->index_min) ||
+             (od->index_max != nd->index_max) ||
+             (od->number != nd->number)) {
+            return(FALSE);
+         }
+      }
+   } else if (file->major_order == ROW_MAJOR_ORDER) {
+      for (od = odims->next, nd = ndims->next;
+           (od != NULL) && (nd != NULL);
+           od = od->next, nd = nd->next) {
+         if ((od->index_min != nd->index_min) ||
+             (od->index_max != nd->index_max) ||
+             (od->number != nd->number)) {
+            return(FALSE);
+         }
+      }
+
+      nd = ndims;
+      od = odims;
+   }
+
+   if (nd->index_min == file->default_offset) {
+      od->index_max += nd->index_max - nd->index_min + 1;
+   } else if (nd->index_min == od->index_max + 1L) {
+      od->index_max = nd->index_max;
+   } else {
+      return(FALSE);
+   }
+
+   od->number = od->index_max - od->index_min + 1L;
+
+   PD_entry_number(ep) = _lite_PD_comp_num(odims);
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_extend_file
+ *
+ * Purpose:     Extend the file by the given numer of bytes.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_extend_file (PDBfile *file, long nb) {
+
+   FILE *fp;
+   long addr;
+   char bf[1];
+
+   fp   = file->stream;
+   addr = file->chrtaddr + nb;
+
+   /*
+    * Expand the file or the space will not be there.
+    */
+   if (io_seek(fp, addr, SEEK_SET)) {
+      sprintf(lite_PD_err, "ERROR: FSEEK FAILED - _PD_EXTEND_FILE");
+      return(FALSE);
+   }
+
+   bf[0] = ' ';
+   nb    = io_write(bf, (size_t) 1, (size_t) 1, fp);
+   if (nb != 1L) {
+      sprintf(lite_PD_err, "ERROR: CAN'T SET FILE SIZE - _PD_EXTEND_FILE");
+      return(FALSE);
+   }
+
+   file->chrtaddr = addr;
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_eod
+ *
+ * Purpose:     Mark the end of data in the file that is set the
+ *              chart address to the current file position.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+void
+_lite_PD_eod (PDBfile *file) {
+
+   FILE *fp;
+   long old, new;
+
+   fp  = file->stream;
+   old = file->chrtaddr;
+   new = io_tell(fp);
+
+   file->chrtaddr = MAX(old, new);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_chrt
+ *
+ * Purpose:     Write out the structure chart into the PDB file.
+ *
+ * Return:      Success:        Disk address
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+long
+_lite_PD_wr_chrt (PDBfile *file) {
+
+   int n;
+   long addr;
+   FILE *fp;
+   hashel *hp;
+   defstr *dp;
+   memdes *desc;
+
+   fp   = file->stream;
+   addr = io_tell(fp);
+   if (addr == -1L) return(-1L);
+
+   if (_lite_PD_tbuffer != NULL) SFREE(_lite_PD_tbuffer);
+
+   _lite_PD_rev_chrt(file);
+
+   /*
+    * The hash array for the structure chart is one element long.
+    */
+   n = 0;
+   for (hp = file->chart->table[0]; hp != NULL; hp = hp->next) {
+      dp = (defstr *) (hp->def);
+
+      /*
+       * Use hp->name instead of dp->type or PD_typedef's will not work.
+       */
+      _PD_put_string(n++, "%s\001%ld\001", hp->name, dp->size);
+
+      for (desc = dp->members; desc != NULL; desc = desc->next) {
+         _PD_put_string(n++, "%s\001", desc->member);
+      }
+
+      _PD_put_string(n++, "\n");
+   }
+
+   _PD_put_string(n++, "\002\n");
+
+   /*
+    * Restore the chart because this may be a PD_flush and more types
+    * may be added later
+    */
+   _lite_PD_rev_chrt(file);
+
+   /*
+    * Write the entire chart to the file now.
+    */
+   io_write(_lite_PD_tbuffer, 1, strlen(_lite_PD_tbuffer), fp);
+   io_flush(fp);
+   SFREE(_lite_PD_tbuffer);
+
+   return(addr);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_symt
+ *
+ * Purpose:     Write out the symbol table (a hash table) into the pdb
+ *              file.
+ *
+ * Return:      Success:        disk address
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+long
+_lite_PD_wr_symt (PDBfile *file) {
+
+   long addr, nt, ne, nb, stride;
+   int i, n, size, flag;
+   FILE *fp;
+   hashel **s_tab, *hp;
+   syment *ep;
+   dimdes *lst;
+
+   fp   = file->stream;
+   addr = io_tell(fp);
+   if (addr == -1L) return(-1L);
+
+   if (_lite_PD_tbuffer != NULL) SFREE(_lite_PD_tbuffer);
+
+   n     = 0;
+   s_tab = file->symtab->table;
+   size  = file->symtab->size;
+   for (i = 0; i < size; i++) {
+      for (hp = s_tab[i]; hp != NULL; hp = hp->next) {
+         ep = (syment *) (hp->def);
+         nt = PD_entry_number(ep);
+         nb = PD_block_number(ep, 0);
+         if (nb == 0) {
+            if (PD_n_blocks(ep) == 1) {
+               nb = nt;
+            } else {
+               sprintf(lite_PD_err, "ERROR: BAD BLOCK LIST - _PD_WR_SYMT\n");
+               return(-1L);
+            }
+         }
+
+         _PD_put_string(n++, "%s\001%s\001%ld\001%ld\001",
+                        hp->name, PD_entry_type(ep), nb,
+                        PD_entry_address(ep));
+
+         /*
+          * Adjust the slowest varying dimension to reflect only
+          * the first block.
+          */
+         flag = PD_get_major_order(file);
+         for (lst = PD_entry_dimensions(ep); lst != NULL; lst = lst->next) {
+            if ((flag == ROW_MAJOR_ORDER) ||
+                ((flag == COLUMN_MAJOR_ORDER) && (lst->next == NULL))) {
+               stride = nt/(lst->number);
+               ne     = nb/stride;
+               flag   = FALSE;
+            } else {
+               ne = lst->number;
+            }
+
+            _PD_put_string(n++, "%ld\001%ld\001", lst->index_min, ne);
+         }
+
+         _PD_put_string(n++, "\n");
+      }
+   }
+
+   /*
+    * Pad an extra newline to mark the end of the
+    * symbol table for _PD_rd_symt.
+    */
+   _PD_put_string(n++, "\n");
+
+   return(addr);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_extras
+ *
+ * Purpose:     Write any extraneous data to the file.  This is essentially
+ *              a place for expansion of the file. To complete the definition
+ *              of a pdb file the following rule applies to extensions in the
+ *              extras table.
+ *
+ *                  An extension shall have one of two formats:         
+ *                                                                      
+ *                     1) <name>:<text>\n                               
+ *                                                                      
+ *                     2) <name>:\n                                     
+ *                        <text1>\n                                     
+ *                        <text2>\n                                     
+ *                           .                                          
+ *                           .                                          
+ *                           .                                          
+ *                        <textn>\n                                     
+ *                        [^B]\n                                        
+ *                                                                      
+ *              anything else is strictly illegal!!!!!!             
+ *              NOTE: the optional ^B is for backward compatibility 
+ *              and is not recommmended.
+ *                  
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *   Added support for long long datatype.
+ *
+ *   Mark C. Miller, Tue Nov 17 22:23:42 PST 2009
+ *   Changed support for long long to match more closely what PDB
+ *   proper does.
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_wr_extras (PDBfile *file) {
+
+   FILE *fp;
+   data_alignment *pa;
+   data_standard *ps;
+   char al[MAXLINE];
+   int has_dirs;
+
+   fp = file->stream;
+
+   /*
+    * Write the default offset.
+    */
+   _PD_put_string(1, "Offset:%d\n", file->default_offset);
+
+   /*
+    * Write the alignment data.
+    */
+   pa    = file->align;
+   al[0] = pa->char_alignment;
+   al[1] = pa->ptr_alignment;
+   al[2] = pa->short_alignment;
+   al[3] = pa->int_alignment;
+   al[4] = pa->long_alignment;
+   al[5] = pa->float_alignment;
+   al[6] = pa->double_alignment;
+   al[7] = '\0';
+
+   if (al[0]*al[1]*al[3]*al[4]*al[5]*al[6] == 0)
+      return(FALSE);
+
+   _PD_put_string(1, "Alignment:%s\n", al);
+   _PD_put_string(1, "Struct-Alignment:%d\n",
+                  file->align->struct_alignment);
+
+    /*
+     * write out the long long standard and alignment
+     */
+   ps = file->std;
+   al[0] = ps->longlong_bytes;
+   al[1] = ps->longlong_order;
+   al[2] = pa->longlong_alignment;
+   al[3] = '\0';
+
+   _PD_put_string(1, "Longlong-Format-Alignment:%s\n", al);
+
+   /*
+    * Write out the date and version data.
+    */
+   _PD_put_string(1, "Version:%d|%s\n",
+                  file->system_version, file->date);
+
+   /*
+    * Write out the casts.
+    */
+   {
+      hashel *hp;
+      defstr *dp;
+      memdes *desc;
+
+      _PD_put_string(1, "Casts:\n");
+      for (hp = *(file->host_chart->table); hp != NULL; hp = hp->next) {
+         dp = (defstr *) hp->def;
+         for (desc = dp->members; desc != NULL; desc = desc->next) {
+            if (desc->cast_memb != NULL) {
+               _PD_put_string(1, "%s\001%s\001%s\001\n",
+                              dp->type, desc->member, desc->cast_memb);
+            }
+         }
+      }
+      _PD_put_string(1, "\002\n");
+   }
+
+   /*
+    * Write out the major order.
+    */
+   _PD_put_string(1, "Major-Order:%d\n", file->major_order);
+
+   /*
+    * Write out the previous file name (family).
+    */
+   if (file->previous_file != NULL) {
+      _PD_put_string(1, "Previous-File:%s\n", file->previous_file);
+   }
+
+   /*
+    * Write out the directory indicator flag.
+    */
+   has_dirs = PD_has_directories(file);
+   _PD_put_string(1, "Has-Directories:%d\n", has_dirs);
+
+   /*
+    * Write out the primitives.
+    */
+   _lite_PD_rev_chrt(file);
+
+   _lite_PD_wr_prim_extras(fp, file->chart, '\001', '\002');
+
+   _lite_PD_rev_chrt(file);
+
+   /*
+    * Write out the blocks - this MUST follow at least the Major-Order extra
+    * or else the read may improperly reconstruct the dimensions.
+    */
+   {
+      long i, j, n, sz;
+      syment *ep;
+      hashel *hp, **tb;
+      HASHTAB *tab;
+
+      _PD_put_string(1, "Blocks:\n");
+      tab = file->symtab;
+      sz  = tab->size;
+      tb  = tab->table;
+      for (i = 0L; i < sz; i++) {
+         for (hp = tb[i]; hp != NULL; hp = hp->next) {
+            ep = (syment *) hp->def;
+            n  = PD_n_blocks(ep);
+            if (n > 1) {
+               symblock *sp;
+
+               sp = PD_entry_blocks(ep);
+               _PD_put_string(1, "%s\001%ld", hp->name, n);
+               for (j = 0L; j < n; j++) {
+                  if ((j > 0) && ((j % 50) == 0)) {
+                     _PD_put_string(1, "\n");
+                  }
+                  _PD_put_string(1, " %ld %ld", sp[j].diskaddr, sp[j].number);
+               }
+               _PD_put_string(1, "\n");
+            }
+         }
+      }
+      _PD_put_string(1, "\002\n");
+   }
+
+   /*
+    * Pad the end of the file with some newlines to smooth over the
+    * end of binary file problems on different (ie CRAY) systems.
+    */
+   _PD_put_string(1, "\n\n");
+
+   /*
+    * Write the symbol table and the extras table to the file now.
+    */
+   io_write(_lite_PD_tbuffer, 1, strlen(_lite_PD_tbuffer), fp);
+   io_flush(fp);
+   SFREE(_lite_PD_tbuffer);
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rev_chrt
+ *
+ * Purpose:     Reverse the list of structures in the single element hash
+ *              table that makes up the chart.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_rev_chrt (PDBfile *file) {
+
+   PD_REVERSE_LIST(hashel, *(file->chart->table), next);
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_put_string
+ *
+ * Purpose:     Build up the contents of the current output buffer
+ *              in an fprintf style.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static int
+_PD_put_string (int reset, char *fmt, ...) {
+
+   long ns;
+   char s[MAXLINE];
+   static char *pl = NULL;
+   static long ncx = 0L, nc = 0L;
+   va_list ap ;
+
+   va_start(ap,fmt);
+   vsprintf(s, fmt, ap);
+   va_end(ap);
+
+   ns = strlen(s);
+
+   if (_lite_PD_tbuffer == NULL) {
+      ncx = BUFINCR;
+      _lite_PD_tbuffer = MAKE_N(char, ncx);
+      pl = _lite_PD_tbuffer;
+      nc = 0;
+   } else if (!reset) {
+      pl = _lite_PD_tbuffer;
+      nc = 0;
+      memset(_lite_PD_tbuffer, 0, ncx);
+   }
+    
+   if (nc + ns >= ncx) {
+      ncx += BUFINCR;
+      REMAKE_N(_lite_PD_tbuffer, char, ncx);
+      pl = _lite_PD_tbuffer + strlen(_lite_PD_tbuffer);
+   }
+
+   strcpy(pl, s);
+   pl += ns;
+   nc += ns;
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_prim_extras
+ *
+ * Purpose:     Write the primitive data types from the given structure
+ *              chart in a form suitable to the extras table.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 18, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+/* ARGSUSED */
+void
+_lite_PD_wr_prim_extras (FILE *fp, HASHTAB *tab, int dc, int rec) {
+
+   long i, n;
+   hashel *hp, **tb;
+   defstr *dp;
+   long *formt;
+   int *ordr;
+
+   _PD_put_string(1, "Primitive-Types:\n");
+
+   tb = tab->table;
+   for (hp = *tb; hp != NULL; hp = hp->next) {
+      dp = (defstr *) hp->def;
+      if (dp->members != NULL) continue;
+
+      /*
+       * Use hp->name instead of dp->type or PD_typedef's won't work!!!
+       */
+      _PD_put_string(1, "%s%c%ld%c%d%c%d%c",
+                     hp->name, dc,
+                     dp->size, dc,
+                     dp->alignment, dc,
+                     dp->order_flag, dc);
+
+      /*
+       * Write the byte order.
+       */
+      ordr = dp->order;
+      if (ordr !=  NULL) {
+         _PD_put_string(1, "ORDER%c", dc);
+         n = dp->size;
+         for (i = 0L; i < n; i++) {
+            _PD_put_string(1, "%d%c", ordr[i], dc);
+         }
+      } else {
+         _PD_put_string(1, "DEFORDER%c", dc);
+      }
+
+      /*
+       * Write the floating point format.
+       */
+      formt = dp->format;
+      if (formt != NULL) {
+         _PD_put_string(1, "FLOAT%c", dc);
+         for (i = 0L; i < 8; i++) {
+            _PD_put_string(1, "%ld%c", formt[i], dc);
+         }
+      } else if (dp->order_flag == -1) {
+         _PD_put_string(1, "NO-CONV%c", dc);
+      } else {
+         _PD_put_string(1, "FIX%c", dc);
+      }
+      _PD_put_string(1, "\n");
+   }
+
+   _PD_put_string(1, "%c\n", rec);
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb/pdmemb.c b/src/pdb/pdmemb.c
new file mode 100644
index 0000000..f83e834
--- /dev/null
+++ b/src/pdb/pdmemb.c
@@ -0,0 +1,742 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDMEMB.C - member handling routines for PDBLib
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include "pdb.h"
+
+/*--------------------------------------------------------------------------*/
+/*                          ACCESSOR FUNCTIONS                              */
+/*--------------------------------------------------------------------------*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_member_type
+ *
+ * Purpose:	Strip off dimensions and member name by inserting a `\0'
+ *		after the type specification.
+ *
+ * Return:	Success:	ptr to the string.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:44 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_PD_member_type (char *s) {
+
+   char *t, *p, c, bf[MAXLINE];
+
+   strcpy(bf, s);
+
+   /*
+    * Find a pointer to the last '*' in the string.
+    */
+   for (p = bf, t = bf; (c = *t) != '\0'; t++) {
+      if (c == '*') p = t;
+   }
+
+   /*
+    * If there was a '*' replace the next character with a '\0'.
+    * Otherwise the type is not a pointer so return the first token.
+    */
+   if (p != bf) *(++p) = '\0';
+   else strtok(bf, " \t\n\r");
+
+   return(lite_SC_strsavef(bf, "char*:_PD_MEMBER_TYPE:bf"));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_member_base_type
+ *
+ * Purpose:	Extract the base type (no indirections) of the
+ *		given member and return a copy of it.
+ *
+ * Return:	Success:	a copy of it
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:31 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_PD_member_base_type (char *s) {
+
+   char *token, bf[MAXLINE];
+
+   strcpy(bf, s);
+   token = lite_SC_firsttok(bf, " *");
+
+   return(lite_SC_strsavef(token, "char*:_PD_MEMBER_BASE_TYPE:token"));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_member_name
+ *
+ * Purpose:	Given the member description, extract the name and return
+ *		a pointer to it.  New space is allocated for the name.
+ *
+ * Return:	Success:	A pointer to the name.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:43 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_PD_member_name (char *s) {
+
+   char *pt, *token, bf[MAXLINE];
+
+   strcpy(bf, s);
+   lite_SC_firsttok(bf, " *");
+   for (pt = bf; strchr(" \t*", *pt) != NULL; pt++);
+   token = lite_SC_firsttok(pt, "([");
+
+   return(lite_SC_strsavef(token, "char*:_PD_MEMBER_NAME:token"));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_ex_dims
+ *
+ * Purpose:	Extract the dimension information from the given string.
+ *
+ * Return:	Success:	If FLAG is true, return dimensions
+ *				interpreted as reference (eg, x(2)
+ *				interpreted as x(defoff)).  If FLAG
+ *				is false, return dimensions interpreted as
+ *				definition (eg, x(2) interpreted as
+ *				x(defoff:2).
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:17 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 15:55:02 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.
+ *
+ *-------------------------------------------------------------------------
+ */
+dimdes *
+_lite_PD_ex_dims (char *memb, int defoff, int flag) {
+
+   char *token, *maxs, bf[MAXLINE];
+   long mini, leng;
+   dimdes *dims, *next, *prev;
+
+   prev = NULL;
+   dims = NULL;
+   strcpy(bf, memb);
+   token = lite_SC_firsttok(bf, "([\001\n");
+   while ((token = lite_SC_firsttok(bf, ",)] ")) != NULL) {
+      maxs = strchr(token, ':');
+      if (maxs != NULL) {
+	 *maxs++ = '\0';
+	 mini = flag ? defoff : atol(token);
+	 leng = atol(maxs) - atol(token) + 1L;
+      } else {
+	 mini = defoff;
+	 leng = flag ? 1L : atol(token);
+      }
+
+      if (leng <= 0L) return(NULL);
+
+      next = _lite_PD_mk_dimensions(mini, leng);
+
+      if (dims == NULL) {
+	 dims = next;
+      } else {
+	 prev->next = next;
+      }
+
+      prev = next;
+   }
+
+   return(dims);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_member_items
+ *
+ * Purpose:	Return the total number of items as specified by the
+ *		dimensions in the given member.
+ *
+ * Return:	Success:	Number of items.
+ *
+ *		Failure:	-1
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:29 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_member_items (char *s) {
+
+   char *token, bf[MAXLINE];
+   long acc;
+
+   strcpy(bf, s);
+   token = strtok(bf, "(\001\n");
+   acc = 1L;
+   while ((token = strtok(NULL, ",) ")) != NULL) {
+      if ((acc *= atol(token)) <= 0) return(-1L);
+   }
+
+   return(acc);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_comp_num
+ *
+ * Purpose:	Compute the number of elements implied by the dimensions
+ *		of a variable.
+ *
+ * Return:	Success:	Number of elements implied by dimensions
+ *
+ *		Failure:	1
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:02 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_comp_num (dimdes *dims) {
+
+   long acc;
+   dimdes *lst;
+
+   for (acc = 1L, lst = dims; lst != NULL; lst = lst->next) {
+      acc *= (long) (lst->number);
+   }
+
+   return(acc);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_str_size
+ *
+ * Purpose:	Compute sizeof for the defstruct specified.
+ *
+ * Return:	Success:	sizeof
+ *
+ *		Failure:	-1 iff some member of the struct is
+ *			 	undefined.
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:58 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_str_size (memdes *str, HASHTAB *tab) {
+
+   int align, al_max, lal;
+   long i, sz, number;
+   memdes *desc;
+
+   sz     = 0L;
+   al_max = 0;
+   for (desc = str; desc != NULL; desc = desc->next) {
+      number = desc->number;
+      i = _lite_PD_lookup_size(desc->type, tab);
+      if (i == -1L) return(-1L);
+
+      align = _lite_PD_align((long) sz, desc->type, tab, &lal);
+      if (align == -1) return(-1L);
+
+      al_max = MAX(al_max, lal);
+
+      desc->member_offs = sz + align;
+
+      sz += align + i*number;
+   }
+
+   if (al_max != 0) {
+      i  = (sz + al_max - 1)/al_max;
+      sz = al_max*i;
+   }
+
+   return(sz);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_align
+ *
+ * Purpose:	Computes the number of bytes needed to put an object of
+ *		TYPE on the proper byte boundary.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 10:45 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_align (long n, char *type, HASHTAB *tab, int *palign) {
+
+   long offset, align, nword;
+   defstr *dp;
+
+   if (type == NULL) {
+      *palign = 0;
+      return(0);
+   }
+
+   if (_lite_PD_indirection(type)) dp = PD_inquire_table_type(tab, "*");
+   else dp = PD_inquire_table_type(tab, type);
+
+   if (dp == NULL) {
+      *palign = -1;
+      return(-1);
+   } else {
+      align = dp->alignment;
+   }
+
+   if (align != 0) {
+      nword  = (n + align - 1)/align;
+      offset = align*nword - n;
+   } else {
+      offset = 0;
+   }
+
+   *palign = align;
+
+   return(offset);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_lookup_type
+ *
+ * Purpose:	Look up the type given in structure chart.
+ *
+ * Return:	Success:	the defstr
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:30 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+defstr *
+_lite_PD_lookup_type (char *s, HASHTAB *tab) {
+
+   char *token, bf[MAXLINE];
+
+   /*
+    * If it's a POINTER handle it now.
+    */
+   if (strchr(s, '*') != NULL) strcpy(bf, "*");
+   else strcpy(bf, s);
+
+   token = strtok(bf, " ");
+   return(PD_inquire_table_type(tab, token));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_lookup_size
+ *
+ * Purpose:	Look up the type given in structure chart and return the
+ *		size.
+ *
+ * Return:	Success:	the size
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  2:02 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_lookup_size (char *s, HASHTAB *tab) {
+
+   char *token, bf[MAXLINE];
+   defstr *dp;
+
+   /*
+    * If it's a POINTER handle it now.
+    */
+   if (strchr(s, '*') != NULL) strcpy(bf, "*");
+   else strcpy(bf, s);
+
+   token = strtok(bf, " ");
+   dp    = PD_inquire_table_type(tab, token);
+   if (dp != NULL) return(dp->size);
+   else return(-1L);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_member_location
+ *
+ * Purpose:	
+ *
+ * Return:	Success:	The byte offset (0 based) of the given
+ *				member from the beginning of the struct.
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  5, 1996  4:41 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_member_location (char *s, HASHTAB *tab, defstr *dp, memdes **pdesc) {
+
+   long addr;
+   char *token, name[MAXLINE];
+   memdes *desc, *nxt;
+
+   strcpy(name, s);
+   token = lite_SC_firsttok(name, ".\001");
+
+   for (addr = 0L, desc = dp->members; desc != NULL; desc = nxt) {
+      nxt = desc->next;
+      if (strcmp(desc->name, token) == 0) {
+	 addr  += desc->member_offs;
+	 *pdesc = desc;
+	 dp = PD_inquire_table_type(tab, desc->base_type);
+	 if (dp != NULL) {
+	    token = lite_SC_firsttok(name, ".\001");
+	    if (token == NULL) return(addr);
+	    else nxt = dp->members;
+	 }
+      }
+   }
+
+   return(-1L);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_PD_inquire_entry
+ *
+ * Purpose:	Look up the symbol table entry for the named quantity.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  4, 1996 11:36 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+syment *
+lite_PD_inquire_entry(PDBfile *file, char *name, int flag, char *fullname) {
+
+   syment *ep;
+   char s[MAXLINE];
+
+   if (flag) strcpy(s, _lite_PD_fixname(file, name));
+   else strcpy(s, name);
+
+   if (fullname != NULL) strcpy(fullname, s);
+
+   ep = (syment *) lite_SC_def_lookup(s, file->symtab);
+
+   /*
+    * If the file has directories and the entry is not "/",
+    * treat entry with and without initial slash as equivalent, 
+    */
+   if ((ep == NULL) &&
+       (PD_has_directories(file)) &&
+       (strcmp(s, "/") != 0)) {
+      if (strrchr(s, '/') == s) {
+	 ep = (syment *) lite_SC_def_lookup(s + 1, file->symtab);
+      } else if (strrchr(s, '/') == NULL) {
+	 char t[MAXLINE];
+	 sprintf(t, "/%s", s);
+	 ep = (syment *) lite_SC_def_lookup(t, file->symtab);
+      }
+   }
+
+   return(ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_rd_itag
+ *
+ * Purpose:	Fill an itag from the file.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT PDB
+ *		Mar  6, 1996 11:07 AM EST
+ *
+ * Modifications:
+ *     Brad Whitlock, Wed Feb 23 18:57:13 PST 2000
+ *     I made the function initialize the itag that is being returned
+ *     when reading the itag fails.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_rd_itag (PDBfile *file, PD_itag *pi) {
+
+   FILE *fp;
+   char *token;
+   static char bf[MAXLINE];
+
+   fp = file->stream;
+
+   _lite_PD_rfgets(bf, MAXLINE, fp);
+
+   token = strtok(bf, "\001");
+   if (token == NULL) goto failure;
+   pi->nitems = atol(token);
+
+   pi->type = strtok(NULL, "\001\n");
+   if (pi->type == NULL) goto failure;
+
+   token = strtok(NULL, "\001\n");
+   if (token == NULL) {
+      pi->addr = -1L;
+      pi->flag = TRUE;
+   } else {
+      pi->addr  = atol(token);
+      token = strtok(NULL, "\001\n");
+      if (token == NULL) pi->flag = TRUE;
+      else pi->flag = atoi(token);
+   }
+
+   return(TRUE);
+
+failure:
+   /*If we're here then reading the itag failed. */
+   pi->nitems = 0;
+   pi->type = NULL;
+   pi->flag = TRUE;
+   pi->addr = -1L;
+   return(FALSE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_adj_dimensions
+ *
+ * Purpose:	Adjust dimension expressions in name for append.  For now,
+ *		indexes for all dimensions must include min and max
+ *		(stride optional) and must match the post-append dimensions.
+ * 		All but the most slowly varying index must match the
+ *		pre-append dimensions.  Because the pre-append dimensions
+ *		are already known the above conditions on the dimensions
+ *		not changing may be relaxed in the future for user
+ *		convenience or to support partial writes in appends.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_adj_dimensions (PDBfile *file, char *name, syment *ep) {
+
+   char *token, *smax, *sinc;
+   char head[MAXLINE], expr[MAXLINE], tail[MAXLINE], bf[MAXLINE];
+   long imin, imax, istep, i;
+   dimdes *dims;
+    
+   expr[0] = '\0';
+   dims = ep->dimensions;
+   strcpy(bf, name);
+   strcpy(head, lite_SC_firsttok(bf, "([\001\n"));
+   tail[0] = '\0';
+
+   while ((token = lite_SC_firsttok(bf, ",)] ")) != NULL) {
+      if (token[0] == '.') {
+	 strcpy(tail, token);
+	 break;
+      }
+      smax = strchr(token, ':');
+      if (smax == NULL) {
+	 lite_PD_error("MAXIMUM INDEX MISSING - _PD_ADJ_DIMENSIONS", PD_WRITE);
+      }
+      *smax++ = '\0';
+      sinc = strchr(smax, ':');
+      if (sinc != NULL) *sinc++ = '\0';
+
+      imin = atol(token);
+      imax = atol(smax);
+      if (sinc != NULL) istep = atol(sinc);
+      else istep = 1;
+
+      if (imin == file->default_offset) {
+	 if (((file->major_order == ROW_MAJOR_ORDER) &&
+	      (dims == ep->dimensions)) ||
+	     ((file->major_order == COLUMN_MAJOR_ORDER) &&
+	      (dims->next == NULL))) {
+	    i = dims->index_max + 1 - imin;
+	    imin += i;
+	    imax += i;
+	 }
+      }
+
+      sprintf(expr, "%s%ld:%ld:%ld,", expr, imin, imax, istep);
+      dims = dims->next;
+   }
+
+   if (expr[0] != '\0') {
+      if (strchr(head, '.') != NULL) {
+	 lite_PD_error("APPEND TO TOP LEVEL OF STRUCT ONLY - "
+		       "_PD_ADJ_DIMENSIONS", PD_WRITE);
+      }
+      expr[strlen(expr) - 1] = '\0';
+      sprintf(name, "%s[%s]%s", head, expr, tail);
+   }
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_PD_wr_itag
+ *
+ * Purpose:     write an itag to the file                               
+ *		for a NULL pointer do:                                  
+ *		    _lite_PD_wr_itag(file, 0L, type, -1L, 0)                 
+ *		for a pointer to data elsewhere do:                     
+ *		    _lite_PD_wr_itag(file, nitems, type, addr, 0)            
+ *		for a pointer to data here do:                          
+ *		    _lite_PD_wr_itag(file, nitems, type, addr, 1)            
+ *		for a pointer to discontiguous data do:                 
+ *		    _lite_PD_wr_itag(file, nitems, type, addr, 2)            
+ * 		    then addr is interpreted as the address of the next 
+ *		    block of data
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_wr_itag (PDBfile *file, long nitems, char *type, long addr,
+		  int flag) {
+
+   io_printf(file->stream, "%ld\001%s\001%ld\001%d\001\n",
+	     nitems, type, addr, flag);
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb/pdpath.c b/src/pdb/pdpath.c
new file mode 100644
index 0000000..ab34bd1
--- /dev/null
+++ b/src/pdb/pdpath.c
@@ -0,0 +1,2114 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDPATH.C - grammar driven parser for variable specifications
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ */
+#include "config.h" /* For a possible redefinition of setjmp/longjmp */
+#if !defined(_WIN32)
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+#include "pdb.h"
+
+/* The fundamental operations are:
+ *        GOTO    - goto the place in memory or on disk implied by the
+ *                  locator on the top of the stack
+ *        INDEX   - compute the hyper-space shape implied by the
+ *                  dimensions on the top of the stack this implies
+ *                  an offset from the current location and a
+ *                  number of items (max) from the offset
+ *                  the current location is changed by offset from
+ *                  the previous location
+ *        MEMBER  - item on the top of the stack is a member name
+ *                  and implies an offset from the current location
+ *                  the current location is changed by offset from
+ *                  the previous location
+ *        DEREF   - assuming the current location is a pointer in
+ *                  memory or an itag on disk dereference so that
+ *                  the current location is at the pointee
+ *        DIGRESS - begin a subroutine which will result with a
+ *                - new integer value on the stack upon completion
+ *        CAST    - specify an output type that overrides the
+ *                - file type
+ */
+
+#define MAXPARSEDEPTH 150
+#define LASTTOK        42
+#define STATEFLAG   -1000
+
+#define GOTO_C    1
+#define MEMBER_C  2
+#define INDEX_C   3
+#define CAST_C    4
+#define DEREF_C   5
+#define RESULT_C  6
+
+#define ERRCODE      256
+#define OPEN_PAREN   257
+#define CLOSE_PAREN  258
+#define STAR         259
+#define DOT          260
+#define ARROW        261
+#define IDENTIFIER   262
+#define COMMA        263
+#define COLON        264
+#define INTEGER      265
+
+#define input()                                                              \
+   FRAME(lex_bf)[FRAME(index)++]
+
+#define unput(c)                                                             \
+   (FRAME(index) = (--FRAME(index) < 0) ? 0 : FRAME(index),                  \
+    FRAME(lex_bf)[FRAME(index)] = c)
+
+#define GOT_TOKEN(tok)                                                       \
+    {if (FRAME(index) == start+1)                                            \
+        return(tok);                                                         \
+     else                                                                    \
+        {unput(c);                                                           \
+         return(_PD_next_token(start));};}
+
+#define FRAME(x)   frames[frame_n].x
+#define CURRENT(x) FRAME(stack)[FRAME(n)].x
+
+typedef struct s_locator locator;
+typedef struct s_parse_frame parse_frame;
+
+struct s_locator {
+   char intype[MAXLINE];
+   int cmmnd;
+   int indirect;
+   SC_address ad;
+   long number;
+   dimdes *dims;
+   symblock *blocks;
+   long n_struct_ptr;
+   long n_array_items;
+   symindir indir_info;
+};
+
+struct s_parse_frame {
+   locator *stack;                      /* locator stack */
+   long n;                              /* current top of stack */
+   long nx;                             /* allocated size of stack */
+   long diskaddr;
+   char path[MAXLINE];
+   int flag;
+   char *lex_bf;
+   char *lval;
+   char *val;
+   char *v[MAXPARSEDEPTH];              /* parser value stack */
+   char **pv;                           /* top of parser value stack */
+   int current_token;                   /* current input token number */
+   int error;                           /* error recovery flag */
+   int n_error;                 /* number of errors */
+   int state;                           /* current state */
+   int tmp;                             /* extra var (lasts between blocks) */
+   int s[MAXPARSEDEPTH];                /* parser state stack */
+   int *ps;                             /* top of parser state stack */
+   int index;
+};
+
+static parse_frame      *frames = NULL;
+static int              frame_n;
+static int              frame_nx;
+static PDBfile          *file_s;
+static int              colon ;
+static char             text[MAXLINE];
+static char             msg[MAXLINE];
+static long             num_val;
+static char             outtype[MAXLINE];
+
+static long             _PD_deref_addr (int) ;
+static void             _PD_disp_rules (int,char**) ;
+static void             _PD_do_cast (char*) ;
+static void             _PD_do_deref (void) ;
+static long             _PD_do_digress (char*) ;
+static void             _PD_do_goto (char*) ;
+static void             _PD_do_index (char*) ;
+static void             _PD_do_member (char*,int) ;
+static char *           _PD_get_type_member (PDBfile*,char*,char*,memdes*,
+                                                 defstr**) ;
+static long             _PD_index_deref (int,dimdes**,long*) ;
+static int              _PD_is_member (char*,memdes*,HASHTAB*,long*) ;
+static int              _PD_lex (void) ;
+static long             _PD_member_deref (int) ;
+static int              _PD_next_token (int) ;
+static long             _PD_num_indirects (char*,HASHTAB*) ;
+static void             _PD_parse (void) ;
+static long             _PD_reduce (void) ;
+static void             _PD_restore_stack (void) ;
+static void             _PD_rl_frames (void) ;
+static void             _PD_save_stack (void) ;
+static void             _PD_shift (char*,char*,dimdes*,symblock*,long,
+                                       long,int,int) ;
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_effective_ep
+ *
+ * Purpose:     Look up the symbol table entry for the named quantity.
+ *
+ * Return:      Success:        An effective symbol table entry which
+ *                              contains the type and dimensions of the
+ *                              entire variable(!) and the disk address
+ *                              and number of items referred to by the
+ *                              hyper-index expression, if any.  If NAME
+ *                              contains such a specification the returned
+ *                              syment will be newly allocated.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  4, 1996  1:03 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  8 17:26:38 PST 1998
+ *    I eliminated some memory leaks.
+ *
+ *-------------------------------------------------------------------------
+ */
+syment *
+_lite_PD_effective_ep (PDBfile *file, char *name, int flag, char *fullname) {
+
+   int          alloc_frames;
+   dimdes       *dims;
+   char         *type;
+   long         numb, addr;
+   symindir     indr;
+   symblock     *sp;
+   syment       *ep;
+
+   /*
+    * To improve performance and to accomodate certain unusual variable names
+    *  such as domain names, see if the variable name is literally in the file
+    */
+   ep = lite_PD_inquire_entry(file, name, flag, fullname);
+   if (ep != NULL) return(lite_PD_copy_syment(ep));
+
+   alloc_frames = FALSE;
+   if (frames == NULL) {
+      alloc_frames = TRUE;
+      frame_n  = 0;
+      frame_nx = 4;
+      frames   = FMAKE_N(parse_frame, frame_nx, "_PD_EFFECTIVE_EP:frames");
+      FRAME(stack) = NULL;
+      FRAME(nx) = 0;
+   }
+
+   FRAME(lex_bf) = lite_SC_strsavef(name, "char*:_PD_EFFECTIVE_EP:lex_bf");
+   FRAME(index) = 0;
+
+   FRAME(n) = 0L;
+   if (FRAME(stack) == NULL) {
+      FRAME(nx) += 10;
+      FRAME(stack) = FMAKE_N(locator, 10, "_PD_EFFECTIVE_EP:loc_stack");
+   }
+
+   switch (setjmp(_lite_PD_trace_err)) {
+   case ABORT:
+      if ((fullname != NULL) && flag) strcpy(fullname, name);
+      if (alloc_frames) _PD_rl_frames();
+      return(NULL);
+
+   case ERR_FREE:
+      if (alloc_frames) _PD_rl_frames();
+      return(NULL);
+
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   /*
+    * Copy these arguments into global (file static) variables.
+    */
+   file_s      = file;
+   FRAME(flag) = flag;
+
+   _PD_parse();
+
+   _PD_reduce();
+
+   dims = CURRENT(dims);
+   type = CURRENT(intype);
+   numb = CURRENT(number);
+   indr = CURRENT(indir_info);
+   addr = CURRENT(ad).diskaddr;
+   sp   = CURRENT(blocks);
+
+   ep = _lite_PD_mk_syment(type, numb, addr, &indr, dims);
+
+   if (sp != NULL) {
+      SFREE(PD_entry_blocks(ep));
+      PD_entry_blocks(ep) = sp;
+      lite_SC_mark(sp, 1);
+   }
+
+   SFREE(dims);
+   SFREE(sp);
+
+   if (fullname != NULL) strcpy(fullname, FRAME(path));
+   if (alloc_frames) _PD_rl_frames();
+
+   return(ep);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_rl_frames
+ *
+ * Purpose:     Free the set parse frames.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  3:20 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_rl_frames (void) {
+
+   SFREE(FRAME(stack));
+   SFREE(FRAME(lex_bf));
+   SFREE(frames);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_shift
+ *
+ * Purpose:     Perform a shift operation.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:21 AM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  8 17:26:38 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+static void
+_PD_shift (char *name, char *type, dimdes *dims, symblock *blocks,
+           long numb, long addr, int indr, int cmmnd) {
+
+   if (type[0] == '\0')
+      lite_PD_error("NO TYPE SPECIFIED - _PD_SHIFT", PD_TRACE);
+
+   if (frames == NULL) {
+      frame_n  = 0;
+      frame_nx = 2;
+      frames   = FMAKE_N(parse_frame, frame_nx, "_PD_EFFECTIVE_EP:frames");
+   }
+
+   FRAME(n)++;
+   if (FRAME(n) >= FRAME(nx)) {
+      FRAME(nx) += 10;
+      REMAKE_N(FRAME(stack), locator, FRAME(nx));
+   }
+
+   memset(FRAME(stack)+FRAME(n), 0, sizeof(locator));
+
+   strcpy(CURRENT(intype), type);
+
+   CURRENT(number)      = numb;
+   CURRENT(ad.diskaddr) = addr;
+   CURRENT(indirect)    = indr;
+   CURRENT(dims)        = dims;
+   CURRENT(blocks)      = blocks;
+   CURRENT(cmmnd)       = cmmnd;
+
+   lite_SC_mark(dims, 1);
+   lite_SC_mark(blocks, 1);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_reduce
+ *
+ * Purpose:     Reduce the parse three.  This means looping over the
+ *              locator stack through the latest GOTO command and
+ *              determining a new locator whose intype, dimensions, number,
+ *              and address can be used to create a valid effective symbol
+ *              table entry or an actual one.  If there is an intermediate
+ *              expression on the stack it will be read and the value (which
+ *              can only be an index) is returned.
+ *
+ * Return:      Success:        See above
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  3:05 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  8 17:26:38 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.  I eliminated some memory leaks.
+ *
+ *-------------------------------------------------------------------------
+ */
+static long
+_PD_reduce (void) {
+
+   int i, nmn, nmx, cmnd;
+   long addr, val, numb;
+   char *type;
+   dimdes *dims;
+   symblock *sp;
+   symindir iloc;
+
+   val = 0L;
+   nmx = FRAME(n);
+
+   type = CURRENT(intype);
+   numb = CURRENT(number);
+   dims = CURRENT(dims);
+   lite_SC_mark(dims, 1);
+
+   /*
+    * Find the most recent GOTO commmand.
+    */
+   for (i = nmx; i > 0; i--) {
+      cmnd = FRAME(stack)[i].cmmnd;
+      if (cmnd == GOTO_C) break;
+   }
+
+   nmn  = MAX(i, 1);
+   addr = 0L;
+
+   iloc.addr       = 0L;
+   iloc.n_ind_type = 0L;
+   iloc.arr_offs   = 0L;
+
+   /*
+    * Find the actual address of the specified object.
+    */
+   if (file_s->virtual_internal) {
+      addr = FRAME(stack)[nmx].ad.diskaddr;
+   } else {
+      for (i = nmn; i <= nmx; i++) {
+         cmnd = FRAME(stack)[i].cmmnd;
+         if (cmnd == DEREF_C) {
+            addr = _PD_deref_addr(i);
+         } else if (cmnd == INDEX_C) {
+            addr = _PD_index_deref(i, &dims, &numb);
+            iloc = FRAME(stack)[i].indir_info;
+         } else if (cmnd == MEMBER_C) {
+            addr = _PD_member_deref(i);
+         } else if (cmnd != CAST_C) {
+            addr += FRAME(stack)[i].ad.diskaddr;
+            FRAME(stack)[i].ad.diskaddr = addr;
+         }
+         SFREE(FRAME(stack)[i-1].dims);
+         SFREE(FRAME(stack)[i-1].blocks);
+      }
+   }
+
+   /*
+    * This must be taken now because the address reduction may have
+    * changed the original.
+    */
+   sp = CURRENT(blocks);
+
+   FRAME(n) = nmn;
+
+   /*
+    * If we are not at the bottom of the locator stack we have
+    * and intermediate expression which must by read in via _PD_rd_syment.
+    */
+   if (nmn != 1) {
+      syment *ep;
+
+      if (numb != 1L) {
+         lite_PD_error("INTERMEDIATE MUST BE SCALAR INTEGER - _PD_REDUCE",
+                       PD_TRACE);
+      }
+
+      ep = _lite_PD_mk_syment(CURRENT(intype), 1L, addr, NULL, NULL);
+      _lite_PD_rd_syment(file_s, ep, "long", &val);
+      _lite_PD_rl_syment(ep);
+
+      FRAME(n)--;
+
+   } else {
+
+      /*
+       * Otherwise we are at the end of the locator stack and the necessary
+       * information to build an effective syment must be filled in the
+       * bottom most locator
+       */
+
+      strcpy(CURRENT(intype), type);
+
+      CURRENT(number)      = numb;
+      CURRENT(ad.diskaddr) = addr;
+      CURRENT(blocks)      = sp;
+      CURRENT(dims)        = dims;
+      CURRENT(indir_info)  = iloc;
+      CURRENT(cmmnd)       = RESULT_C;
+   }
+
+   return(val);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_goto
+ *
+ * Purpose:     Carry out a goto command.  This should be starting out
+ *              with something which is in the symbol table (it is an
+ *              error if not).
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:50 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_do_goto (char *name) {
+
+   char *type;
+   int indr;
+   long numb, addr;
+   dimdes *dims;
+   symblock *sp;
+   syment *ep;
+   defstr *dp;
+
+   ep = lite_PD_inquire_entry(file_s, name, FRAME(flag), FRAME(path));
+   if (ep == NULL) lite_PD_error("NON-EXISTENT ENTRY - _PD_DO_GOTO", PD_TRACE);
+
+   /*
+    * Shift the starting point information onto the locator stack.
+    */
+   numb = PD_entry_number(ep);
+   addr = PD_entry_address(ep);
+   type = PD_entry_type(ep);
+   dims = PD_entry_dimensions(ep);
+   sp   = PD_entry_blocks(ep);
+
+   dp = _lite_PD_lookup_type(type, file_s->chart);
+   if (dp == NULL) lite_PD_error("UNDEFINED TYPE - _PD_DO_GOTO", PD_TRACE);
+   if (dp->size_bits && (addr > 0)) addr *= -SC_BITS_BYTE;
+
+   /*
+    * Indirect does NOT mean that the type is indirect but that the
+    * entry in the symbol table refers to a dynamically allocated
+    * quantity, hence indirect means no dimensions.
+    */
+   indr = (dims == NULL);
+
+   _PD_shift(name, type, dims, sp, numb, addr, indr, GOTO_C);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_member
+ *
+ * Purpose:     Carry out a member command.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:55 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_do_member (char *name, int deref_flag) {
+
+   char *type, t[MAXLINE];
+   int indr;
+   long addr, numb, nsitems;
+   dimdes *dims;
+   defstr *dp;
+   memdes *desc, *nxt;
+   HASHTAB *tab;
+
+   if (file_s->virtual_internal) tab = file_s->host_chart;
+   else tab = file_s->chart;
+
+   /*
+    * If we came here with the "->" syntax we will need to shift
+    * a derefence onto the locator stack ahead of the member shift
+    * also update the path while we're at it.
+    */
+   if (deref_flag) {
+      _PD_do_deref();
+      sprintf(t, "%s->%s", FRAME(path), name);
+   } else {
+      sprintf(t, "%s.%s", FRAME(path), name);
+   }
+
+   strcpy(FRAME(path), t);
+
+   /*
+    * NOTE: we had better be properly dereferenced at this point!!!!!!!
+    * DO NOT IMAGINE THAT ANYTHING DIFFERENT CAN BE DONE!!!!!!
+    */
+   type = CURRENT(intype);
+   if (_lite_PD_indirection(type))
+      lite_PD_error("IMPROPERLY DEREFERENCED EXPRESSION - _PD_DO_MEMBER",
+                    PD_TRACE);
+
+   /*
+    * Find the defstr whose members are to be searched.
+    */
+   dp = PD_inquire_table_type(tab, type);
+   if (dp == NULL) lite_PD_error("UNKNOWN TYPE - _PD_DO_MEMBER", PD_TRACE);
+
+   /*
+    * Loop over the members accumulating offset to the new address
+    * and the number of indirect members which will have to
+    * be skipped over.
+    */
+   addr    = 0L;
+   nsitems = 0L;
+   for (desc = dp->members; desc != NULL; desc = nxt) {
+      nxt = desc->next;
+      if (_PD_is_member(name, desc, tab, &nsitems)) {
+         type = _PD_get_type_member(file_s, FRAME(path), name, desc, &dp);
+
+         addr = desc->member_offs;
+         dims = desc->dimensions;
+         numb = _lite_PD_comp_num(dims);
+         indr = _lite_PD_indirection(type);
+
+         if (file_s->virtual_internal) {
+            SC_address ad;
+
+            ad   = FRAME(stack)[FRAME(n)].ad;
+            addr = ad.diskaddr + desc->member_offs;
+         }
+
+         /*
+          * Shift the member onto the locator stack.
+          */
+         _PD_shift(name, type, dims, NULL,
+                   numb, addr, indr, MEMBER_C);
+         CURRENT(n_struct_ptr) = nsitems;
+
+         return;
+      }
+   }
+
+   lite_PD_error("UNKNOWN MEMBER - _PD_DO_MEMBER", PD_TRACE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_deref
+ *
+ * Purpose:     Carry out a deref command.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:47 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_do_deref (void) {
+
+   long addr;
+   char t[MAXLINE];
+
+   strcpy(t, CURRENT(intype));
+
+   if (file_s->virtual_internal) {
+      SC_address ad;
+
+      ad         = FRAME(stack)[FRAME(n)].ad;
+      ad.memaddr = *(char **) ad.memaddr;
+      addr       = ad.diskaddr;
+
+   } else {
+      addr = 0L;
+   }
+
+   _PD_shift("", t, NULL, NULL, -1L, addr, 0, DEREF_C);
+
+   /*
+    * Since the shift added a new one this will dereference the current
+    * locator.
+    */
+   lite_PD_dereference(CURRENT(intype));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_index
+ *
+ * Purpose:     Carry out an index command.  This must always set the
+ *              current location to point to the first element indexed.
+ *              If more than one element is referenced then that information
+ *              must be put into the locator for future action.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:52 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_do_index (char *expr) {
+
+   int indr;
+   long bpi, start, stop, step, numb, doff, addr;
+   char t[MAXLINE], s[MAXLINE];
+   char *type, *tok;
+   dimdes *dims;
+   symblock *sp;
+
+   /*
+    * Update the path.
+    */
+   sprintf(t, "%s[%s]", FRAME(path), expr);
+   strcpy(FRAME(path), t);
+
+   dims = CURRENT(dims);
+   type = CURRENT(intype);
+   doff = PD_get_offset(file_s);
+
+   if (dims != NULL) {
+      strcpy(t, type);
+      lite_PD_dereference(t);
+      numb = _lite_PD_hyper_number(file_s, expr, 1L, dims, &start);
+      indr = FALSE;
+   } else if (_lite_PD_indirection(type)) {
+      _PD_do_deref();
+
+      /*
+       * Find the offset which will be the first part of the
+       * index expression find the number of items requested.
+       */
+      strcpy(t, expr);
+      tok = lite_SC_firsttok(t, ",");
+
+      strcpy(s, tok);
+      tok = strtok(s, ":");
+      if (tok == NULL) {
+         lite_PD_error("BAD INDEX EXPRESSION - _PD_DO_INDEX", PD_TRACE);
+      }
+
+      start = lite_SC_stoi(tok) - doff;
+
+      tok = strtok(NULL, ":");
+      if (tok == NULL) stop = start;
+      else stop = lite_SC_stoi(tok) - doff;
+
+      step = lite_SC_stoi(strtok(NULL, ":"));
+      if (step == 0L) step = 1L;
+
+      numb = (stop - start)/step + 1;
+
+
+      strcpy(t, CURRENT(intype));
+      indr = TRUE;
+
+   } else {
+      lite_PD_error("CAN'T INDEX OBJECT - _PD_DO_INDEX", PD_TRACE);
+   }
+
+   bpi = _lite_PD_lookup_size(t, file_s->chart);
+
+   if (file_s->virtual_internal) {
+      SC_address ad;
+
+      ad   = FRAME(stack)[FRAME(n)].ad;
+      addr = ad.diskaddr;
+
+   } else {
+      addr = 0L;
+   }
+
+   addr += start*bpi;
+
+   sp = CURRENT(blocks);
+
+   _PD_shift(expr, t, dims, sp, numb, addr, indr, INDEX_C);
+
+   CURRENT(n_array_items) = start;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_cast
+ *
+ * Purpose:     Carry out a CAST command.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:47 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_do_cast (char *type) {
+
+   int in;
+   long n, da;
+   char t[MAXLINE], s[MAXLINE];
+   symblock *sp;
+   dimdes *dm;
+
+   /*
+    * Update the path.
+    */
+   sprintf(t, "(%s) %s", type, FRAME(path));
+   strcpy(FRAME(path), t);
+
+   da = CURRENT(ad.diskaddr);
+   in = CURRENT(indirect);
+   n  = CURRENT(number);
+   sp = CURRENT(blocks);
+   dm = CURRENT(dims);
+
+   strcpy(s, CURRENT(intype));
+
+   _PD_shift("", s, dm, sp, n, da, in, CAST_C);
+
+   strcpy(outtype, type);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_do_digress
+ *
+ * Purpose:     Carry out a digress command.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:49 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+static long
+_PD_do_digress (char *expr) {
+
+   long val;
+   char t[MAXLINE];
+
+   /*
+    * Save the path.
+    * NOTE: this doesn't support more than one level of recursion!!
+    */
+   strcpy(t, FRAME(path));
+
+   val = _PD_reduce();    
+
+   /*
+    * Restore the path.
+    */
+   strcpy(FRAME(path), t);
+
+   return(val);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_is_member
+ *
+ * Purpose:     Determine whether or not the given member is the named
+ *              member and return true iff it is.  Also return the updated
+ *              number of struct indirections to track via the arg list.
+ *
+ * Return:      Success:        true or false
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:18 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+static int
+_PD_is_member (char *name, memdes *desc, HASHTAB *tab, long *pns) {
+
+
+   if (strcmp(desc->name, name) == 0) {
+      /*
+       * If this is the member say so.
+       */
+      return(TRUE);
+   } else {
+      /*
+       * Count up the number of indirects in the structure which will
+       * be skipped.
+       */
+      if (_lite_PD_indirection(desc->type)) {
+         *pns += _lite_PD_member_items(desc->member);
+      }
+      return(FALSE);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_get_type_member
+ *
+ * Purpose:     Get the true type of the member.  Handle any casts.
+ *
+ * Return:      Success:        The type.
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:15 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+static char *
+_PD_get_type_member (PDBfile *file, char *path_name, char *name,
+                     memdes *desc, defstr **pdp) {
+
+   char *mtype;
+   HASHTAB *tab;
+
+   if (file->virtual_internal) tab = file->host_chart;
+   else tab = file->chart;
+
+   *pdp = PD_inquire_table_type(tab, desc->base_type);
+   if (*pdp == NULL)
+      lite_PD_error("UNDEFINED TYPE - _PD_GET_TYPE_MEMBER", PD_TRACE);
+
+   if (desc->cast_offs < 0L) {
+      mtype = desc->type;
+   } else {
+      if (file->virtual_internal) {
+         SC_address ad;
+
+         ad    = FRAME(stack)[FRAME(n)].ad;
+         mtype = DEREF(ad.memaddr + desc->cast_offs);
+         if (mtype == NULL) {
+            if (DEREF(ad.memaddr + desc->member_offs) == NULL) {
+               mtype = desc->type;
+            } else {
+               lite_PD_error("NULL CAST TO NON-NULL MEMBER - "
+                             "_PD_GET_TYPE_MEMBER", PD_TRACE);
+            }
+         }
+
+      } else {
+         char s[MAXLINE], c;
+         int i;
+
+         /*
+          * Build the path of the member which points to the real type.
+          */
+         strcpy(s, path_name);
+         for (i = strlen(s) - 1; i >= 0; i--) {
+            c = s[i];
+            if ((c == '>') || (c == '.')) break;
+         }
+         s[i+1] = '\0';
+         strcat(s, desc->cast_memb);
+
+         _PD_save_stack();
+
+         /*
+          * Read the real type in.
+          */
+         lite_PD_read(file, s, &mtype);
+         if (mtype == NULL) mtype = desc->type;
+
+         _PD_restore_stack();
+      }
+   }
+
+   return(mtype);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_save_stack
+ *
+ * Purpose:     Save the state of the current parse.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:31 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_save_stack (void) {
+
+   frame_n++;
+   if (frame_n >= frame_nx) {
+      frame_nx += 2;
+      REMAKE_N(frames, parse_frame, frame_nx);
+   }
+
+   memset(&frames[frame_n], 0, sizeof(parse_frame));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_restore_stack
+ *
+ * Purpose:     Restore the state of the previous parse.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:31 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_restore_stack (void) {
+
+   SFREE(FRAME(stack));
+   SFREE(FRAME(lex_bf));
+   frame_n--;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_deref_addr
+ *
+ * Purpose:     Dereference a pointer and return the correct address
+ *              of the pointee.  The entire parse tree is avaiable to
+ *              provide all necessary context.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:11 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  8 17:26:38 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.
+ *
+ *-------------------------------------------------------------------------
+ */
+static long
+_PD_deref_addr (int n) {
+
+   long addr, numb, bpi;
+   char *type;
+   HASHTAB *tab;
+   FILE *fp;
+   dimdes *dims;
+   symblock *sp;
+
+   tab  = file_s->chart;
+   type = FRAME(stack)[n-1].intype;
+   bpi  = _lite_PD_lookup_size(type, tab);
+
+   /*
+    * Handle the case of in memory pointers.
+    */
+   if (file_s->virtual_internal) {
+      addr = FRAME(stack)[n].ad.diskaddr;
+      numb = FRAME(stack)[n].number;
+   } else {
+      /*
+       * Handle the case of file pointers
+       */
+      PD_itag itag;
+
+      addr = FRAME(stack)[n-1].ad.diskaddr;
+      numb = FRAME(stack)[n-1].number;
+
+      /*
+       * Get past the level that contains the dereference
+       * NOTE: PDB declines to write top level pointers which are
+       *       useless numbers, it starts in with the pointees and
+       *       hence the start of such objects are the itags of the
+       *       pointees.
+       */
+      if (!_lite_PD_indirection(type)) addr += numb*bpi;
+
+      fp = file_s->stream;
+      if (io_seek(fp, addr, SEEK_SET)) {
+         lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_DEREF_ADDR",
+                       PD_TRACE);
+      }
+
+      _lite_PD_rd_itag(file_s, &itag);
+
+      addr = io_tell(fp);
+      numb = itag.nitems;
+
+      if (!_lite_PD_indirection(FRAME(stack)[n].intype)) {
+         sp = FMAKE(symblock, "_PD_DEREF_ADDR:sp");
+         sp->number   = numb;
+         sp->diskaddr = addr;
+
+         if ((n + 1) == FRAME(n)) {
+            dims = _lite_PD_mk_dimensions(file_s->default_offset, numb);
+         } else {
+            dims = NULL;
+         }
+
+         FRAME(stack)[n].blocks = sp;
+         FRAME(stack)[n].dims   = dims;
+
+         if (n < FRAME(n)) {
+            if (FRAME(stack)[n+1].cmmnd == INDEX_C) {
+               FRAME(stack)[n+1].blocks = sp;
+               FRAME(stack)[n+1].dims   = dims;
+               lite_SC_mark(sp, 1);
+               lite_SC_mark(dims, 1);
+            }
+         }
+      }
+   }
+
+   FRAME(stack)[n].number      = numb;
+   FRAME(stack)[n].ad.diskaddr = addr;
+
+   return(addr);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_index_deref
+ *
+ * Purpose:     Handle indexing where a pointered type was just
+ *              dereferenced.  This will mean skipping over itags and
+ *              other pointees.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:20 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  8 17:26:38 PST 1998
+ *    I added calls to lite_SC_mark to bump memory reference counts as
+ *    appropriate.  I eliminated some memory leaks.
+ *
+ *-------------------------------------------------------------------------
+ */
+static long
+_PD_index_deref (int n, dimdes **pdims, long *pnumb) {
+
+   long indx, addr, numb, naitems, bpi;
+   char *type, *typc, *typp;
+   symblock *nsp;
+   symindir iloc;
+   FILE *fp;
+   HASHTAB *tab;
+
+   nsp = NULL;
+
+   iloc.addr       = 0L;
+   iloc.n_ind_type = 0L;
+   iloc.arr_offs   = 0L;
+
+   if (file_s->virtual_internal) {
+      /*
+       * Handle in memory indexing.
+       */
+      addr = FRAME(stack)[n].ad.diskaddr;
+   } else {
+      /*
+       * Handle file indexing.
+       * Start at the address before the latest DEREF.
+       */
+      typp = FRAME(stack)[n-1].intype;
+      type = FRAME(stack)[n].intype;
+      typc = FRAME(stack)[n+1].intype;
+      indx = FRAME(stack)[n].n_array_items;
+
+      fp  = file_s->stream;
+      tab = file_s->chart;
+
+      iloc.n_ind_type = _PD_num_indirects(type, tab);
+      iloc.arr_offs   = indx;
+
+      /*
+       * In order to know where to go you have to know whether the
+       * next thing on the locator stack dereferences a pointer
+       */
+      if (((n < FRAME(n)) && _lite_PD_indirection(typc)) ||
+          _lite_PD_indirection(typp)) {
+         numb = FRAME(stack)[n-1].number;
+         if ((indx < 0) || (numb < indx))
+            lite_PD_error("INDEX OUT OF BOUNDS - _PD_INDEX_DEREF", PD_TRACE);
+
+         /*
+          * Handle GOTO, DEREF, INDEX.
+          */
+         if (FRAME(stack)[n-1].cmmnd == DEREF_C) {
+            addr = FRAME(stack)[n-2].ad.diskaddr;
+            if (io_seek(fp, addr, SEEK_SET))
+               lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_INDEX_DEREF",
+                             PD_TRACE);
+
+            /*
+             * Skip over the thing that was DEREF'd to where its
+             * pointees begin.
+             */
+            addr = _lite_PD_skip_over(file_s, 1L, TRUE);
+
+            /*
+             * Skip over all items before the indexed one.
+             */
+            numb    = _PD_num_indirects(type, tab);
+            naitems = indx*MAX(1, numb);
+            addr    = _lite_PD_skip_over(file_s, naitems, FALSE);
+
+         } else {
+            /*
+             * Handle GOTO, INDEX.
+             */
+            addr = FRAME(stack)[n-1].ad.diskaddr;
+
+            if (!_lite_PD_indirection(typp)) {
+               bpi   = _lite_PD_lookup_size(typp, tab);
+               addr += numb*bpi;
+               if (io_seek(fp, addr, SEEK_SET))
+                  lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_INDEX_DEREF",
+                                PD_TRACE);
+
+               /*
+                * Skip over all items before the indexed one.
+                */
+               numb    = _PD_num_indirects(typp, tab);
+               naitems = indx*MAX(1, numb);
+               addr    = _lite_PD_skip_over(file_s, naitems, FALSE);
+            } else {
+               /* NOTE: if we get here, then we have an array of pointers (the
+                *       data for which is not written by PDB - the pointers are
+                *       meaningless numbers) consequently we are staring at the
+                *       ITAG of the first pointee
+                */
+               PD_itag itag;
+
+               /*
+                * Be sure that we are at the first ITAG.
+                */
+               if (io_seek(fp, addr, SEEK_SET))
+                  lite_PD_error("FSEEK FAILED - _PD_INDEX_DEREF",
+                                PD_TRACE);
+
+               *pdims = NULL;
+
+               /*
+                * Skip over to the indexed element.
+                */
+               numb    = _PD_num_indirects(typp, tab);
+               naitems = indx*MAX(1, numb);
+               addr    = _lite_PD_skip_over(file_s, naitems, FALSE);
+
+               _lite_PD_rd_itag(file_s, &itag);
+               if (!itag.flag) {
+                  if (io_seek(fp, addr, SEEK_SET))
+                     lite_PD_error("FSEEK FAILED - _PD_INDEX_DEREF",
+                                   PD_TRACE);
+                  _lite_PD_rd_itag(file_s, &itag);
+               }
+
+               numb   = itag.nitems;
+               *pnumb = numb;
+               FRAME(stack)[n].number   = numb;
+
+               /*
+                * After doing one index the next thing has to be contiguous.
+                */
+               SFREE(FRAME(stack)[n+1].blocks);
+
+               addr   = io_tell(fp);
+            }
+         }
+      } else {
+         /*
+          * Handle direct types simply.
+          * GOTCHA: it is a temporary measure to pass the old dimensions
+          *         up the stack the correct thing to do is to distinguish
+          *         between the dimensions of the source and the effective
+          *         dimension of the target.  This will never be right until
+          *         then.
+          */
+         symblock *sp;
+         long nbl, nbb;
+
+         if (*pdims == NULL) {
+            *pdims = FRAME(stack)[n].dims;
+            lite_SC_mark(FRAME(stack)[n].dims, 1);
+         }
+
+         SFREE(FRAME(stack)[n].dims);
+         FRAME(stack)[n].dims = FRAME(stack)[n-1].dims;
+         lite_SC_mark(FRAME(stack)[n-1].dims, 1);
+         addr  = FRAME(stack)[n-1].ad.diskaddr;
+
+         sp    = FRAME(stack)[n].blocks;
+         numb  = FRAME(stack)[n].ad.diskaddr;
+         bpi   = _lite_PD_lookup_size(type, tab);
+
+         nbl       = FRAME(stack)[n-1].number;
+         iloc.addr = addr + nbl*bpi;
+
+         /*
+          * Deal with multiblock entries.
+          */
+         nsp = NULL;
+
+         /* NOTE: it is not the most general thing to assume that bitstreams
+          *       (indicated by negative addresses) must be contiguous although
+          *       all current examples are
+          */
+         if ((sp != NULL) && (addr >= 0)) {
+            nbl = lite_SC_arrlen(sp)/sizeof(symblock);
+
+            /*
+             * Find out which block we got into.
+             */
+            while (TRUE) {
+               nbb  = sp->number*bpi;
+               addr = sp->diskaddr;
+               if (numb < nbb) break;
+
+               numb -= nbb;
+               sp++;
+               nbl--;
+            }
+
+            iloc.addr = addr + nbb;
+
+            /*
+             * Make a copy of the remaining blocks for the effective entry.
+             */
+            if (nbl > 0) {
+               int i;
+
+               nsp = FMAKE_N(symblock, nbl, "_PD_INDEX_DEREF:nsp");
+               for (i = 0; i < nbl; i++) nsp[i] = *sp++;
+            }
+
+            /*
+             * Adjust the first block to be consistent with the rest
+             * of the locator.
+             */
+            nsp[0].number   -= numb/bpi;
+            nsp[0].diskaddr  = addr + numb;
+         }
+
+         if (addr < 0) {
+            defstr *dp;
+
+            dp = PD_inquire_table_type(tab, type);
+            addr -= (numb/bpi)*dp->size_bits;
+         } else {
+            *pnumb = FRAME(stack)[n].number;
+            addr += numb;
+         }
+      }
+   }
+
+   SFREE(FRAME(stack)[n].blocks);
+   FRAME(stack)[n].blocks      = nsp;
+   FRAME(stack)[n].ad.diskaddr = addr;
+   FRAME(stack)[n].indir_info  = iloc;
+
+   return(addr);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_member_deref
+ *
+ * Purpose:     Find the member where a pointered type was just
+ *              dereferenced.  This will mean skipping over itags and
+ *              other pointees.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:38 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static long
+_PD_member_deref (int n) {
+
+   long addr, nsitems;
+   char *type;
+
+   /*
+    * Handle in memory members.
+    */
+   if (file_s->virtual_internal) {
+      addr = FRAME(stack)[n].ad.diskaddr;
+   } else {
+      /*
+       * Handle file members.
+       */
+      int indir, cmmnd;
+      long bpi, numb;
+
+      cmmnd = FRAME(stack)[n-1].cmmnd;
+      indir = _lite_PD_indirection(FRAME(stack)[n].intype);
+      if ((cmmnd == GOTO_C) && indir) {
+         addr = FRAME(stack)[n-1].ad.diskaddr;
+         type = FRAME(stack)[n-1].intype;
+         numb = FRAME(stack)[n-1].number;
+         bpi  = _lite_PD_lookup_size(type, file_s->chart);
+
+         addr += bpi*numb;
+
+         if (io_seek(file_s->stream, addr, SEEK_SET))
+            lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_MEMBER_DEREF",
+                          PD_TRACE);
+
+      } else if ((cmmnd != INDEX_C) && indir) {
+         addr = FRAME(stack)[n-2].ad.diskaddr;
+
+         if (io_seek(file_s->stream, addr, SEEK_SET))
+            lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_MEMBER_DEREF",
+                          PD_TRACE);
+
+         /*
+          * Skip over the thing that was DEREF'd to where its pointees begin.
+          */
+         addr = _lite_PD_skip_over(file_s, 1L, TRUE);
+         
+      } else {
+         /*
+          * Start at the address in the previous locator.
+          */
+         addr = FRAME(stack)[n-1].ad.diskaddr;
+      }
+
+      /*
+       * Handle indirect types differently from direct ones.
+       */
+      type = FRAME(stack)[n].intype;
+      if (_lite_PD_indirection(type)) {
+         nsitems = FRAME(stack)[n].n_struct_ptr;
+
+         if (io_seek(file_s->stream, addr, SEEK_SET))
+            lite_PD_error("FSEEK FAILED TO FIND DATA - _PD_MEMBER_DEREF",
+                          PD_TRACE);
+
+         /*
+          * Skip over all items before the specified member.
+          */
+         addr = _lite_PD_skip_over(file_s, nsitems, FALSE);
+         
+      } else {
+         /*
+          * Handle direct types simply.
+          */
+         addr += FRAME(stack)[n].ad.diskaddr;
+      }
+   }
+
+   FRAME(stack)[n].ad.diskaddr = addr;
+
+   return(addr);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_skip_over
+ *
+ * Purpose:     Given a number of units, skip over that many units
+ *              including subunits referenced by the top level units.  If
+ *              noind is true don't pick up the additional indirects.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:56 PM EST
+ *
+ * Modifications:
+ *     Brad Whitlock, Wed Feb 23 19:01:08 PST 2000
+ *     Added code to skip some logic when an itag cannot be read.
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_skip_over (PDBfile *file, long skip, int noind) {
+
+   long bytepitem, addr;
+   int indir;
+   FILE *fp;
+   HASHTAB *tab;
+   PD_itag itag;
+
+   fp  = file->stream;
+   tab = file->chart;
+
+   while (skip-- > 0L)
+   {
+       if(TRUE == _lite_PD_rd_itag(file, &itag))
+       {
+           /*
+            * Note whether this is an indirection.
+            */
+           indir = _lite_PD_indirection(itag.type);
+
+           /*
+            * If noind is TRUE don't pick up the indirects.
+            */
+          if (noind == FALSE)
+          {
+              /*
+               * If it is an indirection we have more to skip over.
+               */
+              if (indir) skip += itag.nitems;
+
+              /*
+               * If it is a structure with indirections we have more to
+               * skip over.
+               */
+             skip += itag.nitems*_PD_num_indirects(itag.type, tab);
+          }
+
+          /*
+           * If it was not a NULL pointer find it.
+           */
+          if ((itag.addr != -1L) && (itag.nitems != 0L))
+          {
+              if (!itag.flag && (skip == -1))
+              {
+                  if (io_seek(fp, itag.addr, SEEK_SET))
+                      lite_PD_error("CAN'T FIND REAL DATA - _PD_SKIP_OVER",
+                                    PD_TRACE);
+                  _lite_PD_rd_itag(file, &itag);
+              }
+
+              /*
+               * Layered indirects have no "data" bytes written out to be
+               * skipped over.
+               */
+              if (!indir)
+              {
+                  bytepitem = _lite_PD_lookup_size(itag.type, tab);
+                  if (bytepitem == -1)
+                      lite_PD_error("CAN'T FIND NUMBER OF BYTES - _PD_SKIP_OVER",
+                                    PD_TRACE);
+              }
+              else
+              {
+                  bytepitem = 0;
+              }
+
+              /*
+               * If its here, step over the data.
+               */
+              if (itag.flag && (skip > -1))
+              {
+                  addr = bytepitem*itag.nitems;
+                  if (!indir)
+                      if (io_seek(fp, addr, SEEK_CUR))
+                          lite_PD_error("CAN'T SKIP TO ADDRESS - _PD_SKIP_OVER",
+                                        PD_TRACE);
+              }
+          }
+      } /* end if (_lite_PD_rd_itag(...) == TRUE). */
+   } /* end while */
+
+   addr = io_tell(fp);
+
+   return(addr);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_num_indirects
+ *
+ * Purpose:     Count up the number of members of the given structure
+ *              with indirect references.
+ *
+ * Return:      Success:        Number of indirect references.
+ *
+ *              Failure:        lite_PD_error()
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:06 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static long
+_PD_num_indirects (char *type, HASHTAB *tab) {
+
+   char *mtype;
+   defstr *dp;
+
+   mtype = _lite_PD_member_base_type(type);
+   dp    = PD_inquire_table_type(tab, mtype);
+   SFREE(mtype);
+
+   if (dp == NULL) {
+      lite_PD_error("CAN'T FIND TYPE - _PD_NUM_INDIRECTS", PD_TRACE);
+   }
+
+   return(dp->n_indirects);
+}
+
+/*--------------------------------------------------------------------------*/
+/*                          LEXICAL SCANNER ROUTINES                        */
+/*--------------------------------------------------------------------------*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_lex
+ *
+ * Purpose:     Lexical scanner called by the generated parser.  Text of
+ *              identifiers is put in the global variable TEXT.  The
+ *              numerical value of an integer token is put in the global
+ *              variable NUM_VAL.  Legal token values are:
+ *
+ *              OPEN_PAREN       ( or [                                   
+ *              CLOSE_PAREN      ) or ]                                   
+ *              DOT              .                                        
+ *              COMMA            ,                                        
+ *              COLON            :                                        
+ *              STAR             *                                        
+ *              ARROW            ->                                       
+ *              INTEGER          octal, decimal, or hexidecimal integer   
+ *              IDENTIFIER       just about anything else (no white space)
+ *              
+ * Return:      Success:        The value of the lexical token.
+ *
+ *              Failure:        0 if at the end of the input string.
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:27 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_lex (void) {
+
+   int c, d, start;
+
+   start = FRAME(index);
+   while (TRUE) {
+      c = input();
+      switch (c) {
+      case '\0' :
+         if (FRAME(index) == start+1) {
+            unput(c);
+            return(0);
+         } else {
+            unput(c);
+            return(_PD_next_token(start));
+         }
+
+      case '(' :
+      case '[' :
+         GOT_TOKEN(OPEN_PAREN);
+
+      case ')' :
+      case ']' :
+         GOT_TOKEN(CLOSE_PAREN);
+
+      case '.' :
+         GOT_TOKEN(DOT);
+
+      case ',' :
+         GOT_TOKEN(COMMA);
+
+      case ':' :
+         GOT_TOKEN(COLON);
+
+      case '*' :
+         GOT_TOKEN(STAR);
+
+      case '-' :
+         d = input();
+         if (d == '>') {
+            if (FRAME(index) == start+2) {
+               return(ARROW);
+            } else {
+               unput(d);
+               unput(c);
+               return(_PD_next_token(start));
+            }
+         }
+
+      default :
+         break;
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_next_token
+ *
+ * Purpose:     Figure out whether the specified token is an identifier
+ *              or an integer and take the apropriate action.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:04 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_next_token (int start) {
+
+   int nc;
+   char *end, s[MAXLINE], *tok;
+
+   nc = FRAME(index) - start;
+   strncpy(s, FRAME(lex_bf)+start, nc);
+   s[nc] = '\0';
+
+   /*
+    * Eliminate whitespace from either end of the token.
+    * NOTE: things like "a b" are illegal anyway.
+    */
+   tok = strtok(s, " \t\f\n\r");
+   strcpy(text, tok);
+
+   num_val = _lite_SC_strtol(text, &end, 0);
+   tok     = text + strlen(text);
+   if (tok == end) return(INTEGER);
+   else return(IDENTIFIER);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_parse
+ *
+ * Purpose:     Parse an expression which is in the lexical buffer of the
+ *              current parse frame.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  2:19 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_parse (void) {
+
+   char **pvt;
+   register char **lpv;         /* top of value stack */
+   register int *lps;           /* top of state stack */
+   register int lstate;         /* current state */
+   register int  n;             /* internal state number info */
+   register int len;
+
+   static int exca[] = {-1, 1, 0, -1, -2, 0,} ;
+   static int act[]  = { 3, 29,  5, 26, 24,  7,  7,  9, 19, 25,
+                         3, 18,  5, 10, 17,  7, 11, 12, 14, 15,
+                         20,  1, 16,  4,  6,  8, 13,  2,  0,  0,
+                         0,  0,  0,  0,  0, 23, 21, 22, 28,  0,
+                         27, 30} ;
+   static int pact[] = { -247, -1000, -1000,  -255,  -244,  -247,
+                         -1000, -1000,  -240, -1000,
+                         -257,  -256,  -256, -1000,  -247, -1000,
+                         -254, -1000,  -261, -1000,
+                         -1000, -1000, -1000, -1000, -1000,  -257,
+                         -257, -1000,  -263,  -257, -1000};
+   static int pgo[] = {0, 20, 27, 25, 23, 24, 22, 14, 11};
+   static int r1[]  = {0, 1, 1, 1, 3, 3, 2, 2, 4, 4,
+                       4, 4, 6, 6, 7, 7, 7, 8, 8, 5};
+   static int r2[]  = {0, 2, 9, 1, 3, 5,  2, 5, 3, 9,
+                       7, 7, 2, 7, 2, 7, 11, 3, 3, 3};
+   static int chk[] = {-1000,  -1,  -2, 257,  -4, 259,  -5, 262,  -3, 262,
+                       257, 260, 261,  -1, 258, 259,  -6,  -7,  -8, 265,
+                       -1,  -5,  -5,  -1, 258, 263, 264,  -7,  -8, 264, -8};
+   static int def[] = { 3, -2,  1, 0, 6, 3, 8, 19,  0,  4,
+                        3,  0,  0, 7, 3, 5, 0, 12, 14, 17,
+                        18, 10, 11, 2, 9, 3, 3, 13, 15,  3, 16};
+
+   static int negative_one = -1;
+
+   /*
+    * Initialize externals - _PD_parse may be called more than once.
+    */
+   FRAME(pv) = &FRAME(v)[negative_one];
+   FRAME(ps) = &FRAME(s)[negative_one];
+
+   FRAME(state)         = 0;
+   FRAME(tmp)           = 0;
+   FRAME(n_error)       = 0;
+   FRAME(error)         = 0;
+   FRAME(current_token) = -1;
+
+   lpv    = FRAME(pv);
+   lps    = FRAME(ps);
+   lstate = FRAME(state);
+
+   colon = FALSE;
+
+   /*
+    * loop as expressions are pushed onto the stack.
+    */
+   for (;;) {
+      /*
+       * Put a state and value onto the stacks.
+       */
+      if (++lps >= &FRAME(s)[MAXPARSEDEPTH])
+         lite_PD_error("STACK OVERFLOW - _PD_PARSE", PD_TRACE);
+
+      *lps   = lstate;
+      *++lpv = FRAME(val);
+
+      /*
+       * We have a new state - find out what to do.
+       */
+      n = pact[lstate];
+      if (n > STATEFLAG) {
+         if ((FRAME(current_token) < 0) &&
+             ((FRAME(current_token) = _PD_lex()) < 0))
+            FRAME(current_token) = 0;
+
+         /*
+          * Valid shift.
+          */
+         n += FRAME(current_token);
+         if ((n >= 0) && (n < LASTTOK)) {
+            n = act[n];
+            if (chk[n] == FRAME(current_token)) {
+               FRAME(current_token) = -1;
+               FRAME(val) = FRAME(lval);
+
+               lstate = n;
+               if (FRAME(error) > 0) FRAME(error)--;
+               continue;
+            }
+         }
+      }
+
+      n = def[lstate];
+      if (n == -2) {
+         int *xi;
+
+         if ((FRAME(current_token) < 0) &&
+             ((FRAME(current_token) = _PD_lex()) < 0))
+            FRAME(current_token) = 0;
+
+         /*
+          * Look through exception table.
+          */
+         xi = exca;
+
+         while ((*xi != -1) || (xi[1] != lstate)) {
+            xi += 2;
+         }
+
+         while ((*(xi += 2) >= 0) && (*xi != FRAME(current_token))) /*void*/ ;
+
+         n = xi[1];
+         if (n < 0) return;
+      }
+
+      /*
+       * Check for syntax error.
+       */
+      if (n == 0) {
+         if (FRAME(error) > 0)
+            lite_PD_error("SYNTAX ERROR - _PD_PARSE", PD_TRACE);
+      }
+
+      /*
+       * Reduction by production n.
+       */
+      FRAME(tmp) = n;           /* value to switch over */
+      pvt = lpv;                        /* top of value stack */
+
+      /*
+       * Look in goto table for next state.
+       * If r2[n] doesn't have the low order bit set
+       * then there is no action to be done for this reduction
+       * and no saving/unsaving of registers done.
+       */
+      len = r2[n];
+      if (!(len & 01)) {
+         len >>= 1;
+         lpv -= len;
+         FRAME(val) = lpv[1];
+
+         n = r1[n];
+         lps -= len;
+         lstate = pgo[n] + *lps + 1;
+         if ((lstate >= LASTTOK) ||
+             (chk[lstate = act[lstate]] != -n)) {
+            lstate = act[pgo[n]];
+         }
+
+         continue;
+      }
+
+      len >>= 1;
+      lpv -= len;
+      FRAME(val) = lpv[1];
+
+      n   = r1[n];
+      lps -= len;
+      lstate = pgo[n] + *lps + 1;
+         
+      if ((lstate >= LASTTOK) ||
+          (chk[lstate = act[lstate]] != -n)) {
+         lstate = act[pgo[n]];
+      }
+
+      /*
+       * Save until reenter driver code.
+       */
+      FRAME(state) = lstate;
+      FRAME(ps)    = lps;
+      FRAME(pv)    = lpv;
+
+      _PD_disp_rules(FRAME(tmp), pvt);
+
+      lpv    = FRAME(pv);
+      lps    = FRAME(ps);
+      lstate = FRAME(state);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    _PD_disp_rules
+ *
+ * Purpose:     Dispatch on the specified rule.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:14 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_disp_rules (int rule, char **pvt) {
+
+   switch (rule) {
+
+      /* variable_expression :
+       *      unary_expression
+       *    | OPEN_PAREN type CLOSE_PAREN variable_expression
+       */
+   case 2:
+      _PD_do_cast(pvt[-2]);
+      break;
+
+      /*    | */
+   case 3:
+      break;
+
+      /* type :
+       *      IDENTIFIER
+       */
+   case 4:
+      FRAME(val) = text;
+      break;
+
+      /*    | type STAR */
+   case 5:
+      sprintf(msg, "%s *", pvt[-1]);
+      FRAME(val) = msg;
+      break;
+
+      /* unary_expression :
+       *      postfix_expression
+       *    | STAR variable_expression
+       */
+   case 7:
+      _PD_do_deref();
+      break;
+
+      /* postfix_expression :
+       *      primary_expression
+       */
+   case 8:
+      _PD_do_goto(pvt[-0]);
+      break;
+
+      /*    | postfix_expression OPEN_PAREN index_expression CLOSE_PAREN */
+   case 9:
+      _PD_do_index(pvt[-1]);
+      SFREE(pvt[-1]);
+      break;
+
+      /*    | postfix_expression DOT primary_expression */
+   case 10:
+      _PD_do_member(pvt[-0], FALSE);
+      break;
+
+      /*    | postfix_expression ARROW primary_expression */
+   case 11:
+      _PD_do_member(pvt[-0], TRUE);
+      break;
+
+      /* index_expression :
+       *         range
+       *       | index_expression COMMA range
+       */
+   case 13:
+      sprintf(msg, "%s,%s", pvt[-2], pvt[-0]);
+      SFREE(pvt[-2]);
+      SFREE(pvt[-0]);
+      FRAME(val) = lite_SC_strsavef(msg, "char*:PARSE:COMMA");
+      break;
+
+      /* range : index
+       *       | index COLON index
+       */
+   case 15:
+      if (strcmp(pvt[-2], pvt[-0]) != 0) colon = TRUE;
+      sprintf(msg, "%s:%s", pvt[-2], pvt[-0]);
+      SFREE(pvt[-2]);
+      SFREE(pvt[-0]);
+      FRAME(val) = lite_SC_strsavef(msg, "char*:PARSE:COLON");
+      break;
+
+      /*       | index COLON index COLON index */
+   case 16:
+      if (strcmp(pvt[-4], pvt[-2]) != 0) colon = TRUE;
+      sprintf(msg, "%s:%s:%s", pvt[-4], pvt[-2], pvt[-0]);
+      SFREE(pvt[-4]);
+      SFREE(pvt[-2]);
+      SFREE(pvt[-0]);
+      FRAME(val) = lite_SC_strsavef(msg, "char*:PARSE:COLON:COLON");
+      break;
+
+      /* index : INTEGER */
+   case 17:
+      sprintf(msg, "%ld", num_val);
+      FRAME(val) = lite_SC_strsavef(msg, "char*:PARSE:INTEGER");
+      break;
+
+      /*       | variable_expression */
+   case 18:
+      sprintf(msg, "%ld", _PD_do_digress(pvt[-0]));
+      FRAME(val) = lite_SC_strsavef(msg, "char*:PARSE:VARIABLE_EXPRESSION");
+      break;
+
+      /* primary_expression : IDENTIFIER */
+   case 19:
+      if (colon)
+         lite_PD_error("HYPERINDEX ON NON-TERMINAL NODE - _PD_DISP_RULES",
+                       PD_TRACE);
+      FRAME(val) = text;
+      break;
+   }
+}
diff --git a/src/pdb/pdrdwr.c b/src/pdb/pdrdwr.c
new file mode 100644
index 0000000..e77f080
--- /dev/null
+++ b/src/pdb/pdrdwr.c
@@ -0,0 +1,1926 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * PDRDWR.C - new read/write routines for PDBLib
+ *
+ * Source Version: 9.0
+ * Software Release #92-0043
+ *
+ */
+#include "config.h" /* For a possible redefinition of setjmp/longjmp */
+#if !defined(_WIN32)
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+#include "pdb.h"
+
+#define DONE         1
+#define LEAF         2
+#define LEAF_ITEM    3
+#define LEAF_RET     4
+#define LEAF_INDIR   5
+#define INDIRECT     6
+#define INDIR_ITEM   7
+#define INDIR_RET    8
+#define BLOCK        9
+#define BLOCK_ITEM  10
+#define BLOCK_RET   11
+#define SKIP_TO     12
+#define SKIP_RET    13
+
+#define SAVE_S(s, t)                                                         \
+    {str_stack[str_ptr++] = s;                                               \
+     s = lite_SC_strsavef(t, "char*:SAVE_S:t");}
+#define RESTORE_S(s)                                                         \
+    {SFREE(s);                                                               \
+     s = str_stack[--str_ptr];}
+
+#define SAVE_I(val)     lval_stack[lval_ptr++].diskaddr = (long) val;
+#define RESTORE_I(val)  val = lval_stack[--lval_ptr].diskaddr;
+
+#define SAVE_P(val)           lval_stack[lval_ptr++].memaddr = (char *) val;
+#define RESTORE_P(type, val)  val = (type *) lval_stack[--lval_ptr].memaddr;
+
+#define SET_CONT(ret)                                                        \
+   {call_stack[call_ptr++] = ret;                                            \
+    dst = _lite_PD_indirection(litype) ? INDIRECT : LEAF;                         \
+    continue;}
+
+#define SET_CONT_RD(ret, branch)                                             \
+   {call_stack[call_ptr++] = ret;                                            \
+    dst = branch;                                                            \
+    continue;}
+
+#define GO_CONT                                                              \
+   {dst = call_stack[--call_ptr];                                            \
+    continue;}
+
+#define GO(lbl)                                                              \
+    {dst = lbl;                                                              \
+     continue;}
+
+
+static long             call_ptr = 0L ;
+static long             lval_ptr = 0L ;
+static long             str_ptr = 0L ;
+static long             call_stack[1000] ;
+static SC_address       lval_stack[1000] ;
+static char             *str_stack[1000] ;
+
+static dimind *         _PD_compute_hyper_strides (PDBfile*,char*,dimdes*,
+                                                       int*) ;
+static void             _PD_effective_addr (long*,long*,long,symblock*) ;
+static int              _PD_rd_hyper_index (PDBfile*,syment*,char*,dimind*,
+                                                char*,char*,long,symblock*,int,
+                                                int) ;
+static int              _PD_rd_ind_tags (PDBfile*,char**,PD_itag*) ;
+static void             _PD_rd_leaf_members (PDBfile*,char*,long,char*,
+                                                 char*,int) ;
+static int              _PD_read_hyper_space (PDBfile*,syment*,char*,char*,
+                                                  char*,symblock*,int,int,long,
+                                                  long,long) ;
+static char *           _PD_wr_hyper_index (PDBfile*,char*,dimind*,char*,
+                                            char*,long,symblock*,int,int);
+static void             _PD_wr_leaf_members (PDBfile*,char*,char*,long,byte*);
+static int              _PD_wr_ind_itags (PDBfile*,long,char*);
+static char *           _PD_write_hyper_space (PDBfile*,char*,char*,char*,
+                                               symblock*,int,int,long,
+                                               long,long);
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_indexed_read_as
+ *
+ * Purpose:     Read part of an entry from the PDB file into the location
+ *              pointed to by VR.  IND contains one triplet of long ints
+ *              per variable dimension specifying start, stop, and step
+ *              for the index.
+ *
+ * Return:      Success:        Number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  4, 1996  4:52 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_indexed_read_as (PDBfile *file, char *fullpath, char *type, byte *vr,
+                          int nd, long *ind, syment *ep) {
+
+   int          i, err;
+   long         start, stop, step;
+   char         expr[MAXLINE], index[MAXLINE], hname[MAXLINE];
+
+   switch (setjmp(_lite_PD_read_err)) {
+   case ABORT:
+      return(FALSE);
+   case ERR_FREE:
+      return(TRUE);
+   default:
+      memset(lite_PD_err, 0, MAXLINE);
+      break;
+   }
+
+   strcpy(index, "(");
+   for (i = 0; i < nd; i++) {
+      start = ind[0];
+      stop  = ind[1];
+      step  = ind[2];
+      ind  += 3;
+      if (start == stop) sprintf(expr, "%ld,", start);
+      else if (step <= 1L) sprintf(expr, "%ld:%ld,", start, stop);
+      else sprintf(expr, "%ld:%ld:%ld,", start, stop, step);
+      strcat(index, expr);
+   }
+
+   if (strlen(index) > 1) {
+      index[strlen(index)-1] = ')';
+      sprintf(hname, "%s%s", fullpath, index);
+   } else {
+      strcpy(hname, fullpath);
+   }
+
+   _lite_PD_rl_syment_d(ep);
+   ep = _lite_PD_effective_ep(file, hname, TRUE, fullpath);
+   if (ep == NULL)
+      lite_PD_error("CAN'T FIND ENTRY - _PD_INDEXED_READ_AS", PD_READ);
+
+   PD_entry_number(ep) = lite_PD_hyper_number(file, hname, ep);
+   if (type == NULL) type = PD_entry_type(ep);
+
+   err = _lite_PD_hyper_read (file, hname, type, ep, vr);
+   _lite_PD_rl_syment_d(ep);
+
+   return(err);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_hyper_read
+ *
+ * Purpose:     Parse an index expression of the form
+ *
+ *              <expr>  := <spec> | <expr>, <spec>
+ *              <spec>  := <start> |
+ *                         <start>:<stop> |
+ *                         <start>:<stop>:<step>
+ *              <start> := starting integer index value
+ *              <stop>  := ending integer index value
+ *              <step>  := integer index step value
+ *
+ * Return:      Success:        Number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  4, 1996  4:45 PM EST
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Mon Jan 11 16:04:56 PST 2010
+ *  Fixed src/dst overlap in strcpy flagged by valgrind. Note, in this
+ *  context, src is guarenteed to be an 'end' part of dst so a simple
+ *  manual shift of bytes works.
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_hyper_read (PDBfile *file, char *name, char *outtype,
+                     syment *ep, byte *vr) {
+
+   long         hbyt, fbyt;
+   int          nd, c, nrd, i;
+   char         s[MAXLINE], *expr;
+   dimdes       *dims;
+   dimind       *pi;
+   syment       *dep, *tep;
+
+   /*
+    * To accomodate certain bad users do one quick test
+    * see if the variable name is literally in the file
+    * this lets things such as foo(2,10) be variable names
+    */
+   dep = lite_PD_inquire_entry(file, name, FALSE, NULL);
+   if (dep != NULL) return(_lite_PD_rd_syment(file, ep, outtype, vr));
+
+   dims = PD_entry_dimensions(ep);
+   strcpy(s, name);
+   c = s[strlen(s)-1];
+   if (((c != ')') && (c != ']')) || (dims == NULL)) {
+      return(_lite_PD_rd_syment(file, ep, outtype, vr));
+   }
+
+   if (_lite_PD_indirection(outtype)) {
+      lite_PD_error("CAN'T HYPER INDEX INDIRECT TYPE - _PD_HYPER_READ",
+                    PD_READ);
+   }
+
+   expr = lite_SC_lasttok(s, "[]()");
+   for (i = 0; expr[i] != '\0'; i++)
+      s[i] = expr[i];
+   s[i] = '\0';
+
+   pi = _PD_compute_hyper_strides(file, s, dims, &nd);
+   if (pi == NULL)
+      lite_PD_error("CAN'T FIND HYPER INDICES - _PD_HYPER_READ", PD_READ);
+
+   fbyt = _lite_PD_lookup_size(PD_entry_type(ep), file->chart);
+   if (fbyt == -1) {
+      lite_PD_error("CAN'T FIND NUMBER OF FILE BYTES - _PD_HYPER_READ",
+                    PD_READ);
+   }
+
+   hbyt = _lite_PD_lookup_size(outtype, file->host_chart);
+   if (hbyt == -1) {
+      lite_PD_error("CAN'T FIND NUMBER OF HOST BYTES - _PD_HYPER_READ",
+                    PD_READ);
+   }
+
+   /*
+    * Make a dummy for the hyper read to use as scratch space.
+    */
+   tep = _lite_PD_mk_syment(NULL, 0L, 0L, &(ep->indirects), NULL);
+
+   nrd = _PD_rd_hyper_index(file, tep, vr, pi,
+                            PD_entry_type(ep), outtype,
+                            PD_entry_address(ep),
+                            PD_entry_blocks(ep), hbyt, fbyt);
+
+   _lite_PD_rl_syment(tep);
+
+   SFREE(pi);
+
+   return(nrd);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_rd_syment
+ *
+ * Purpose:     From the information in the symbol table entry EP read
+ *              the entry from the PDBfile FILE into the location
+ *              pointed by by VR.  At this point the things have been
+ *              completely dereferenced.  This new version is written in
+ *              a continuation passing style so that PDB has control over
+ *              the stack andisn't blowing out the execution stack for
+ *              long linked lists.
+ *
+ * Return:      Success:        Number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  2:51 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 09:54:39 PST 1998
+ *    Remove the caching of pointer references.
+ *
+ *    Sean Ahern, Wed Jul 14 14:03:01 PDT 2004
+ *    Don't flush if the file has been opened as "read only".
+ *
+ *    Kathleen Bonnell, Thu Jan  8 17:40:36 PST 2009
+ *    Fixed UMR for litype by adding initialization.
+ *-------------------------------------------------------------------------
+ */
+long
+_lite_PD_rd_syment (PDBfile *file, syment *ep, char *outtype, byte *vr) {
+
+   FILE *fp;
+   int dst, vif, size, boffs, readonly;
+   long i, n, nitems, bytepitem, addr, eaddr, nrd;
+   long flag;
+   char bf[MAXLINE], *pv, *litype=NULL, *lotype, *svr, **lvr;
+   symblock *sp;
+   symindir iloc;
+   defstr *dp;
+   memdes *desc, *mem_lst;
+   PD_itag pi;
+
+   fp  = file->stream;
+   vif = file->virtual_internal;
+   readonly = file->mode == PD_OPEN;
+
+#ifdef PDB_WRITE
+   if (!vif && !readonly && io_flush(fp))
+      lite_PD_error("FFLUSH FAILED BEFORE READ - _PD_RD_SYMENT", PD_READ);
+#endif
+
+   call_ptr = 0L;
+   lval_ptr = 0L;
+   str_ptr  = 0L;
+   lotype   = NULL;
+
+   SAVE_S(lotype, outtype);
+
+   fp   = file->stream;
+   iloc = ep->indirects;
+
+   file->flushed = FALSE;
+
+   call_stack[call_ptr++] = DONE;
+   dst = BLOCK;
+
+   /*
+    * Some AIX compilers will erroneously take the default case if
+    * this is terminated with a semicolon
+    */
+   while (TRUE) {
+      switch (dst) {
+         /*
+          * Count on this being right and _lite_PD_effective_ep will handle all
+          * issues about partial reads across discontiguous blocks by correctly
+          * making an effective syment for which this logic works!!!!!!
+          */
+      case BLOCK :
+         bytepitem = _lite_PD_lookup_size(outtype, file->host_chart);
+         if (bytepitem == -1) {
+            lite_PD_error("CAN'T FIND NUMBER OF BYTES - _PD_RD_SYMENT",
+                          PD_READ);
+         }
+
+         sp = PD_entry_blocks(ep);
+         n  = PD_n_blocks(ep);
+         if (n == 1)
+            sp[0].number = PD_entry_number(ep);
+
+         pv  = (char *) vr;
+         nrd = 0L;
+         i   = 0L;
+
+      case BLOCK_ITEM :
+         if (i >= n)
+            {GO_CONT;};
+
+         addr   = sp[i].diskaddr;
+         nitems = sp[i].number;
+
+         /*
+          * If negative we are staring at a bit address.
+          */
+         if (addr < 0) {
+            eaddr = (-addr) >> 3;
+            boffs = -addr - (eaddr << 3);
+         } else {
+            eaddr = addr;
+            boffs = 0;
+         }
+
+         if (!vif && io_seek(fp, eaddr, SEEK_SET)) {
+            lite_PD_error("FSEEK FAILED TO FIND ADDRESS - _PD_RD_SYMENT",
+                          PD_READ);
+         }
+
+         SAVE_I(i);
+         SAVE_I(n);
+         SAVE_S(litype, PD_entry_type(ep));
+         SAVE_P(pv);
+         SET_CONT(BLOCK_RET);
+
+      case BLOCK_RET:
+         RESTORE_P(char, pv);
+         RESTORE_S(litype);
+         RESTORE_I(n);
+         RESTORE_I(i);
+
+         pv += nitems*bytepitem;
+         i++;
+
+         GO(BLOCK_ITEM);
+
+      case LEAF:
+         if (vif) {
+            SC_address ad;
+            ad.diskaddr = addr;
+            memcpy(pv, ad.memaddr, nitems*bytepitem);
+         } else {
+            _PD_rd_leaf_members(file, pv, nitems, litype, lotype, boffs);
+         }
+         nrd += nitems;
+
+         /*
+          * The host type must be used to get the correct member offsets
+          * for the in memory copy - the file ones might be wrong!!
+          */
+         dp = PD_inquire_host_type(file, lotype);
+         if (dp == NULL) lite_PD_error("BAD TYPE - _PD_RD_SYMENT", PD_READ);
+
+         mem_lst = dp->members;
+         if (!dp->n_indirects || (mem_lst == NULL)) GO_CONT;
+
+         if (lite_pdb_rd_hook != NULL) {
+            mem_lst = (*lite_pdb_rd_hook)(dp->members);
+         }
+
+         /*
+          * For an array of structs read the indirects for each array
+          * element.
+          */
+         size = dp->size;
+         svr  = pv;
+         i    = 0L;
+
+      case LEAF_ITEM :
+         if (i >= nitems) GO_CONT;
+         desc = mem_lst;
+
+      case LEAF_INDIR :
+         if (desc == NULL) {
+            i++;
+            svr += size;
+            GO(LEAF_ITEM);
+         }
+
+         if (!_lite_PD_indirection(desc->type)) {
+            desc = desc->next;
+            GO(LEAF_INDIR);
+         }
+
+         SAVE_I(i);
+         SAVE_I(size);
+         SAVE_P(mem_lst);
+         SAVE_P(desc);
+         SAVE_P(svr);
+         SAVE_P(pv);
+         pv  = svr + desc->member_offs;
+         lvr = (char **) pv;
+         SET_CONT_RD(LEAF_RET, SKIP_TO);
+
+      case LEAF_RET :
+         RESTORE_P(char, pv);
+         RESTORE_P(char, svr);
+         RESTORE_P(memdes, desc);
+         RESTORE_P(memdes, mem_lst);
+         RESTORE_I(size);
+         RESTORE_I(i);
+
+         desc = desc->next;
+         GO(LEAF_INDIR);
+
+      case INDIRECT :
+         SAVE_P(pv);
+         lvr = (char **) pv;
+         i   = 0L;
+
+      case INDIR_ITEM :
+         if (i >= nitems) {
+            RESTORE_P(char, pv);
+            nrd += nitems;
+            GO_CONT;
+         }
+
+         SAVE_I(i);
+         SAVE_I(nrd);
+         SAVE_P(lvr);
+         lvr = &lvr[i];
+         SET_CONT_RD(INDIR_RET, SKIP_TO);
+
+      case INDIR_RET :
+         RESTORE_P(char *, lvr);
+         RESTORE_I(nrd);
+         RESTORE_I(i);
+         i++;
+
+         GO(INDIR_ITEM);
+
+      case SKIP_TO :
+         if (iloc.addr > 0L) {
+            long naitems;
+
+            io_seek(fp, iloc.addr, SEEK_SET);
+            iloc.addr = -1L;
+
+            naitems = iloc.n_ind_type*iloc.arr_offs;
+            addr    = _lite_PD_skip_over(file, naitems, TRUE);
+         }
+
+         if (vif) {
+            SC_address ad;
+
+            ad.diskaddr = addr;
+            DEREF(pv) = DEREF(ad.memaddr);
+            GO_CONT;
+         } else if (_PD_rd_ind_tags(file, lvr, &pi) == -1) {
+            GO_CONT;
+         }
+
+         /*
+          * Now read the data.
+          */
+         SAVE_I(nrd);
+         SAVE_I(nitems);
+
+         nitems = pi.nitems;
+         addr   = pi.addr;
+         flag   = pi.flag;
+
+         SAVE_S(litype, pi.type);
+         SAVE_S(lotype, litype);
+         SAVE_I(addr);
+         SAVE_I(flag);
+         SAVE_P(pv);
+         pv = lvr[0];
+         SET_CONT(SKIP_RET);
+
+      case SKIP_RET :
+         RESTORE_P(char, pv);
+         RESTORE_I(flag);
+         RESTORE_S(lotype);
+         RESTORE_S(litype);
+         RESTORE_I(addr);
+         RESTORE_I(nitems);
+         RESTORE_I(nrd);
+
+         /*
+          * Restore the file pointer to its original location if necessary.
+          */
+         if (flag != 1L) {
+            if (io_seek(fp, addr, SEEK_SET)) {
+               lite_PD_error("FAILED TO FIND OLD ADDRESS - _PD_RD_SYMENT",
+                             PD_READ);
+            }
+         }
+
+         addr = io_tell(fp);
+         if (addr == -1L) {
+            lite_PD_error("CAN'T FIND RETURN ADDRESS - _PD_RD_SYMENT",
+                          PD_READ);
+         }
+
+         GO_CONT;
+
+      case DONE :
+         RESTORE_S(lotype);
+         return(nrd);
+
+      default  :
+         sprintf(bf, "UNDECIDABLE CASE - _PD_RD_SYMENT");
+         lite_PD_error(bf, PD_READ);
+      }
+   }
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_rd_hyper_index
+ *
+ * Purpose:     Do the real work of parsing an index expression into
+ *              components and recursively determine the disk locations
+ *              to read into the buffer OUT.  OUT is to be filled in order
+ *              from smallest index to largest.  The offset is specified
+ *              by the starting address which is ADDR.  FBYT is the number
+ *              of bytes in the file for each item to be read.  HBYT is the
+ *              number of bytes in memory for each item to be read.
+ *
+ * Return:      Success:        The number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  2:33 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_rd_hyper_index (PDBfile *file, syment *ep, char *out, dimind *pi,
+                    char *intype, char *outtype, long addr, symblock *sp,
+                    int hbyt, int fbyt) {
+
+   long offset, stride, start, stop, step;
+   int nrd, nir;
+
+   /*
+    * For each index specification compute the range and recurse.
+    * */
+   stride = fbyt*pi->stride;
+   start  = stride*pi->start;
+   stop   = stride*pi->stop;
+   step   = stride*pi->step;
+
+   if (addr < 0) {
+      defstr* dpf;
+      dpf  = _lite_PD_lookup_type(intype, file->chart);
+      stop = addr - dpf->size_bits*((stop - start)/fbyt);
+      step = -dpf->size_bits*(step/fbyt);
+   } else {
+      stop = addr + (stop - start);
+   }
+
+   /*
+    * At the bottom of the recursion do the actual reads.
+    * */
+   nrd = 0;
+   if (stride <= (long) fbyt) {
+      nrd += _PD_read_hyper_space(file, ep, out, intype, outtype,
+                                  sp, hbyt, fbyt, addr, stop, step);
+
+   } else if (addr < 0) {
+      for (offset = -addr; offset <= -stop; offset -= step) {
+         nir = _PD_rd_hyper_index(file, ep, out, pi + 1, intype, outtype,
+                                  -offset, sp, hbyt, fbyt);
+         nrd += nir;
+         out += nir*hbyt;
+      }
+
+   } else {
+      for (offset = addr; offset <= stop; offset += step) {
+         nir = _PD_rd_hyper_index(file, ep, out, pi + 1, intype, outtype,
+                                  offset, sp, hbyt, fbyt);
+         nrd += nir;
+         out += nir*hbyt;
+      }
+   }
+
+   return(nrd);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_read_hyper_space
+ *
+ * Purpose:     Read a part of a hyper-surface from a data array. ADDR is
+ *              the starting address.  STOP is the upper bound on the
+ *              address. STEP is the increment of the address for each
+ *              entry.  FBYT is the number bytes in the file for each item
+ *              to be read.  HBYT is the number of bytes in memory for each
+ *              item to be read.  EP is a scratch syment for temporary use.
+ *
+ * Return:      Success:        The number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:50 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_read_hyper_space (PDBfile *file, syment *ep, char *out, char *intype,
+                      char *outtype, symblock *sp, int hbyt, int fbyt,
+                      long addr, long stop, long step) {
+
+   long eaddr, nb, nitems;
+   int nrd;
+
+   PD_entry_type(ep)       = intype;
+   PD_entry_dimensions(ep) = NULL;
+
+   nrd = 0;
+   if (addr >= 0) {
+      /*
+       * Items logically contiguous.
+       */
+      if (step == fbyt) {
+         long niw;
+
+         /*
+          * Read across blocks.
+          */
+         nitems = (stop - addr)/step + 1L;
+         while (nitems > 0) {
+            eaddr = addr;
+
+            _PD_effective_addr(&eaddr, &nb, fbyt, sp);
+
+            /*
+             * NOTE: this subverts _PD_effective_addr in part, but
+             * because _lite_PD_effective_ep cannot be modified to build an
+             * effective syment for indirectly referenced data which
+             * cannot be distinguished from an explicitly dimensioned
+             * array, this is the best that can be done
+             */
+            if ((eaddr == 0) || (nb == 0)) {
+               eaddr = addr;
+               nb    = nitems;
+            }
+
+            niw = MIN(nitems, nb);
+
+            PD_entry_address(ep) = eaddr;
+            PD_entry_number(ep)  = niw;
+            nrd += _lite_PD_rd_syment(file, ep, outtype, out);
+
+            nitems -= niw;
+            addr   += fbyt*niw;
+            out    += hbyt*niw;
+         }
+      } else {
+         /*
+          * Items not logically contiguous.
+          */
+         PD_entry_number(ep) = 1L;
+         for (; addr <= stop; addr += step, out += hbyt) {
+            eaddr = addr;
+            _PD_effective_addr(&eaddr, &nb, fbyt, sp);
+            PD_entry_address(ep) = eaddr;
+            nrd += _lite_PD_rd_syment(file, ep, outtype, out);
+         }
+      }
+   } else {
+      /*
+       * We have a bitstream.
+       */
+      defstr* dpf;
+
+      dpf = _lite_PD_lookup_type(intype, file->chart);
+      /*
+       * Items logically contiguous.
+       */
+      if (step == -dpf->size_bits) {
+         nitems = (stop - addr)/step + 1L;
+
+         /*
+          * NOTE: multi-block bitstreams are not supported.
+          */
+         PD_entry_number(ep)  = nitems;
+         PD_entry_address(ep) = addr;
+         nrd += _lite_PD_rd_syment(file, ep, outtype, out);
+
+         out += hbyt*nitems;
+      } else {
+         /*
+          * Items not logically contiguous.
+          */
+         PD_entry_number(ep) = 1L;
+         for (; addr >= stop; addr += step, out += hbyt) {
+            PD_entry_address(ep) = addr;
+            nrd += _lite_PD_rd_syment(file, ep, outtype, out);
+         }
+      }
+   }
+
+   PD_entry_type(ep) = NULL;
+
+   return(nrd);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_rd_leaf_members
+ *
+ * Purpose:     Read the leaves only for NITEMS of INTYPE from the
+ *              PDBfile FILE into the location pointed to by VR as type
+ *              OUTTYPE.  At this level it is guaranteed that the type
+ *              will not be a pointer.
+ *
+ * Return:      Success:        Number of items successfully read.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:08 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_rd_leaf_members (PDBfile *file, char *vr, long nitems, char *intype,
+                     char *outtype, int boffs) {
+
+   FILE *fp;
+   long bytepitemin, in_offs, out_offs, nir, nia;
+   char *buf, *vbuf, *svr;
+   defstr *dpf;
+
+   fp = file->stream;
+
+   dpf         = _lite_PD_lookup_type(intype, file->chart);
+   bytepitemin = dpf->size;
+   if (bytepitemin == -1)
+      lite_PD_error("CAN'T FIND NUMBER OF BYTES - _PD_RD_LEAF_MEMBERS",
+                    PD_READ);
+
+   if ((dpf->convert > 0) || (strcmp(intype, outtype) != 0)) {
+      if (dpf->size_bits) {
+         nia = (((nitems*dpf->size_bits + boffs + SC_BITS_BYTE - 1)
+                 /SC_BITS_BYTE) + bytepitemin - 1)/bytepitemin;
+      } else {
+         nia = nitems;
+      }
+      buf = (char *) lite_SC_alloc(nia, bytepitemin,
+                                   "_PD_RD_LEAF_MEMBERS:buffer");
+      if (buf == NULL)
+         lite_PD_error("CAN'T ALLOCATE MEMORY - _PD_RD_LEAF_MEMBERS", PD_READ);
+
+      nir = io_read(buf, (size_t) bytepitemin, (size_t) nia, fp);
+      if (nir == nia) {
+         vbuf     = buf;
+         svr      = vr;
+         in_offs  = 0L;
+         out_offs = 0L;
+         lite_PD_convert(&svr, &vbuf, intype, outtype, nitems,
+                         file->std, file->host_std, file->host_std,
+                         &in_offs, &out_offs,
+                         file->chart, file->host_chart, boffs, PD_READ);
+         SFREE(buf);
+      } else {
+         SFREE(buf);
+         lite_PD_error("FILE READ FAILED - _PD_RD_LEAF_MEMBERS", PD_READ);
+      }
+   } else {
+      nir = io_read(vr, (size_t) bytepitemin, (size_t) nitems, fp);
+      if (nir != nitems)
+         lite_PD_error("DATA READ FAILED - _PD_RD_LEAF_MEMBERS", PD_READ);
+   }
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_rd_ind_tags
+ *
+ * Purpose:     Read itags and setup the read of an indirection.
+ *
+ * Return:      Success:        TRUE iff there is indirect data to be read.
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:46 PM EST
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 09:54:39 PST 1998
+ *    Remove the caching of pointer references.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+_PD_rd_ind_tags (PDBfile *file, char **vr, PD_itag *pi) {
+
+   long bytepitem, nitems, addr, oaddr;
+   int flag;
+   char *type, bf2[MAXLINE];
+   FILE *fp;
+
+   fp = file->stream;
+
+   if (!_lite_PD_rd_itag(file, pi)) {
+      lite_PD_error("BAD ITAG - _PD_RD_IND_TAGS", PD_READ);
+   }
+
+   nitems = pi->nitems;
+   type   = pi->type;
+   addr   = pi->addr;
+   flag   = pi->flag;
+
+   /*
+    * If it was a NULL pointer stop here.
+    */
+   if ((addr == -1L) || (nitems == 0L)) {
+      *vr = NULL;
+      return(-1);
+   }
+
+   /*
+    * Get the size and allocate storage for it.
+    */
+   bytepitem = _lite_PD_lookup_size(type, file->host_chart);
+   if (bytepitem == -1)
+      lite_PD_error("CAN'T FIND NUMBER OF BYTES - _PD_RD_IND_TAGS",
+                    PD_READ);
+
+   DEREF(vr) = (char *) lite_SC_alloc(nitems, bytepitem,
+                                      "_PD_RD_IND_TAGS:vr");
+
+   /*
+    * If flag != 1 it was written somewhere else
+    * GOTCHA: watch for new case of flag == 2 which means a discontiguous block
+    *         Deal with this, if and when it arises.
+    */
+   if (flag != 1) {
+      oaddr = io_tell(fp);
+      if (oaddr == -1L)
+         lite_PD_error("CAN'T FIND CURRENT ADDRESS - _PD_RD_IND_TAGS",
+                       PD_READ);
+
+      /*
+       * Jump to the place where the original is described.
+       */
+      if (io_seek(fp, addr, SEEK_SET))
+         lite_PD_error("FAILED TO FIND ADDRESS - _PD_RD_IND_TAGS",
+                       PD_READ);
+
+      /*
+       * Read the descriptor so that the file pointer is left on the actual
+       * data.
+       * NOTE: read into separate buffer so not to clobber "type" which
+       *       is strtok'd into bf1.
+       */
+      _lite_PD_rfgets(bf2, MAXLINE, fp);
+
+      pi->addr = oaddr;
+   }
+
+   return(0);
+}
+
+/*--------------------------------------------------------------------------*/
+/*                          AUXILLIARY ROUTINES                             */
+/*--------------------------------------------------------------------------*/
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_effective_addr
+ *
+ * Purpose:     Given a disk address computed on the assumption of one
+ *              contiguous block and list of symblocks, compute and
+ *              return the actual disk address.  Also return the number
+ *              of items remaining in the block after the effective
+ *              address.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 10:57 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+_PD_effective_addr (long *paddr, long *pnitems, long bpi, symblock *sp) {
+
+   int i;
+   long nb, nt, ad, addr;
+
+   addr = *paddr;
+   i    = 0;
+   ad   = sp[i].diskaddr;
+   nt   = addr - ad;
+   while (TRUE) {
+      nb  = sp[i].number*bpi;
+      nt -= nb;
+
+      if ((nb <= 0L) || (nt < 0L)) break;
+
+      i++;
+      ad   = sp[i].diskaddr;
+      addr = ad + nt;
+   }
+
+   *paddr   = addr;
+   *pnitems = (ad + nb - addr)/bpi;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_indirection
+ *
+ * Purpose:     Is TYPE an indirect type.
+ *
+ * Return:      Success:        TRUE iff TYPE has a `*' as the last
+ *                              non-blank character.
+ *
+ *              Failure:        Never fails.
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  2:01 PM EST
+ *
+ * Modifications:
+ *     Brad Whitlock, Wed Feb 23 19:11:09 PST 2000
+ *     Made the function return FALSE if s == NULL. This prevents a crash.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+_lite_PD_indirection (char *s)
+{
+    if(s != NULL)
+    {
+        char *t;
+
+        for (t = s + strlen(s); t > s; t--)
+        {
+            if (*t == '*') return(TRUE);
+        }
+    }
+
+    return(FALSE);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_dereference
+ *
+ * Purpose:     Starting at the end of the string work backwards to the
+ *              first non-blank character and if it is a `*' insert
+ *              `\0' in its place.
+ *
+ * Return:      Success:        Ptr to the beginning of the string.
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:44 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_PD_dereference (char *s) {
+
+   char *t;
+
+   for (t = s + strlen(s); t > s; t--) {
+      if (*t == '*') break;
+   }
+
+   /*
+    * Check for whitespace to remove - eg. "char *" -> "char"
+    */
+   for (t-- ; t > s; t--) {
+      if (strchr(" \t", *t) == NULL) {
+         *(++t) = '\0';
+         break;
+      }
+   }
+
+   return(s);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    lite_PD_hyper_number
+ *
+ * Purpose:     Return the number of elements implied by a hyper
+ *              index expression.
+ *
+ * Return:      Success:        number of elements
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:45 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+lite_PD_hyper_number (PDBfile *file, char *name, syment *ep) {
+
+   char s[MAXLINE];
+   int c;
+
+   /*
+    * If name is of the form a[...] strip off the name part
+    * by design _lite_PD_hyper_number can't handle anything but the index part.
+    */
+   strcpy(s, name);
+   c = s[0];
+   if (strchr("0123456789-.", c) == NULL) lite_SC_firsttok(s, "()[]");
+
+   return(_lite_PD_hyper_number(file, s,
+                                PD_entry_number(ep),
+                                PD_entry_dimensions(ep), NULL));
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_hyper_number
+ *
+ * Purpose:     <expr>  := <spec> | <expr>, <spec>
+ *              <spec>  := <start> |
+ *                         <start>:<stop> |
+ *                         <start>:<stop>:<step>
+ *              <start> := starting integer index value
+ *              <stop>  := ending integer index value
+ *              <step>  := integer index step value
+ *
+ * Return:      Success:        The number of elements implied by a
+ *                              hyper index expression.
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  6, 1996 11:17 AM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+long
+_lite_PD_hyper_number (PDBfile *file, char *indxpr, long numb,
+                       dimdes *dims, long *poff) {
+
+   int nd;
+   long i, maxs, sum, offs;
+   char s[MAXLINE];
+   dimind *pi;
+
+   strcpy(s, indxpr);
+   pi = _PD_compute_hyper_strides(file, s, dims, &nd);
+
+   offs = 0L;
+   sum  = 1L;
+   for (i = 0; i < nd; i++) {
+      maxs  = (pi[i].stop - pi[i].start + pi[i].step)/pi[i].step;
+      offs += pi[i].start*pi[i].stride;
+      sum  *= maxs;
+   }
+
+   SFREE(pi);
+
+   if (poff != NULL) *poff = offs;
+
+   return(sum);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_init_dimind
+ *
+ * Purpose:     Fill a dimind struct given the stride and an ASCII
+ *              index epxression.
+ *
+ * Return:      void
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  4:26 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+_lite_PD_init_dimind (dimind *pi, long offset, long stride, char *expr) {
+
+   char s[MAXLINE], *token;
+   long start, stop, step;
+
+   if (expr != NULL) strcpy(s, expr);
+   else s[0] = '\0';
+
+   token = strtok(s, " \t:");
+   if (token == NULL) start = 0L;
+   else start = atol(token);
+
+   token = strtok(NULL, " \t:");
+   if (token == NULL) stop = start;
+   else stop = atol(token);
+
+   token = strtok(NULL, " \t:");
+   if (token == NULL) step = 1L;
+   else step = atol(token);
+
+   pi->stride = stride;
+   pi->start  = start - offset;
+   pi->stop   = stop - offset;
+   pi->step   = step;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_compute_hyper_strides
+ *
+ * Purpose:     Initialize and return an array of dimension indices
+ *              representing the hyper strides from the given hyper
+ *              index expression.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT PDB
+ *              Mar  5, 1996  1:37 PM EST
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static dimind *
+_PD_compute_hyper_strides (PDBfile *file, char *ind, dimdes *dims, int *pnd) {
+
+   int i, nd;
+   long maxs;
+   dimdes *pd;
+   dimind *pi;
+
+   if (dims == NULL) {
+      pi = FMAKE(dimind, "_PD_COMPUTE_HYPER_STRIDES:pi");
+
+      _lite_PD_init_dimind(pi, file->default_offset, 0L,
+                           lite_SC_firsttok(ind, ",()[]\n\r"));
+
+      *pnd = 1;
+      return(pi);
+   }
+
+   /*
+    * Count the number of dimensions and allocate some temporaries.
+    */
+   for (nd = 0, pd = dims; pd != NULL; pd = pd->next, nd++) /*void*/ ;
+   pi = FMAKE_N(dimind, nd, "_PD_COMPUTE_HYPER_STRIDES:pi");
+
+   /*
+    * Pre-compute the strides, offsets, and so on for the hyper-space walk.
+    */
+   if (file->major_order == COLUMN_MAJOR_ORDER) {
+      maxs = 1L;
+      for (i = nd - 1, pd = dims; i >= 0; i--) {
+         _lite_PD_init_dimind(&pi[i], pd->index_min, maxs,
+                              lite_SC_firsttok(ind, ",()[]\n\r"));
+         if (pd != NULL) {
+            maxs *= pd->number;
+            pd    = pd->next;
+         }
+      }
+
+   } else if (file->major_order == ROW_MAJOR_ORDER) {
+      for (maxs = 1L, pd = dims->next; pd != NULL; pd = pd->next) {
+         maxs *= pd->number;
+      }
+
+      for (i = 0, pd = dims; i < nd; i++) {
+         _lite_PD_init_dimind(&pi[i], pd->index_min, maxs,
+                              lite_SC_firsttok(ind, ",()[]\n\r"));
+         if (pd->next != NULL) {
+            pd    = pd->next;
+            maxs /= pd->number;
+         }
+      }
+   }
+
+   *pnd = nd;
+
+   return(pi);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_hyper_write
+ *
+ * Purpose:     Parse an index expression of the form
+ *
+ *                 <expr>  := <spec> | <expr>, <spec>
+ *                 <spec>  := <start> |
+ *                            <start>:<stop> |
+ *                            <start>:<stop>:<step>
+ *                 <start> := starting integer index value
+ *                 <stop>  := ending integer index value
+ *                 <step>  := integer index step value
+ *
+ *              and write the specified elements to the PDBfile
+ *              from the array provided
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Wed Jan 21 18:03:08 PST 2009
+ *  Silenced valgrind errors by fixing overlapping strcpy.
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+int
+_lite_PD_hyper_write (PDBfile *file, char *name, syment *ep, byte *vr,
+                      char *intype) {
+
+   long hbyt, fbyt;
+   int nd, c;
+   char s[MAXLINE], *expr;
+   dimdes *dims;
+   dimind *pi;
+
+   memset(s, 0, sizeof(s));
+   dims = PD_entry_dimensions(ep);
+   strcpy(s, name);
+   c = s[strlen(s)-1];
+   if (((c != ')') && (c != ']')) || (dims == NULL)) {
+      return(_lite_PD_wr_syment(file, vr, PD_entry_number(ep),
+                                intype, PD_entry_type(ep)));
+   }
+
+   if (_lite_PD_indirection(PD_entry_type(ep))) {
+      lite_PD_error("CAN'T HYPER INDEX INDIRECT TYPE - _PD_HYPER_WRITE",
+                    PD_WRITE);
+   }
+
+   expr = lite_SC_lasttok(s, "[]()");
+   if (s + strlen(expr) + 1 >= expr)
+   {
+       int i;
+       for (i=0; expr[i] != 0; i++)
+           s[i] = expr[i];
+       s[i] = 0;
+   }
+   else
+   {
+       strcpy(s, expr);
+   }
+
+   pi = _PD_compute_hyper_strides(file, s, dims, &nd);
+   if (pi == NULL) {
+      lite_PD_error("CAN'T FIND HYPER INDICES - _PD_HYPER_WRITE", PD_WRITE);
+   }
+
+   fbyt = _lite_PD_lookup_size(PD_entry_type(ep), file->chart);
+   if (fbyt == -1) {
+      lite_PD_error("CAN'T FIND NUMBER OF FILE BYTES - _PD_HYPER_WRITE",
+                    PD_WRITE);
+   }
+
+   hbyt = _lite_PD_lookup_size(intype, file->host_chart);
+   if (hbyt == -1) {
+      lite_PD_error("CAN'T FIND NUMBER OF HOST BYTES - _PD_HYPER_WRITE",
+                    PD_WRITE);
+   }
+
+   _PD_wr_hyper_index(file, vr, pi, intype,
+                      PD_entry_type(ep), PD_entry_address(ep),
+                      PD_entry_blocks(ep), hbyt, fbyt);
+
+   SFREE(pi);
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_wr_syment
+ *
+ * Purpose:     Write the NUMBER of elements of type TYPE from memory pointed
+ *              to by VAR. This new version is written in a continuation
+ *              passing style so that PDB has control over the stack and isn't
+ *              blowing out the execution stack for long linked lists.
+ *
+ * Return:      Success:        Number of items successfully written.
+ *
+ *              Failure:
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+long
+_lite_PD_wr_syment (PDBfile *file, char *vr, long nitems,
+                    char *intype, char *outtype) {
+   int dst, size;
+   long i;
+   defstr *dp;
+   memdes *desc, *mem_lst;
+   char bf[MAXLINE], *litype, *lotype, *svr, *ttype;
+   FILE *fp;
+
+   call_ptr = 0L;
+   lval_ptr = 0L;
+   str_ptr  = 0L;
+   litype   = NULL;
+   lotype   = NULL;
+
+   SAVE_S(litype, intype);
+   SAVE_S(lotype, outtype);
+
+   fp = file->stream;
+
+   file->flushed = FALSE;
+
+   call_stack[call_ptr++] = DONE;
+   dst = _lite_PD_indirection(litype) ? INDIRECT : LEAF;
+
+   /*
+    * some AIX compilers will erroneously take the default case if
+    * this is terminated with a semicolon.
+    */
+   while (1) {
+      switch (dst) {
+      case LEAF:
+         _PD_wr_leaf_members(file, litype, lotype, nitems, vr);
+         dp = PD_inquire_host_type(file, litype);
+         if (dp == NULL) {
+            lite_PD_error("BAD TYPE - _PD_WR_SYMENT", PD_WRITE);
+         }
+
+         mem_lst = dp->members;
+         if (!dp->n_indirects || (mem_lst == NULL)) GO_CONT;
+
+         if (lite_pdb_wr_hook != NULL) {
+            mem_lst = (*lite_pdb_wr_hook)(file, vr, dp);
+         }
+
+         /*
+          * If type is a struct with pointered members write them out now
+          * for an array of structs write the indirects for each array element
+          */
+         size = dp->size;
+         svr  = vr;
+         i    = 0L;
+
+      case LEAF_ITEM:
+         if (i >= nitems) GO_CONT;
+         desc = mem_lst;
+
+      case LEAF_INDIR :
+         if (desc == NULL) {
+            i++;
+            svr += size;
+            GO(LEAF_ITEM);
+         }
+
+         PD_CAST_TYPE(ttype, desc, svr+desc->member_offs, svr,
+                      lite_PD_error, "BAD CAST - _PD_WR_SYMENT", PD_WRITE);
+
+         SAVE_S(litype, ttype);
+
+         if (!_lite_PD_indirection(litype)) {
+            RESTORE_S(litype);
+            desc = desc->next;
+            GO(LEAF_INDIR);
+         }
+
+         SAVE_I(nitems);
+         nitems = desc->number;
+
+         SAVE_I(i);
+         SAVE_I(size);
+         SAVE_P(mem_lst);
+         SAVE_P(desc);
+         SAVE_P(svr);
+         SAVE_P(vr);
+         vr = svr + desc->member_offs;
+         SET_CONT(LEAF_RET);
+
+      case LEAF_RET :
+         RESTORE_P(char, vr);
+         RESTORE_P(char, svr);
+         RESTORE_P(memdes, desc);
+         RESTORE_P(memdes, mem_lst);
+         RESTORE_I(size);
+         RESTORE_I(i);
+         RESTORE_I(nitems);
+         RESTORE_S(litype);
+
+         desc = desc->next;
+         GO(LEAF_INDIR);
+
+      case INDIRECT :
+         if (vr == NULL) {
+            io_printf(fp, "%ld\001%s\001%ld\001%d\001\n", 0L, litype,
+                      -1L, TRUE);
+            GO_CONT;
+         }
+
+         /*
+          * Dereference a local copy of the type.
+          */
+         SAVE_S(litype, litype);
+         lite_PD_dereference(litype);
+
+         /*
+          * Write the data.
+          */
+         i = 0L;
+
+      case INDIR_ITEM :
+         if (i >= nitems) {
+            RESTORE_S(litype);
+            GO_CONT;
+         }
+
+         SAVE_P(vr);
+         vr = DEREF(vr);
+         if (vr == NULL) {
+            _lite_PD_wr_itag(file, 0L, litype, -1L, FALSE);
+            RESTORE_P(char, vr);
+            i++;
+            vr += sizeof(char *);
+            GO(INDIR_ITEM);
+         }
+
+         SAVE_I(nitems);
+         nitems = _lite_PD_number_refd(vr, litype, file->host_chart);
+         if (nitems == -1L) {
+            sprintf(bf, "CAN'T GET POINTER LENGTH ON %s - _PD_WR_SYMENT",
+                    litype);
+            lite_PD_error(bf, PD_WRITE);
+         }
+
+         if (nitems == -2L) {
+            sprintf(bf, "UNKNOWN TYPE %s - _PD_WR_SYMENT", litype);
+            lite_PD_error(bf, PD_WRITE);
+         }
+
+         if (!_PD_wr_ind_itags(file, nitems, litype)) {
+            RESTORE_I(nitems);
+            RESTORE_P(char, vr);
+            i++;
+            vr += sizeof(char *);
+            GO(INDIR_ITEM);
+         }
+
+         SAVE_I(i);
+         SAVE_S(lotype, litype);
+         SET_CONT(INDIR_RET);
+
+      case INDIR_RET :
+         RESTORE_S(lotype);
+         RESTORE_I(i);
+         RESTORE_I(nitems);
+         RESTORE_P(char, vr);
+
+         i++;
+         vr += sizeof(char *);
+
+         GO(INDIR_ITEM);
+
+      case DONE :
+         RESTORE_S(lotype);
+         RESTORE_S(litype);
+
+         /*
+          * update the end of data mark
+          */
+         _lite_PD_eod(file);
+
+         return(nitems);
+
+      default:
+         lite_PD_error("_UNDECIDABLE CASE - _PD_WR_SYMENT", PD_WRITE) ;
+      }
+   }
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_wr_hyper_index
+ *
+ * Purpose:     Do the real work of parsing an index expression into
+ *              compontents and recursively determine the disk locations
+ *              to read into the buffer OUT.  OUT is to be filled in order
+ *              from smallest index to largest.  The offset is specified by
+ *              the starting address which is ADDR.  FBYT is the number
+ *              of bytes in the file for each item to be read. HBYT is the
+ *              number of bytes in memory for each item to be read.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static char *
+_PD_wr_hyper_index (PDBfile *file, char *out, dimind *pi,
+                    char *intype, char *outtype, long addr,
+                    symblock *sp, int hbyt, int fbyt) {
+
+   long offset, stride, start, stop, step;
+
+   /*
+    * For each index specification compute the range and recurse.
+    */
+   stride = fbyt*pi->stride;
+   start  = stride*pi->start;
+   stop   = stride*pi->stop;
+   step   = stride*pi->step;
+
+   stop  = addr + stop - start;
+   start = addr;
+
+   /*
+    * At the bottom of the recursion do the actual operations.
+    */
+   if (stride <= (long) fbyt) {
+      out = _PD_write_hyper_space(file, out, intype, outtype, sp, hbyt, fbyt,
+                                  start, stop, step);
+   } else {
+      for (offset = start; offset <= stop; offset += step) {
+         out = _PD_wr_hyper_index(file, out, pi + 1, intype, outtype,
+                                  offset, sp, hbyt, fbyt);
+      }
+   }
+
+   return(out);
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_wr_leaf_members
+ *
+ * Purpose:     Write the direct leaf data
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Adapted from PACT
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static void
+_PD_wr_leaf_members (PDBfile *file, char *intype, char *outtype,
+                     long nitems, byte *vr) {
+
+   long bytepitem, in_offs, out_offs;
+   int ret;
+   size_t nb;
+   char *svr, *vbuf, *buf;
+   FILE *fp;
+   defstr *dpf;
+
+   fp = file->stream;
+
+   dpf       = _lite_PD_lookup_type(outtype, file->chart);
+   bytepitem = dpf->size;
+   if (bytepitem == -1) {
+      lite_PD_error("CAN'T GET NUMBER OF BYTES - _PD_WR_LEAF_MEMBERS",
+                    PD_WRITE);
+   }
+
+   /*
+    * Dispatch all other writes.
+    */
+   if ((dpf->convert > 0) || (strcmp(intype, outtype) != 0)) {
+      buf=(char*)lite_SC_alloc(nitems,bytepitem,"_PD_WR_LEAF_MEMBERS:buffer");
+      if (buf == NULL) {
+         lite_PD_error("CAN'T ALLOCATE MEMORY - _PD_WR_LEAF_MEMBERS",
+                       PD_WRITE);
+      }
+      vbuf     = buf;
+      svr      = vr;
+      in_offs  = 0L;
+      out_offs = 0L;
+      lite_PD_convert(&vbuf, &svr, intype, outtype, nitems,
+                      file->host_std, file->std, file->host_std,
+                      &in_offs, &out_offs,
+                      file->host_chart, file->chart, 0, PD_WRITE);
+      nb  = io_write(buf, (size_t) bytepitem, (size_t) nitems, fp);
+      ret = (nb == nitems) ? TRUE : FALSE;
+      SFREE(buf);
+   } else {
+      nb  = io_write(vr, (size_t) bytepitem, (size_t) nitems, fp);
+      ret = (nb == nitems) ? TRUE : FALSE;
+   }
+
+   if (!ret) {
+      lite_PD_error("BYTE WRITE FAILED - _PD_WR_LEAF_MEMBERS", PD_WRITE);
+   }
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _lite_PD_number_refd
+ *
+ * Purpose:     Compute the number of items pointed to by VR
+ *
+ * Return:      Success:        Number of items.
+ *
+ *              Failure:        -1: Score did not allocate the block.
+ *                              -2: type is unknown.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+long
+_lite_PD_number_refd (byte *vr, char *type, HASHTAB *tab) {
+
+   long bytepitem, nitems;
+
+   if (vr == NULL) return(0L);
+
+   if ((nitems = lite_SC_arrlen(vr)) <= 0) return(-1L);
+
+   if ((bytepitem = _lite_PD_lookup_size(type, tab)) == -1) return(-2L);
+
+   nitems /= bytepitem;
+
+   return(nitems);
+}
+#endif /* PDB_WRITE */
+
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_wr_ind_itags
+ *
+ * Purpose:     Handle the memory of pointers and write the itags
+ *              correctly.
+ *
+ * Return:      Success:        TRUE
+ *
+ *              Failure:        FALSE
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Dec  7 09:54:39 PST 1998
+ *    Remove the caching of pointer references.
+ *
+ *    Eric Brugger, Thu Sep 23 10:36:58 PDT 1999
+ *    Removed unused argument vr.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static int
+_PD_wr_ind_itags (PDBfile *file, long nitems, char *type) {
+
+   FILE *fp;
+   long addr;
+
+   fp = file->stream;
+
+   /*
+    * Save the address of the header because
+    * we don't know the data address yet
+    */
+   addr = io_tell(fp);
+   if (addr == -1L) {
+      lite_PD_error("FAILED TO FIND ADDRESS - _PD_WR_IND_ITAGS", PD_WRITE);
+   }
+
+   /*
+    * Write some info for the read
+    * TRUE if this is the first time for the pointer
+    */
+   _lite_PD_wr_itag(file, nitems, type, addr, TRUE);
+
+   return(TRUE);
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    _PD_write_hyper_space
+ *
+ * Purpose:     Write a part of a hyper-surface to disk
+ *              - ADDR is the starting address
+ *              - STOP is the upper bound on the address
+ *              - STEP is the increment of the address for each entry
+ *              - FBYT is the number of bytes in the file for each
+ *              - item to be written
+ *              - HBYT is the number of bytes in memory for each
+ *              - item to be written
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.matzke.cioe.com
+ *              Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+static char *
+_PD_write_hyper_space(PDBfile *file, char *in, char *intype, char *outtype,
+                      symblock *sp, int hbyt, int fbyt, long addr,
+                      long stop, long step) {
+
+   long nb, eaddr;
+
+   if (step == fbyt) {
+      /*
+       * Items logically contiguous.
+       */
+      long nitems, niw;
+
+      nitems = (stop - addr)/step + 1L;
+
+      /*
+       * Get writes across blocks correct.
+       */
+      while (nitems > 0) {
+         /*
+          * Adjust the address for the correct block.
+          */
+         eaddr = addr;
+         _PD_effective_addr(&eaddr, &nb, fbyt, sp);
+         if (io_seek(file->stream, eaddr, SEEK_SET)) {
+            lite_PD_error("FSEEK FAILED TO FIND ADDRESS - "
+                          "_PD_WRITE_HYPER_SPACE", PD_WRITE);
+         }
+
+         /*
+          * NOTE: this subverts _PD_effective_addr in part, but because
+          * _lite_PD_effective_ep cannot be modified to build an effective
+          * syment for indirectly referenced data which cannot be
+          * distinguished from an explicitly dimensioned array, this is the
+          * best that can be done.
+          */
+         if ((eaddr == 0) || (nb == 0)) {
+            eaddr = addr;
+            nb    = nitems;
+         }
+
+         niw = MIN(nb, nitems);
+
+         _lite_PD_wr_syment(file, in, niw, intype, outtype);
+
+         nitems -= niw;
+         addr   += fbyt*niw;
+         in     += hbyt*niw;
+      }
+   } else {
+      /*
+       * Items logically discontinuous.
+       */
+      for (/*void*/; addr <= stop; addr += step, in += hbyt) {
+         eaddr = addr;
+         _PD_effective_addr(&eaddr, &nb, fbyt, sp);
+         if (io_seek(file->stream, eaddr, SEEK_SET)) {
+            lite_PD_error("FSEEK FAILED - _PD_WRITE_HYPER_SPACE", PD_WRITE);
+         }
+         _lite_PD_wr_syment(file, in, 1L, intype, outtype);
+      }
+   }
+
+   return(in);
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb_drv/Makefile.am b/src/pdb_drv/Makefile.am
new file mode 100644
index 0000000..517cdb6
--- /dev/null
+++ b/src/pdb_drv/Makefile.am
@@ -0,0 +1,59 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+noinst_LTLIBRARIES = libsilo_pdb_drv.la
+libsilo_pdb_drv_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(srcdir)/../pdb -I$(builddir)/../silo -I$(srcdir)/../silo -I$(srcdir)/../score
+
+noinst_HEADERS = \
+ silo_pdb_private.h
+FILES = \
+ silo_pdb.c
diff --git a/src/pdb_drv/Makefile.in b/src/pdb_drv/Makefile.in
new file mode 100644
index 0000000..4ebed45
--- /dev/null
+++ b/src/pdb_drv/Makefile.in
@@ -0,0 +1,548 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/pdb_drv
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_pdb_drv_la_LIBADD =
+am__objects_1 = silo_pdb.lo
+am_libsilo_pdb_drv_la_OBJECTS = $(am__objects_1)
+libsilo_pdb_drv_la_OBJECTS = $(am_libsilo_pdb_drv_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_pdb_drv_la_SOURCES)
+DIST_SOURCES = $(libsilo_pdb_drv_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+noinst_LTLIBRARIES = libsilo_pdb_drv.la
+libsilo_pdb_drv_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(srcdir)/../pdb -I$(builddir)/../silo -I$(srcdir)/../silo -I$(srcdir)/../score
+noinst_HEADERS = \
+ silo_pdb_private.h
+
+FILES = \
+ silo_pdb.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/pdb_drv/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/pdb_drv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_pdb_drv.la: $(libsilo_pdb_drv_la_OBJECTS) $(libsilo_pdb_drv_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_pdb_drv_la_OBJECTS) $(libsilo_pdb_drv_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_pdb.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/pdb_drv/silo_pdb.c b/src/pdb_drv/silo_pdb.c
new file mode 100644
index 0000000..c3d3f29
--- /dev/null
+++ b/src/pdb_drv/silo_pdb.c
@@ -0,0 +1,12400 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * silo-pdb.c   -- The PDB functions.
+ */
+
+#define NEED_SCORE_MM
+#include "silo_pdb_private.h"
+
+/* The code between BEGIN/END monikers used to reside in a separate
+ * file, 'pjjacket.c' but was moved here to reduce polution of the
+ * global namespace with PJ symbols that are relevant only to the
+ * PDB driver as well as to make it easier to re-map the code here
+ * for th PDB proper driver */
+/* BEGIN pjjacket.c */
+/*
+  Module Name                                                pjjacket.c
+
+  Purpose
+
+       This module contains the 'jacket' functions which map the
+       special directory PDB functions (prefixed with 'PJ') using
+       variable names into valid PDB functions.
+
+  Programmer
+
+       Jeffery Long, NSSD/B
+
+  Contents
+
+     Jacket Routines
+     ---------------
+
+       (int)  PJ_read()
+       (int)  PJ_read_as()
+       (int)  PJ_read_alt()
+       (int)  PJ_read_as_alt()
+*/
+
+static char   *pj_fixname(PDBfile *, char *);
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_read
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_read (PDBfile *file, char *name, void *var) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_read(file, newname, var));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_read_alt
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_read_alt (PDBfile *file, char *name, void *var, long *ind) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_read_alt(file, newname, var, ind));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_read_as
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_read_as (PDBfile *file, char *name, char *type, void *var) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_read_as(file, newname, type, var));
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_read_as_alt
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_read_as_alt (PDBfile *file, char *name, char *type, void *var, long *ind) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_read_as_alt(file, newname, type, var, ind));
+}
+
+
+/*-----------------------------------------------------------*
+ * Modifications:
+ *
+ *    Al Leibee, Mon Aug  9 10:30:54 PDT 1993
+ *    Converted to new PDBlib interface for PD_inquire_entry.
+ *    Note that the new args 'flag' and 'full path' are not
+ *    used since pj_fixname is always invoked to get the full
+ *    path name.
+ *-----------------------------------------------------------*/
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_inquire_entry
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL syment *
+PJ_inquire_entry (PDBfile *file, char *name) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_inquire_entry(file, newname, FALSE, NULL));
+}
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*
+ * Modifications
+ *
+ * Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ * SCALLOC_N to ALLOC_N to be not SCORE-dependent.
+ */
+
+/*-------------------------------------------------------------------------
+ * Function:    pj_fixname
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, Sun Dec 18 17:33:35 EST 1994
+ *      _outname is static allocated instead of on the heap.  Otherwise
+ *      it shows up as a memory leak since we always forget to free it
+ *      at the end of the program.
+ *
+ *      Mark C. Miller, Mon Jan 30 19:43:02 PST 2006
+ *      Increased size of _outname to something more appropriate. Added
+ *      code to avoid over-writes
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL char *
+pj_fixname (PDBfile *file, char *inname) {
+
+   static char    _outname[MAXLINE];
+
+   /*
+    *  If requested name begins with a '/', just use it.
+    *  Otherwise, form a name with an absolute path.
+    */
+   if (inname[0] == '/') {
+      strncpy(_outname, inname, sizeof(_outname));
+      _outname[sizeof(_outname)-1] = '\0';
+   }
+   else {
+      PJ_get_fullpath(file, lite_PD_pwd(file), inname, _outname);
+   }
+
+   return (_outname);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_write
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+INTERNAL int
+PJ_write (PDBfile *file, char *name, char *type, void *var) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_write(file, newname, type, var));
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_write_alt
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+INTERNAL int
+PJ_write_alt (PDBfile *file, char *name, char *type, void *var, int nd,
+              long *ind) {
+
+   char          *newname = pj_fixname(file, name);
+
+   return (lite_PD_write_alt(file, newname, type, var, nd, ind));
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    PJ_write_len
+ *
+ * Purpose:     Alternate form of PD_write_alt, which accepts length rather
+ *              than pairs of min/max indices.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+INTERNAL int
+PJ_write_len (PDBfile *file, char *name, char *type, const void *var, int nd,
+              long *len) {
+
+   long           ind[15], i;
+
+   char          *newname = pj_fixname(file, name);
+
+   for (i = 0; i < nd; i++) {
+      ind[i * 3] = 0;
+      ind[i * 3 + 1] = len[i] - 1;
+      ind[i * 3 + 2] = 1;
+   }
+
+   return (lite_PD_write_alt(file, newname, type, (void*) var, nd, ind));
+}
+#endif /* PDB_WRITE */
+/* END pjjacket.c */
+
+/* The code between BEGIN/END monikers used to reside in a separate
+ * file, 'pjobj.c' but was moved here to reduce polution of the
+ * global namespace with PJ symbols that are relevant only to the
+ * PDB driver as well as to make it easier to re-map the code here
+ * for th PDB proper driver */
+/* BEGIN pjobj.c */
+/*-------------------------------------------------------------------------
+ * Global private variables.
+ *-------------------------------------------------------------------------
+ */
+static PJcomplist *_tcl;
+static int     _pj_force_single = FALSE;
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                 pjobject.c
+
+  Purpose
+
+        This module contains functions for easily reading PDB objects.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Description
+
+        The principal function here is PJ_GetObject. It operates on a
+        PJcomplist data structure, which is simply a set of names, pointers,
+        and data types which describe the components of a PDB object.
+        PJ_GetObject interprets the object description and reads the object
+        components into the pointers provided.
+
+        There are three macros defined in pjgroup.h for simplifying the use
+        of PJ_GetObject. They are PJ_INIT_OBJ, PJ_DEFINE_OBJ and
+        PJ_DEFALL_OBJ. PJ_INIT_OBJ takes a single argument, the address of
+        a PJ_Object to manipulate. PJ_DEFINE_OBJ & PJ_DEFALL_OBJ take four
+        arguments: the component name, the address of where to store the
+        component, the component data type, and a sentinel indicating
+        whether or not the component is a scalar.
+
+   Contents
+
+        int   PJ_GetObject (file, objname, object, ret_type)
+        void *PJ_GetComponent (file, objname, compname)
+
+*/
+
+/* Definition of global variables (bleah!) */
+
+/* The variable use_PJgroup_cache is used in the PJ_GetObject function call.
+ * That function will cache any PJgroup that it retrieves, if possible.
+ * Sometimes, however, we've changed the state of the file (like changing
+ * directories) and must ignore any cache that we already have.  The
+ * "use_PJgroup_cache" variable is a boolean value that allows us to ignore
+ * the cached value when we need to.  Note that, even if this variable is set
+ * to 0 here, it will be reset to 1 after the first group is read.
+ */
+static int use_PJgroup_cache = 1;
+
+/* To cache the PJgroup, we need to keep the group, and we need to keep
+ * the "definition" of which object it is.  This information can be
+ * captured by storing the name of the object, the name of the file it
+ * came from, and the directory from which it came.
+ */
+static PJgroup *cached_group = NULL;
+static char    *cached_obj_name = NULL;
+static char    *cached_file_name = NULL;
+
+PRIVATE int db_pdb_ParseVDBSpec (char *mvdbspec, char **varname,
+                                 char **filename);
+PRIVATE int pj_GetVarDatatypeID (PDBfile *file, char *varname);
+PRIVATE void reduce_path(char *path, char *npath);
+
+/*----------------------------------------------------------------------
+ *  Routine                                               PJ_ForceSingle
+ *
+ *  Purpose
+ *
+ *      Set the force single flag.
+ *
+ *  Programmer
+ *
+ *      Eric Brugger, February 15, 1995
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_ForceSingle (int flag) {
+
+   _pj_force_single = flag ? 1 : 0;
+
+   return (0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            PJ_InqForceSingle
+ *
+ *  Purpose
+ *
+ *      Inquire the status of the force single flag.
+ *
+ *  Programmer
+ *
+ *      Eric Brugger, February 15, 1995
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_InqForceSingle(void)
+{
+    return (_pj_force_single);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine:                                                PJ_NoCache
+ *
+ *  Purpose:
+ *      Turn off caching of PJgroups until the next PJ_GetObject call.
+ *
+ *  Programmer:
+ *      Sean Ahern, Mon Jul  1 08:23:41 PDT 1996
+ *
+ *  Notes:
+ *     See comment at the top of this file about the use_PJgroup_cache
+ *     global variable.
+ *
+ *  Modifications:
+ *
+ *     Jim Reus, 23 Apr 97
+ *     Provide void in parameter list (to agree with header file).
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL void
+PJ_NoCache ( void )
+{
+    use_PJgroup_cache = 0;
+}
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 PJ_GetObject
+ *
+ *  Purpose
+ *
+ *      Read the contents of an object and store each entity into the
+ *      address provided in the given component list structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 08:30:58 PST 1994
+ *      Added error mechanism
+ *
+ *      Sean Ahern, Wed Jun 26 16:26:08 PDT 1996
+ *      Added caching of the PJgroup.
+ *
+ *      Eric Brugger, Wed Dec 11 12:41:47 PST 1996
+ *      I swapped the order of the loops over group component names
+ *      and list component names.  This can be made slightly more
+ *      efficient since the inner loop can be made to terminate
+ *      earlier if a match is found.  This also closes a memory leak
+ *      in the case where a component name is in the group twice and
+ *      the memory for it should be allocated.  This has the other
+ *      side affect of changing the behaviour such that if an entry
+ *      shows up more than once it will take the first one, not the
+ *      last one.
+ *
+ *      Sean Ahern, Mon Nov 23 17:03:59 PST 1998
+ *      Removed the memory associated with the group when we're replacing the
+ *      cached one.  Moved the memory management of the cache to a better
+ *      place in the file.
+ *
+ *      Eric Brugger, Tue Dec 15 14:41:20 PST 1998
+ *      I modified the routine to handle file names in the object name.
+ *
+ *      Sean Ahern, Thu Mar 30 11:01:56 PST 2000
+ *      Fixed a memory leak.
+ *
+ *      Sean Ahern, Tue Jun 13 17:25:25 PDT 2000
+ *      Made the function return the type of the object, if requested.
+ *      Beefed up the error message if the object isn't found.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+PJ_GetObject(PDBfile *file_in, char *objname_in, PJcomplist *tobj,
+             char **ret_type)
+{
+    int             i, j, error;
+    char           *varname=NULL, *filename=NULL;
+    char           *objname=NULL;
+    PDBfile        *file=NULL;
+    char           *me = "PJ_GetObject";
+
+    if (!file_in)
+        return db_perror(NULL, E_NOFILE, me);
+    if (!objname_in || !*objname_in)
+        return db_perror("objname", E_BADARGS, me);
+
+    /*
+     * If the object name has a filename in it then open the file
+     */
+    if (db_pdb_ParseVDBSpec(objname_in, &varname, &filename) < 0)
+    {
+        FREE(varname);
+        return db_perror("objname", E_BADARGS, me);
+    }
+
+    if (filename != NULL)
+    {
+        objname = varname;
+        if ((file = lite_PD_open(filename, "r")) == NULL)
+        {
+            FREE (varname);
+            FREE (filename);
+            return db_perror("objname", E_BADARGS, me);
+        }
+#ifdef USING_PDB_PROPER
+        PD_set_track_pointers(file, FALSE);
+#endif
+    }
+    else
+    {
+        objname = objname_in;
+        file = file_in;
+    }
+
+    /* Read object description if we don't have it cached.
+     *
+     * There are three things that we have to check:
+     *     use_PJgroup_cache is true
+     *     cache_obj_name is the same as the passed-in name
+     *     cache_file_name is the same as the passed-in file's name
+     *
+     * If any of these are false, we can't use the cached PJgroup and must
+     * instead read a new one from the PDBfile.
+     */
+    if ((use_PJgroup_cache == 0) ||
+        (cached_obj_name == NULL) || (strcmp(cached_obj_name, objname) != 0) ||
+        (cached_file_name == NULL) || (strcmp(cached_file_name, file->name)))
+    {
+        PJ_ClearCache();
+        error = !PJ_get_group(file, objname, &cached_group);
+        if (error || cached_group == NULL)
+        {
+            char err_str[256];
+            FREE(varname);
+            FREE(filename);
+            sprintf(err_str,"PJ_get_group: Probably no such object \"%s\".",objname);
+            db_perror(err_str, E_CALLFAIL, me);
+            return -1;
+        }
+
+        /* We've gotten a new group, remember which one it is. */
+        cached_obj_name = STRDUP(objname);
+        cached_file_name = STRDUP(file->name);
+
+        /* Now that we've cached a group, turn caching back on. */
+        use_PJgroup_cache = 1;
+    }
+
+    /* If we are asked to, return the object type */
+    if (ret_type)
+    {
+        *ret_type = safe_strdup(cached_group->type);
+    }
+
+    /* Walk through the object, putting the data into the appropriate memory
+     * locations.  */
+    for (i = 0; i < tobj->num; i++)
+    {
+        for (j = 0; j < cached_group->ncomponents; j++)
+        {
+            if (tobj->ptr[i] != NULL &&
+                STR_EQUAL(cached_group->comp_names[j], tobj->name[i]))
+            {
+
+                /*
+                 *  For alloced arrays, pass the address of the
+                 *  pointer (i.e., ptr[i]). If not alloced, address
+                 *  is already in the ptr[i] element.
+                 */
+                PJ_ReadVariable(file, cached_group->pdb_names[j],
+                                tobj->type[i], (int)tobj->alloced[i],
+                                (tobj->alloced[i]) ?
+                                (char **)&tobj->ptr[i] :
+                                (char **)tobj->ptr[i]);
+
+            }
+        }
+    }
+
+    /*
+     * If the variable was from another file the file.
+     */
+    if (filename != NULL)
+    {
+        FREE (filename);
+        lite_PD_close (file);
+    }
+
+    FREE (varname);
+
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Function:                                             PJ_ClearCache
+ *
+ * Purpose:     Frees up the storage associated with the cache.
+ *
+ * Programmer:  Sean Ahern, Mon Nov 23 17:19:17 PST 1998
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Jul 27 12:46:30 PDT 1999
+ *    Added a return statement at the end of the function.
+ *
+ *    Brad Whitlock, Thu Jan 20 15:32:27 PST 2000
+ *    Added the void to the argument list to preserve the prototype.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+PJ_ClearCache(void)
+{
+    int error;
+    static char *me = "PJ_ClearCache";
+
+    /* Free up the old group. */
+    if (cached_group)
+    {
+        error = !PJ_rel_group(cached_group);
+        if (error)
+        {
+            db_perror("PJ_rel_group", E_CALLFAIL, me);
+            return -1;
+        }
+        cached_group = NULL;
+    }
+    FREE(cached_obj_name);
+    FREE(cached_file_name);
+
+    return 0;
+}
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                              PJ_GetComponent
+ *
+ *  Purpose
+ *
+ *      Read the contents of an object and store each entity into the
+ *      address provided in the given component list structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 08:39:56 PST 1994
+ *      Added error mechanism
+ *--------------------------------------------------------------------
+ */
+INTERNAL void *
+PJ_GetComponent (PDBfile *file, char *objname, char *compname) {
+
+   char          *result = NULL;
+   PJcomplist     tmp_obj;
+   char          *me = "PJ_GetComponent";
+
+   /* Read just the requested component of the given object */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ(compname, &result, DB_NOTYPE);
+
+   if (PJ_GetObject(file, objname, &tmp_obj, NULL) < 0) {
+      db_perror("PJ_GetObject", E_CALLFAIL, me);
+      return NULL;
+   }
+
+   return ((void *)result);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          PJ_GetComponentType
+ *
+ *  Purpose
+ *
+ *      Reads the contents of an object if it is not already cached and
+ *      looks in the component list to determine the component type.
+ *
+ *  Programmer
+ *
+ *      Brad Whitlock, Thu Jan 20 15:26:51 PST 2000
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_GetComponentType (PDBfile *file, char *objname, char *compname)
+{
+   int  retval = DB_NOTYPE;
+   char *me = "PJ_GetComponentType";
+
+   /* If there is no cached group, or we are interested in a
+    * different object, get the one we want.  */
+   if(cached_group == NULL || cached_obj_name == NULL ||
+      (!STR_EQUAL(cached_obj_name, objname)))
+   {
+       char       *result = NULL;
+       PJcomplist tmp_obj;
+
+       /* Read just the requested component of the given object */
+       INIT_OBJ(&tmp_obj);
+       DEFALL_OBJ(compname, &result, DB_NOTYPE);
+
+       if (PJ_GetObject(file, objname, &tmp_obj, NULL) < 0) {
+          db_perror("PJ_GetObject", E_CALLFAIL, me);
+          return DB_NOTYPE;
+       }
+       FREE(result);
+   }
+
+   /* If there is now cached group information (and there should be)
+    * then look for the component in the group and determine its type.  */
+   if(use_PJgroup_cache && cached_group)
+   {
+       int i, index, found = 0;
+
+       /* Look through the cached group's component list to find
+        * the appropriate index.  */
+        for(i = 0; i < cached_group->ncomponents; i++)
+        {
+            if(strcmp(compname, cached_group->comp_names[i]) == 0)
+            {
+                found = 1;
+                index = i;
+                break;
+            }
+        }
+
+        /* If the component name was in the list then determine
+         * the type. If it does not have a prefix, then it must be
+         * a variable since components can only be int,float,double,
+         * string, or variable.  */
+        if(found)
+        {
+            if(strncmp(cached_group->pdb_names[index], "'<i>", 4) == 0)
+                retval = DB_INT;
+            else if(strncmp(cached_group->pdb_names[index], "'<f>", 4) == 0)
+                retval = DB_FLOAT;
+            else if(strncmp(cached_group->pdb_names[index], "'<d>", 4) == 0)
+                retval = DB_DOUBLE;
+            else if(strncmp(cached_group->pdb_names[index], "'<s>", 4) == 0)
+                retval = DB_CHAR;
+            else
+                retval = DB_VARIABLE;
+        }
+   }
+
+   return retval;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                             PJ_ReadVariable
+ *
+ *  Purpose
+ *
+ *      Read an entity of arbitrary type from a PDB file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *      If the requested entity is either a scalar or a literal, the
+ *      result will be stored directly into the space pointed to by
+ *      var. Otherwise, space will be allocated and var will be
+ *      assigned the new address.
+ *
+ *  Modifications
+ *      Al Leibee, Thu Feb 17 13:04:47 PST 1994
+ *      Removed Kludge re use of db_pdb_getvarinfo by using
+ *      pdb_getvarinfo.
+ *
+ *      Robb Matzke, Fri Dec 2 13:51:28 PST 1994
+ *      If this function allocates space for `var' we use the C
+ *      libraray--not SCORE.
+ *
+ *      Eric Brugger, Mon Oct 23 12:17:03 PDT 1995
+ *      I corrected a bug with the forcing of values.  If the value
+ *      was forced, new storage was allocated for the space to put the
+ *      results.  But this was a bug since if storage was passed to the
+ *      routine, then the data had to be put in that space.
+ *
+ *      Eric Brugger, Thu Aug 20 11:46:54 PDT 1998
+ *      I modified the routine to not perform forcing of values to
+ *      single if the required type was DB_NOTYPE.  I think that the
+ *      correct behavior is to only do forcing if the required data
+ *      type is DB_FLOAT, but this routine gets used a lot and to
+ *      check that it was always being called correctly is a lot of
+ *      work.
+ *
+ *      Brad Whitlock, Thu Jan 20 17:33:20 PST 2000
+ *      Added code for double conversion.
+ *
+ *      Eric Brugger, Fri Sep  1 14:53:59 PDT 2000
+ *      Added code to compress out "../" from the variable name.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long data type.
+ *
+ *      Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *      Conditionally compile long long support only when its
+ *      different from long.
+ *
+ *      Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *      Made long long support UNconditionally compiled.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+PJ_ReadVariable(PDBfile *file,
+                char    *name_in,     /*Name of variable to read */
+                int     req_datatype, /*Requested datatype for variable */
+                int     alloced,      /*has space already been allocated? */
+                char    **var)        /*Address of ptr to store data into */
+{
+   int            num, size, i, okay;
+   int            act_datatype, forcing;
+   int           *iptr;
+   char           tname[256], *lit;
+   float         *local_f;
+   char          *local_c;
+   float         *fptr;
+   double        *dptr;
+   char          *name=0;
+
+   okay = TRUE;
+
+   name = ALLOC_N(char, strlen(name_in)+1);
+   reduce_path(name_in, name);
+
+   /* Determine actual datatype of variable or literal */
+   act_datatype = pj_GetVarDatatypeID(file, name);
+
+   /* Set sentinel if will be forcing doubles to floats */
+   if (req_datatype != DB_NOTYPE && req_datatype != act_datatype &&
+       _pj_force_single)
+      forcing = 1;
+   else
+      forcing = 0;
+
+   /*--------------------------------------------------
+    *  If name is enclosed in single quotes, take it as
+    *  a literal value.
+    *-------------------------------------------------*/
+
+   if (name[0] == '\'') {
+      /*
+       * No forcing of literals.  Since literals return an
+       * an actual data type of -1, they will never get forced
+       * since this is not a valid type.  This is a case of two
+       * wrongs making a right since if the actual data type had
+       * been a valid value, this routine would have tried to
+       * convert it which would have been an error.
+       */
+      forcing = 0;
+
+      /*--------------------------------------------------
+       *  Component is a literal. Convert from ascii
+       *  to type specified in string (default is int).
+       *-------------------------------------------------*/
+
+      strcpy(tname, &name[1]);
+      tname[strlen(tname) - 1] = '\0';
+
+      if (name[1] == '<')
+         lit = &tname[3];
+      else
+         lit = tname;
+
+      if (STR_BEGINSWITH(tname, "<i>")) {
+
+         if (alloced)
+            iptr = (int *)*var;
+         else
+            iptr = ALLOC(int);
+
+         *iptr = atoi(lit);
+         *var = (char *)iptr;
+
+      }
+      else if (STR_BEGINSWITH(tname, "<f>")) {
+
+         if (alloced)
+            fptr = (float *)*var;
+         else
+            fptr = ALLOC(float);
+
+         *fptr = (float)atof(lit);
+         *var = (char *)fptr;
+
+      }
+      else if (STR_BEGINSWITH(tname, "<d>")) {
+
+         if (alloced)
+            dptr = (double *)*var;
+         else
+            dptr = ALLOC(double);
+
+         *dptr = (double)atof(lit);
+         *var = (char *)dptr;
+
+      }
+      else if (STR_BEGINSWITH(tname, "<s>")) {
+
+         if (alloced)
+            strcpy(*var, lit);
+         else {
+            *var = ALLOC_N(char, strlen(lit) + 1);
+
+            strcpy(*var, lit);
+         }
+
+      }
+      else {
+
+         if (alloced)
+            iptr = (int *)*var;
+         else
+            iptr = ALLOC(int);
+
+         *iptr = atoi(lit);
+         *var = (char *)iptr;
+      }
+   }
+   else {
+      /*--------------------------------------------------
+       *  Component is not a literal. See if it was
+       *  alloced. If so, read directly into 'var' space.
+       *  Otherwise, let PDB assign address to our ptr.
+       *  NOTE -- if num is returned '-1', name is a
+       *  pointered array.
+       *-------------------------------------------------*/
+
+      (void)pdb_getvarinfo(file, name, tname, &num, &size, 0);
+
+      /* If not already allocated, and is not a pointered var, allocate */
+      if (!alloced && num > 0) {
+         if (forcing)
+            *var = ALLOC_N (char, num * sizeof(float));
+         else
+            *var = ALLOC_N (char, num * size);
+
+         alloced = 1;
+      }
+
+      /*
+       * If we are forcing the values to float, then read the
+       * values into a buffer the size of the data as it exists
+       * in the file.
+       */
+      if (forcing) {
+         local_f = (float *) *var;
+
+         *var = ALLOC_N (char, num * size);
+      }
+
+      if (alloced)
+         /*------------------------------
+          *  Space already allocated by
+          *  caller, so use that.
+          *-----------------------------*/
+         okay = PJ_read(file, name, *var);
+      else
+         /*------------------------------
+          *  Let PDBlib allocate new
+          *  space. Just set pointer.
+          *-----------------------------*/
+         okay = PJ_read(file, name, var);
+
+      /*
+       *  PDB cannot query length of pointered vars in file, so
+       *  num is set to -1. Now that it has been read, can query
+       *  length.
+       */
+      if (num < 0) {
+         num = lite_SC_arrlen(*var) / size;
+
+         local_c = ALLOC_N(char, num * size);
+
+         memcpy(local_c, *var, num * size);
+
+         SCFREE(*var);
+         *var = local_c;
+      }
+   }
+
+   /*--------------------------------------------------
+    *  Map values to float if
+    *  force-single flag is TRUE.
+    *--------------------------------------------------*/
+   if (okay && forcing) {
+      char          *c_conv = NULL;
+      double        *d_conv = NULL;
+      long          *l_conv = NULL;
+      long long     *ll_conv = NULL;
+      short         *s_conv = NULL;
+      int           *i_conv = NULL;
+
+      switch (act_datatype) {
+      case DB_INT:
+         i_conv = (int *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)i_conv[i];
+         break;
+      case DB_SHORT:
+         s_conv = (short *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)s_conv[i];
+         break;
+      case DB_LONG:
+         l_conv = (long *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)l_conv[i];
+         break;
+      case DB_LONG_LONG:
+         ll_conv = (long long *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)ll_conv[i];
+         break;
+      case DB_DOUBLE:
+         d_conv = (double *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)d_conv[i];
+         break;
+      case DB_CHAR:
+         c_conv = (char *)(*var);
+
+         for (i = 0; i < num; i++)
+            local_f[i] = (float)c_conv[i];
+         break;
+      default:
+         break;
+      }
+   }
+
+   if (forcing) {
+      FREE(*var);
+      *var = (char *)local_f;
+   }
+
+   FREE(name);
+
+   return (okay);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          pj_GetVarDatatypeID
+ *
+ *  Purpose
+ *
+ *      Return the datatype of the given variable.
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Aug 18 15:59:26 PDT 1993
+ *      Convert to new PJ_inquire_entry interface.
+ *
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *--------------------------------------------------------------------*/
+PRIVATE int
+pj_GetVarDatatypeID (PDBfile *file, char *varname) {
+
+   syment        *ep;
+
+   if (varname[0] == '<')
+      return DB_CHAR;
+
+   ep = PJ_inquire_entry(file, varname);
+   if (ep == NULL)
+      return (OOPS);
+
+   return (SW_GetDatatypeID(ep->type));
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_ParseVDBSpec
+ *
+ *  Purpose
+ *
+ *      Parse a variable database specification.
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *--------------------------------------------------------------------*/
+PRIVATE int
+db_pdb_ParseVDBSpec (char *mvdbspec, char **varname, char **filename)
+{
+    int len_filename, len_varname;
+
+    /*
+     * Split spec into SILO name and SILO directory/variable name.
+     */
+    if (strchr (mvdbspec, ':') != NULL)
+    {
+        len_filename = strcspn (mvdbspec, ":");
+
+        *filename = ALLOC_N (char, len_filename+1);
+
+        strncpy (*filename, mvdbspec, len_filename);
+
+        len_varname = strlen(mvdbspec) - (len_filename+1);
+        if (len_varname <= 0)
+        {
+            FREE (*filename);
+            return (OOPS);
+        }
+
+        /*
+         * If a / does not exist at the beginning of the
+         * path, insert it.
+         */
+        if (mvdbspec[len_filename+1] == '/')
+        {
+            *varname = ALLOC_N (char, len_varname+1);
+            strncpy (*varname, &mvdbspec[len_filename+1], len_varname);
+        }
+        else
+        {
+            *varname = ALLOC_N (char, len_varname+2);
+            (*varname) [0] = '/';
+            strncpy (&((*varname)[1]), &mvdbspec[len_filename+1], len_varname);
+            len_varname++;
+        }
+     }
+     else
+     {
+        *filename = NULL;
+
+        *varname = ALLOC_N (char, strlen(mvdbspec)+1);
+        strcpy (*varname, mvdbspec);
+    }
+
+    return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 reduce_path
+ *
+ *  Purpose
+ *
+ *      Compress out the "../" from a path.
+ *
+ *  Notes
+ *
+ *  Programmer   Eric Brugger
+ *  Date         September 1, 2000
+ *
+ *  Modifications
+ *
+ *--------------------------------------------------------------------*/
+PRIVATE void
+reduce_path(char *path, char *npath)
+{
+    int      i, j;
+    int      lpath;
+
+     npath [0] = '/' ;
+     npath [1] = '\0' ;
+     j = 0 ;
+     lpath = strlen (path) ;
+     for (i = 0; i < lpath; i++) {
+          while (path [i] == '/' && path [i+1] == '/')
+               i++ ;
+          if (path [i] == '/' && path [i+1] == '.' && path [i+2] == '.' &&
+                (path [i+3] == '/' || path [i+3] == '\0')) {
+               if (j > 0)
+                     j-- ;
+               while (npath [j] != '/' && j > 0)
+                    j-- ;
+               i += 2 ;
+               }
+          else {
+               npath [j++] = path [i] ;
+          }
+     }
+     npath [j] =  '\0' ;
+
+     /*
+      * Check that the path is valid.
+      */
+     if (j == 0) {
+          path [0] = '/';
+          path [1] = '\0';
+     }
+}
+/* END pjobj.c */
+
+/* The code between BEGIN/END monikers used to reside in a separate
+ * file, 'pjgroup.c' but was moved here to reduce polution of the
+ * global namespace with PJ symbols that are relevant only to the
+ * PDB driver as well as to make it easier to re-map the code here
+ * for th PDB proper driver */
+/* BEGIN pjgroup.c */
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                                  pjgroup.c
+
+  Purpose
+
+        This module provides a capability for reading and writing
+        group descriptions in a PDB file.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+
+  Description
+
+
+  Contents
+
+        User-Callable Functions (C)
+
+                int      PJ_put_group (file, group, overwrite)
+                int      PJ_get_group (file, name, PJgroup **group)
+                PJgroup *PJ_make_group (name, type, comp_names, pdb_names, num)
+                int      PJ_rel_group (group)
+
+        User-Callable Functions (Fortran)
+
+
+        Internal-Use-Only Functions
+
+
+
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*
+ **********************
+ * Modification History
+ **********************
+ * $Id: pjgroup.c,v 1.4 1995/08/30 00:21:38 ahern Exp $
+ * $Header: /SRC/pact/repository/src/silo/pdb/pjgroup.c,v 1.4 1995/08/30 00:21:38 ahern Exp $
+ * $Log: pjgroup.c,v $
+ * Revision 1.4  1995/08/30  00:21:38  ahern
+ *  < ahern | D95_08_29_17_20_15 > Reformatted whitespace and tabs. You'll find that most changes are in comments.
+ *
+ * Revision 1.3  1995/08/28  21:53:40  ahern
+ *  < ahern | D95_08_28_14_49_09 > Ran indent on silo.
+ *
+ * Revision 1.2  1995/04/21  16:16:34  brugger
+ *  < brugger | D95_04_21_09_10_55 > I merged in Robbs silo filters enhancements into silo.
+ *
+ * Revision 1.1  1995/02/01  00:54:03  brugger
+ *  < brugger | D95_01_31_16_47_08 > I incorporated robbs new device independent silo.
+ *
+ * Revision 1.2  1994/10/17  16:17:29  brugger
+ *  < brugger | D94_10_17_09_09_09 > I restructured silo
+ *
+ * Revision 1.1.1.1  1994/04/13  22:55:17  sabrown
+ * Reconfigure SILO
+ *
+ * Revision 1.2  1993/09/27  16:30:37  leibee
+ *  < leibee | Mon Sep 27 09:25:46 PDT 1993 > Commit of v2_3 of SILO
+ *
+ *
+ * Al Leibee, Wed Jul 21 09:01:32 PDT 1993
+ * Ensure that PJ_make_group input strings are
+ * SCORE-allocated.
+ *
+ * Revision 1.2  1993/07/13  16:57:51  leibee
+ * Updated slide, pdbext, silo, swat modules: made allocate/free usage consistant re SCORE and system memory managers; reduced dependence on SCORE memory manager; removed check for SCORE-allocated array within FREE; added configman files.
+ *
+ *
+ * Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ * Made allocation/free usage consistant.
+ */
+
+/*=============================
+ * Global Data for this Module
+ *=============================*/
+
+/*--------------------------------------------------------------------
+ *  Routine                                              PJ_get_group
+ *
+ *  Purpose
+ *
+ *      Read a group description from the given PDB file.
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ * 	Robb Matzke, 5 Feb 1997
+ *	This function returns 0 instead of dumping core if NAME is
+ *	not a group.
+ *
+ *    Eric Brugger, Mon Dec  7 11:03:09 PST 1998
+ *    Removed call to lite_PD_reset_ptr_list since it was removed.
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_get_group(
+   PDBfile       *file,        /* PDB file pointer */
+   char          *name,        /* Name of group desc to read */
+   PJgroup      **group)       /* Variable to write into */
+{
+   syment	*ep;
+   
+   /*
+    * Make sure the thing we're looking up is really a group.
+    */
+   ep = lite_PD_inquire_entry (file, name, TRUE, NULL);
+   if (!ep || strcmp(PD_entry_type(ep), "Group *")) return 0;
+
+
+   return ((int)PJ_read(file, name, group));
+
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                              PJ_make_group
+ *
+ *  Purpose
+ *
+ *      Return a group description variable constructed from given
+ *      elements.
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Jul 21 09:01:32 PDT 1993
+ *      Ensure that inputted strings are SCORE-allocated.
+ *
+ *      Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *      Character strings known to have been allocated by SCORE.
+ *
+ *      Jeremy Meredith, Fri Nov 19 10:04:54 PST 1999
+ *      Changed SC_strdup to safe_strdup.
+ *
+ *      Jeremy Meredith, Tue Nov 30 09:12:15 PST 1999
+ *      I changed safe_strdup back to SC_strdup.  Not allocating the
+ *      memory with SCORE's memory management routines caused severe
+ *      problems because the memory block was not tagged correctly.
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL PJgroup *
+PJ_make_group (
+   char          *name,        /* Name of this group */
+   char          *type,        /* Type of this group */
+   char         **comp_names,  /* Array of component names (num) */
+   char         **pdb_names,   /* Array of internal (PDB) names (num) */
+   int            num)         /* Number of components provided */
+{
+   PJgroup       *group;
+   char          *sc_type, *sc_name;
+   char         **sc_comp_nms;
+   char         **sc_int_nms;
+   int            i;
+
+   if (num <= 0 || name == NULL || type == NULL ||
+       comp_names == NULL || pdb_names == NULL)
+      return (NULL);
+
+   group = SCALLOC(PJgroup);
+
+   /*----------------------------------------
+    *  Ensure strings allocated by SCORE
+    *  by making duplicates.
+    *----------------------------------------*/
+   sc_comp_nms = SCALLOC_N(char *, num);
+   sc_int_nms = SCALLOC_N(char *, num);
+
+   for (i = 0; i < num; i++) {
+      sc_comp_nms[i] = SC_strdup(comp_names[i]);
+      sc_int_nms[i] = SC_strdup(pdb_names[i]);
+   }
+   sc_type = SC_strdup(type);
+   sc_name = SC_strdup(name);
+
+   /*----------------------------------------
+    *  Store new pointers in group variable.
+    *----------------------------------------*/
+   group->name = sc_name;
+   group->type = sc_type;
+   group->ncomponents = num;
+   group->comp_names = sc_comp_nms;
+   group->pdb_names = sc_int_nms;
+
+   return (group);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                              PJ_rel_group
+ *
+ *  Purpose
+ *
+ *      Release the space associated with the given group.
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *      FREE to SCFREE to be consistant with allocation.
+ *
+ *      Sean Ahern, Mon Nov 23 17:02:49 PST 1998
+ *      Made the return value meaningful.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+PJ_rel_group (PJgroup *group) {
+
+   int            i;
+
+   if (group == NULL || group->ncomponents <= 0)
+      return (FALSE);
+
+   for (i = 0; i < group->ncomponents; i++) {
+      SCFREE(group->comp_names[i]);
+      SCFREE(group->pdb_names[i]);
+   }
+
+   SCFREE(group->name);
+   SCFREE(group->type);
+   SCFREE(group->comp_names);
+   SCFREE(group->pdb_names);
+   SCFREE(group);
+
+   return (TRUE);
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                              PJ_print_group
+ *
+ *  Purpose
+ *
+ *      Print the given group.
+ *
+ *  Notes
+ *
+ *--------------------------------------------------------------------
+ */
+INTERNAL int
+PJ_print_group (PJgroup *group, FILE *fp) {
+
+   int            i;
+
+   if (group == NULL || group->ncomponents <= 0)
+      return (FALSE);
+
+   if (fp == NULL)
+      fp = stdout;
+
+   fprintf(fp, "Group: %s is of type %s and has %d components.\n",
+	   group->name, group->type, group->ncomponents);
+
+   for (i = 0; i < group->ncomponents; i++) {
+      fprintf(fp, "Component [%d] = %s  ==> %s\n", i,
+	      group->comp_names[i], group->pdb_names[i]);
+   }
+   return 0;
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                             PJ_put_group
+ *
+ *  Purpose
+ *
+ *      Write a group description into the given PDB file.
+ *
+ *  Return:	Success:	non-zero
+ *
+ * 		Failute:	zero
+ *
+ *  Notes
+ *
+ *
+ *  Modifications
+ *
+ *     Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *     FREE to SCFREE to be consistant with allocation.
+ *
+ *     Robb Matzke, 7 Mar 1997
+ *     Added the OVERWRITE argument.  If non-zero, then we can overwrite
+ *     any existing group with the same name.
+ *
+ *    Eric Brugger, Mon Dec  7 11:03:09 PST 1998
+ *    Removed call to lite_PD_reset_ptr_list since it was removed.
+ *
+ *--------------------------------------------------------------------
+ */
+#ifdef PDB_WRITE
+INTERNAL int
+PJ_put_group (
+   PDBfile       *file,        /* PDB file pointer */
+   PJgroup       *group,       /* Group variable to write */
+   int		 overwrite)
+{
+
+   char         **varlist;
+   char           name[MAXNAME];
+
+   if (file == NULL || group == NULL)
+      return (FALSE);
+
+   /*----------------------------------------
+    *  Define the group struct, if it hasn't
+    *  been already.
+    *----------------------------------------*/
+
+   if (PD_inquire_type(file, "Group") == NULL) {
+
+      if ((lite_PD_defstr(file, "Group",
+			  "char    *name",
+			  "char    *type",
+			  "char    **comp_names",
+			  "char    **pdb_names",
+			  "integer ncomponents",
+			  lite_LAST)) == NULL)
+	 printf("PJ_put_group -- Error defining Group structure.\n");
+   }
+
+   /*----------------------------------------
+    *  Build an absolute pathname.
+    *---------------------------------------*/
+   PJ_get_fullpath(file, lite_PD_pwd(file), group->name, name);
+
+   /*----------------------------------------
+    *  Make sure this group description hasn't
+    *  already been written.
+    *----------------------------------------*/
+   if (!overwrite) {
+#ifdef USING_PDB_PROPER
+      varlist = SC_hasharr_dump(file->symtab, name, 0, 0);
+#else
+      varlist = lite_SC_hash_dump(file->symtab, name);
+#endif
+
+      if (varlist != NULL && varlist[0] != NULL)
+	 return (FALSE);
+
+      /*FREE(varlist); */
+      SCFREE(varlist);
+   }
+
+   /*----------------------------------------
+    *  Write the group description variable.
+    *----------------------------------------*/
+   return ((int)PJ_write(file, name, "Group *", &group));
+}
+#endif /* PDB_WRITE */
+
+/* END pjgroup.c */
+
+/* File-wide modifications:
+ *      Sean Ahern, Fri Aug  1 13:23:38 PDT 1997
+ *      Reformatted tabs to spaces.
+ */
+
+static char   *_valstr[10] =
+{"value0", "value1", "value2",
+ "value3", "value4", "value5",
+ "value6", "value7", "value8",
+ "value9"};
+
+static char   *_mixvalstr[10] =
+{"mixed_value0", "mixed_value1",
+ "mixed_value2", "mixed_value3",
+ "mixed_value4", "mixed_value5",
+ "mixed_value6", "mixed_value7",
+ "mixed_value8", "mixed_value9"};
+
+static char   *_ptvalstr[10] =
+{"0_data", "1_data", "2_data",
+ "3_data", "4_data", "5_data",
+ "6_data", "7_data", "8_data",
+ "9_data"};
+
+#define CHECK_TYPE(typestring,type,name) \
+    if (strcmp(typestring, DBGetObjtypeName(type)) != 0) \
+    { \
+        char error[256]; \
+        sprintf(error,"Requested %s object \"%s\" is not a %s.",\
+                typestring, name, DBGetObjtypeName(type)); \
+        FREE(typestring); \
+        db_perror(error, E_INTERNAL, me); \
+    } else { \
+        FREE(typestring); \
+    }
+
+static PJcomplist *_tcl;
+
+/* Symbolic constants used in calls to db_StringListToStringArray
+   to indicate behavior. A '!' in front means to not perform the
+   associated action. For PDB driver, we handle the slash swap
+   on the 'names' member of multi-block objects only and we
+   skip first semicolon ONLY for those string arrays that were
+   added to PDB driver prior to db_StringListToStringArray
+   coming into existence. This is to ensure diffs on files
+   before and after this change don't vary due to leading
+   semicolon. */
+static const int handleSlashSwap = 1;
+static const int skipFirstSemicolon = 1;
+
+/*----------------------------------------------------------------------
+ *  Routine                                       db_pdb_GetVarDatatype
+ *
+ *  Purpose
+ *
+ *      Return the datatype of the given variable.
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Aug 18 15:59:26 PDT 1993
+ *      Convert to new PJ_inquire_interface.
+ *
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *
+ *      Mark C. Miller, Thu May 13 19:02:58 PDT 2010
+ *      Moved here from pjobj.c so it could be made static (private).
+ *--------------------------------------------------------------------*/
+PRIVATE int
+db_pdb_GetVarDatatype (PDBfile *pdb, char *varname) {
+
+   syment        *ep;
+   int            datatype;
+
+   ep = PJ_inquire_entry(pdb, varname);
+   if (!ep)
+      return -1;
+
+   datatype = SW_GetDatatypeID(ep->type);
+
+   return datatype;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_InitCallbacks
+ *
+ * Purpose:     Initialize the callbacks in a DBfile structure.
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov 29 13:26:58 PST 1994
+ *
+ * Modifications:
+ *
+ *    Eric Brugger, Thu Feb 16 08:45:00 PST 1995
+ *    I added the DBReadVarSlice callback.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    I changed this to prototype form.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    I added multi-material-species
+ *
+ *    Eric Brugger, Tue Mar 30 10:49:56 PST 1999
+ *    I added the DBPutZonelist2 callback.
+ *
+ *    Robb Matzke, 2000-01-14
+ *    I organized callbacks by category for easier comparison with other
+ *    drivers.
+ *
+ *    Brad Whitlock, Thu Jan 20 11:59:11 PDT 2000
+ *    I added the DBGetComponentType callback.
+ *-------------------------------------------------------------------------*/
+PRIVATE void
+db_pdb_InitCallbacks ( DBfile *dbfile )
+{
+    /* Properties of the driver */
+    dbfile->pub.pathok = FALSE;         /*driver doesn't handle paths well*/
+
+    /* File operations */
+    dbfile->pub.close = db_pdb_close;
+    dbfile->pub.module = db_pdb_Filters;
+
+    /* Directory operations */
+    dbfile->pub.cd = db_pdb_SetDir;
+    dbfile->pub.g_dir = db_pdb_GetDir;
+    dbfile->pub.newtoc = db_pdb_NewToc;
+    dbfile->pub.cdid = NULL;            /*DBSetDirID() not supported    */
+#ifdef PDB_WRITE
+    dbfile->pub.mkdir = db_pdb_MkDir;
+#endif
+
+    /* Variable inquiries */
+    dbfile->pub.exist = db_pdb_InqVarExists;
+    dbfile->pub.g_varlen = db_pdb_GetVarLength;
+    dbfile->pub.g_varbl = db_pdb_GetVarByteLength;
+    dbfile->pub.g_vartype = db_pdb_GetVarType;
+    dbfile->pub.g_vardims = db_pdb_GetVarDims;
+    dbfile->pub.r_var1 = NULL;          /*DBReadVar1() not supported    */
+    dbfile->pub.g_attr = db_pdb_GetAtt;
+    dbfile->pub.r_att = db_pdb_ReadAtt;
+
+    /* Variable I/O operations */
+    dbfile->pub.g_var = db_pdb_GetVar;
+    dbfile->pub.r_var = db_pdb_ReadVar;
+    dbfile->pub.r_varslice = db_pdb_ReadVarSlice;
+#ifdef PDB_WRITE
+    dbfile->pub.write = db_pdb_Write;
+    dbfile->pub.writeslice = db_pdb_WriteSlice;
+#endif
+
+    /* Low-level object functions */
+    dbfile->pub.g_obj = db_pdb_GetObject;
+    dbfile->pub.inqvartype = db_pdb_InqVarType;
+    dbfile->pub.i_meshtype = db_pdb_InqMeshtype;
+    dbfile->pub.i_meshname = db_pdb_InqMeshname;
+    dbfile->pub.g_comp = db_pdb_GetComponent;
+    dbfile->pub.g_comptyp = db_pdb_GetComponentType;
+    dbfile->pub.g_compnames = db_pdb_GetComponentNames;
+#ifdef PDB_WRITE
+    dbfile->pub.c_obj = db_pdb_WriteObject;      /*overloaded with w_obj*/
+    dbfile->pub.w_obj = db_pdb_WriteObject;      /*overloaded with c_obj*/
+    dbfile->pub.w_comp = db_pdb_WriteComponent;
+#endif
+
+    /* Curve functions */
+    dbfile->pub.g_cu = db_pdb_GetCurve;
+#ifdef PDB_WRITE
+    dbfile->pub.p_cu = db_pdb_PutCurve;
+#endif
+
+    /* Defvar functions */
+    dbfile->pub.g_defv = db_pdb_GetDefvars;
+#ifdef PDB_WRITE
+    dbfile->pub.p_defv = db_pdb_PutDefvars;
+#endif
+
+    /* Csgmesh functions */
+    dbfile->pub.g_csgm = db_pdb_GetCsgmesh;
+    dbfile->pub.g_csgv = db_pdb_GetCsgvar;
+    dbfile->pub.g_csgzl = db_pdb_GetCSGZonelist;
+#ifdef PDB_WRITE
+    dbfile->pub.p_csgm = db_pdb_PutCsgmesh;
+    dbfile->pub.p_csgv = db_pdb_PutCsgvar;
+    dbfile->pub.p_csgzl = db_pdb_PutCSGZonelist;
+#endif
+
+    /* Quadmesh functions */
+    dbfile->pub.g_qm = db_pdb_GetQuadmesh;
+    dbfile->pub.g_qv = db_pdb_GetQuadvar;
+#ifdef PDB_WRITE
+    dbfile->pub.p_qm = db_pdb_PutQuadmesh;
+    dbfile->pub.p_qv = db_pdb_PutQuadvar;
+#endif
+
+    /* Unstructured mesh functions */
+    dbfile->pub.g_um = db_pdb_GetUcdmesh;
+    dbfile->pub.g_uv = db_pdb_GetUcdvar;
+    dbfile->pub.g_fl = db_pdb_GetFacelist;
+    dbfile->pub.g_zl = db_pdb_GetZonelist;
+    dbfile->pub.g_phzl = db_pdb_GetPHZonelist;
+#ifdef PDB_WRITE
+    dbfile->pub.p_um = db_pdb_PutUcdmesh;
+    dbfile->pub.p_sm = db_pdb_PutUcdsubmesh;
+    dbfile->pub.p_uv = db_pdb_PutUcdvar;
+    dbfile->pub.p_fl = db_pdb_PutFacelist;
+    dbfile->pub.p_zl = db_pdb_PutZonelist;
+    dbfile->pub.p_zl2= db_pdb_PutZonelist2;
+    dbfile->pub.p_phzl= db_pdb_PutPHZonelist;
+#endif
+
+    /* Material functions */
+    dbfile->pub.g_ma = db_pdb_GetMaterial;
+    dbfile->pub.g_ms = db_pdb_GetMatspecies;
+#ifdef PDB_WRITE
+    dbfile->pub.p_ma = db_pdb_PutMaterial;
+    dbfile->pub.p_ms = db_pdb_PutMatspecies;
+#endif
+
+    /* Pointmesh functions */
+    dbfile->pub.g_pm = db_pdb_GetPointmesh;
+    dbfile->pub.g_pv = db_pdb_GetPointvar;
+#ifdef PDB_WRITE
+    dbfile->pub.p_pm = db_pdb_PutPointmesh;
+    dbfile->pub.p_pv = db_pdb_PutPointvar;
+#endif
+
+    /* Multiblock functions */
+    dbfile->pub.g_mm = db_pdb_GetMultimesh;
+    dbfile->pub.g_mmadj = db_pdb_GetMultimeshadj;
+    dbfile->pub.g_mv = db_pdb_GetMultivar;
+    dbfile->pub.g_mt = db_pdb_GetMultimat;
+    dbfile->pub.g_mms= db_pdb_GetMultimatspecies;
+#ifdef PDB_WRITE
+    dbfile->pub.p_mm = db_pdb_PutMultimesh;
+    dbfile->pub.p_mmadj = db_pdb_PutMultimeshadj;
+    dbfile->pub.p_mv = db_pdb_PutMultivar;
+    dbfile->pub.p_mt = db_pdb_PutMultimat;
+    dbfile->pub.p_mms= db_pdb_PutMultimatspecies;
+#endif
+
+    /* Compound arrays */
+    dbfile->pub.g_ca = db_pdb_GetCompoundarray;
+#ifdef PDB_WRITE
+    dbfile->pub.p_ca = db_pdb_PutCompoundarray;
+#endif
+
+    /* MRG trees and Groupel maps */
+    dbfile->pub.g_mrgt = db_pdb_GetMrgtree;
+    dbfile->pub.g_grplm = db_pdb_GetGroupelmap;
+    dbfile->pub.g_mrgv = db_pdb_GetMrgvar;
+#ifdef PDB_WRITE
+    dbfile->pub.p_mrgt = db_pdb_PutMrgtree;
+    dbfile->pub.p_grplm = db_pdb_PutGroupelmap;
+    dbfile->pub.p_mrgv = db_pdb_PutMrgvar;
+#endif
+
+    dbfile->pub.free_z = db_pdb_FreeCompressionResources;
+
+    dbfile->pub.sort_obo = db_pdb_SortObjectsByOffset;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_close
+ *
+ * Purpose:     Closes a PDB file and free the memory associated with
+ *              the file.
+ *
+ * Return:      Success:        NULL, usually assigned to the file
+ *                              pointer being closed as in:
+ *                                dbfile = db_pdb_close (dbfile) ;
+ *
+ *              Failure:        Never fails.
+ *
+ * Programmer:  matzke at viper
+ *              Wed Nov  2 13:42:25 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Feb 27 15:55:01 PST 1995
+ *    I changed the return value to be an integer instead of a pointer
+ *    to a DBfile.
+ *
+ *    Sean Ahern, Mon Jul  1 14:05:38 PDT 1996
+ *    Turned off the PJgroup cache when we close files.
+ *
+ *    Sean Ahern, Tue Oct 20 17:21:18 PDT 1998
+ *    Reformatted whitespace.
+ *
+ *    Sean Ahern, Mon Nov 23 17:29:17 PST 1998
+ *    Added clearing of the object cache when the file is closed.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_close(DBfile *_dbfile)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+
+   if (dbfile)
+   {
+      /*
+       * Free the private parts of the file.
+       */
+      lite_PD_close(dbfile->pdb);
+      dbfile->pdb = NULL;
+
+      /* We've closed a file, so we can't cache PJgroups any more */
+      PJ_NoCache();
+
+      /*
+       * Free the public parts of the file.
+       */
+      silo_db_close(_dbfile);
+
+      /* Clear the current object cache. */
+      PJ_ClearCache();
+   }
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_Open
+ *
+ * Purpose:     Opens a PDB file that already exists.
+ *
+ * Return:      Success:        ptr to the file structure
+ *
+ *              Failure:        NULL, db_errno set.
+ *
+ * Programmer:  matzke at viper
+ *              Wed Nov  2 13:15:16 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_pdb_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:36:13 EST 1995
+ *    I changed the call db_pdb_GetToc to DBNewToc.
+ *
+ *    Sean Ahern, Sun Oct  1 03:05:08 PDT 1995
+ *    Made "me" static.
+ *
+ *    Sean Ahern, Sun Oct  1 06:09:25 PDT 1995
+ *    Fixed a parameter type problem.
+ *
+ *    Sean Ahern, Mon Jan  8 17:37:47 PST 1996
+ *    Added the mode parameter and accompanying logic.
+ *
+ *    Eric Brugger, Fri Jan 19 10:00:41 PST 1996
+ *    I checked to see if it is a netcdf flavor of pdb file.
+ *    If it is, then it returns NULL.
+ *
+ *    Sean Ahern, Fri Oct 16 17:46:57 PDT 1998
+ *    Reformatted whitespace.
+ *
+ *    Mark C. Miller, Wed Feb 25 09:37:48 PST 2009
+ *    Changed error code for failure to open to E_DRVRCANTOPEN
+ *-------------------------------------------------------------------------*/
+INTERNAL DBfile *
+db_pdb_Open(char *name, int mode, int opts_set_id)
+{
+    PDBfile        *pdb;
+    DBfile_pdb     *dbfile;
+    static char    *me = "db_pdb_Open";
+
+    if (!SW_file_exists(name))
+    {
+        db_perror(name, E_NOFILE, me);
+        return NULL;
+    } else if (!SW_file_readable(name))
+    {
+        db_perror("not readable", E_NOFILE, me);
+        return NULL;
+    }
+    if (mode == DB_READ)
+    {
+        if (NULL == (pdb = lite_PD_open(name, "r")))
+        {
+            db_perror(NULL, E_DRVRCANTOPEN, me);
+            return NULL;
+        }
+    } else if (mode == DB_APPEND)
+    {
+        if (NULL == (pdb = lite_PD_open(name, "a")))
+        {
+            db_perror(NULL, E_DRVRCANTOPEN, me);
+            return NULL;
+        }
+    } else
+    {
+        db_perror("mode", E_INTERNAL, me);
+        return (NULL);
+    }
+
+    /*
+     * If it is the netcdf flavor of pdb, then return NULL.
+     */
+#ifdef USING_PDB_PROPER
+    PD_set_track_pointers(pdb, FALSE);
+    if (NULL != SC_hasharr_lookup(pdb->symtab, "_whatami"))
+#else
+    if (NULL != lite_SC_lookup("_whatami", pdb->symtab))
+#endif
+    {
+        lite_PD_close(pdb);
+        return (NULL);
+    }
+
+    dbfile = ALLOC(DBfile_pdb);
+    memset(dbfile, 0, sizeof(DBfile_pdb));
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_PDB;
+#ifdef USING_PDB_PROPER
+    dbfile->pub.type = DB_PDBP;
+#endif
+    dbfile->pdb = pdb;
+    db_pdb_InitCallbacks((DBfile *) dbfile);
+    return (DBfile *) dbfile;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_Create
+ *
+ * Purpose:     Creates a PDB file and begins the process of writing
+ *              mesh and mesh-related data into that file.
+ *
+ *              NOTE: The `mode' parameter is unused.
+ *                    But it's caught at the DBCreate call.
+ *
+ * Return:      Success:        pointer to a new file
+ *
+ *              Failure:        NULL, db_errno set
+ *
+ * Programmer:  matzke at viper
+ *              Thu Nov  3 14:46:38 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_pdb_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:37:07 EST 1995
+ *    I changed the call db_pdb_GetToc to DBNewToc.
+ *
+ *    Sean Ahern, Sun Oct  1 03:05:32 PDT 1995
+ *    Made "me" static.
+ *
+ *    Sean Ahern, Wed Oct  4 17:13:16 PDT 1995
+ *    Fixed a parameter type problem.
+ *
+ *    Sean Ahern, Fri Oct 16 17:47:22 PDT 1998
+ *    Reformatted whitespace.
+ *
+ *    Hank Childs, Thu Jan  6 13:41:38 PST 2000
+ *    Put in cast to long of strlen to remove compiler warning.
+ *
+ *    Jeremy Meredith, Wed Oct 25 16:16:59 PDT 2000
+ *    Added DB_INTEL so we had a little-endian target.
+ *
+ *    Thomas R. Treadway, Wed Feb 28 11:36:34 PST 2007
+ *    Checked for compression option.
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+INTERNAL DBfile *
+db_pdb_Create (char *name, int mode, int target, int opts_set_id, char *finfo)
+{
+    DBfile_pdb     *dbfile;
+    static char    *me = "db_pdb_create";
+
+    if (SILO_Globals.enableChecksums)
+    {
+        db_perror(name, E_NOTIMP, "no checksums in PDB driver");
+        return NULL;
+    }
+    if (SILO_Globals.compressionParams)
+    {
+        db_perror(name, E_NOTIMP, "no compression in PDB driver");
+        return NULL;
+    }
+
+
+    /*
+     * The target type.
+     */
+    switch (target)
+    {
+    case DB_LOCAL:
+        break;
+    case DB_SUN3:
+        lite_PD_target(&lite_IEEEA_STD, &lite_M68000_ALIGNMENT);
+        break;
+    case DB_SUN4:
+        lite_PD_target(&lite_IEEEA_STD, &lite_SPARC_ALIGNMENT);
+        break;
+    case DB_SGI:
+        lite_PD_target(&lite_IEEEA_STD, &lite_MIPS_ALIGNMENT);
+        break;
+    case DB_RS6000:
+        lite_PD_target(&lite_IEEEA_STD, &lite_RS6000_ALIGNMENT);
+        break;
+    case DB_CRAY:
+        lite_PD_target(&lite_CRAY_STD, &lite_UNICOS_ALIGNMENT);
+        break;
+    case DB_INTEL:
+        lite_PD_target(&lite_IEEEA_STD, &lite_INTELA_ALIGNMENT);
+        break;
+    default:
+        db_perror("target", E_BADARGS, me);
+        return NULL;
+    }
+
+    if (NULL == (dbfile = ALLOC(DBfile_pdb)))
+    {
+        db_perror(name, E_NOMEM, me);
+        return NULL;
+    }
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_PDB;
+#ifdef USING_PDB_PROPER
+    dbfile->pub.type = DB_PDBP;
+#endif
+    db_pdb_InitCallbacks((DBfile *) dbfile);
+
+    if (NULL == (dbfile->pdb = lite_PD_open(name, "w")))
+    {
+        FREE(dbfile->pub.name);
+        db_perror(name, E_NOFILE, me);
+        return NULL;
+    }
+#ifdef USING_PDB_PROPER
+    PD_set_track_pointers(dbfile->pdb, FALSE);
+#endif
+    lite_PD_mkdir(dbfile->pdb, "/");
+    DBNewToc((DBfile *) dbfile);
+    if (finfo)
+    {
+        long    count = (long) strlen(finfo) + 1;
+
+        PJ_write_len(dbfile->pdb, "_fileinfo", "char", finfo, 1, &count);
+    }
+#ifdef USING_PDB_PROPER
+    {
+        long count = 1; 
+        int version_val = PDB_SYSTEM_VERSION;
+        PJ_write_len(dbfile->pdb, "_pdblibinfo", "integer", &version_val, 1, &count);
+    }
+#endif
+    return (DBfile *) dbfile;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_ForceSingle
+ *
+ * Purpose:     If status is non-zero, then force all double-precision
+ *              floating-point values to single precision.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  matzke at viper
+ *              Tue Jan 10 10:50:49 PST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+db_pdb_ForceSingle (int status)
+{
+   PJ_ForceSingle(status);
+   return 0;
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                                      PJ_ls
+ *
+ *  Purpose
+ *
+ *      Return a list of all variables of the specified type in the
+ *      specified directory.
+ *
+ *  Notes
+ *
+ *      Providing a NULL string for 'type' will cause the type check
+ *      to be avoided. Providing a NULL string for the directory path
+ *      will cause only the root directory to be searched.
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Fri Feb 24 10:37:43 EST 1995
+ *      This function just calls PD_ls().  But we must make sure that
+ *      the return value is allocated with the C memory management.
+ *
+ *      Robb Matzke, Fri Dec 2 13:20:38 PST 1994
+ *      Removed references to SCORE memory management.  The varlist
+ *      vector and the strings in that vector are allocated with
+ *      SCORE by lite_SC_hash_dump()--actually, the strings pointed to
+ *      by this vector should not be freed because they are in the
+ *      hash table.
+ *
+ *      Al Leibee, Mon Aug  9 10:30:54 PDT 1993
+ *      Convert to new PD_inquire_entry interface.
+ *
+ *      Al Leibee, Thu Jul  8 08:05:09 PDT 1993
+ *      FREE to SCFREE to be consistant with allocation.
+ *--------------------------------------------------------------------*/
+INTERNAL char **
+PJ_ls (PDBfile       *file, /* PDB file pointer */
+       char          *path, /* Path of dir to search (if NULL use '/') */
+       char          *type, /* Variable type to search for (else NULL) */
+       int           *num)  /* Returned number of matches */
+{
+   char         **score_out, **malloc_out;
+
+   score_out = lite_PD_ls(file, path, type, num);
+   malloc_out = ALLOC_N(char *, *num + 1);
+   memcpy(malloc_out, score_out, *num * sizeof(char *));
+
+   malloc_out[*num] = NULL;
+   lite_SC_free(score_out);
+   return malloc_out;
+}
+
+/*--------------------------------------------------------------------
+ *  Routine                                            PJ_get_fullpath
+ *
+ *  Purpose
+ *
+ *      Generate a full pathname from the current working directory
+ *      and the given pathname (abs/rel)
+ *
+ *  Notes
+ *
+ *      This routine is for internal use only. Not for user-level.
+ *
+ *      Robb Matzke, Fri Feb 24 10:40:39 EST 1995
+ *      Removed the call to PJ_file_has_dirs() and we assume that all
+ *      files support directories.
+ *
+ *      Sean Ahern, Fri Oct 16 17:47:44 PDT 1998
+ *      Reformatted whitespace.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+PJ_get_fullpath(
+   PDBfile       *file,
+   char          *cwd,         /* Current working directory */
+   char          *path,        /* Pathname (abs or rel) to traverse */
+   char          *name)        /* Returned adjusted name */
+{
+    int             ierr;
+    char           *subpath;
+    char            tmpstr[256];
+
+    if (file == NULL || cwd == NULL || path == NULL || name == NULL)
+        return (FALSE);
+
+    ierr = 0;
+    name[0] = '\0';
+
+    /*
+     *  If using an absolute path just copy verbatim.
+     */
+    if (path[0] == '/')
+    {
+        strcpy(name, path);
+    } else
+    {
+
+        /*
+         *  Using a relative path.
+         *  Break path into slash-separated tokens, and process
+         *  each subpath individually.
+         */
+
+        strcpy(name, cwd);
+        strcpy(tmpstr, path);
+
+        subpath = (char *)strtok(tmpstr, "/");
+
+        while (subpath != NULL && !ierr)
+        {
+
+            if (STR_EQUAL("/", subpath))
+            {
+
+                /* No-op */
+
+            } else if (STR_EQUAL(".", subpath))
+            {
+
+                /* No-op */
+
+            } else if (STR_EQUAL("..", subpath))
+            {
+
+                /* Go up one level, unless already at top */
+                if (!STR_EQUAL("/", cwd))
+                {
+                    char           *s;
+
+                    s = strrchr(name, '/');
+                    if (s != NULL)
+                        s[0] = '\0';
+                }
+            } else
+            {
+
+                /* Append to end of current path */
+                if (STR_LASTCHAR(name) != '/')
+                    strcat(name, "/");
+                strcat(name, subpath);
+            }
+            subpath = (char *)strtok(NULL, "/");
+        }
+    }
+
+    if (name[0] == '\0')
+        strcpy(name, "/");
+
+    return (TRUE);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_getobjinfo
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Al Leibee, Fri Sep  3 10:54:47 PDT 1993
+ *    Error check on PJ_read.
+ *
+ *    Eric Brugger, Thu Feb  9 12:54:37 PST 1995
+ *    I modified the routine to read elements of the group structure
+ *    as "abc->type" instead of "abc.type".
+ *
+ *    Sean Ahern, Sun Oct  1 03:05:56 PDT 1995
+ *    Made "me" static.
+ *
+ *    Eric Brugger, Fri Dec  4 12:45:22 PST 1998
+ *    Added code to free ctype to eliminate a memory leak.
+ *-------------------------------------------------------------------------*/
+PRIVATE int
+db_pdb_getobjinfo (PDBfile       *pdb,
+                   char          *name, /* Name of object to inquire about */
+                   char          *type, /* Returned object type of 'name'  */
+                   int           *num)  /* Returned number of elements */
+{
+   char           newname[MAXNAME];
+   char          *ctype;
+   static char   *me = "db_pdb_getobjinfo";
+
+   if (!pdb)
+      return db_perror(NULL, E_NOFILE, me);
+   if (!name || !*name)
+      return db_perror("name", E_BADARGS, me);
+
+   *num = *type = 0;
+
+   sprintf(newname, "%s->type", name);
+   if (PJ_read(pdb, newname, &ctype) == FALSE) {
+      return db_perror("PJ_read", E_CALLFAIL, me);
+   }
+   strcpy(type, ctype);
+   SCFREE(ctype);
+
+   sprintf(newname, "%s->ncomponents", name);
+   PJ_read(pdb, newname, num);
+
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_getvarinfo
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *      Al Leibee, Wed Aug 18 15:59:26 PDT 1993
+ *      Convert to new PJ_inquire_entry interface.
+ *
+ *      Al Leibee, Mon Aug 30 15:13:50 PDT 1993
+ *      Use PD_inquire_host_type to get true data type size.
+ *
+ *      Sean Ahern, Sun Oct  1 03:06:20 PDT 1995
+ *      Made "me" static.
+ *
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *-------------------------------------------------------------------------*/
+PRIVATE int
+db_pdb_getvarinfo (PDBfile       *pdb,
+                   char          *name,     /*Name of var to inquire about */
+                   char          *type,     /*Returned datatype of 'name' */
+                   int           *num,      /*Returned number of elements */
+                   int           *size,     /*Returned element size */
+                   int            verbose)  /*Sentinel: 1=print error msgs*/
+{
+   int            is_ptr;
+   char           lastchar;
+   char          *s;
+   defstr        *dp;
+   syment        *ep;
+   static char   *me = "db_pdb_getvarinfo";
+
+   *num = *size = 0;
+   if (type)
+      type[0] = '\0';
+
+   /*
+    *  Get symbol table entry for requested variable.
+    */
+   ep = PJ_inquire_entry(pdb, name);
+   if (ep == NULL)
+      return db_perror("PJ_inquire_entry", E_CALLFAIL, me);
+
+   /* Assign values */
+   if (type)
+      strcpy(type, ep->type);
+
+   lastchar = STR_LASTCHAR(ep->type);
+   is_ptr = (lastchar == '*');
+
+   if (is_ptr) {
+      s = ALLOC_N(char, strlen(ep->type) + 1);
+
+      strcpy(s, ep->type);
+      s[strcspn(s, " *")] = '\0';
+
+      /* Get data size of primitive (non-pointer) unit */
+      dp = PD_inquire_host_type(pdb, s);
+      *size = dp->size;
+      *num = -1;              /* lite_SC_arrlen(values) / dp->size; */
+      if (verbose)
+         printf("Cannot query length of pointered variable.\n");
+
+      FREE(s);
+
+   }
+   else {
+      dp = PD_inquire_host_type(pdb, ep->type);
+      if (dp == NULL) {
+         if (verbose)
+            printf("Don't know about data of type: %s\n", ep->type);
+         return db_perror("PD_inquire_host_type", E_CALLFAIL, me);
+      }
+
+      /* Assign values */
+      *size = dp->size;
+      *num = ep->number;
+   }
+
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetDir
+ *
+ * Purpose:     Return the name of the current directory by copying the
+ *              name to the output buffer supplied.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 08:52:38 PST 1994
+ *
+ * Modifications:
+ *    Sean Ahern, Sun Oct  1 03:06:52 PDT 1995
+ *    Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetDir (DBfile *_dbfile, char *result)
+{
+   char          *p;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_GetDir";
+
+   if (!result)
+      return db_perror("result", E_BADARGS, me);
+   p = lite_PD_pwd(dbfile->pdb);
+   if (!p || !*p) {
+      db_perror("PD_pwd", E_CALLFAIL, me);
+      result[0] = '\0';
+      return -1;
+   }
+   strcpy(result, p);
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_NewToc
+ *
+ * Purpose:     Read the table of contents from the current directory
+ *              and make it the current table of contents for the file
+ *              pointer, freeing any previously existing table of contents.
+ *
+ * Notes
+ *
+ *              It is assumed that scalar values within the TOC have been
+ *              initialized to zero.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_errno set
+ *
+ * Programmer:  matzke at viper
+ *              Thu Nov  3 14:34:31 PST 1994
+ *
+ * Modifications
+ *    Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *    Changed FREE to SCFREE for consistant allocate/free usage.
+ *
+ *    Al Leibee, Wed Aug 18 15:59:26 PDT 1993
+ *    Convert to new PJ_inquire_entry interface.
+ *
+ *    Al Leibee, Mon Aug  1 16:16:00 PDT 1994
+ *    Added material species.
+ *
+ *    Robb Matzke, Tue Oct 25 09:46:48 PDT 1994
+ *    added compound arrays.
+ *
+ *    Robb Matzke, Fri Dec 2 14:05:57 PST 1994
+ *    Removed all references to SCORE memory management.  Local variable
+ *    `name' is now allocated on the stack instead of by memory management.
+ *
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I made it into an internal routine.
+ *
+ *    Eric Brugger, Thu Feb  9 12:54:37 PST 1995
+ *    I modified the routine to read elements of the group structure
+ *    as "abc->type" instead of "abc.type".
+ *
+ *    Eric Brugger, Thu Feb  9 15:07:29 PST 1995
+ *    I modified the routine to handle the obj in the table of contents.
+ *
+ *    Robb Matzke, Tue Feb 21 16:20:58 EST 1995
+ *    Removed references to the `id' fields of the DBtoc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:38:59 EST 1995
+ *    Changed the name from db_pdb_GetToc to db_pdb_NewToc.
+ *
+ *    Robb Matzke, Tue Mar 7 11:21:21 EST 1995
+ *    Changed this to a CALLBACK.
+ *
+ *    Katherine Price, Thu May 25 14:44:42 PDT 1995
+ *    Added multi-block materials.
+ *
+ *    Eric Brugger, Thu Jun 29 09:44:47 PDT 1995
+ *    I modified the routine so that directories would show up in the
+ *    table of contents.
+ *
+ *    Sean Ahern, Sun Oct  1 03:07:17 PDT 1995
+ *    Made "me" static.
+ *
+ *    Eric Brugger, Mon Oct 23 08:00:16 PDT 1995
+ *    I corrected a bug where the last character of a directory name
+ *    was always eliminated.  This was done to get rid to the terminating
+ *    '/' character in a directory name.  Well it turns out that not
+ *    all silo files have a '/' at the end of a directory name.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added multi-block species.
+ *
+ *    Jeremy Meredith, Nov 17 1998
+ *    Added initialization of imultimatspecies.
+ *
+ *    Eric Brugger, Fri Dec  4 12:45:22 PST 1998
+ *    Added code to free ctype to eliminate a memory leak.
+ *
+ *    Hank Childs, Thu Jan  6 13:33:21 PST 2000
+ *    Removed print statement that appears to be a debugging relic.
+ *
+ *    Robb Matzke, Fri May 19 13:18:36 EDT 2000
+ *    Avoid malloc(0)/calloc(0) since the behavior is undefined by Posix.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_NewToc (DBfile *_dbfile)
+{
+#define PJDIR  -10
+#define PJVAR  -11
+
+   int            i, lstr, num;
+   int           *types=NULL;
+   int            ivar, iqmesh, iqvar, iumesh, iuvar, icurve, idir, iarray,
+      imat, imatspecies, imultimesh, imultivar, imultimat, imultimatspecies,
+      ipmesh, iptvar, iobj, icsgmesh, icsgvar, idefvars, imultimeshadj,
+      imrgtrees, igroupelmaps, imrgvars;
+
+   DBtoc         *toc;
+   char          *ctype;
+   char         **list;        /* Names of everything in current directory */
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PDBfile       *file;        /* PDB file pointer  */
+   char           name[128];
+   static char   *me = "db_pdb_NewToc";
+
+   db_FreeToc(_dbfile);
+   dbfile->pub.toc = toc = db_AllocToc();
+
+   file = dbfile->pdb;
+
+   /*------------------------------------------------------------
+    *  Get count of each entity (var, dir, curve, etc.)
+    *  Start by getting list of everything in current dir,
+    *  then count occurences of each type. Build an array of types
+    *  which correspond to each item in list.
+    *  (list is allocated by malloc().  The strings it points
+    *  to should never be free since they are the strings stored in
+    *  the SCORE hash table used by PDB.
+    *------------------------------------------------------------*/
+   list = PJ_ls(file, ".", NULL, &num);
+   if (num) types = ALLOC_N(int, num);
+
+   for (i = 0; i < num; i++) {
+
+      syment        *ep;
+
+      ep = lite_PD_inquire_entry(file, list[i], TRUE, NULL);
+
+      if (ep == NULL) {
+         types[i] = 999999;
+         continue;
+      }
+
+      /*----------------------------------------
+       *  Directory
+       *----------------------------------------*/
+      if (STR_BEGINSWITH(ep->type, "Directory")) {
+         toc->ndir++;
+         types[i] = PJDIR;
+
+         /*----------------------------------------
+          *  Group (object)
+          *----------------------------------------*/
+      }
+      else if (STR_BEGINSWITH(ep->type, "Group")) {
+
+         /*
+          * Read the type field of each object and increment
+          * the appropriate count.
+          */
+         sprintf(name, "%s.type", list[i]);
+         if (!PJ_read(file, name, &ctype)) {
+            sprintf(name, "%s->type", list[i]);
+            if (!PJ_read(file, name, &ctype)) {
+               return db_perror("PJ_read", E_CALLFAIL, me);
+            }
+         }
+
+         types[i] = DBGetObjtypeTag(ctype);
+         SCFREE(ctype);
+
+         switch (types[i]) {
+         case DB_MULTIMESH:
+            toc->nmultimesh++;
+            break;
+         case DB_MULTIMESHADJ:
+            toc->nmultimeshadj++;
+            break;
+         case DB_MULTIVAR:
+            toc->nmultivar++;
+            break;
+         case DB_MULTIMAT:
+            toc->nmultimat++;
+            break;
+         case DB_MULTIMATSPECIES:
+            toc->nmultimatspecies++;
+            break;
+         case DB_CSGMESH:
+            toc->ncsgmesh++;
+            break;
+         case DB_CSGVAR:
+            toc->ncsgvar++;
+            break;
+         case DB_DEFVARS:
+            toc->ndefvars++;
+            break;
+         case DB_QUADMESH:
+         case DB_QUAD_RECT:
+         case DB_QUAD_CURV:
+            toc->nqmesh++;
+            break;
+         case DB_QUADVAR:
+            toc->nqvar++;
+            break;
+         case DB_UCDMESH:
+            toc->nucdmesh++;
+            break;
+         case DB_UCDVAR:
+            toc->nucdvar++;
+            break;
+         case DB_POINTMESH:
+            toc->nptmesh++;
+            break;
+         case DB_POINTVAR:
+            toc->nptvar++;
+            break;
+         case DB_CURVE:
+            toc->ncurve++;
+            break;
+         case DB_MATERIAL:
+            toc->nmat++;
+            break;
+         case DB_MATSPECIES:
+            toc->nmatspecies++;
+            break;
+         case DB_ARRAY:
+            toc->narrays++;
+            break;
+         case DB_MRGTREE:
+            toc->nmrgtrees++;
+            break;
+         case DB_GROUPELMAP:
+            toc->ngroupelmaps++;
+            break;
+         case DB_MRGVAR:
+            toc->nmrgvars++;
+            break;
+         default:
+            toc->nobj++;
+            break;
+         }
+
+         /*----------------------------------------
+          *  Other (variable?)
+          *----------------------------------------*/
+      }
+      else {
+         types[i] = PJVAR;
+         toc->nvar++;
+      }
+   }
+
+   /*----------------------------------------------------------------------
+    *  Now all the counts have been made; allocate space.
+    *---------------------------------------------------------------------*/
+   if (toc->nvar > 0) {
+      toc->var_names = ALLOC_N(char *, toc->nvar);
+   }
+
+   if (toc->nobj > 0) {
+      toc->obj_names = ALLOC_N(char *, toc->nobj);
+   }
+
+   if (toc->ndir > 0) {
+      toc->dir_names = ALLOC_N(char *, toc->ndir);
+   }
+
+   if (toc->ncurve > 0) {
+      toc->curve_names = ALLOC_N(char *, toc->ncurve);
+   }
+
+   if (toc->ndefvars > 0) {
+      toc->defvars_names = ALLOC_N(char *, toc->ndefvars);
+   }
+
+   if (toc->nmultimesh > 0) {
+      toc->multimesh_names = ALLOC_N(char *, toc->nmultimesh);
+   }
+
+   if (toc->nmultimeshadj > 0) {
+      toc->multimeshadj_names = ALLOC_N(char *, toc->nmultimeshadj);
+   }
+
+   if (toc->nmultivar > 0) {
+      toc->multivar_names = ALLOC_N(char *, toc->nmultivar);
+   }
+
+   if (toc->nmultimat > 0) {
+      toc->multimat_names = ALLOC_N(char *, toc->nmultimat);
+   }
+
+   if (toc->nmultimatspecies > 0) {
+      toc->multimatspecies_names = ALLOC_N(char *, toc->nmultimatspecies);
+   }
+
+   if (toc->ncsgmesh > 0) {
+      toc->csgmesh_names = ALLOC_N(char *, toc->ncsgmesh);
+   }
+
+   if (toc->ncsgvar > 0) {
+      toc->csgvar_names = ALLOC_N(char *, toc->ncsgvar);
+   }
+
+   if (toc->nqmesh > 0) {
+      toc->qmesh_names = ALLOC_N(char *, toc->nqmesh);
+   }
+
+   if (toc->nqvar > 0) {
+      toc->qvar_names = ALLOC_N(char *, toc->nqvar);
+   }
+
+   if (toc->nucdmesh > 0) {
+      toc->ucdmesh_names = ALLOC_N(char *, toc->nucdmesh);
+   }
+
+   if (toc->nucdvar > 0) {
+      toc->ucdvar_names = ALLOC_N(char *, toc->nucdvar);
+   }
+
+   if (toc->nptmesh > 0) {
+      toc->ptmesh_names = ALLOC_N(char *, toc->nptmesh);
+   }
+
+   if (toc->nptvar > 0) {
+      toc->ptvar_names = ALLOC_N(char *, toc->nptvar);
+   }
+
+   if (toc->nmat > 0) {
+      toc->mat_names = ALLOC_N(char *, toc->nmat);
+   }
+
+   if (toc->nmatspecies > 0) {
+      toc->matspecies_names = ALLOC_N(char *, toc->nmatspecies);
+   }
+
+   if (toc->narrays > 0) {
+      toc->array_names = ALLOC_N(char *, toc->narrays);
+   }
+
+   if (toc->nmrgtrees > 0) {
+      toc->mrgtree_names = ALLOC_N(char *, toc->nmrgtrees);
+   }
+
+   if (toc->ngroupelmaps > 0) {
+      toc->groupelmap_names = ALLOC_N(char *, toc->ngroupelmaps);
+   }
+
+   if (toc->nmrgvars > 0) {
+      toc->mrgvar_names = ALLOC_N(char *, toc->nmrgvars);
+   }
+   /*----------------------------------------------------------------------
+    *  Now loop over all the items in the directory and store the
+    *  names and ID's
+    *---------------------------------------------------------------------*/
+   icurve = ivar = iqmesh = iqvar = iumesh = iuvar = idir = iarray = 0;
+   imultimesh = imultivar = imultimat = imat = imatspecies = ipmesh = 0;
+   iptvar = iobj = imultimatspecies = icsgmesh = icsgvar = idefvars = 0;
+   imultimeshadj = imrgtrees = igroupelmaps = imrgvars = 0 ;
+
+   for (i = 0; i < num; i++) {
+
+      switch (types[i]) {
+
+      case 999999:
+         /*The call to PD_inquire_entry() failed above. */
+         break;
+
+      case PJDIR:
+         /*
+          * After copying the directory name, eliminate
+          * the terminating '/' if one is present.
+          */
+         toc->dir_names[idir] = STRDUP(list[i]);
+         lstr = strlen(list[i]);
+         if (toc->dir_names[idir][lstr-1] == '/')
+            toc->dir_names[idir][lstr-1] = '\0';
+         idir++;
+         break;
+
+      case PJVAR:
+         toc->var_names[ivar] = STRDUP(list[i]);
+         ivar++;
+         break;
+
+      case DB_MULTIMESH:
+         toc->multimesh_names[imultimesh] = STRDUP(list[i]);
+         imultimesh++;
+         break;
+
+      case DB_MULTIMESHADJ:
+         toc->multimeshadj_names[imultimeshadj] = STRDUP(list[i]);
+         imultimeshadj++;
+         break;
+
+      case DB_MULTIVAR:
+         toc->multivar_names[imultivar] = STRDUP(list[i]);
+         imultivar++;
+         break;
+
+      case DB_MULTIMAT:
+         toc->multimat_names[imultimat] = STRDUP(list[i]);
+         imultimat++;
+         break;
+
+      case DB_MULTIMATSPECIES:
+         toc->multimatspecies_names[imultimatspecies] = STRDUP(list[i]);
+         imultimatspecies++;
+         break;
+
+      case DB_CSGMESH:
+         toc->csgmesh_names[icsgmesh] = STRDUP(list[i]);
+         icsgmesh++;
+         break;
+
+      case DB_CSGVAR:
+         toc->csgvar_names[icsgvar] = STRDUP(list[i]);
+         icsgvar++;
+         break;
+
+      case DB_DEFVARS:
+         toc->defvars_names[idefvars] = STRDUP(list[i]);
+         idefvars++;
+         break;
+
+      case DB_QUAD_RECT:
+      case DB_QUAD_CURV:
+      case DB_QUADMESH:
+         toc->qmesh_names[iqmesh] = STRDUP(list[i]);
+         iqmesh++;
+         break;
+
+      case DB_QUADVAR:
+         toc->qvar_names[iqvar] = STRDUP(list[i]);
+         iqvar++;
+         break;
+
+      case DB_UCDMESH:
+         toc->ucdmesh_names[iumesh] = STRDUP(list[i]);
+         iumesh++;
+         break;
+
+      case DB_UCDVAR:
+         toc->ucdvar_names[iuvar] = STRDUP(list[i]);
+         iuvar++;
+         break;
+
+      case DB_POINTMESH:
+         toc->ptmesh_names[ipmesh] = STRDUP(list[i]);
+         ipmesh++;
+         break;
+
+      case DB_POINTVAR:
+         toc->ptvar_names[iptvar] = STRDUP(list[i]);
+         iptvar++;
+         break;
+
+      case DB_CURVE:
+         toc->curve_names[icurve] = STRDUP(list[i]);
+         icurve++;
+         break;
+
+      case DB_MATERIAL:
+         toc->mat_names[imat] = STRDUP(list[i]);
+         imat++;
+         break;
+
+      case DB_MATSPECIES:
+         toc->matspecies_names[imatspecies] = STRDUP(list[i]);
+         imatspecies++;
+         break;
+
+      case DB_ARRAY:
+         toc->array_names[iarray] = STRDUP(list[i]);
+         iarray++;
+         break;
+
+      case DB_MRGTREE:
+         toc->mrgtree_names[imrgtrees] = STRDUP(list[i]);
+         imrgtrees++;
+         break;
+
+      case DB_GROUPELMAP:
+         toc->groupelmap_names[igroupelmaps] = STRDUP(list[i]);
+         igroupelmaps++;
+         break;
+
+      case DB_MRGVAR:
+         toc->mrgvar_names[imrgvars] = STRDUP(list[i]);
+         imrgvars++;
+         break;
+
+      default:
+         toc->obj_names[iobj] = STRDUP(list[i]);
+         iobj++;
+         break;
+      }
+   }
+
+   FREE(list);
+   if (types) FREE(types);
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_InqVarType
+ *
+ * Purpose:     Return the DBObjectType for a given object name
+ *
+ * Return:      Success:        the ObjectType for the given object
+ *
+ *              Failure:        DB_INVALID_OBJECT
+ *
+ * Programmer:  Sean Ahern,
+ *              Wed Oct 28 14:46:53 PST 1998
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Dec  4 12:45:22 PST 1998
+ *    Added code to free char_type to eliminate a memory leak.
+ *
+ *    Sean Ahern, Wed Dec  9 16:21:52 PST 1998
+ *    Added some checks of the return value of DBGetObjtypeTag to make sure
+ *    that we're returning a DBObjectType.
+ *
+ *    Sean Ahern, Thu Apr 29 16:24:16 PDT 1999
+ *    Added two checks, one is if the variable exists at all.  The other is to
+ *    add some logic to help PDB understand directories.
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:49:42 PST 1999
+ *    Removed type, which was unused.
+ *
+ *    Hank Childs, Thu Jan  6 13:46:02 PST 2000
+ *    Put in cast to remove compiler warning.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBObjectType
+db_pdb_InqVarType(DBfile *_dbfile, char *varname)
+{
+    DBfile_pdb     *dbfile = (DBfile_pdb *) _dbfile;
+    PDBfile        *file = dbfile->pdb;
+    char           *char_type = NULL;
+    char            name[256];
+    syment         *entry;
+    int             typetag;
+
+    /* First, check to see if it exists */
+    entry = lite_PD_inquire_entry(file, varname, TRUE, NULL);
+    if (entry == NULL)
+    {
+        /* This could be a directory.  Add a "/" to the end and try again. */
+        char *newname = (char*)malloc(strlen(varname)+2);
+        sprintf(newname,"%s/",varname);
+        entry = lite_PD_inquire_entry(file, newname, TRUE, NULL);
+        free(newname);
+
+        /* If it's NULL now, we really have an invalid object.  Otherwise,
+         * just drop out of the if, and continue. */
+        if (entry == NULL)
+            return(DB_INVALID_OBJECT);
+    }
+
+    /* Then, check to see if it's a directory. */
+    if (STR_BEGINSWITH(entry->type, "Directory"))
+        return(DB_DIR);
+    else if (STR_BEGINSWITH(entry->type, "Group"))
+    {
+        /* It's not a directory.  Ask PDB what the type is. */
+        sprintf(name, "%s.type", varname);
+        if (!PJ_read(file, name, &char_type))
+        {
+            sprintf(name, "%s->type", varname);
+            if (!PJ_read(file, name, &char_type))
+                return(DB_INVALID_OBJECT);
+        }
+        typetag = DBGetObjtypeTag(char_type);
+        SCFREE(char_type);
+        if ((typetag == DB_QUAD_RECT) || (typetag == DB_QUAD_CURV))
+            typetag = DB_QUADMESH;
+        return( (DBObjectType) typetag);
+    } else
+    {
+        return(DB_VARIABLE);
+    }
+
+    /* For stupid compilers */
+    /* NOTREACHED */
+    return(DB_INVALID_OBJECT);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetAtt
+ *
+ * Purpose:     Allocate space for, and read, the given attribute of the
+ *              given variable.
+ *
+ * Return:      Success:        pointer to result
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 08:06:45 PST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:07:41 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK void *
+db_pdb_GetAtt (DBfile *_dbfile, char *varname, char *attname)
+{
+   void          *result;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_GetAtt";
+
+   result = lite_PD_get_attribute(dbfile->pdb, varname, attname);
+   if (!result) {
+      db_perror("PD_get_attribute", E_CALLFAIL, me);
+      return NULL;
+   }
+   return result;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetObject
+ *
+ * Purpose:     Reads a group from a PDB file.
+ *
+ * Return:      Success:        Ptr to the new group, all memory allocated
+ *                              by malloc().
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.mdn.com
+ *              Jan 24, 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *
+ *    Mark C. Miller, Wed Jan 21 13:52:10 PST 2009
+ *    Removed #if 0 conditional compilation of PJ_rel_group call to fix
+ *    a leak.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBobject *
+db_pdb_GetObject (DBfile *_file, char *name)
+{
+   PJgroup      *group=NULL;
+   PDBfile      *file = ((DBfile_pdb *)_file)->pdb;
+   DBobject     *obj=NULL;
+   int          i;
+
+   if (!PJ_get_group (file, name, &group)) return NULL;
+
+   /*
+    * We build our own DBobject here instead of calling DBMakeObject
+    * because we have a character string type name instead of an
+    * integer type constant.
+    */
+   obj = malloc (sizeof (DBobject));
+   obj->name = safe_strdup (group->name);
+   obj->type = safe_strdup (group->type);
+   obj->ncomponents = obj->maxcomponents = group->ncomponents;
+   obj->comp_names = malloc (obj->maxcomponents * sizeof(char*));
+   obj->pdb_names  = malloc (obj->maxcomponents * sizeof(char*));
+
+   for (i=0; i<group->ncomponents; i++) {
+      obj->comp_names[i] = safe_strdup (group->comp_names[i]);
+      obj->pdb_names[i] = safe_strdup (group->pdb_names[i]);
+   }
+
+   PJ_rel_group (group);
+
+   return obj;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetMaterial
+ *
+ *  Purpose
+ *
+ *      Read a material-data object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Mon Nov 14 14:30:12 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Sean Ahern, Sun Oct  1 03:07:59 PDT 1995
+ *      Made "me" static.
+ *
+ *      Robb Matzke, 26 Aug 1997
+ *      The datatype is set from DB_DOUBLE to DB_FLOAT only if the
+ *      force-single flag is set.
+ *
+ *      Sean Ahern, Wed Jun 14 10:53:56 PDT 2000
+ *      Added a check to make sure the object we're reading is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Sean Ahern, Tue Feb  5 13:35:49 PST 2002
+ *      Added support for material names.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmaterial *
+db_pdb_GetMaterial(DBfile *_dbfile,     /*DB file pointer */
+                   char   *name)        /*Name of material object to return*/
+{
+    DBmaterial *mm = NULL;
+    DBfile_pdb *dbfile = (DBfile_pdb *) _dbfile;
+    static char *me = "db_pdb_GetMaterial";
+    PJcomplist tmp_obj;
+    char   *type = NULL;
+    char *tmpnames = NULL;
+    char *tmpcolors = NULL;
+    DBmaterial tmpmm;
+    memset(&tmpmm, 0, sizeof(DBmaterial));
+
+    /* Comp. Name        Comp. Address     Data Type     */
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("ndims",       &tmpmm.ndims,       DB_INT);
+    DEFINE_OBJ("dims",         tmpmm.dims,        DB_INT);
+    DEFINE_OBJ("major_order", &tmpmm.major_order, DB_INT);
+    DEFINE_OBJ("origin",      &tmpmm.origin,      DB_INT);
+    DEFALL_OBJ("meshid",      &tmpmm.meshname,    DB_CHAR);
+    DEFINE_OBJ("allowmat0",   &tmpmm.allowmat0,   DB_INT);
+    DEFINE_OBJ("guihide",     &tmpmm.guihide,     DB_INT);
+
+    DEFINE_OBJ("nmat",        &tmpmm.nmat,        DB_INT);
+    DEFINE_OBJ("mixlen",      &tmpmm.mixlen,      DB_INT);
+    DEFINE_OBJ("datatype",    &tmpmm.datatype,    DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBMatMatnos)
+        DEFALL_OBJ("matnos",      &tmpmm.matnos,      DB_INT);
+    if (SILO_Globals.dataReadMask & DBMatMatnames)
+        DEFALL_OBJ("matnames",    &tmpnames,        DB_CHAR);
+    if (SILO_Globals.dataReadMask & DBMatMatcolors)
+        DEFALL_OBJ("matcolors",    &tmpcolors,        DB_CHAR);
+    if (SILO_Globals.dataReadMask & DBMatMatlist)
+        DEFALL_OBJ("matlist",     &tmpmm.matlist,     DB_INT);
+    if (SILO_Globals.dataReadMask & DBMatMixList)
+    {
+        DEFALL_OBJ("mix_mat",     &tmpmm.mix_mat,     DB_INT);
+        DEFALL_OBJ("mix_next",    &tmpmm.mix_next,    DB_INT);
+        DEFALL_OBJ("mix_zone",    &tmpmm.mix_zone,    DB_INT);
+        DEFALL_OBJ("mix_vf",      &tmpmm.mix_vf,      DB_FLOAT);
+    }
+
+    if (PJ_GetObject(dbfile->pdb, name, &tmp_obj, &type) < 0)
+        return NULL;
+
+    if (NULL == (mm = DBAllocMaterial()))
+    {
+        db_perror("DBAllocMaterial", E_CALLFAIL, me);
+        return NULL;
+    }
+    *mm = tmpmm;
+
+    CHECK_TYPE(type,DB_MATERIAL,name);
+    _DBQQCalcStride(mm->stride, mm->dims, mm->ndims, mm->major_order);
+
+    /* If we have material names, restore it to an array of names.  In the
+     * file, it's stored as one string, with individual names separated by
+     * semicolons. */
+    if ((tmpnames != NULL) && (mm->nmat > 0))
+    {
+        char *s, *name;
+        int i;
+        char error[256];
+
+        mm->matnames = ALLOC_N(char *, mm->nmat);
+
+        s = &tmpnames[0];
+        name = (char *)strtok(s, ";");
+
+        for (i = 0; i < mm->nmat; i++)
+        {
+            mm->matnames[i] = STRDUP(name);
+
+            if (i + 1 < mm->nmat)
+            {
+                name = (char *)strtok(NULL, ";");
+                if (name == NULL)
+                {
+                    sprintf(error, "(%s) Not enough material names found\n", me);
+                    db_perror(error, E_INTERNAL, me);
+                }
+            }
+        }
+        FREE(tmpnames);
+    }
+    if ((tmpcolors != NULL) && (mm->nmat > 0))
+    {
+        mm->matcolors = DBStringListToStringArray(tmpcolors, mm->nmat,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(tmpcolors);
+    }
+
+    mm->id = 0;
+    mm->name = STRDUP(name);
+    if (DB_DOUBLE == mm->datatype && PJ_InqForceSingle())
+    {
+        mm->datatype = DB_FLOAT;
+    }
+
+    return (mm);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                       db_pdb_GetMatspecies
+ *
+ *  Purpose
+ *
+ *      Read a matspecies-data object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Tue Nov 29 13:29:57 PST 1994
+ *      Changed for device independence.
+ *
+ *      Al Leibee, Tue Jul 26 08:44:01 PDT 1994
+ *      Replaced composition by species.
+ *
+ *      Sean Ahern, Sun Oct  1 03:08:19 PDT 1995
+ *      Made "me" static.
+ *
+ *      Jeremy Meredith, Wed Jul  7 12:15:31 PDT 1999
+ *      I removed the origin value from the species object.
+ *
+ *      Sean Ahern, Wed Jun 14 17:19:12 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added names and colors for species.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmatspecies *
+db_pdb_GetMatspecies (DBfile *_dbfile,   /*DB file pointer */
+                      char   *objname)   /*Name of matspecies obj to return */
+{
+   char *type = NULL;
+   DBmatspecies  *mm;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_GetMatspecies";
+   char *tmpnames = NULL;
+   char *tmpcolors = NULL;
+   char           tmpstr[256];
+   PJcomplist     tmp_obj;
+   DBmatspecies   tmpmm;
+   int            i, nstrs = 0;
+   memset(&tmpmm, 0, sizeof(DBmatspecies));
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFALL_OBJ("matname", &tmpmm.matname, DB_CHAR);
+   DEFINE_OBJ("ndims", &tmpmm.ndims, DB_INT);
+   DEFINE_OBJ("dims", tmpmm.dims, DB_INT);
+   DEFINE_OBJ("major_order", &tmpmm.major_order, DB_INT);
+   DEFINE_OBJ("datatype", &tmpmm.datatype, DB_INT);
+   DEFINE_OBJ("nmat", &tmpmm.nmat, DB_INT);
+   DEFALL_OBJ("nmatspec", &tmpmm.nmatspec, DB_INT);
+   DEFINE_OBJ("nspecies_mf", &tmpmm.nspecies_mf, DB_INT);
+   DEFALL_OBJ("speclist", &tmpmm.speclist, DB_INT);
+   DEFINE_OBJ("mixlen", &tmpmm.mixlen, DB_INT);
+   DEFALL_OBJ("mix_speclist", &tmpmm.mix_speclist, DB_INT);
+   DEFINE_OBJ("guihide", &tmpmm.guihide, DB_INT);
+   if (SILO_Globals.dataReadMask & DBMatMatnames)
+       DEFALL_OBJ("species_names",    &tmpnames,        DB_CHAR);
+   if (SILO_Globals.dataReadMask & DBMatMatcolors)
+       DEFALL_OBJ("speccolors",    &tmpcolors,        DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+      return NULL;
+
+   if (NULL == (mm = DBAllocMatspecies())) {
+      db_perror("DBAllocMatspecies", E_CALLFAIL, me);
+      return NULL;
+   }
+   *mm = tmpmm;
+
+   CHECK_TYPE(type, DB_MATSPECIES, objname);
+
+   /* Now read in species_mf per its datatype. */
+   INIT_OBJ(&tmp_obj);
+
+   if (mm->datatype == 0) {
+      strcpy(tmpstr, objname);
+      strcat(tmpstr, "_data");
+      mm->datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmpstr);
+
+      if (mm->datatype < 0)
+         mm->datatype = DB_FLOAT;
+   }
+
+   if (mm->datatype == DB_DOUBLE && PJ_InqForceSingle())
+      mm->datatype = DB_FLOAT;
+
+   DEFALL_OBJ("species_mf", &mm->species_mf, mm->datatype);
+   PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL);
+
+   _DBQQCalcStride(mm->stride, mm->dims, mm->ndims, mm->major_order);
+
+   mm->id = 0;
+   mm->name = STRDUP(objname);
+
+   for (i=0; i < mm->nmat; i++)
+       nstrs += mm->nmatspec[i];
+   if (tmpnames != NULL)
+   {
+       if (nstrs > 0)
+          mm->specnames = DBStringListToStringArray(tmpnames, nstrs,
+              !handleSlashSwap, !skipFirstSemicolon);
+       FREE(tmpnames);
+   }
+   if (tmpcolors != NULL)
+   {
+       if (nstrs > 0)
+          mm->speccolors = DBStringListToStringArray(tmpcolors, nstrs,
+              !handleSlashSwap, !skipFirstSemicolon);
+       FREE(tmpcolors);
+   }
+
+   return (mm);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetCompoundarray
+ *
+ * Purpose:     Read a compound array object from a PDB data file.
+ *
+ * Return:      Success:        pointer to the new object
+ *
+ *              Failure:        NULL, db_errno set
+ *
+ * Programmer:  matzke at viper
+ *              Wed Nov  2 14:43:05 PST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:09:15 PDT 1995
+ *     Made "me" static.
+ *
+ *     Sean Ahern, Wed Jun 14 17:19:34 PDT 2000
+ *     Added a check to make sure the object is the right type.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBcompoundarray *
+db_pdb_GetCompoundarray (DBfile *_dbfile, char *array_name)
+{
+   char *type = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   DBcompoundarray *ca = NULL;
+   char          *s, delim[2], *name_vector = NULL;
+   static char   *me = "db_pdb_GetCompoundarray";
+   PJcomplist     tmp_obj;
+   DBcompoundarray tmpca;
+   memset(&tmpca, 0, sizeof(DBcompoundarray));
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+   DEFINE_OBJ("nelems", &tmpca.nelems, DB_INT);
+   DEFINE_OBJ("nvalues", &tmpca.nvalues, DB_INT);
+   DEFINE_OBJ("datatype", &tmpca.datatype, DB_INT);
+   DEFALL_OBJ("elemnames", &name_vector, DB_CHAR);
+   DEFALL_OBJ("elemlengths", &tmpca.elemlengths, DB_INT);
+   if (PJ_GetObject(dbfile->pdb, array_name, &tmp_obj, &type) < 0)
+       return NULL;
+   if (NULL == (ca = DBAllocCompoundarray()))
+      return NULL;
+   *ca = tmpca;
+
+   CHECK_TYPE(type, DB_ARRAY, array_name);
+   if (ca->nelems <= 0 || ca->nvalues <= 0 || ca->datatype < 0 ||
+       !name_vector) {
+      DBFreeCompoundarray(ca);
+      db_perror(array_name, E_NOTFOUND, me);
+      return NULL;
+   }
+
+   /*
+    *  Internally, the meshnames are stored in a single character
+    *  string as a delimited set of names. Here we break them into
+    *  separate names.  The delimiter is the first character of the
+    *  name vector.
+    */
+   if (name_vector && ca->nelems > 0) {
+      ca->elemnames = ALLOC_N(char *, ca->nelems);
+
+      delim[0] = name_vector[0];
+      delim[1] = '\0';
+      for (i = 0; i < ca->nelems; i++) {
+         s = strtok(i ? NULL : (name_vector + 1), delim);
+         ca->elemnames[i] = STRDUP(s);
+      }
+      FREE(name_vector);
+   }
+
+   /*
+    * Read the rest of the object--the vector of values, per datatype.
+    */
+   INIT_OBJ(&tmp_obj);
+   if (DB_DOUBLE == ca->datatype && PJ_InqForceSingle()) {
+      ca->datatype = DB_FLOAT;
+   }
+
+   DEFALL_OBJ("values", &ca->values, ca->datatype);
+   PJ_GetObject(dbfile->pdb, array_name, &tmp_obj, NULL);
+
+   ca->id = 0;
+   ca->name = STRDUP(array_name);
+
+   return ca;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetCurve
+ *
+ * Purpose:     Read a curve object from a PDB data file.
+ *
+ * Return:      Success:        pointer to the new object
+ *
+ *              Failure:        NULL, db_errno set
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 16, 1996
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Wed Jun 14 17:19:43 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Thomas R. Treadway, Fri Jul  7 11:43:41 PDT 2006
+ *      Added DBOPT_REFERENCE support.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBcurve *
+db_pdb_GetCurve (DBfile *_dbfile, char *name)
+{
+   char *type = NULL;
+   DBfile_pdb   *dbfile = (DBfile_pdb *) _dbfile ;
+   DBcurve      *cu ;
+   static char  *me = "db_pdb_GetCurve" ;
+   PJcomplist   tmp_obj ;
+   DBcurve tmpcu;
+   memset(&tmpcu, 0, sizeof(DBcurve));
+
+   INIT_OBJ (&tmp_obj) ;
+   DEFINE_OBJ ("npts", &tmpcu.npts, DB_INT) ;
+   DEFINE_OBJ ("datatype", &tmpcu.datatype, DB_INT) ;
+   DEFALL_OBJ ("label",    &tmpcu.title,    DB_CHAR) ;
+   DEFALL_OBJ ("xvarname", &tmpcu.xvarname, DB_CHAR) ;
+   DEFALL_OBJ ("yvarname", &tmpcu.yvarname, DB_CHAR) ;
+   DEFALL_OBJ ("xlabel",   &tmpcu.xlabel,   DB_CHAR) ;
+   DEFALL_OBJ ("ylabel",   &tmpcu.ylabel,   DB_CHAR) ;
+   DEFALL_OBJ ("xunits",   &tmpcu.xunits,   DB_CHAR) ;
+   DEFALL_OBJ ("yunits",   &tmpcu.yunits,   DB_CHAR) ;
+   DEFALL_OBJ ("reference",&tmpcu.reference,DB_CHAR) ;
+   DEFINE_OBJ ("guihide",  &tmpcu.guihide,  DB_INT) ;
+   if (PJ_GetObject (dbfile->pdb, name, &tmp_obj, &type)<0)
+       return NULL ;
+   if (NULL == (cu = DBAllocCurve ())) return NULL ;
+   *cu = tmpcu;
+
+   CHECK_TYPE(type, DB_CURVE, name);
+   if (cu->npts<=0)
+   {
+      DBFreeCurve (cu) ;
+      db_perror (name, E_NOTFOUND, me) ;
+      return NULL ;
+   }
+
+   if (DB_DOUBLE == cu->datatype && PJ_InqForceSingle())
+      cu->datatype = DB_FLOAT ;
+
+   /*
+    * Read the x and y arrays.
+    */
+   if (SILO_Globals.dataReadMask & DBCurveArrays)
+   {
+      if (cu->reference && (cu->x || cu->y)) {
+         db_perror ("x and y not NULL", E_BADARGS, me) ;
+         return NULL ;
+      } else if (cu->reference) {
+         cu->x = NULL;
+         cu->y = NULL;
+      } else {
+         INIT_OBJ (&tmp_obj) ;
+         DEFALL_OBJ ("xvals", &cu->x, cu->datatype) ;
+         DEFALL_OBJ ("yvals", &cu->y, cu->datatype) ;
+         PJ_GetObject (dbfile->pdb, name, &tmp_obj, NULL) ;
+      }
+   }
+
+   cu->id = 0 ;
+
+   return cu ;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetComponent
+ *
+ * Purpose:     Read a component value from the data file.
+ *
+ * Return:      Success:        pointer to component.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 08:26:55 PST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:10:32 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK void *
+db_pdb_GetComponent (DBfile *_dbfile, char *objname, char *compname)
+{
+   void          *result;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_GetComponent";
+
+   result = PJ_GetComponent(dbfile->pdb, objname, compname);
+   if (!result) {
+      db_perror("PJ_GetComponent", E_CALLFAIL, me);
+      return NULL;
+   }
+
+   return result;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetComponentType
+ *
+ * Purpose:     Read a component type from the data file.
+ *
+ * Return:      Success:        integer representing component type.
+ *
+ *              Failure:        DB_NOTYPE
+ *
+ * Programmer:  Brad Whitlock
+ *              Thu Jan 20 12:02:29 PDT 2000
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetComponentType (DBfile *_dbfile, char *objname, char *compname)
+{
+   int           retval = DB_NOTYPE;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+
+   retval = PJ_GetComponentType(dbfile->pdb, objname, compname);
+   return retval;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_GetDefvars
+ *
+ *  Purpose
+ *
+ *      Read a defvars structure from the given database.
+ *
+ *  Programmger
+ *
+ *      Mark C. Miller,
+ *      August 8, 2005
+ *
+ *  Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBdefvars *
+db_pdb_GetDefvars(DBfile *_dbfile, const char *objname)
+{
+   char *typestring = NULL;
+   DBdefvars     *defv = NULL;
+   int            ncomps, type;
+   char          *tmpnames, *tmpdefns, tmp[256];
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetDefvars";
+
+   db_pdb_getobjinfo(dbfile->pdb, (char *) objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   /* Read multi-block object */
+   if (type == DB_DEFVARS)
+   {
+       DBdefvars tmpdefv;
+       memset(&tmpdefv, 0, sizeof(DBdefvars));
+
+       INIT_OBJ(&tmp_obj);
+       DEFINE_OBJ("ndefs", &tmpdefv.ndefs, DB_INT);
+       DEFALL_OBJ("types", &tmpdefv.types, DB_INT);
+       DEFALL_OBJ("guihides", &tmpdefv.guihides, DB_INT);
+       DEFALL_OBJ("names", &tmpnames, DB_CHAR);
+       DEFALL_OBJ("defns", &tmpdefns, DB_CHAR);
+
+       if (PJ_GetObject(dbfile->pdb, (char *) objname, &tmp_obj, &typestring) < 0)
+           return NULL;
+       if ((defv = DBAllocDefvars(0)) == NULL)
+           return NULL;
+       *defv = tmpdefv;
+
+      CHECK_TYPE(typestring, DB_DEFVARS, objname);
+
+       if ((tmpnames != NULL) && (defv->ndefs > 0))
+       {
+           defv->names = DBStringListToStringArray(tmpnames, defv->ndefs,
+               !handleSlashSwap, !skipFirstSemicolon);
+           FREE(tmpnames);
+       }
+
+       if ((tmpdefns != NULL) && (defv->ndefs > 0))
+       {
+           defv->defns = DBStringListToStringArray(tmpdefns, defv->ndefs,
+               !handleSlashSwap, !skipFirstSemicolon);
+           FREE(tmpdefns);
+       }
+   }
+
+   return (defv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    pdb_getvarinfo
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+pdb_getvarinfo (PDBfile *pdbfile,
+                char    *name,    /*Name of variable to inquire about */
+                char    *type,    /*Returned datatype of 'name' */
+                int     *num,     /*Returned number of elements */
+                int     *size,    /*Returned element size */
+                int     verbose)  /*Sentinel: 1==print error msgs; 0==quiet*/
+{
+   int            is_ptr;
+   char           lastchar;
+   char          *s;
+   defstr        *dp;
+   syment        *ep;
+
+   *num = *size = 0;
+   if (type)
+      type[0] = '\0';
+
+   /*
+    *  Get symbol table entry for requested variable.
+    */
+   ep = PJ_inquire_entry(pdbfile, name);
+   if (ep == NULL)
+      return (OOPS);
+
+   /* Assign values */
+   if (type)
+      strcpy(type, ep->type);
+
+   lastchar = STR_LASTCHAR(ep->type);
+   if (lastchar == '*')
+      is_ptr = 1;
+   else
+      is_ptr = 0;
+
+   if (is_ptr) {
+      s = STRDUP(ep->type);
+      s[strcspn(s, " *")] = '\0';
+
+      /* Get data size of primitive (non-pointer) unit */
+      dp = PD_inquire_host_type(pdbfile, s);
+      *size = dp->size;
+      *num = -1;              /* lite_SC_arrlen(values) / dp->size; */
+      if (verbose)
+         printf("Cannot query length of pointered variable.\n");
+
+      FREE(s);
+
+   }
+   else {
+      dp = PD_inquire_host_type(pdbfile, ep->type);
+      if (dp == NULL) {
+         if (verbose)
+            printf("Don't know about data of type: %s\n", ep->type);
+         return (OOPS);
+      }
+
+      /* Assign values */
+      *size = dp->size;
+      *num = ep->number;
+   }
+
+   return (OKAY);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_GetMultimesh
+ *
+ *  Purpose
+ *
+ *      Read a multi-block-mesh structure from the given database. If the
+ *      requested object is not multi-block, return the information for
+ *      that one mesh only.
+ *
+ * Modifications
+ *    Al Leibee, Wed Jul  7 08:00:00 PDT 1993
+ *    Change SCALLOC_N to ALLOC_N and SC_strsave to STR_SAVE to be less
+ *    SCORE dependent.  Change FREE to SCFREE to be consistant with
+ *    allocation.
+ *
+ *    Robb Matzke, Mon Nov 14 14:37:33 EST 1994
+ *    Device independence rewrite.
+ *
+ *    Robb Matzke, Fri Dec 2 14:11:57 PST 1994
+ *    Removed references to SCORE memory management: `tmpnames'
+ *
+ *    Eric Brugger, Fri Jan 27 09:33:44 PST 1995
+ *    I modified the routine to return NULL unless the variable is
+ *    a multimesh.
+ *
+ *    Sean Ahern, Sun Oct  1 03:11:55 PDT 1995
+ *    Made "me" static.
+ *
+ *    Eric Brugger, Wed Jul  2 13:30:05 PDT 1997
+ *    Modify the call to DBAllocMultimesh to not allocate any arrays
+ *    in the multimesh structure.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Jeremy Meredith, Fri Jul 23 09:08:09 PDT 1999
+ *    Added a check to stop strtok from occurring past the end of the
+ *    array.  This was crashing the code intermittently.
+ *
+ *    Sean Ahern, Wed Jun 14 17:19:47 PDT 2000
+ *    Added a check to make sure the object is the right type.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *    Thomas R. Treadway, Thu Jul 20 13:34:57 PDT 2006
+ *    Added lgroupings, groupings, and groupnames options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Replaced strtok-loop over ...names member with call to
+ *   db_StringListToStringArray. Added logic to control behavior of
+ *   slash character swapping for windows/linux and skipping of first
+ *   semicolon in calls to db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmultimesh *
+db_pdb_GetMultimesh (DBfile *_dbfile, char *objname)
+{
+   char *typestring = NULL;
+   DBmultimesh   *mm = NULL;
+   int            ncomps, type;
+   char          *tmpnames=0, tmp[256];
+   char          *tmpgnames = 0;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetMultimesh";
+
+   db_pdb_getobjinfo(dbfile->pdb, objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   if (type == DB_MULTIMESH) {
+
+      DBmultimesh tmpmm;
+      memset(&tmpmm, 0, sizeof(DBmultimesh));
+
+      /* Read multi-block object */
+      INIT_OBJ(&tmp_obj);
+      DEFINE_OBJ("nblocks", &tmpmm.nblocks, DB_INT);
+      DEFINE_OBJ("ngroups", &tmpmm.ngroups, DB_INT);
+      DEFINE_OBJ("blockorigin", &tmpmm.blockorigin, DB_INT);
+      DEFINE_OBJ("grouporigin", &tmpmm.grouporigin, DB_INT);
+      DEFINE_OBJ("guihide", &tmpmm.guihide, DB_INT);
+      DEFALL_OBJ("meshids", &tmpmm.meshids, DB_INT);
+      DEFALL_OBJ("meshtypes", &tmpmm.meshtypes, DB_INT);
+      DEFALL_OBJ("meshnames", &tmpnames, DB_CHAR);
+      DEFALL_OBJ("meshdirs", &tmpmm.dirids, DB_INT);
+      DEFINE_OBJ("extentssize", &tmpmm.extentssize, DB_INT);
+      DEFALL_OBJ("extents", &tmpmm.extents, DB_DOUBLE);
+      DEFALL_OBJ("zonecounts", &tmpmm.zonecounts, DB_INT);
+      DEFALL_OBJ("has_external_zones", &tmpmm.has_external_zones, DB_INT);
+      DEFINE_OBJ("lgroupings", &tmpmm.lgroupings, DB_INT);
+      DEFALL_OBJ("groupings", &tmpmm.groupings, DB_INT);
+      DEFALL_OBJ("groupnames", &tmpgnames, DB_CHAR);
+      DEFALL_OBJ("mrgtree_name", &tmpmm.mrgtree_name, DB_CHAR);
+      DEFINE_OBJ("tv_connectivity", &tmpmm.tv_connectivity, DB_INT);
+      DEFINE_OBJ("disjoint_mode", &tmpmm.disjoint_mode, DB_INT);
+      DEFINE_OBJ("topo_dim", &tmpmm.topo_dim, DB_INT);
+      DEFALL_OBJ("file_ns", &tmpmm.file_ns, DB_CHAR);
+      DEFALL_OBJ("block_ns", &tmpmm.block_ns, DB_CHAR);
+      DEFINE_OBJ("block_type", &tmpmm.block_type, DB_INT);
+      DEFALL_OBJ("empty_list", &tmpmm.empty_list, DB_INT);
+      DEFINE_OBJ("empty_cnt", &tmpmm.empty_cnt, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &typestring) < 0)
+         return NULL;
+      if ((mm = DBAllocMultimesh(0)) == NULL)
+         return NULL;
+      *mm = tmpmm;
+
+      CHECK_TYPE(typestring, DB_MULTIMESH, objname);
+
+      /* The value we store to the file for 'topo_dim' member is
+         designed such that zero indicates a value that was NOT
+         specified in the file. Since zero is a valid topological
+         dimension, when we store topo_dim to a file, we always
+         add 1. So, we have to subtract it here. This was implemented
+         for multimeshes in 4.7 and so is handled correctly for
+         them in all cases. */
+       mm->topo_dim = mm->topo_dim - 1;
+
+      /*----------------------------------------
+       *  Internally, the meshnames and groupings 
+       *  iare stored in a single character string 
+       *  as a delimited set of names. Here we break
+       *  them into separate names.
+       *----------------------------------------*/
+
+      if ((tmpnames != NULL) && (mm->nblocks > 0)) {
+         mm->meshnames = DBStringListToStringArray(tmpnames, mm->nblocks,
+             handleSlashSwap, skipFirstSemicolon);
+         FREE(tmpnames);
+      }
+      if ((tmpgnames != NULL) && (mm->lgroupings > 0)) {
+         mm->groupnames = DBStringListToStringArray(tmpgnames, mm->lgroupings,
+             !handleSlashSwap, !skipFirstSemicolon);
+         FREE(tmpgnames);
+      }
+   }
+
+   return (mm);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                      db_pdb_GetMultimeshadj
+ *
+ *  Purpose
+ *
+ *      Read some or all of a multi-block-mesh adjacency object from
+ *      the given database.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmultimeshadj *
+db_pdb_GetMultimeshadj (DBfile *_dbfile, const char *objname, int nmesh,
+    const int *block_map)
+{
+   char *typestring = NULL;
+   DBmultimeshadj   *mmadj = NULL;
+   int            ncomps, type;
+   int            i, j, tmpnmesh;
+   char          tmp[256], *nlsname = 0, zlsname = 0;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetMultimeshadj";
+   char           tmpn[256];
+   int           *offsetmap, *offsetmapn=0, *offsetmapz=0, lneighbors, tmpoff;
+
+   db_pdb_getobjinfo(dbfile->pdb, (char*)objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   if (type == DB_MULTIMESHADJ) {
+
+      DBmultimeshadj tmpmmadj;
+      memset(&tmpmmadj, 0, sizeof(DBmultimeshadj));
+
+      /* Read multi-block object */
+      INIT_OBJ(&tmp_obj);
+      DEFINE_OBJ("nblocks", &tmpmmadj.nblocks, DB_INT);
+      DEFINE_OBJ("lneighbors", &tmpmmadj.lneighbors, DB_INT);
+      DEFINE_OBJ("totlnodelists", &tmpmmadj.totlnodelists, DB_INT);
+      DEFINE_OBJ("totlzonelists", &tmpmmadj.totlzonelists, DB_INT);
+      DEFINE_OBJ("blockorigin", &tmpmmadj.blockorigin, DB_INT);
+      DEFALL_OBJ("meshtypes", &tmpmmadj.meshtypes, DB_INT);
+      DEFALL_OBJ("nneighbors", &tmpmmadj.nneighbors, DB_INT);
+      DEFALL_OBJ("neighbors", &tmpmmadj.neighbors, DB_INT);
+      DEFALL_OBJ("back", &tmpmmadj.back, DB_INT);
+      DEFALL_OBJ("lnodelists", &tmpmmadj.lnodelists, DB_INT);
+      DEFALL_OBJ("lzonelists", &tmpmmadj.lzonelists, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, (char*)objname, &tmp_obj, &typestring) < 0)
+         return NULL;
+      if ((mmadj = DBAllocMultimeshadj(0)) == NULL)
+         return NULL;
+      *mmadj = tmpmmadj;
+
+      CHECK_TYPE(typestring, DB_MULTIMESHADJ, objname);
+
+       offsetmap = ALLOC_N(int, mmadj->nblocks);
+       lneighbors = 0;
+       for (i = 0; i < mmadj->nblocks; i++)
+       {
+           offsetmap[i] = lneighbors;
+           lneighbors += mmadj->nneighbors[i];
+       }
+
+       if (mmadj->lnodelists && (SILO_Globals.dataReadMask & DBMMADJNodelists))
+       {
+          mmadj->nodelists = ALLOC_N(int *, lneighbors); 
+          offsetmapn = ALLOC_N(int, mmadj->nblocks);
+          tmpoff = 0;
+          for (i = 0; i < mmadj->nblocks; i++)
+          {
+              offsetmapn[i] = tmpoff;
+              for (j = 0; j < mmadj->nneighbors[i]; j++)
+                 tmpoff += mmadj->lnodelists[offsetmap[i]+j];
+          }
+       }
+
+       if (mmadj->lzonelists && (SILO_Globals.dataReadMask & DBMMADJZonelists))
+       {
+          mmadj->zonelists = ALLOC_N(int *, lneighbors); 
+          offsetmapz = ALLOC_N(int, mmadj->nblocks);
+          tmpoff = 0;
+          for (i = 0; i < mmadj->nblocks; i++)
+          {
+              offsetmapz[i] = tmpoff;
+              for (j = 0; j < mmadj->nneighbors[i]; j++)
+                 tmpoff += mmadj->lzonelists[offsetmap[i]+j];
+          }
+       }
+       
+       tmpnmesh = nmesh;
+       if (nmesh <= 0 || !block_map)
+           tmpnmesh = mmadj->nblocks;
+
+       /* This loop could be optimized w.r.t. number of I/O requests
+          it makes. The nodelists and/or zonelists could be read in
+          a single call. But then we'd have to split it into separate
+          arrays duplicating memory */
+       for (i = 0; (i < tmpnmesh) &&
+                   (SILO_Globals.dataReadMask & (DBMMADJNodelists|DBMMADJZonelists)); i++)
+       {
+          int blockno = block_map ? block_map[i] : i;
+
+          if (mmadj->lnodelists && (SILO_Globals.dataReadMask & DBMMADJNodelists))
+          {
+             tmpoff = offsetmapn[blockno];
+             for (j = 0; j < mmadj->nneighbors[blockno]; j++)
+             {
+                long ind[3];
+                int len = mmadj->lnodelists[offsetmap[blockno]+j];
+                int *nlist = ALLOC_N(int, len);
+
+                ind[0] = tmpoff;
+                ind[1] = tmpoff + len - 1;
+                ind[2] = 1;
+                db_mkname(dbfile->pdb, (char*)objname, "nodelists", tmpn);
+                if (!PJ_read_alt(dbfile->pdb, tmpn, nlist, ind)) {
+                   FREE(offsetmap);
+                   FREE(offsetmapn);
+                   FREE(offsetmapz);
+                   db_perror("PJ_read_alt", E_CALLFAIL, me);
+                }
+
+                mmadj->nodelists[offsetmap[blockno]+j] = nlist;
+                tmpoff += len;
+             }
+          }
+
+          if (mmadj->lzonelists && (SILO_Globals.dataReadMask & DBMMADJZonelists))
+          {
+             tmpoff = offsetmapz[blockno];
+             for (j = 0; j < mmadj->nneighbors[blockno]; j++)
+             {
+                long ind[3];
+                int len = mmadj->lzonelists[offsetmap[blockno]+j];
+                int *zlist = ALLOC_N(int, len);
+
+                ind[0] = tmpoff;
+                ind[1] = tmpoff + len - 1;
+                ind[2] = 1;
+                db_mkname(dbfile->pdb, (char*)objname, "zonelists", tmpn);
+                if (!PJ_read_alt(dbfile->pdb, tmpn, zlist, ind)) {
+                   FREE(offsetmap);
+                   FREE(offsetmapn);
+                   FREE(offsetmapz);
+                   db_perror("PJ_read_alt", E_CALLFAIL, me);
+                }
+
+                mmadj->zonelists[offsetmap[blockno]+j] = zlist;
+                tmpoff += len;
+             }
+          }
+       }
+
+       FREE(offsetmap);
+       FREE(offsetmapn);
+       FREE(offsetmapz);
+   }
+
+   return (mmadj);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetMultivar
+ *
+ * Purpose:     Read a multi-block-var structure from the given database.
+ *
+ * Return:      Success:        ptr to a new structure
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 21 11:04:39 EST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Sun Oct  1 03:12:16 PDT 1995
+ *    Made "me" static.
+ *
+ *    Eric Brugger, Wed Jul  2 13:30:05 PDT 1997
+ *    Modify the call to DBAllocMultivar to not allocate any arrays
+ *    in the multivar structure.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Jeremy Meredith, Fri Jul 23 09:08:09 PDT 1999
+ *    Added a check to stop strtok from occurring past the end of the
+ *    array.  This was crashing the code intermittently.
+ *
+ *    Sean Ahern, Wed Jun 14 17:20:24 PDT 2000
+ *    Added a check to make sure the object is the right type.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *    Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *    Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Replaced strtok-loop over ...names member with call to
+ *   db_StringListToStringArray. Added logic to control behavior of
+ *   slash character swapping for windows/linux and skipping of first
+ *   semicolon in calls to db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBmultivar *
+db_pdb_GetMultivar (DBfile *_dbfile, char *objname)
+{
+   char *typestring = NULL;
+   DBmultivar    *mv = NULL;
+   int            ncomps, type;
+   char          *tmpnames=0, tmp[256];
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetMultivar";
+   char          *rpnames = NULL;
+
+   db_pdb_getobjinfo(dbfile->pdb, objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   if (type == DB_MULTIVAR) {
+
+      DBmultivar tmpmv;
+      memset(&tmpmv, 0, sizeof(DBmultivar));
+
+      /* Read multi-block object */
+      INIT_OBJ(&tmp_obj);
+      DEFINE_OBJ("nvars", &tmpmv.nvars, DB_INT);
+      DEFALL_OBJ("vartypes", &tmpmv.vartypes, DB_INT);
+      DEFALL_OBJ("varnames", &tmpnames, DB_CHAR);
+      DEFINE_OBJ("ngroups", &tmpmv.ngroups, DB_INT);
+      DEFINE_OBJ("blockorigin", &tmpmv.blockorigin, DB_INT);
+      DEFINE_OBJ("grouporigin", &tmpmv.grouporigin, DB_INT);
+      DEFINE_OBJ("extentssize", &tmpmv.extentssize, DB_INT);
+      DEFALL_OBJ("extents", &tmpmv.extents, DB_DOUBLE);
+      DEFINE_OBJ("guihide", &tmpmv.guihide, DB_INT);
+      DEFALL_OBJ("region_pnames", &rpnames, DB_CHAR);
+      DEFINE_OBJ("tensor_rank", &tmpmv.tensor_rank, DB_INT);
+      DEFALL_OBJ("mmesh_name", &tmpmv.mmesh_name, DB_CHAR);
+      DEFINE_OBJ("conserved", &tmpmv.conserved, DB_INT);
+      DEFINE_OBJ("extensive", &tmpmv.extensive, DB_INT);
+      DEFALL_OBJ("file_ns", &tmpmv.file_ns, DB_CHAR);
+      DEFALL_OBJ("block_ns", &tmpmv.block_ns, DB_CHAR);
+      DEFINE_OBJ("block_type", &tmpmv.block_type, DB_INT);
+      DEFALL_OBJ("empty_list", &tmpmv.empty_list, DB_INT);
+      DEFINE_OBJ("empty_cnt", &tmpmv.empty_cnt, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &typestring) < 0)
+         return NULL;
+      if ((mv = DBAllocMultivar(0)) == NULL)
+         return NULL;
+      *mv = tmpmv;
+      CHECK_TYPE(typestring, DB_MULTIVAR, objname);
+
+      /*----------------------------------------
+       *  Internally, the varnames are stored
+       *  in a single character string as a
+       *  delimited set of names. Here we break
+       *  them into separate names.
+       *----------------------------------------*/
+
+      if (tmpnames != NULL && mv->nvars > 0) {
+         mv->varnames = DBStringListToStringArray(tmpnames, mv->nvars,
+             handleSlashSwap, skipFirstSemicolon);
+         FREE(tmpnames);
+      }
+
+      if (rpnames != NULL)
+      {
+         mv->region_pnames = DBStringListToStringArray(rpnames, -1,
+             !handleSlashSwap, !skipFirstSemicolon);
+         FREE(rpnames);
+      }
+   }
+
+   return (mv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetMultimat
+ *
+ * Purpose:     Read a multi-material structure from the given database.
+ *
+ * Return:      Success:        ptr to a new structure
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 21 12:39:51 EST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Sun Oct  1 03:12:39 PDT 1995
+ *    Made "me" static.
+ *
+ *    Sean Ahern, Mon Jun 24 14:44:44 PDT 1996
+ *    Added better error checking to keep strtok from running off the
+ *    end of the tmpnames array,
+ *
+ *    Sean Ahern, Mon Jun 24 15:03:43 PDT 1996
+ *    Fixed a memory leak where mt->matnames was being allocated twice,
+ *    once in DBAllocMultimat, and once here.
+ *
+ *    Sean Ahern, Tue Jun 25 13:41:23 PDT 1996
+ *    Since we know that material names are delimited by ';', we don't
+ *    need the delim array.  Just use ";" instead.
+ *
+ *    Eric Brugger, Wed Jul  2 13:30:05 PDT 1997
+ *    Modify the call to DBAllocMultimat to not allocate any arrays
+ *    in the multimat structure.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Sean Ahern, Wed Jun 14 17:20:55 PDT 2000
+ *    Added a check to make sure the object is the right type.
+ *
+ *    Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *    Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *    var for PJ_GetObject to read into. Added check for return
+ *    value of PJ_GetObject.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added material_names and matcolors as well as nmatnos and matnos
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Replaced strtok-loop over ...names member with call to
+ *   db_StringListToStringArray. Added logic to control behavior of
+ *   slash character swapping for windows/linux and skipping of first
+ *   semicolon in calls to db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Thu Feb  4 11:14:20 PST 2010
+ *   Added missing logic for setting allowmat0.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBmultimat *
+db_pdb_GetMultimat (DBfile *_dbfile, char *objname)
+{
+   char *typestring = NULL;
+   DBmultimat    *mt = NULL;
+   int            ncomps, type;
+   char          *tmpnames=NULL, *s=NULL, *name=NULL, tmp[256];
+   char          *tmpmatcolors=NULL, *tmpmaterial_names=NULL;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetMultimat";
+
+   db_pdb_getobjinfo(dbfile->pdb, objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   if (type == DB_MULTIMAT) {
+
+      DBmultimat tmpmt;
+      memset(&tmpmt, 0, sizeof(DBmultimat));
+
+      /* Read multi-block object */
+      INIT_OBJ(&tmp_obj);
+      DEFINE_OBJ("nmats", &tmpmt.nmats, DB_INT);
+      DEFALL_OBJ("matnames", &tmpnames, DB_CHAR);
+      DEFINE_OBJ("ngroups", &tmpmt.ngroups, DB_INT);
+      DEFINE_OBJ("blockorigin", &tmpmt.blockorigin, DB_INT);
+      DEFINE_OBJ("grouporigin", &tmpmt.grouporigin, DB_INT);
+      DEFINE_OBJ("nmatnos", &tmpmt.nmatnos, DB_INT);
+      DEFALL_OBJ("matnos", &tmpmt.matnos, DB_INT);
+      DEFALL_OBJ("mixlens", &tmpmt.mixlens, DB_INT);
+      DEFALL_OBJ("matcounts", &tmpmt.matcounts, DB_INT);
+      DEFALL_OBJ("matlists", &tmpmt.matlists, DB_INT);
+      DEFINE_OBJ("guihide", &tmpmt.guihide, DB_INT);
+      DEFINE_OBJ("allowmat0", &tmpmt.allowmat0, DB_INT);
+      DEFALL_OBJ("material_names", &tmpmaterial_names, DB_CHAR);
+      DEFALL_OBJ("matcolors", &tmpmatcolors, DB_CHAR);
+      DEFALL_OBJ("mmesh_name", &tmpmt.mmesh_name, DB_CHAR);
+      DEFALL_OBJ("file_ns", &tmpmt.file_ns, DB_CHAR);
+      DEFALL_OBJ("block_ns", &tmpmt.block_ns, DB_CHAR);
+      DEFALL_OBJ("empty_list", &tmpmt.empty_list, DB_INT);
+      DEFINE_OBJ("empty_cnt", &tmpmt.empty_cnt, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &typestring) < 0)
+         return NULL;
+      if ((mt = DBAllocMultimat(0)) == NULL)
+         return NULL;
+      *mt = tmpmt;
+      CHECK_TYPE(typestring, DB_MULTIMAT, objname);
+
+      /*----------------------------------------
+       *  Internally, the material names are stored
+       *  in a single character string as a
+       *  delimited set of names. Here we break
+       *  them into separate names.
+       *----------------------------------------*/
+
+      if (tmpnames != NULL && mt->nmats > 0)
+      {
+          mt->matnames = DBStringListToStringArray(tmpnames, mt->nmats,
+              handleSlashSwap, skipFirstSemicolon);
+          FREE(tmpnames);
+      }
+
+      if (tmpmaterial_names && mt->nmatnos > 0)
+      {
+          mt->material_names = DBStringListToStringArray(tmpmaterial_names,
+              mt->nmatnos, !handleSlashSwap, !skipFirstSemicolon);
+          FREE(tmpmaterial_names);
+      }
+      if (tmpmatcolors && mt->nmatnos > 0)
+      {
+          mt->matcolors = DBStringListToStringArray(tmpmatcolors,
+              mt->nmatnos, !handleSlashSwap, !skipFirstSemicolon);
+          FREE(tmpmatcolors);
+      }
+   }
+
+   return (mt);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetMultimatspecies
+ *
+ * Purpose:     Read a multi-species structure from the given database.
+ *
+ * Return:      Success:        ptr to a new structure
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Jeremy S. Meredith
+ *              Sept 17 1998
+ *
+ * Modifications:
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Sean Ahern, Wed Jun 14 17:21:18 PDT 2000
+ *    Added a check to make sure the object is the right type.
+ *
+ *    Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *    Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *    var for PJ_GetObject to read into. Added check for return
+ *    value of PJ_GetObject.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added nmat and nmatspec
+ *
+ *    Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *    Added names and colors for species.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Replaced strtok-loop over ...names member with call to
+ *   db_StringListToStringArray. Added logic to control behavior of
+ *   slash character swapping for windows/linux and skipping of first
+ *   semicolon in calls to db_StringListToStringArray.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBmultimatspecies *
+db_pdb_GetMultimatspecies (DBfile *_dbfile, char *objname)
+{
+   char *typestring = NULL;
+   DBmultimatspecies *mms = NULL;
+   int                ncomps, type;
+   int                i, nstrs = 0;
+   char              *tmpnames=NULL, *s=NULL, *name=NULL, tmp[256];
+   char              *tmpspecnames=NULL, *tmpcolors=NULL;
+   DBfile_pdb        *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist         tmp_obj;
+   static char       *me = "db_pdb_GetMultimatspecies";
+
+   db_pdb_getobjinfo(dbfile->pdb, objname, tmp, &ncomps);
+   type = DBGetObjtypeTag(tmp);
+
+   if (type == DB_MULTIMATSPECIES) {
+
+      DBmultimatspecies tmpmms;
+      memset(&tmpmms, 0, sizeof(DBmultimatspecies));
+
+      /* Read multi-block object */
+      INIT_OBJ(&tmp_obj);
+      DEFINE_OBJ("nspec", &tmpmms.nspec, DB_INT);
+      DEFALL_OBJ("specnames", &tmpnames, DB_CHAR);
+      DEFINE_OBJ("ngroups", &tmpmms.ngroups, DB_INT);
+      DEFINE_OBJ("blockorigin", &tmpmms.blockorigin, DB_INT);
+      DEFINE_OBJ("grouporigin", &tmpmms.grouporigin, DB_INT);
+      DEFINE_OBJ("guihide", &tmpmms.guihide, DB_INT);
+      DEFINE_OBJ("nmat", &tmpmms.nmat, DB_INT);
+      DEFALL_OBJ("nmatspec", &tmpmms.nmatspec, DB_INT);
+      if (SILO_Globals.dataReadMask & DBMatMatnames)
+         DEFALL_OBJ("species_names", &tmpspecnames, DB_CHAR);
+      if (SILO_Globals.dataReadMask & DBMatMatcolors)
+         DEFALL_OBJ("speccolors", &tmpcolors, DB_CHAR);
+      DEFALL_OBJ("file_ns", &tmpmms.file_ns, DB_CHAR);
+      DEFALL_OBJ("block_ns", &tmpmms.block_ns, DB_CHAR);
+      DEFALL_OBJ("empty_list", &tmpmms.empty_list, DB_INT);
+      DEFINE_OBJ("empty_cnt", &tmpmms.empty_cnt, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &typestring) < 0)
+         return NULL;
+      if ((mms = DBAllocMultimatspecies(0)) == NULL)
+         return NULL;
+      *mms = tmpmms;
+      CHECK_TYPE(typestring, DB_MULTIMATSPECIES, objname);
+
+      /*----------------------------------------
+       *  Internally, the material species names
+       *  are stored in a single character string
+       *  as a delimited set of names. Here we
+       *  break them into separate names.
+       *----------------------------------------*/
+
+      if (tmpnames != NULL && mms->nspec > 0)
+      {
+          mms->specnames = DBStringListToStringArray(tmpnames, mms->nspec,
+              handleSlashSwap, skipFirstSemicolon);
+          FREE(tmpnames);
+      }
+
+      if (tmpspecnames != NULL)
+      {
+          for (i = 0; i < mms->nmat; i++)
+              nstrs += mms->nmatspec[i];
+          if (nstrs > 0)
+              mms->species_names = DBStringListToStringArray(tmpspecnames, nstrs,
+                  !handleSlashSwap, !skipFirstSemicolon);
+          FREE(tmpspecnames);
+      }
+      if (tmpcolors != NULL)
+      {
+          if (nstrs == 0)
+          {
+              for (i = 0; i < mms->nmat; i++)
+                  nstrs += mms->nmatspec[i];
+          }
+          if (nstrs > 0)
+              mms->speccolors = DBStringListToStringArray(tmpcolors, nstrs,
+                  !handleSlashSwap, !skipFirstSemicolon);
+          FREE(tmpcolors);
+      }
+   }
+
+   return (mms);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_GetPointmesh
+ *
+ *  Purpose
+ *
+ *      Read a point-mesh object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Robb Matzke, Mon Nov 14 15:49:15 EST 1994
+ *      Device independence rewrite
+ *
+ *      Robb Matzke, 27 Aug 1997
+ *      The datatype is changed to DB_FLOAT only if it was DB_DOUBLE
+ *      and force_single is turned on.
+ *
+ *      Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *      Added group_no.
+ *
+ *      Sean Ahern, Wed Jun 14 17:21:36 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBpointmesh *
+db_pdb_GetPointmesh (DBfile *_dbfile, char *objname)
+{
+   char *type = NULL;
+   DBpointmesh   *pm = NULL;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   static char *me = "db_pdb_GetPointmesh";
+   DBpointmesh tmppm;
+   memset(&tmppm, 0, sizeof(DBpointmesh));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("block_no", &tmppm.block_no, DB_INT);
+   DEFINE_OBJ("group_no", &tmppm.group_no, DB_INT);
+   DEFINE_OBJ("cycle", &tmppm.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmppm.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmppm.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmppm.datatype, DB_INT);
+   DEFINE_OBJ("ndims", &tmppm.ndims, DB_INT);
+   DEFINE_OBJ("nels", &tmppm.nels, DB_INT);
+   DEFINE_OBJ("origin", &tmppm.origin, DB_INT);
+   DEFINE_OBJ("gnznodtype", &tmppm.gnznodtype, DB_INT);
+
+   DEFINE_OBJ("min_extents", tmppm.min_extents, DB_FLOAT);
+   DEFINE_OBJ("max_extents", tmppm.max_extents, DB_FLOAT);
+
+   DEFINE_OBJ("guihide", &tmppm.guihide, DB_INT);
+   DEFALL_OBJ("mrgtree_name", &tmppm.mrgtree_name, DB_CHAR);
+
+   if (SILO_Globals.dataReadMask & DBPMCoords)
+   {
+       DEFALL_OBJ("coord0", &tmppm.coords[0], DB_FLOAT);
+       DEFALL_OBJ("coord1", &tmppm.coords[1], DB_FLOAT);
+       DEFALL_OBJ("coord2", &tmppm.coords[2], DB_FLOAT);
+   }
+
+   DEFALL_OBJ("label0", &tmppm.labels[0], DB_CHAR);
+   DEFALL_OBJ("label1", &tmppm.labels[1], DB_CHAR);
+   DEFALL_OBJ("label2", &tmppm.labels[2], DB_CHAR);
+   DEFALL_OBJ("units0", &tmppm.units[0], DB_CHAR);
+   DEFALL_OBJ("units1", &tmppm.units[1], DB_CHAR);
+   DEFALL_OBJ("units2", &tmppm.units[2], DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+      return NULL;
+   if ((pm = DBAllocPointmesh()) == NULL)
+      return NULL;
+   *pm = tmppm;
+   CHECK_TYPE(type, DB_POINTMESH, objname);
+
+   /*
+    *  Read the remainder of the object: loop over all values
+    *  associated with this variable.
+    */
+   pm->gnznodtype = tmppm.gnznodtype?tmppm.gnznodtype:DB_INT;
+   if (SILO_Globals.dataReadMask & DBPMGlobNodeNo) {
+      INIT_OBJ(&tmp_obj);
+      DEFALL_OBJ("gnodeno", &tmppm.gnodeno, pm->gnznodtype);
+      pm->gnodeno = 0;
+      if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL)>=0)
+          pm->gnodeno = tmppm.gnodeno;
+   }
+
+   pm->id = 0;
+   pm->name = STRDUP(objname);
+   if (DB_DOUBLE==pm->datatype && PJ_InqForceSingle()) {
+      pm->datatype = DB_FLOAT;
+   }
+
+   return (pm);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetPointvar
+ *
+ *  Purpose
+ *
+ *      Read a point-var object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Robb Matzke, Mon Nov 14 15:58:36 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Sean Ahern, Fri May 24 17:35:58 PDT 1996
+ *      Added smarts for figuring out the datatype, similar to
+ *      db_pdb_GetUcdvar and db_pdb_GetQuadvar.
+ *
+ *      Sean Ahern, Fri May 24 17:36:31 PDT 1996
+ *      I corrected a possible bug where, if force single were on,
+ *      the datatype would only be set to DB_FLOAT if the datatype
+ *      had previously been DB_DOUBLE.  This ignored things like
+ *      DB_INT.
+ *
+ *      Eric Brugger, Fri Sep  6 08:12:40 PDT 1996
+ *      I removed the reading of "meshid" since it is not used and
+ *      is actually stored as a string in the silo files not an
+ *      integer.  This caused a memory overwrite which only hurt
+ *      things if the string was more than 104 characters.
+ *
+ *      Sam Wookey, Wed Jul  1 16:21:09 PDT 1998
+ *      Corrected the way we retrieve variables with nvals > 1.
+ *
+ *      Sean Ahern, Wed Jun 14 17:22:54 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Eric Brugger, Tue Mar  2 16:21:15 PST 2004
+ *      Modified the routine to use _ptvalstr for the names of the
+ *      components when the variable has more than one component.
+ *      Each component name needs to be a seperate string for things
+ *      to work properly, since a pointer to the string is stored and
+ *      not a copy of the string.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmeshvar *
+db_pdb_GetPointvar (DBfile *_dbfile, char *objname)
+{
+   char *type = NULL;
+   DBmeshvar     *mv = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   char           tmp[256];
+   static char *me = "db_pdb_GetPointvar";
+   char          *rpnames = NULL;
+   DBmeshvar tmpmv;
+   memset(&tmpmv, 0, sizeof(DBmeshvar));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("cycle", &tmpmv.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpmv.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpmv.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmpmv.datatype, DB_INT);
+   DEFINE_OBJ("ndims", &tmpmv.ndims, DB_INT);
+   DEFINE_OBJ("nels", &tmpmv.nels, DB_INT);
+   DEFINE_OBJ("nvals", &tmpmv.nvals, DB_INT);
+   DEFINE_OBJ("origin", &tmpmv.origin, DB_INT);
+
+   DEFALL_OBJ("label", &tmpmv.label, DB_CHAR);
+   DEFALL_OBJ("units", &tmpmv.units, DB_CHAR);
+   DEFALL_OBJ("meshid",&tmpmv.meshname, DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpmv.guihide, DB_INT);
+   DEFALL_OBJ("region_pnames", &rpnames, DB_CHAR);
+   DEFINE_OBJ("conserved", &tmpmv.conserved, DB_INT);
+   DEFINE_OBJ("extensive", &tmpmv.extensive, DB_INT);
+
+   if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+      return NULL;
+   if ((mv = DBAllocMeshvar()) == NULL)
+      return NULL;
+   *mv = tmpmv;
+   CHECK_TYPE(type, DB_POINTVAR, objname);
+
+   /*
+    *  Read the remainder of the object: loop over all values
+    *  associated with this variable.
+    */
+
+   if ((mv->nvals > 0) && (SILO_Globals.dataReadMask & DBPVData)) {
+      INIT_OBJ(&tmp_obj);
+
+      mv->vals = ALLOC_N(DB_DTPTR *, mv->nvals);
+
+      if (mv->datatype == 0) {
+          if(mv->nvals == 1)
+          {
+              sprintf(tmp, "%s_data", objname);
+          }
+          else
+          {
+              sprintf(tmp, "%s_0_data", objname);
+          }
+          if ((mv->datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmp)) < 0) {
+              /* Not found. Assume float. */
+              mv->datatype = DB_FLOAT;
+          }
+      }
+
+      if (PJ_InqForceSingle())
+          mv->datatype = DB_FLOAT;
+
+      if(mv->nvals == 1)
+      {
+          DEFALL_OBJ("_data", &mv->vals[0], DB_FLOAT);
+      }
+      else
+      {
+          for (i = 0; i < mv->nvals; i++)
+          {
+              DEFALL_OBJ(_ptvalstr[i], &mv->vals[i], DB_FLOAT);
+          }
+      }
+
+      PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL);
+   }
+
+   if (rpnames != NULL)
+   {
+      mv->region_pnames = DBStringListToStringArray(rpnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(rpnames);
+   }
+
+   mv->id = 0;
+   mv->name = STRDUP(objname);
+
+   return (mv);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetQuadmesh
+ *
+ *  Purpose
+ *
+ *      Read a quad-mesh object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Robb Matzke, Mon Nov 14 16:03:55 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Sean Ahern, Fri Aug  1 13:24:28 PDT 1997
+ *      Reformatted code through "indent".
+ *
+ *      Sean Ahern, Fri Aug  1 13:24:45 PDT 1997
+ *      Changed how the datatype is computed.  It used to be unconditionally
+ *      set to DB_FLOAT.  Now we only do that if we're doing a force single.
+ *
+ *      Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *      Added group_no and baseindex[].
+ *
+ *      Eric Brugger, Thu Aug 26 09:05:20 PDT 1999
+ *      I modified the routine to set the base_index field base on
+ *      the origin field when the base_index field is not defined in
+ *      the file.
+ *
+ *      Sean Ahern, Wed Jun 14 17:36:42 PDT 2000
+ *      Added checks to make sure the object has the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBquadmesh *
+db_pdb_GetQuadmesh (DBfile *_dbfile, char *objname)
+{
+    char *type = NULL;
+    DBquadmesh     *qm = NULL;
+    PJcomplist      tmp_obj;
+    DBfile_pdb     *dbfile = (DBfile_pdb *) _dbfile;
+    static char *me = "db_pdb_GetQuadmesh";
+    DBquadmesh tmpqm;
+    memset(&tmpqm, 0, sizeof(DBquadmesh));
+
+    tmpqm.base_index[0] = -99999;
+
+    /*------------------------------------------------------------*
+     * Comp. Name        Comp. Address     Data Type              *
+     *------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("block_no", &tmpqm.block_no, DB_INT);
+    DEFINE_OBJ("group_no", &tmpqm.group_no, DB_INT);
+    DEFINE_OBJ("cycle", &tmpqm.cycle, DB_INT);
+    DEFINE_OBJ("time", &tmpqm.time, DB_FLOAT);
+    DEFINE_OBJ("dtime", &tmpqm.dtime, DB_DOUBLE);
+    DEFINE_OBJ("datatype", &tmpqm.datatype, DB_INT);
+    DEFINE_OBJ("coord_sys", &tmpqm.coord_sys, DB_INT);
+    DEFINE_OBJ("coordtype", &tmpqm.coordtype, DB_INT);
+    DEFINE_OBJ("facetype", &tmpqm.facetype, DB_INT);
+    DEFINE_OBJ("planar", &tmpqm.planar, DB_INT);
+    DEFINE_OBJ("ndims", &tmpqm.ndims, DB_INT);
+    DEFINE_OBJ("nspace", &tmpqm.nspace, DB_INT);
+    DEFINE_OBJ("nnodes", &tmpqm.nnodes, DB_INT);
+    DEFINE_OBJ("major_order", &tmpqm.major_order, DB_INT);
+    DEFINE_OBJ("origin", &tmpqm.origin, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBQMCoords)
+    {
+        DEFALL_OBJ("coord0", &tmpqm.coords[0], DB_FLOAT);
+        DEFALL_OBJ("coord1", &tmpqm.coords[1], DB_FLOAT);
+        DEFALL_OBJ("coord2", &tmpqm.coords[2], DB_FLOAT);
+    }
+    DEFALL_OBJ("label0", &tmpqm.labels[0], DB_CHAR);
+    DEFALL_OBJ("label1", &tmpqm.labels[1], DB_CHAR);
+    DEFALL_OBJ("label2", &tmpqm.labels[2], DB_CHAR);
+    DEFALL_OBJ("units0", &tmpqm.units[0], DB_CHAR);
+    DEFALL_OBJ("units1", &tmpqm.units[1], DB_CHAR);
+    DEFALL_OBJ("units2", &tmpqm.units[2], DB_CHAR);
+
+    DEFINE_OBJ("dims", tmpqm.dims, DB_INT);
+    DEFINE_OBJ("min_index", tmpqm.min_index, DB_INT);
+    DEFINE_OBJ("max_index", tmpqm.max_index, DB_INT);
+    DEFINE_OBJ("min_extents", tmpqm.min_extents, DB_FLOAT);
+    DEFINE_OBJ("max_extents", tmpqm.max_extents, DB_FLOAT);
+    DEFINE_OBJ("baseindex", tmpqm.base_index, DB_INT);
+    DEFINE_OBJ("guihide", &tmpqm.guihide, DB_INT);
+    DEFALL_OBJ("mrgtree_name", &tmpqm.mrgtree_name, DB_CHAR);
+
+    /* The type passed here to PJ_GetObject is NULL because quadmeshes can have
+     * one of two types:  DB_COLLINEAR or DB_NONCOLLINEAR.  */
+    if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+       return NULL;
+    if ((qm = DBAllocQuadmesh()) == NULL)
+       return NULL;
+    *qm = tmpqm;
+    if ((strcmp(type, DBGetObjtypeName(DB_QUAD_RECT)) != 0)
+        &&
+        (strcmp(type, DBGetObjtypeName(DB_QUAD_CURV)) != 0)
+       )
+    {
+        char error[256];
+        sprintf(error,"Requested %s object \"%s\" is not a quadmesh.",
+                type, objname);
+        FREE(type);
+        db_perror(error, E_INTERNAL, me);
+    } else {
+        FREE(type);
+    }
+
+    /*
+     * If base_index was not set with the PJ_GetObject call, then
+     * set it based on origin.
+     */
+    if (qm->base_index[0] == -99999)
+    {
+        int       i;
+
+        for (i = 0; i < qm->ndims; i++)
+        {
+            qm->base_index[i] = qm->origin;
+        }
+    }
+
+    qm->id = 0;
+    qm->name = STRDUP(objname);
+
+    if (PJ_InqForceSingle())
+        qm->datatype = DB_FLOAT;
+
+    _DBQMSetStride(qm);
+
+    return (qm);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetQuadvar
+ *
+ *  Purpose
+ *
+ *      Read a quad-var object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Wed Jul 20 07:56:37 PDT 1994
+ *      Added get of mixed zone data arrays.
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Robb Matzke, Mon Nov 14 17:02:44 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Sean Ahern, Fri Sep 29 18:39:08 PDT 1995
+ *      Requested DB_FLOATS instead of qv->datatype.
+ *
+ *      Sean Ahern, Fri May 24 17:20:00 PDT 1996
+ *      I corrected a possible bug where, if force single were on,
+ *      the datatype would only be set to DB_FLOAT if the datatype
+ *      had previously been DB_DOUBLE.  This ignored things like
+ *      DB_INT.
+ *
+ *      Robb Matzke, 19 Jun 1997
+ *      Reads the optional `ascii_labels' field.
+ *
+ *      Sean Ahern, Wed Jun 14 17:23:49 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Brad Whitlock, Wed Jul 21 12:05:56 PDT 2004
+ *      I fixed a coding error that prevented PJ_GetObject from
+ *      reading in labels and units for the quadvar.
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBquadvar *
+db_pdb_GetQuadvar (DBfile *_dbfile, char *objname)
+{
+   char *type = NULL;
+   DBquadvar     *qv = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   char           tmp[256];
+   static char *me = "db_pdb_GetQuadvar";
+   char          *rpnames = NULL;
+   DBquadvar tmpqv;
+   memset(&tmpqv, 0, sizeof(DBquadvar));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   /* Scalars */
+   DEFINE_OBJ("cycle", &tmpqv.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpqv.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpqv.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmpqv.datatype, DB_INT);
+   DEFINE_OBJ("centering", &tmpqv.centering, DB_INT);
+   DEFINE_OBJ("ndims", &tmpqv.ndims, DB_INT);
+   DEFINE_OBJ("major_order", &tmpqv.major_order, DB_INT);
+   DEFINE_OBJ("nels", &tmpqv.nels, DB_INT);
+   DEFINE_OBJ("nvals", &tmpqv.nvals, DB_INT);
+   DEFINE_OBJ("origin", &tmpqv.origin, DB_INT);
+   DEFINE_OBJ("mixlen", &tmpqv.mixlen, DB_INT);
+   DEFINE_OBJ("use_specmf", &tmpqv.use_specmf, DB_INT);
+   DEFINE_OBJ("ascii_labels", &tmpqv.ascii_labels, DB_INT);
+   DEFALL_OBJ("meshid", &tmpqv.meshname, DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpqv.guihide, DB_INT);
+   DEFINE_OBJ("conserved", &tmpqv.conserved, DB_INT);
+   DEFINE_OBJ("conserved", &tmpqv.extensive, DB_INT);
+
+   /* Arrays */
+   DEFINE_OBJ("min_index", tmpqv.min_index, DB_INT);
+   DEFINE_OBJ("max_index", tmpqv.max_index, DB_INT);
+   DEFINE_OBJ("dims", tmpqv.dims, DB_INT);
+   DEFINE_OBJ("align", tmpqv.align, DB_FLOAT);
+   DEFALL_OBJ("region_pnames", &rpnames, DB_CHAR);
+
+   /* Arrays that PJ_GetObject must allocate. */
+   DEFALL_OBJ("label", &tmpqv.label, DB_CHAR);
+   DEFALL_OBJ("units", &tmpqv.units, DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+      return NULL;
+   if ((qv = DBAllocQuadvar()) == NULL)
+      return NULL;
+   *qv = tmpqv;
+   CHECK_TYPE(type, DB_QUADVAR, objname);
+
+   /*
+    *  Read the remainder of the object: loop over all values
+    *  associated with this variable.
+    */
+
+   if ((qv->nvals > 0) && (SILO_Globals.dataReadMask & DBQVData)) {
+      INIT_OBJ(&tmp_obj);
+
+      qv->vals = ALLOC_N(DB_DTPTR *, qv->nvals);
+
+      if (qv->mixlen > 0) {
+         qv->mixvals = ALLOC_N(DB_DTPTR *, qv->nvals);
+      }
+
+      if (qv->datatype == 0) {
+         strcpy(tmp, objname);
+         strcat(tmp, "_data");
+         if ((qv->datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmp)) < 0) {
+            /* Not found. Assume float. */
+            qv->datatype = DB_FLOAT;
+         }
+      }
+
+      if (PJ_InqForceSingle())
+         qv->datatype = DB_FLOAT;
+
+      for (i = 0; i < qv->nvals; i++) {
+         DEFALL_OBJ(_valstr[i], &qv->vals[i], DB_FLOAT);
+
+         if (qv->mixlen > 0) {
+            DEFALL_OBJ(_mixvalstr[i], &qv->mixvals[i], DB_FLOAT);
+         }
+      }
+
+      PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL);
+   }
+
+   if (rpnames != NULL)
+   {
+      qv->region_pnames = DBStringListToStringArray(rpnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(rpnames);
+   }
+
+   qv->id = 0;
+   qv->name = STRDUP(objname);
+
+   _DBQQCalcStride(qv->stride, qv->dims, qv->ndims, qv->major_order);
+
+   return (qv);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBGetUcdmesh
+ *
+ *  Purpose
+ *
+ *      Read a ucd-mesh structure from the given database.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Parameters
+ *
+ *      DBGetUcdmesh  {Out}   {Pointer to DBucdmesh structure}
+ *      dbfile        {In}    {Pointer to current file}
+ *      meshname      {In}    {Name of ucdmesh to read}
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 15 10:54:15 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Eric Brugger, Wed Dec 11 13:01:52 PST 1996
+ *      I plugged some memory leaks by freeing flname, zlname and
+ *      elname at the end.
+ *
+ *      Eric Brugger, Tue Oct 20 12:46:53 PDT 1998
+ *      Modify the routine to read in the min_index and max_index
+ *      fields of the zonelist.
+ *
+ *      Eric Brugger, Tue Mar 30 11:17:58 PST 1999
+ *      Modify the routine to read in the shapetype field of the
+ *      zonelist.  This field is optional.
+ *
+ *      Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *      Added group_no, gnodeno, and gzoneno.
+ *
+ *      Sean Ahern, Wed Jun 14 17:24:07 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc calls to after PJ_GetObject. Added automatic
+ *      vars for PJ_GetObject to read into. Added checks for return
+ *      value of PJ_GetObject calls.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers. Protect
+ *      call to db_SplitShapelist if data read mask did not include
+ *      zonelist info.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBucdmesh *
+db_pdb_GetUcdmesh (DBfile *_dbfile, char *meshname)
+{
+   char *type = NULL;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   DBucdmesh     *um = NULL;
+   char          *flname = NULL, *zlname = NULL, *elname = NULL,
+                 *phzlname = NULL;
+   PJcomplist     tmp_obj;
+   int            lo_offset, hi_offset;
+   static char *me = "db_pdb_GetUcdmesh";
+   DBucdmesh tmpum;
+   memset(&tmpum, 0, sizeof(DBucdmesh));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("block_no", &tmpum.block_no, DB_INT);
+   DEFINE_OBJ("group_no", &tmpum.group_no, DB_INT);
+   DEFINE_OBJ("cycle", &tmpum.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpum.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpum.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmpum.datatype, DB_INT);
+   DEFINE_OBJ("coord_sys", &tmpum.coord_sys, DB_INT);
+   DEFINE_OBJ("topo_dim", &tmpum.topo_dim, DB_INT);
+   DEFINE_OBJ("ndims", &tmpum.ndims, DB_INT);
+   DEFINE_OBJ("nnodes", &tmpum.nnodes, DB_INT);
+   DEFINE_OBJ("origin", &tmpum.origin, DB_INT);
+
+   DEFINE_OBJ("min_extents", tmpum.min_extents, DB_FLOAT);
+   DEFINE_OBJ("max_extents", tmpum.max_extents, DB_FLOAT);
+
+   if (SILO_Globals.dataReadMask & DBUMCoords)
+   {
+       DEFALL_OBJ("coord0", &tmpum.coords[0], DB_FLOAT);
+       DEFALL_OBJ("coord1", &tmpum.coords[1], DB_FLOAT);
+       DEFALL_OBJ("coord2", &tmpum.coords[2], DB_FLOAT);
+   }
+   DEFALL_OBJ("label0", &tmpum.labels[0], DB_CHAR);
+   DEFALL_OBJ("label1", &tmpum.labels[1], DB_CHAR);
+   DEFALL_OBJ("label2", &tmpum.labels[2], DB_CHAR);
+   DEFALL_OBJ("units0", &tmpum.units[0], DB_CHAR);
+   DEFALL_OBJ("units1", &tmpum.units[1], DB_CHAR);
+   DEFALL_OBJ("units2", &tmpum.units[2], DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpum.guihide, DB_INT);
+   DEFINE_OBJ("gnznodtype", &tmpum.gnznodtype, DB_INT);
+
+   /* Get SILO ID's for other UCD mesh components */
+   DEFALL_OBJ("facelist", &flname, DB_CHAR);
+   DEFALL_OBJ("zonelist", &zlname, DB_CHAR);
+   DEFALL_OBJ("edgelist", &elname, DB_CHAR);
+
+   /* Optional polyhedral zonelist */
+   DEFALL_OBJ("phzonelist", &phzlname, DB_CHAR);
+
+   DEFALL_OBJ("mrgtree_name", &tmpum.mrgtree_name, DB_CHAR);
+   DEFINE_OBJ("tv_connectivity", &tmpum.tv_connectivity, DB_INT);
+   DEFINE_OBJ("disjoint_mode", &tmpum.disjoint_mode, DB_INT);
+
+   if (PJ_GetObject(dbfile->pdb, meshname, &tmp_obj, &type) < 0)
+      return NULL;
+   if ((um = DBAllocUcdmesh()) == NULL)
+      return NULL;
+   *um = tmpum;
+   CHECK_TYPE(type, DB_UCDMESH, meshname);
+
+   if (PJ_InqForceSingle() == TRUE)
+      um->datatype = DB_FLOAT;
+
+   um->id = 0;
+   um->name = STRDUP(meshname);
+
+   /* The value we store to the file for 'topo_dim' member is
+      designed such that zero indicates a value that was NOT
+      specified in the file. Since zero is a valid topological
+      dimension, when we store topo_dim to a file, we always
+      add 1. So, we have to subtract it here. However, this
+      data member was not being handled correctly in files
+      versions before 4.7. So, for older files, if topo_dim
+      is non-zero we just pass it without alteration. */
+   if (!DBFileVersionGE(_dbfile,4,5,1) || DBFileVersionGE(_dbfile, 4,7,0))
+       um->topo_dim = um->topo_dim - 1;
+
+   /* Optional global node number */
+   um->gnznodtype = um->gnznodtype?um->gnznodtype:DB_INT;
+   if (SILO_Globals.dataReadMask & DBUMGlobNodeNo) {
+      INIT_OBJ(&tmp_obj);
+      DEFALL_OBJ("gnodeno", &tmpum.gnodeno, um->gnznodtype);
+      um->gnodeno = 0;
+      if (PJ_GetObject(dbfile->pdb, meshname, &tmp_obj, NULL)>=0)
+          um->gnodeno = tmpum.gnodeno;
+   }
+
+   /* Read facelist, zonelist, and edgelist */
+
+   if ((flname != NULL && strlen(flname) > 0)
+       && (SILO_Globals.dataReadMask & DBUMFacelist))
+   {
+      DBfacelist tmpfaces;
+      memset(&tmpfaces, 0, sizeof(DBfacelist));
+
+
+      /*------------------------------------------------------------*/
+      /*          Comp. Name        Comp. Address     Data Type     */
+      /*------------------------------------------------------------*/
+      INIT_OBJ(&tmp_obj);
+
+      DEFINE_OBJ("ndims", &tmpfaces.ndims, DB_INT);
+      DEFINE_OBJ("nfaces", &tmpfaces.nfaces, DB_INT);
+      DEFINE_OBJ("lnodelist", &tmpfaces.lnodelist, DB_INT);
+      DEFINE_OBJ("nshapes", &tmpfaces.nshapes, DB_INT);
+      DEFINE_OBJ("ntypes", &tmpfaces.ntypes, DB_INT);
+      DEFINE_OBJ("origin", &tmpfaces.origin, DB_INT);
+
+      DEFALL_OBJ("nodelist", &tmpfaces.nodelist, DB_INT);
+      DEFALL_OBJ("shapesize", &tmpfaces.shapesize, DB_INT);
+      DEFALL_OBJ("shapecnt", &tmpfaces.shapecnt, DB_INT);
+      DEFALL_OBJ("typelist", &tmpfaces.typelist, DB_INT);
+      DEFALL_OBJ("types", &tmpfaces.types, DB_INT);
+      DEFALL_OBJ("zoneno", &tmpfaces.zoneno, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, flname, &tmp_obj, NULL) < 0)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      if ((um->faces = DBAllocFacelist()) == NULL)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      *(um->faces) = tmpfaces;
+
+   }
+
+   if ((zlname != NULL && strlen(zlname) > 0)
+       && (SILO_Globals.dataReadMask & DBUMZonelist))
+   {
+      DBzonelist tmpzones;
+      memset(&tmpzones, 0, sizeof(DBzonelist));
+
+      /*------------------------------------------------------------*/
+      /*          Comp. Name        Comp. Address     Data Type     */
+      /*------------------------------------------------------------*/
+      INIT_OBJ(&tmp_obj);
+
+      DEFINE_OBJ("ndims", &tmpzones.ndims, DB_INT);
+      DEFINE_OBJ("nzones", &tmpzones.nzones, DB_INT);
+      DEFINE_OBJ("nshapes", &tmpzones.nshapes, DB_INT);
+      DEFINE_OBJ("lnodelist", &tmpzones.lnodelist, DB_INT);
+      DEFINE_OBJ("origin", &tmpzones.origin, DB_INT);
+
+      DEFALL_OBJ("nodelist", &tmpzones.nodelist, DB_INT);
+      DEFALL_OBJ("shapetype", &tmpzones.shapetype, DB_INT);
+      DEFALL_OBJ("shapesize", &tmpzones.shapesize, DB_INT);
+      DEFALL_OBJ("shapecnt", &tmpzones.shapecnt, DB_INT);
+      DEFINE_OBJ("gnznodtype", &tmpzones.gnznodtype, DB_INT);
+
+      /*----------------------------------------------------------*/
+      /* These are optional so set them to their default values   */
+      /*----------------------------------------------------------*/
+      lo_offset = 0;
+      hi_offset = 0;
+      DEFINE_OBJ("lo_offset", &lo_offset, DB_INT);
+      DEFINE_OBJ("hi_offset", &hi_offset, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, zlname, &tmp_obj, &type) < 0)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      if ((um->zones = DBAllocZonelist()) == NULL)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      *(um->zones) = tmpzones;
+
+      CHECK_TYPE(type, DB_ZONELIST, zlname);
+
+      um->zones->min_index = lo_offset;
+      um->zones->max_index = um->zones->nzones - hi_offset - 1;
+
+      /*----------------------------------------------------------*/
+      /* If we have ghost zones, split any group of shapecnt so   */
+      /* all the shapecnt refer to all real zones or all ghost    */
+      /* zones.  This will make dealing with ghost zones easier   */
+      /* for applications.                                        */
+      /*----------------------------------------------------------*/
+      if ((lo_offset != 0 || hi_offset != 0) &&
+          SILO_Globals.dataReadMask & DBZonelistInfo)
+      {
+          db_SplitShapelist (um);
+      }
+
+      /* Read optional global zone numbers */
+      um->zones->gnznodtype = um->zones->gnznodtype?um->zones->gnznodtype:DB_INT;
+      if (SILO_Globals.dataReadMask & DBZonelistGlobZoneNo) {
+          INIT_OBJ(&tmp_obj);
+          DEFALL_OBJ("gzoneno", &tmpzones.gzoneno, um->zones->gnznodtype);
+          um->zones->gzoneno = 0;
+          if (PJ_GetObject(dbfile->pdb, zlname, &tmp_obj, NULL)>=0)
+              um->zones->gzoneno = tmpzones.gzoneno;
+      }
+
+   }
+
+   if (elname && *elname) {
+      DBedgelist tmpedges;
+      memset(&tmpedges, 0, sizeof(DBedgelist));
+
+
+      /*------------------------------------------------------------*/
+      /*          Comp. Name        Comp. Address     Data Type     */
+      /*------------------------------------------------------------*/
+      INIT_OBJ(&tmp_obj);
+
+      DEFINE_OBJ("ndims", &tmpedges.ndims, DB_INT);
+      DEFINE_OBJ("nedges", &tmpedges.nedges, DB_INT);
+      DEFINE_OBJ("origin", &tmpedges.origin, DB_INT);
+
+      DEFALL_OBJ("edge_beg", &tmpedges.edge_beg, DB_INT);
+      DEFALL_OBJ("edge_end", &tmpedges.edge_end, DB_INT);
+
+      if (PJ_GetObject(dbfile->pdb, elname, &tmp_obj, NULL) < 0)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      if ((um->edges = DBAllocEdgelist()) == NULL)
+      {
+         DBFreeUcdmesh(um);
+         return NULL;
+      }
+      *(um->edges) = tmpedges;
+   }
+
+   if (phzlname && *phzlname && (SILO_Globals.dataReadMask & DBUMZonelist)) {
+      um->phzones = db_pdb_GetPHZonelist(_dbfile, phzlname);
+   }
+
+   FREE (zlname);
+   FREE (flname);
+   FREE (elname);
+   FREE (phzlname);
+
+   return (um);
+
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetUcdvar
+ *
+ *  Purpose
+ *
+ *      Read a ucd-var object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Tue Apr 19 08:56:11 PDT 1994
+ *      Added dtime.
+ *
+ *      Robb Matzke, Tue Nov 15 11:05:44 EST 1994
+ *      Device independence rewrite.
+ *
+ *      Sean Ahern, Tue Dec  5 16:38:55 PST 1995
+ *      Added PDB logic to determine datatype
+ *      if it's not in the SILO file.
+ *
+ *      Eric Brugger, Thu May 23 10:02:33 PDT 1996
+ *      I corrected a bug where the datatype was being incorrectly set
+ *      to DOUBLE, if force single were on and the datatype was
+ *      specified in the silo file.
+ *
+ *      Sean Ahern, Fri May 24 17:20:00 PDT 1996
+ *      I corrected a possible bug where, if force single were on,
+ *      the datatype would only be set to DB_FLOAT if the datatype
+ *      had previously been DB_DOUBLE.  This ignored things like
+ *      DB_INT.
+ *
+ *      Eric Brugger, Fri Sep  6 08:12:40 PDT 1996
+ *      I removed the reading of "meshid" since it is not used and
+ *      is actually stored as a string in the silo files not an
+ *      integer.  This caused a memory overwrite which only hurt
+ *      things if the string was more than 48 characters.
+ *
+ *      Sean Ahern, Wed Jun 14 17:24:41 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Brad Whitlock, Wed Jan 18 15:07:57 PST 2006
+ *      Added optional ascii_labels.
+ *
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBucdvar *
+db_pdb_GetUcdvar (DBfile *_dbfile, char *objname)
+{
+   char *type = NULL;
+   DBucdvar      *uv = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   char           tmp[256];
+   static char *me = "db_pdb_GetUcdvar";
+   char          *rpnames = NULL;
+   DBucdvar tmpuv;
+   memset(&tmpuv, 0, sizeof(DBucdvar));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("cycle", &tmpuv.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpuv.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpuv.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmpuv.datatype, DB_INT);
+   DEFINE_OBJ("centering", &tmpuv.centering, DB_INT);
+   DEFINE_OBJ("ndims", &tmpuv.ndims, DB_INT);
+   DEFINE_OBJ("nels", &tmpuv.nels, DB_INT);
+   DEFINE_OBJ("nvals", &tmpuv.nvals, DB_INT);
+   DEFINE_OBJ("origin", &tmpuv.origin, DB_INT);
+   DEFINE_OBJ("mixlen", &tmpuv.mixlen, DB_INT);
+   DEFINE_OBJ("use_specmf", &tmpuv.use_specmf, DB_INT);
+   DEFINE_OBJ("ascii_labels", &tmpuv.ascii_labels, DB_INT);
+
+   DEFALL_OBJ("label", &tmpuv.label, DB_CHAR);
+   DEFALL_OBJ("units", &tmpuv.units, DB_CHAR);
+   DEFALL_OBJ("meshid",&tmpuv.meshname, DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpuv.guihide, DB_INT);
+   DEFALL_OBJ("region_pnames", &rpnames, DB_CHAR);
+   DEFINE_OBJ("conserved", &tmpuv.conserved, DB_INT);
+   DEFINE_OBJ("extensive", &tmpuv.extensive, DB_INT);
+
+   if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+      return NULL;
+   if ((uv = DBAllocUcdvar()) == NULL)
+      return NULL;
+   *uv = tmpuv;
+   CHECK_TYPE(type, DB_UCDVAR, objname);
+
+   /*
+    *  Read the remainder of the object: loop over all values
+    *  associated with this variable.
+    */
+   if ((uv->nvals > 0) && (SILO_Globals.dataReadMask & DBUVData)) {
+      INIT_OBJ(&tmp_obj);
+
+      uv->vals = ALLOC_N(DB_DTPTR *, uv->nvals);
+
+      if (uv->mixlen > 0) {
+         uv->mixvals = ALLOC_N(DB_DTPTR *, uv->nvals);
+      }
+
+      if (uv->datatype == 0) {
+          strcpy(tmp, objname);
+          strcat(tmp, "_data");
+          if ((uv->datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmp)) < 0) {
+              /* Not found. Assume float. */
+              uv->datatype = DB_FLOAT;
+          }
+      }
+
+      if (PJ_InqForceSingle())
+          uv->datatype = DB_FLOAT;
+
+      for (i = 0; i < uv->nvals; i++) {
+         DEFALL_OBJ(_valstr[i], &uv->vals[i], DB_FLOAT);
+
+         if (uv->mixlen > 0) {
+            DEFALL_OBJ(_mixvalstr[i], &uv->mixvals[i], DB_FLOAT);
+         }
+      }
+
+      PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL);
+   }
+
+   if (rpnames != NULL)
+   {
+      uv->region_pnames = DBStringListToStringArray(rpnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(rpnames);
+   }
+
+   uv->id = 0;
+   uv->name = STRDUP(objname);
+
+   return (uv);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBGetCsgmesh
+ *
+ *  Purpose
+ *
+ *      Read a CSG mesh structure from the given database.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller
+ *      August 9, 2005
+ *
+ *  Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBcsgmesh *
+db_pdb_GetCsgmesh (DBfile *_dbfile, const char *meshname)
+{
+   char *type = NULL;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   DBcsgmesh     *csgm = NULL;
+   char          *zlname = NULL, *tmpbndnames = NULL;
+   PJcomplist     tmp_obj;
+   static char *me = "db_pdb_GetCsgmesh";
+   DBcsgmesh tmpcsgm;
+   memset(&tmpcsgm, 0, sizeof(DBcsgmesh));
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("block_no", &tmpcsgm.block_no, DB_INT);
+   DEFINE_OBJ("group_no", &tmpcsgm.group_no, DB_INT);
+   DEFINE_OBJ("cycle", &tmpcsgm.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpcsgm.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpcsgm.dtime, DB_DOUBLE);
+   DEFINE_OBJ("lcoeffs", &tmpcsgm.lcoeffs, DB_INT);
+   DEFINE_OBJ("datatype", &tmpcsgm.datatype, DB_INT);
+   DEFINE_OBJ("ndims", &tmpcsgm.ndims, DB_INT);
+   DEFINE_OBJ("nbounds", &tmpcsgm.nbounds, DB_INT);
+   DEFINE_OBJ("origin", &tmpcsgm.origin, DB_INT);
+   DEFINE_OBJ("min_extents", tmpcsgm.min_extents, DB_DOUBLE);
+   DEFINE_OBJ("max_extents", tmpcsgm.max_extents, DB_DOUBLE);
+   DEFALL_OBJ("label0", &tmpcsgm.labels[0], DB_CHAR);
+   DEFALL_OBJ("label1", &tmpcsgm.labels[1], DB_CHAR);
+   DEFALL_OBJ("label2", &tmpcsgm.labels[2], DB_CHAR);
+   DEFALL_OBJ("units0", &tmpcsgm.units[0], DB_CHAR);
+   DEFALL_OBJ("units1", &tmpcsgm.units[1], DB_CHAR);
+   DEFALL_OBJ("units2", &tmpcsgm.units[2], DB_CHAR);
+   DEFALL_OBJ("csgzonelist", &zlname, DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpcsgm.guihide, DB_INT);
+   DEFALL_OBJ("mrgtree_name", &tmpcsgm.mrgtree_name, DB_CHAR);
+   DEFINE_OBJ("tv_connectivity", &tmpcsgm.tv_connectivity, DB_INT);
+   DEFINE_OBJ("disjoint_mode", &tmpcsgm.disjoint_mode, DB_INT);
+
+   if (SILO_Globals.dataReadMask & DBCSGMBoundaryInfo)
+   {
+       DEFALL_OBJ("typeflags", &tmpcsgm.typeflags, DB_INT);
+       DEFALL_OBJ("bndids", &tmpcsgm.bndids, DB_INT);
+   }
+
+   /* Optional boundary names */
+   if (SILO_Globals.dataReadMask & DBCSGMBoundaryNames)
+       DEFALL_OBJ("bndnames", &tmpbndnames, DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, (char*) meshname, &tmp_obj, &type) < 0)
+      return NULL;
+   CHECK_TYPE(type, DB_CSGMESH, meshname);
+
+    /* now that we know the object's data type, we can correctly
+       read the coeffs */
+    if ((SILO_Globals.dataReadMask & DBCSGMBoundaryInfo) && (tmpcsgm.lcoeffs > 0))
+    {
+        INIT_OBJ(&tmp_obj);
+        if (DB_DOUBLE == tmpcsgm.datatype && PJ_InqForceSingle()) {
+           tmpcsgm.datatype = DB_FLOAT;
+        }
+
+        DEFALL_OBJ("coeffs", &tmpcsgm.coeffs, tmpcsgm.datatype);
+        PJ_GetObject(dbfile->pdb, (char*) meshname, &tmp_obj, NULL);
+    }
+
+    if ((tmpbndnames != NULL) && (tmpcsgm.nbounds > 0))
+    {
+        tmpcsgm.bndnames = DBStringListToStringArray(tmpbndnames, tmpcsgm.nbounds,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(tmpbndnames);
+    }
+
+   tmpcsgm.name = STRDUP(meshname);
+
+   if ((zlname && *zlname && (SILO_Globals.dataReadMask & DBCSGMZonelist)))
+      tmpcsgm.zones = db_pdb_GetCSGZonelist(_dbfile, zlname);
+  
+   if ((csgm = DBAllocCsgmesh()) == NULL)
+      return NULL;
+   *csgm = tmpcsgm;
+
+   FREE (zlname);
+
+   return (csgm);
+
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetCsgvar
+ *
+ *  Purpose
+ *
+ *      Read a csg-var object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, August 10, 2005
+ *
+ *  Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBcsgvar *
+db_pdb_GetCsgvar (DBfile *_dbfile, const char *objname)
+{
+   char *type = NULL;
+   DBcsgvar      *csgv = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   char           tmp[256];
+   static char *me = "db_pdb_GetCsgvar";
+   char          *rpnames = NULL;
+   DBcsgvar tmpcsgv;
+   memset(&tmpcsgv, 0, sizeof(DBcsgvar));
+
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("cycle", &tmpcsgv.cycle, DB_INT);
+   DEFINE_OBJ("time", &tmpcsgv.time, DB_FLOAT);
+   DEFINE_OBJ("dtime", &tmpcsgv.dtime, DB_DOUBLE);
+   DEFINE_OBJ("datatype", &tmpcsgv.datatype, DB_INT);
+   DEFINE_OBJ("centering", &tmpcsgv.centering, DB_INT);
+   DEFINE_OBJ("nels", &tmpcsgv.nels, DB_INT);
+   DEFINE_OBJ("nvals", &tmpcsgv.nvals, DB_INT);
+   DEFINE_OBJ("ascii_labels", &tmpcsgv.ascii_labels, DB_INT);
+   DEFALL_OBJ("label", &tmpcsgv.label, DB_CHAR);
+   DEFALL_OBJ("units", &tmpcsgv.units, DB_CHAR);
+   DEFALL_OBJ("meshid",&tmpcsgv.meshname, DB_CHAR);
+   DEFINE_OBJ("guihide", &tmpcsgv.guihide, DB_INT);
+   DEFALL_OBJ("region_pnames", &rpnames, DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, (char*) objname, &tmp_obj, &type) < 0)
+      return NULL;
+   CHECK_TYPE(type, DB_CSGVAR, objname);
+
+   /*
+    *  Read the remainder of the object: loop over all values
+    *  associated with this variable.
+    */
+   if ((tmpcsgv.nvals > 0) && (SILO_Globals.dataReadMask & DBCSGVData)) {
+      INIT_OBJ(&tmp_obj);
+
+      tmpcsgv.vals = ALLOC_N(void *, tmpcsgv.nvals);
+
+      if (tmpcsgv.datatype == 0) {
+          strcpy(tmp, objname);
+          strcat(tmp, "_data");
+          if ((tmpcsgv.datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmp)) < 0) {
+              /* Not found. Assume float. */
+              tmpcsgv.datatype = DB_FLOAT;
+          }
+      }
+
+      if ((tmpcsgv.datatype == DB_DOUBLE) && PJ_InqForceSingle())
+          tmpcsgv.datatype = DB_FLOAT;
+
+      for (i = 0; i < tmpcsgv.nvals; i++) {
+         DEFALL_OBJ(_valstr[i], &tmpcsgv.vals[i], tmpcsgv.datatype);
+      }
+
+      PJ_GetObject(dbfile->pdb, (char*) objname, &tmp_obj, NULL);
+   }
+
+   if (rpnames != NULL)
+   {
+      csgv->region_pnames = DBStringListToStringArray(rpnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(rpnames);
+   }
+
+   tmpcsgv.name = STRDUP(objname);
+
+   if ((csgv = DBAllocCsgvar()) == NULL)
+      return NULL;
+   *csgv = tmpcsgv;
+
+   return (csgv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetFacelist
+ *
+ * Purpose:     Reads a facelist object from a SILO file.
+ *
+ * Return:      Success:        A pointer to a new facelist structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, January 14, 2000
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Wed Jun 14 17:24:58 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBfacelist *
+db_pdb_GetFacelist(DBfile *_dbfile, char *objname)
+{
+    char *type = NULL;
+    DBfacelist          *fl=NULL;
+    PJcomplist          tmp_obj;
+    DBfile_pdb          *dbfile = (DBfile_pdb*)_dbfile;
+    static char *me = "db_pdb_GetFacelist";
+    DBfacelist tmpfl;
+    memset(&tmpfl, 0, sizeof(DBfacelist));
+
+
+    /*------------------------------------------------------------*/
+    /*          Comp. Name        Comp. Address     Data Type     */
+    /*------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("ndims", &tmpfl.ndims, DB_INT);
+    DEFINE_OBJ("nfaces", &tmpfl.nfaces, DB_INT);
+    DEFINE_OBJ("origin", &tmpfl.origin, DB_INT);
+    DEFINE_OBJ("lnodelist", &tmpfl.lnodelist, DB_INT);
+    DEFINE_OBJ("nshapes", &tmpfl.nshapes, DB_INT);
+    DEFINE_OBJ("ntypes", &tmpfl.ntypes, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBFacelistInfo)
+    {
+        DEFALL_OBJ("nodelist", &tmpfl.nodelist, DB_INT);
+        DEFALL_OBJ("shapecnt", &tmpfl.shapecnt, DB_INT);
+        DEFALL_OBJ("shapesize", &tmpfl.shapesize, DB_INT);
+        DEFALL_OBJ("typelist", &tmpfl.typelist, DB_INT);
+        DEFALL_OBJ("types", &tmpfl.types, DB_INT);
+        DEFALL_OBJ("nodeno", &tmpfl.nodeno, DB_INT);
+        DEFALL_OBJ("zoneno", &tmpfl.zoneno, DB_INT);
+    }
+
+    if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+       return NULL;
+    if ((fl = DBAllocFacelist()) == NULL)
+       return NULL;
+    *fl = tmpfl;
+    CHECK_TYPE(type, DB_FACELIST, objname);
+
+    return fl;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetZonelist
+ *
+ * Purpose:     Reads a zonelist object from a SILO file.
+ *
+ * Return:      Success:        A pointer to a new facelist structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, January 14, 2000
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Wed Jun 14 17:25:16 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBzonelist *
+db_pdb_GetZonelist(DBfile *_dbfile, char *objname)
+{
+    char *type = NULL;
+    DBzonelist          *zl = NULL;
+    PJcomplist          tmp_obj;
+    DBfile_pdb          *dbfile = (DBfile_pdb*)_dbfile;
+    static char *me = "db_pdb_GetZonelist";
+    DBzonelist tmpzl;
+    memset(&tmpzl, 0, sizeof(DBzonelist));
+
+
+    /*------------------------------------------------------------*/
+    /*          Comp. Name        Comp. Address     Data Type     */
+    /*------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("ndims", &tmpzl.ndims, DB_INT);
+    DEFINE_OBJ("nzones", &tmpzl.nzones, DB_INT);
+    DEFINE_OBJ("origin", &tmpzl.origin, DB_INT);
+    DEFINE_OBJ("lnodelist", &tmpzl.lnodelist, DB_INT);
+    DEFINE_OBJ("nshapes", &tmpzl.nshapes, DB_INT);
+    DEFINE_OBJ("min_index", &tmpzl.min_index, DB_INT);
+    DEFINE_OBJ("max_index", &tmpzl.max_index, DB_INT);
+    DEFINE_OBJ("gnznodtype", &tmpzl.gnznodtype, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBZonelistInfo)
+    {
+        DEFALL_OBJ("shapecnt", &tmpzl.shapecnt, DB_INT);
+        DEFALL_OBJ("shapesize", &tmpzl.shapesize, DB_INT);
+        DEFALL_OBJ("shapetype", &tmpzl.shapetype, DB_INT);
+        DEFALL_OBJ("nodelist", &tmpzl.nodelist, DB_INT);
+        DEFALL_OBJ("zoneno", &tmpzl.zoneno, DB_INT);
+    }
+
+    if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+       return NULL;
+    if ((zl = DBAllocZonelist()) == NULL)
+       return NULL;
+    *zl = tmpzl;
+    CHECK_TYPE(type, DB_ZONELIST, objname);
+
+    /* optional global zone numbers */
+    zl->gnznodtype = zl->gnznodtype?zl->gnznodtype:DB_INT;
+    if (SILO_Globals.dataReadMask & DBZonelistGlobZoneNo) {
+       INIT_OBJ(&tmp_obj);
+       DEFALL_OBJ("gzoneno", &tmpzl.gzoneno, zl->gnznodtype);
+       zl->gzoneno = 0;
+       if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL)>=0)
+           zl->gzoneno = tmpzl.gzoneno; 
+    }
+
+    return zl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetPHZonelist
+ *
+ * Purpose:     Reads a DBphzonelist object from a SILO file.
+ *
+ * Return:      Success:        A pointer to a new facelist structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, January 14, 2000
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Wed Jun 14 17:25:16 PDT 2000
+ *      Added a check to make sure the object is the right type.
+ *
+ *      Sean Ahern, Thu Mar  1 12:28:07 PST 2001
+ *      Added support for the dataReadMask stuff.
+ *
+ *      Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *      Moved DBAlloc call to after PJ_GetObject. Added automatic
+ *      var for PJ_GetObject to read into. Added check for return
+ *      value of PJ_GetObject.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBphzonelist *
+db_pdb_GetPHZonelist(DBfile *_dbfile, char *objname)
+{
+    char *type = NULL;
+    DBphzonelist          *phzl = NULL;
+    PJcomplist          tmp_obj;
+    DBfile_pdb          *dbfile = (DBfile_pdb*)_dbfile;
+    static char *me = "db_pdb_GetPHZonelist";
+    DBphzonelist tmpphzl;
+    memset(&tmpphzl, 0, sizeof(DBphzonelist));
+
+
+    /*------------------------------------------------------------*/
+    /*          Comp. Name        Comp. Address     Data Type     */
+    /*------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("nfaces", &tmpphzl.nfaces, DB_INT);
+    DEFINE_OBJ("lnodelist", &tmpphzl.lnodelist, DB_INT);
+    DEFINE_OBJ("nzones", &tmpphzl.nzones, DB_INT);
+    DEFINE_OBJ("lfacelist", &tmpphzl.lfacelist, DB_INT);
+    DEFINE_OBJ("origin", &tmpphzl.origin, DB_INT);
+    DEFINE_OBJ("lo_offset", &tmpphzl.lo_offset, DB_INT);
+    DEFINE_OBJ("hi_offset", &tmpphzl.hi_offset, DB_INT);
+    DEFINE_OBJ("gnznodtype", &tmpphzl.gnznodtype, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBZonelistInfo)
+    {
+        DEFALL_OBJ("nodecnt", &tmpphzl.nodecnt, DB_INT);
+        DEFALL_OBJ("nodelist", &tmpphzl.nodelist, DB_INT);
+        DEFALL_OBJ("extface", &tmpphzl.extface, DB_CHAR);
+        DEFALL_OBJ("facecnt", &tmpphzl.facecnt, DB_INT);
+        DEFALL_OBJ("facelist", &tmpphzl.facelist, DB_INT);
+        DEFALL_OBJ("zoneno", &tmpphzl.zoneno, DB_INT);
+    }
+
+    if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, &type) < 0)
+       return NULL;
+    if ((phzl = DBAllocPHZonelist()) == NULL)
+       return NULL;
+    *phzl = tmpphzl;
+    CHECK_TYPE(type, DB_PHZONELIST, objname);
+
+    /* optional global zone numbers */
+    phzl->gnznodtype = phzl->gnznodtype?phzl->gnznodtype:DB_INT;
+    if (SILO_Globals.dataReadMask & DBZonelistGlobZoneNo) {
+       INIT_OBJ(&tmp_obj);
+       DEFALL_OBJ("gzoneno", &tmpphzl.gzoneno, phzl->gnznodtype);
+       phzl->gzoneno = 0;
+       if (PJ_GetObject(dbfile->pdb, objname, &tmp_obj, NULL)>=0)
+           phzl->gzoneno = tmpphzl.gzoneno;
+    }
+
+    return phzl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetCSGZonelist
+ *
+ * Purpose:     Reads a CSG zonelist object from a SILO file.
+ *
+ * Return:      Success:        A pointer to a new facelist structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 9, 2005 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK DBcsgzonelist *
+db_pdb_GetCSGZonelist(DBfile *_dbfile, const char *objname)
+{
+    char *type = NULL;
+    char *tmprnames = 0, *tmpznames = 0;
+    DBcsgzonelist      *zl = NULL;
+    PJcomplist          tmp_obj;
+    DBfile_pdb         *dbfile = (DBfile_pdb*)_dbfile;
+    static char *me = "db_pdb_GetCSGZonelist";
+    DBcsgzonelist tmpzl;
+    memset(&tmpzl, 0, sizeof(DBcsgzonelist));
+
+    /*------------------------------------------------------------*/
+    /*          Comp. Name        Comp. Address     Data Type     */
+    /*------------------------------------------------------------*/
+    INIT_OBJ(&tmp_obj);
+
+    DEFINE_OBJ("nregs", &tmpzl.nregs, DB_INT);
+    DEFINE_OBJ("origin", &tmpzl.origin, DB_INT);
+    DEFINE_OBJ("lxform", &tmpzl.lxform, DB_INT);
+    DEFINE_OBJ("datatype", &tmpzl.datatype, DB_INT);
+    DEFINE_OBJ("nzones", &tmpzl.nzones, DB_INT);
+    DEFINE_OBJ("min_index", &tmpzl.min_index, DB_INT);
+    DEFINE_OBJ("max_index", &tmpzl.max_index, DB_INT);
+
+    if (SILO_Globals.dataReadMask & DBZonelistInfo)
+    {
+        DEFALL_OBJ("typeflags", &tmpzl.typeflags, DB_INT);
+        DEFALL_OBJ("leftids", &tmpzl.leftids, DB_INT);
+        DEFALL_OBJ("rightids", &tmpzl.rightids, DB_INT);
+        DEFALL_OBJ("zonelist", &tmpzl.zonelist, DB_INT);
+    }
+    if (SILO_Globals.dataReadMask & DBCSGZonelistRegNames)
+        DEFALL_OBJ("regnames", &tmprnames, DB_CHAR);
+    if (SILO_Globals.dataReadMask & DBCSGZonelistZoneNames)
+        DEFALL_OBJ("zonenames", &tmpznames, DB_CHAR);
+
+    if (PJ_GetObject(dbfile->pdb, (char*) objname, &tmp_obj, &type) < 0)
+       return NULL;
+    CHECK_TYPE(type, DB_CSGZONELIST, objname);
+
+    /* now that we know the object's data type, we can correctly
+       read the xforms */
+    if ((SILO_Globals.dataReadMask & DBZonelistInfo) && (tmpzl.lxform > 0))
+    {
+        INIT_OBJ(&tmp_obj);
+        if (DB_DOUBLE == tmpzl.datatype && PJ_InqForceSingle()) {
+           tmpzl.datatype = DB_FLOAT;
+        }
+
+        DEFALL_OBJ("xform", &tmpzl.xform, tmpzl.datatype);
+        PJ_GetObject(dbfile->pdb, (char*) objname, &tmp_obj, NULL);
+    }
+
+    if ((tmprnames != NULL) && (tmpzl.nregs > 0))
+    {
+        tmpzl.regnames = DBStringListToStringArray(tmprnames, tmpzl.nregs,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(tmprnames);
+    }
+
+    if ((tmpznames != NULL) && (tmpzl.nzones > 0))
+    {
+        tmpzl.zonenames = DBStringListToStringArray(tmpznames, tmpzl.nzones,
+            !handleSlashSwap, !skipFirstSemicolon);
+        FREE(tmpznames);
+    }
+
+    if ((zl = DBAllocCSGZonelist()) == NULL)
+       return NULL;
+    *zl = tmpzl;
+
+    return zl;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetVar
+ *
+ * Purpose:     Allocates space for a variable and reads the variable
+ *              from the database.
+ *
+ * Return:      Success:        Pointer to variable data
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 11:12:23 EST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:13:19 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK void *
+db_pdb_GetVar (DBfile *_dbfile, char *name)
+{
+   static char   *me = "db_pdb_GetVar";
+   char          *data;
+   int            n;
+
+   /* Find out how long (in bytes) requested variable is. */
+   if (0 == (n = DBGetVarByteLength(_dbfile, name))) {
+      db_perror(name, E_NOTFOUND, me);
+      return NULL;
+   }
+
+   /* Read it and return. */
+   data = ALLOC_N(char, n);
+   if (DBReadVar(_dbfile, name, data) < 0) {
+      db_perror("DBReadVar", E_CALLFAIL, me);
+      FREE(data);
+      return (NULL);
+   }
+
+   return data;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetVarByteLength
+ *
+ * Purpose:     Returns the length of the given variable in bytes.
+ *
+ * Return:      Success:        length of variable in bytes
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 11:45:42 EST 1994
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetVarByteLength (DBfile *_dbfile, char *varname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            number, size;
+
+   db_pdb_getvarinfo(dbfile->pdb, varname, NULL, &number, &size, 0);
+   return number * size;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetVarDims
+ *
+ * Purpose:     Returns the size of each dimension.
+ *
+ * Return:      Success:        Number of dimensions not to exceed MAXDIMS.
+ *                              The dimension sizes are written to DIMS.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  6 1997
+ *
+ * Modifications:
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetVarDims (DBfile *_dbfile, char *varname, int maxdims, int *dims)
+{
+   DBfile_pdb   *dbfile = (DBfile_pdb *) _dbfile;
+   static char  *me = "db_pdb_GetVarDims";
+   syment       *ep;
+   dimdes       *dd;
+   int          i;
+
+   ep = PJ_inquire_entry (dbfile->pdb, varname);
+   if (!ep) return db_perror ("PJ_inquire_entry", E_CALLFAIL, me);
+
+   for (i=0, dd=ep->dimensions; i<maxdims && dd; i++, dd=dd->next) {
+      dims[i] = dd->number;
+   }
+   return i;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetVarType
+ *
+ * Purpose:     Returns the data type ID (DB_INT, DB_FLOAT, etc) of the
+ *              variable.
+ *
+ * Return:      Success:        type ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Dec 22 09:00:39 PST 1994
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetVarType (DBfile *_dbfile, char *varname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            number, size;
+   char           typename[256];
+
+   db_pdb_getvarinfo(dbfile->pdb, varname, typename, &number, &size, 0);
+   return db_GetDatatypeID(typename);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetVarLength
+ *
+ * Purpose:     Returns the number of elements in the requested variable.
+ *
+ * Return:      Success:        number of elements
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 12:06:36 EST 1994
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetVarLength (DBfile *_dbfile, char *varname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            number, size;
+
+   db_pdb_getvarinfo(dbfile->pdb, varname, NULL, &number, &size, 0);
+   return number;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_InqMeshname
+ *
+ * Purpose:     Returns the name of a mesh associated with a mesh-variable.
+ *              Caller must allocate space for mesh name.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 12:10:59 EST 1994
+ *
+ * Modifications:
+ *      Katherine Price, Fri Jun  2 08:58:54 PDT 1995
+ *      Added error return code.
+ *
+ *      Sean Ahern, Mon Jun 24 13:30:53 PDT 1996
+ *      Fixed a memory leak.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_InqMeshname (DBfile *_dbfile, char *vname, char *mname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   void          *v;
+
+   if ((v = PJ_GetComponent(dbfile->pdb, vname, "meshid"))) {
+      if (mname)
+         strcpy(mname, (char *)v);
+      FREE(v);
+      return 0;
+   }
+   FREE(v);
+   return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_InqMeshtype
+ *
+ * Purpose:     returns the mesh type.
+ *
+ * Return:      Success:        mesh type
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 12:16:12 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Feb  9 12:54:37 PST 1995
+ *    I modified the routine to read elements of the group structure
+ *    as "abc->type" instead of "abc.type".
+ *
+ *    Sean Ahern, Sun Oct  1 03:13:44 PDT 1995
+ *    Made "me" static.
+ *
+ *    Eric Brugger, Fri Dec  4 12:45:22 PST 1998
+ *    Added code to free ctype to eliminate a memory leak.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_InqMeshtype (DBfile *_dbfile, char *mname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   char           tmp[256], *ctype;
+   int            type;
+   static char   *me = "db_pdb_InqMeshtype";
+
+   sprintf(tmp, "%s->type", mname);
+   if (!PJ_read(dbfile->pdb, tmp, &ctype)) {
+      return db_perror("PJ_read", E_CALLFAIL, me);
+   }
+
+   type = DBGetObjtypeTag(ctype);
+   SCFREE(ctype);
+
+   return type;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_InqVarExists
+ *
+ *  Purpose
+ *      Check whether the variable exists and return non-zero if so,
+ *      and 0 if not
+ *
+ *  Programmer
+ *      Sean Ahern, Thu Jul 20 12:04:39 PDT 1995
+ *
+ *  Modifications
+ *      Sean Ahern, Sun Oct  1 03:14:03 PDT 1995
+ *      Made "me" static.
+ *
+ *      Sean Ahern, Wed Apr 12 11:14:38 PDT 2000
+ *      Removed the last two parameters to PJ_inquire_entry because they
+ *      weren't being used.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_InqVarExists (DBfile *_dbfile, char *varname)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   syment        *ep;
+
+   ep = PJ_inquire_entry(dbfile->pdb, varname);
+   if (!ep)
+      return (0);
+   else
+      return (1);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_ReadAtt
+ *
+ * Purpose:     Reads the specified attribute value into the provided
+ *              space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Mon Nov 21 21:00:56 EST 1994
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_ReadAtt(DBfile *_dbfile, char *vname, char *attname, void *results)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   char          *attval;
+
+   attval = lite_PD_get_attribute(dbfile->pdb, vname, attname);
+   memcpy(results, attval, lite_SC_arrlen(attval));
+   SFREE(attval);
+
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_ReadVar
+ *
+ * Purpose:     Reads a variable into the given space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Mon Nov 21 21:05:07 EST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:18:45 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_ReadVar (DBfile *_dbfile, char *vname, void *result)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_ReadVar";
+
+   if (!PJ_read(dbfile->pdb, vname, result)) {
+      return db_perror("PJ_read", E_CALLFAIL, me);
+   }
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_ReadVarSlice
+ *
+ * Purpose:     Reads a slice of a variable into the given space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  brugger at sgibird
+ *              Thu Feb 16 08:45:00 PST 1995
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:19:03 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_ReadVarSlice (DBfile *_dbfile, char *vname, int *offset, int *length,
+                     int *stride, int ndims, void *result)
+{
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   long           ind[3 * MAXDIMS_VARWRITE];
+   static char   *me = "db_pdb_ReadVarSlice";
+
+   for (i = 0; i < ndims && i < MAXDIMS_VARWRITE; i++) {
+      ind[3 * i] = offset[i];
+      ind[3 * i + 1] = offset[i] + length[i] - 1;
+      ind[3 * i + 2] = stride[i];
+   }
+
+   if (!PJ_read_alt(dbfile->pdb, vname, result, ind)) {
+      return db_perror("PJ_read_alt", E_CALLFAIL, me);
+   }
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_SetDir
+ *
+ * Purpose:     Sets the current directory within the database.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Mon Nov 21 21:10:37 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_pdb_GetToc.
+ *
+ *    Robb Matzke, Fri Feb 24 10:15:54 EST 1995
+ *    The directory ID (pub.dirid) is no longer set since PJ_pwd_id()
+ *    has gone away.
+ *
+ *    Robb Matzke, Tue Mar 7 10:40:02 EST 1995
+ *    I changed the call db_pdb_GetToc to DBNewToc.
+ *
+ *    Sean Ahern, Sun Oct  1 03:19:19 PDT 1995
+ *    Made "me" static.
+ *
+ *    Sean Ahern, Mon Jul  1 14:06:08 PDT 1996
+ *    Turned off the PJgroup cache when we change directories.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_SetDir (DBfile *_dbfile, char *path)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_SetDir";
+   char           error_message[256];
+
+   if (1 == lite_PD_cd(dbfile->pdb, path)) {
+      dbfile->pub.dirid = 0;
+
+      /* We've changed directories, so we can't cache PJgroups any more */
+      PJ_NoCache();
+
+      /* Must make new table-of-contents since dir has changed */
+      db_FreeToc(_dbfile);
+   }
+   else {
+      sprintf(error_message,"\"%s\" ***%s***",path,lite_PD_err);
+      return db_perror(error_message, E_NOTDIR, me);
+   }
+
+   return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_Filters
+ *
+ * Purpose:     Output the name of this device driver to the specified
+ *              stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:11:59 EST 1995
+ *
+ * Modifications:
+ *
+ *    Hank Childs, Thu Jan  6 13:48:40 PST 2000
+ *    Put in lint directive for unused arguments.
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_Filters (DBfile *dbfile, FILE *stream)
+{
+   fprintf(stream, "PDB Device Driver\n");
+   return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_GetComponentNames
+ *
+ * Purpose:     Returns the component names for the specified object.
+ *              Each component name also has a variable name under which
+ *              the component value is stored in the data file.  The
+ *              COMP_NAMES and FILE_NAMES output arguments will point to
+ *              an array of pointers to names.  Each name as well as the
+ *              two arrays will be allocated with `malloc'.
+ *
+ * Return:      Success:        Number of components found for the
+ *                              specified object.
+ *
+ *              Failure:        zero.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.mdn.com
+ *              May 20, 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Nov 23 09:39:49 PST 1999
+ *    Changed strdup to safe_strdup.
+ *-------------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_GetComponentNames (DBfile *_dbfile, char *objname,
+                          char ***comp_names, char ***file_names)
+{
+   PJgroup      *group = NULL ;
+   DBfile_pdb   *dbfile = (DBfile_pdb *) _dbfile ;
+   int          i ;
+   syment       *ep ;
+
+   if (comp_names) *comp_names = NULL ;
+   if (file_names) *file_names = NULL ;
+
+   /*
+    * First make sure that the specified object is type "Group *", otherwise
+    * we'll get a segmentation fault deep within the PDB library!
+    */
+   ep = lite_PD_inquire_entry (dbfile->pdb, objname, TRUE, NULL) ;
+   if (!ep || strcmp(ep->type, "Group *")) return 0 ;
+
+   /*
+    * OK, now we can go ahead and get the group, but watch out
+    * for the empty group.
+    */
+   if (!PJ_get_group (dbfile->pdb, objname, &group)) return 0 ;
+   if (!group) return 0 ;
+   if (group->ncomponents<=0) return 0 ;
+
+   /*
+    * Copy the group component names and pdb names into the
+    * output arrays after allocating them.
+    */
+   if (comp_names)
+       *comp_names = (char**)malloc(group->ncomponents * sizeof(char *)) ;
+   if (file_names)
+       *file_names = (char**)malloc(group->ncomponents * sizeof(char *)) ;
+   for (i=0; i<group->ncomponents; i++) {
+      if (comp_names) (*comp_names)[i] = safe_strdup (group->comp_names[i]) ;
+      if (file_names) (*file_names)[i] = safe_strdup (group->pdb_names[i]) ;
+   }
+
+   return group->ncomponents ;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 DBGetMrgtree
+ *
+ *  Purpose
+ *
+ *      Read mrg tree structure from the given database.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Oct 10 13:08:36 PDT 2007
+ *
+ *  Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Added logic to control behavior of slash character swapping for
+ *   windows/linux and skipping of first semicolon in calls to
+ *   db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmrgtree *
+db_pdb_GetMrgtree(DBfile *_dbfile, const char *mrgtree_name)
+{
+   char *type = NULL;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   DBmrgtree     *tree = NULL;
+   PJcomplist     tmp_obj;
+   static char   *me = "db_pdb_GetMrgtree";
+   DBmrgtree      tmptree;
+   DBmrgtnode   **ltree;
+   int            root, num_nodes, i, j, n;
+   int           *intArray = 0;
+   char          *s, **strArray = 0;
+   char          *mrgv_onames = 0, *mrgv_rnames = 0;
+   memset(&tmptree, 0, sizeof(DBmrgtree));
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   /* read header and scalars data only first */
+   DEFINE_OBJ("src_mesh_type", &tmptree.src_mesh_type, DB_INT);
+   DEFINE_OBJ("type_info_bits", &tmptree.type_info_bits, DB_INT);
+   DEFINE_OBJ("num_nodes", &tmptree.num_nodes, DB_INT);
+   DEFINE_OBJ("root", &root, DB_FLOAT);
+   DEFALL_OBJ("src_mesh_name", &tmptree.src_mesh_name, DB_CHAR);
+   DEFALL_OBJ("scalars", &intArray, DB_INT);
+   DEFALL_OBJ("mrgvar_onames", &mrgv_onames, DB_CHAR);
+   DEFALL_OBJ("mrgvar_rnames", &mrgv_rnames, DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, &type) < 0)
+      return NULL;
+   CHECK_TYPE(type, DB_MRGTREE, mrgtree_name);
+   FREE(type);
+
+   tree = (DBmrgtree *) calloc(1,sizeof(DBmrgtree));
+   memset(tree, 0, sizeof(DBmrgtree));
+   *tree = tmptree;
+   tree->root = 0;
+   tree->cwr = 0;
+   num_nodes = tree->num_nodes;
+
+   /* allocate all the nodes of the tree and a linear list of pointers
+   to them */
+   ltree = (DBmrgtnode **) malloc(num_nodes * sizeof(DBmrgtnode*));
+   for (i = 0; i < num_nodes; i++)
+       ltree[i] = (DBmrgtnode *) calloc(1,sizeof(DBmrgtnode));
+
+   /* Read the nodal scalar data */
+   for (i = 0; i < num_nodes; i++)
+   {
+       ltree[i]->narray           = intArray[i*6+0];
+       ltree[i]->type_info_bits   = intArray[i*6+1];
+       ltree[i]->max_children     = intArray[i*6+2];
+       ltree[i]->nsegs            = intArray[i*6+3];
+       ltree[i]->num_children     = intArray[i*6+4];
+       ltree[i]->parent           = intArray[i*6+5] >= 0 ? ltree[intArray[i*6+5]] : 0;
+   }
+   FREE(intArray);
+
+   /* read the node 'name' member */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("name", &s, DB_CHAR);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   strArray = DBStringListToStringArray(s, num_nodes,
+       !handleSlashSwap, !skipFirstSemicolon);
+   for (i = 0; i < num_nodes; i++)
+       ltree[i]->name = strArray[i];
+   FREE(s);
+   FREE(strArray); /* free only top-level array of pointers */
+
+   /* read the node 'names' member */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("names", &s, DB_CHAR);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   if (s)
+   {
+       strArray = DBStringListToStringArray(s, -1, !handleSlashSwap,
+           !skipFirstSemicolon);
+       n = 0;
+       for (i = 0; i < num_nodes; i++)
+       {
+           if (ltree[i]->narray == 0)
+               continue;
+
+           if (strchr(strArray[n], '%') == 0)
+           {
+               ltree[i]->names = (char**) malloc(ltree[i]->narray * sizeof(char*));
+               for (j = 0; j < ltree[i]->narray; j++, n++)
+                   ltree[i]->names[j] = strArray[n];
+           }
+           else
+           {
+               ltree[i]->names = (char**) malloc(1 * sizeof(char*));
+               ltree[i]->names[0] = strArray[n];
+               n++;
+           }
+       }
+   }
+   FREE(s);
+   FREE(strArray); /* free only top-level array of pointers */
+
+   /* read the maps_name data */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("maps_name", &s, DB_CHAR);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   strArray = DBStringListToStringArray(s, num_nodes, !handleSlashSwap,
+       !skipFirstSemicolon);
+   for (i = 0; i < num_nodes; i++)
+       ltree[i]->maps_name = strArray[i];
+   FREE(s);
+   FREE(strArray); /* free only top-level array of pointers */
+
+   /* read the map segment id data */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("seg_ids", &intArray, DB_INT);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   n = 0;
+   for (i = 0; i < num_nodes; i++)
+   {
+       int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+       if (ns > 0)
+       {
+           ltree[i]->seg_ids = (int*) malloc(ns * sizeof(int));
+           for (j = 0; j < ns; j++)
+               ltree[i]->seg_ids[j] = intArray[n++];
+       }
+   }
+   FREE(intArray);
+
+   /* read the map segment len data */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("seg_lens", &intArray, DB_INT);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   n = 0;
+   for (i = 0; i < num_nodes; i++)
+   {
+       int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+       if (ns > 0)
+       {
+           ltree[i]->seg_lens = (int*) malloc(ns * sizeof(int));
+           for (j = 0; j < ns; j++)
+               ltree[i]->seg_lens[j] = intArray[n++];
+       }
+   }
+   FREE(intArray);
+
+   /* read the map segment type data */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("seg_types", &intArray, DB_INT);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   n = 0;
+   for (i = 0; i < num_nodes; i++)
+   {
+       int ns = ltree[i]->nsegs*(ltree[i]->narray?ltree[i]->narray:1);
+       if (ns > 0)
+       {
+           ltree[i]->seg_types = (int*) malloc(ns * sizeof(int));
+           for (j = 0; j < ns; j++)
+               ltree[i]->seg_types[j] = intArray[n++];
+       }
+   }
+   FREE(intArray);
+
+   /* read the child ids */
+   INIT_OBJ(&tmp_obj);
+   DEFALL_OBJ("children", &intArray, DB_INT);
+   PJ_GetObject(dbfile->pdb, (char*)mrgtree_name, &tmp_obj, NULL);
+   n = 0;
+   for (i = 0; i < num_nodes; i++)
+   {
+       int nc = ltree[i]->num_children;
+       if (nc > 0)
+       {
+           ltree[i]->children = (DBmrgtnode**) malloc(nc * sizeof(DBmrgtnode*));
+           for (j = 0; j < nc; j++)
+               ltree[i]->children[j] = ltree[intArray[n++]];
+       }
+   }
+   FREE(intArray);
+
+   if (mrgv_onames)
+   {
+      tree->mrgvar_onames = DBStringListToStringArray(mrgv_onames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(mrgv_onames);
+   }
+   if (mrgv_rnames)
+   {
+      tree->mrgvar_rnames = DBStringListToStringArray(mrgv_rnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(mrgv_rnames);
+   }
+
+   tree->root = ltree[root];
+   tree->cwr = tree->root;
+
+   FREE(ltree);
+
+   return (tree);
+
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                              DBGetGroupelmap
+ *
+ *  Purpose
+ *
+ *      Read groupel map object from the given database.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Oct 10 13:08:36 PDT 2007
+ *
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBgroupelmap*
+db_pdb_GetGroupelmap(DBfile *_dbfile, const char *name)
+{
+    int i, j, n;
+    DBgroupelmap *gm = NULL;
+    DBfile_pdb *dbfile = (DBfile_pdb *) _dbfile;
+    static char *me = "db_pdb_GetGroupelmap";
+    PJcomplist tmp_obj;
+    char   *type = NULL;
+    int *segData = NULL;
+    int *fracLengths = NULL;
+    void *fracsArray = NULL;
+
+    DBgroupelmap tmpgm;
+    memset(&tmpgm, 0, sizeof(DBgroupelmap));
+
+    INIT_OBJ(&tmp_obj);
+    DEFINE_OBJ("num_segments",    &tmpgm.num_segments, DB_INT);
+    DEFINE_OBJ("fracs_data_type", &tmpgm.fracs_data_type, DB_INT);
+    DEFALL_OBJ("groupel_types",   &tmpgm.groupel_types, DB_INT);
+    DEFALL_OBJ("segment_lengths", &tmpgm.segment_lengths, DB_INT);
+    DEFALL_OBJ("segment_ids",     &tmpgm.segment_ids, DB_INT);
+    DEFALL_OBJ("segment_data",    &segData, DB_INT);
+    DEFALL_OBJ("frac_lengths",    &fracLengths, DB_INT);
+    DEFALL_OBJ("segment_fracs",   &fracsArray, DB_FLOAT);
+
+    if (PJ_GetObject(dbfile->pdb, (char*)name, &tmp_obj, &type) < 0)
+        return NULL;
+    CHECK_TYPE(type,DB_GROUPELMAP,name);
+    FREE(type);
+
+    gm = (DBgroupelmap*) calloc(1,sizeof(DBgroupelmap));
+    *gm = tmpgm;
+
+    /* unflatten the segment data */
+    gm->segment_data = (int **) malloc(gm->num_segments * sizeof(int*));
+    n = 0;
+    for (i = 0; i < gm->num_segments; i++)
+    {
+        int sl = gm->segment_lengths[i];
+        gm->segment_data[i] = 0;
+        if (sl > 0)
+        {
+            gm->segment_data[i] = (int*) malloc(sl * sizeof(int));
+            for (j = 0; j < sl; j++)
+                gm->segment_data[i][j] = segData[n++];
+        }
+    }
+    FREE(segData);
+
+    /* unflatten frac data if we have it */
+    if (fracLengths != NULL)
+    {
+        gm->segment_fracs = malloc(gm->num_segments * sizeof(void*));
+        n = 0;
+        for (i = 0; i < gm->num_segments; i++)
+        {
+            int len = fracLengths[i];
+
+            if (len <= 0)
+            {
+                gm->segment_fracs[i] = 0;
+                continue;
+            }
+
+            gm->segment_fracs[i] = malloc(len * ((gm->fracs_data_type==DB_FLOAT)?sizeof(float):sizeof(double)));
+            for (j = 0; j < len; j++)
+            {
+                if (gm->fracs_data_type == DB_FLOAT)
+                {
+                    float *pfa = (float *) fracsArray;
+                    float *psf = (float *) (gm->segment_fracs[i]);
+                    psf[j] = pfa[n++];
+                }
+                else
+                {
+                    double *pfa = (double *) fracsArray;
+                    double *psf = (double *) (gm->segment_fracs[i]);
+                    psf[j] = pfa[n++];
+                }
+            }
+        }
+    }
+    else
+    {
+        gm->segment_fracs = 0;
+    }
+    FREE(fracLengths);
+    FREE(fracsArray);
+
+    gm->name = STRDUP(name);
+    if (DB_DOUBLE == gm->fracs_data_type && PJ_InqForceSingle())
+        gm->fracs_data_type = DB_FLOAT;
+
+    return gm;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_GetMrgvar
+ *
+ *  Purpose
+ *
+ *      Read a mrgvar object from a SILO file and return the
+ *      SILO structure for this type.
+ *
+ *
+ *   Mark C. Miller, Tue Nov 10 09:14:01 PST 2009
+ *   Replaced strtok-loop over ...names member with call to
+ *   db_StringListToStringArray. Added logic to control behavior of
+ *   slash character swapping for windows/linux and skipping of first
+ *   semicolon in calls to db_StringListToStringArray.
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK DBmrgvar *
+db_pdb_GetMrgvar(DBfile *_dbfile, const char *objname)
+{
+   char *type = NULL;
+   DBmrgvar      *mrgv = NULL;
+   int            i;
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   PJcomplist     tmp_obj;
+   char           tmp[256];
+   static char *me = "db_pdb_GetMrgvar";
+   char          *rpnames = NULL;
+   char          *cnames = NULL;
+   DBmrgvar tmpmrgv;
+   memset(&tmpmrgv, 0, sizeof(DBmrgvar));
+
+
+   /*------------------------------------------------------------*/
+   /*          Comp. Name        Comp. Address     Data Type     */
+   /*------------------------------------------------------------*/
+   INIT_OBJ(&tmp_obj);
+
+   DEFINE_OBJ("ncomps", &tmpmrgv.ncomps, DB_INT);
+   DEFINE_OBJ("nregns", &tmpmrgv.nregns, DB_INT);
+   DEFINE_OBJ("datatype", &tmpmrgv.datatype, DB_INT);
+   DEFALL_OBJ("mrgt_name",&tmpmrgv.mrgt_name, DB_CHAR);
+   DEFALL_OBJ("compnames", &cnames, DB_CHAR);
+   DEFALL_OBJ("reg_pnames", &rpnames, DB_CHAR);
+
+   if (PJ_GetObject(dbfile->pdb, (char*)objname, &tmp_obj, &type) < 0)
+      return NULL;
+   mrgv = (DBmrgvar *) calloc(1, sizeof(DBmrgvar));
+   *mrgv = tmpmrgv;
+   CHECK_TYPE(type, DB_MRGVAR, objname);
+
+   INIT_OBJ(&tmp_obj);
+
+   mrgv->data = ALLOC_N(void *, mrgv->ncomps);
+
+   if (mrgv->datatype == 0) {
+      strcpy(tmp, objname);
+      strcat(tmp, "_data");
+      if ((mrgv->datatype = db_pdb_GetVarDatatype(dbfile->pdb, tmp)) < 0) {
+         /* Not found. Assume float. */
+         mrgv->datatype = DB_FLOAT;
+      }
+   }
+
+   if (PJ_InqForceSingle())
+      mrgv->datatype = DB_FLOAT;
+
+   for (i = 0; i < mrgv->ncomps; i++) {
+      DEFALL_OBJ(_valstr[i], &mrgv->data[i], DB_FLOAT);
+   }
+
+   PJ_GetObject(dbfile->pdb, (char*)objname, &tmp_obj, NULL);
+
+   if (cnames != NULL)
+   {
+      mrgv->compnames = DBStringListToStringArray(cnames, mrgv->ncomps,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(cnames);
+   }
+
+   if (rpnames != NULL)
+   {
+      mrgv->reg_pnames = DBStringListToStringArray(rpnames, -1,
+          !handleSlashSwap, !skipFirstSemicolon);
+      FREE(rpnames);
+   }
+
+   mrgv->name = STRDUP(objname);
+
+   return (mrgv);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                              db_pdb_FreeCompressionResources 
+ *
+ *  Purpose: Implement this method to quite error messages from top
+ *           top-level api. This is better than just NOT generating
+ *           those messages at the top-level because that would make
+ *           the choice for all drivers.
+ *
+ *  Programmer: Mark C. Miller, Tue Dec  2 09:59:20 PST 2008
+ *--------------------------------------------------------------------*/
+SILO_CALLBACK int
+db_pdb_FreeCompressionResources(DBfile *_dbfile, const char *meshname)
+{
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_WriteObject
+ *
+ *  Purpose
+ *
+ *      Write an object into the given file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 7 Mar 1997
+ *      Returns a failure status if PJ_put_group fails.
+ *
+ *      Robb Matzke, 7 Mar 1997
+ *      The FREEMEM argument was replaced with a FLAGS argument that
+ *      has the value 0, FREE_MEM, or OVER_WRITE depending on how
+ *      this function got called (FREE_MEM still doesn't do anything).
+ *
+ *      Mark C. Miller, 10May06
+ *      Passed value for SILO_Globals.allowOverwrites to PJ_put_group
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_WriteObject(DBfile   *_file,    /*File to write into */
+                   DBobject *obj,      /*Object description to write out */
+                   int      flags)     /*Sentinel: 1=free associated memory */
+{
+   PJgroup       *group;
+   PDBfile       *file;
+   static char   *me = "db_pdb_WriteObject";
+
+   if (!obj || !_file)
+      return (OOPS);
+   file = ((DBfile_pdb *) _file)->pdb;
+
+   group = PJ_make_group(obj->name, obj->type, obj->comp_names,
+                         obj->pdb_names, obj->ncomponents);
+   if (!PJ_put_group(file, group, (OVER_WRITE==flags?1:0) ||
+                                  SILO_Globals.allowOverwrites)) {
+      PJ_rel_group (group);
+      return db_perror ("PJ_put_group", E_CALLFAIL, me);
+   }
+   PJ_rel_group(group);
+   return (OKAY);
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                       db_pdb_WriteComponent
+ *
+ *  Purpose
+ *
+ *      Add a variable component to the given object structure, AND
+ *      write out the associated data.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_WriteComponent (DBfile *_file, DBobject *obj, char *compname,
+                       char *prefix, char *datatype, const void *var,
+                       int nd, long count[])
+{
+   PDBfile       *file;
+   char           tmp[256];
+
+   file = ((DBfile_pdb *) _file)->pdb;
+   db_mkname(file, prefix, compname, tmp);
+
+   PJ_write_len(file, tmp, datatype, var, nd, count);
+   DBAddVarComponent(obj, compname, tmp);
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_Write
+ *
+ * Purpose:     Writes a single variable into a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Mon Nov 21 21:17:50 EST 1994
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, Sun Dec 18 17:14:18 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString.
+ *
+ *      Sean Ahern, Sun Oct  1 03:19:43 PDT 1995
+ *      Made "me" static.
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_Write (DBfile *_dbfile, char *vname, void *var,
+              int *dims, int ndims, int datatype)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   char          *idata;
+   int            i;
+   long           ind[3 * MAXDIMS_VARWRITE];
+   static char   *me = "db_pdb_Write";
+
+   for (i = 0; i < ndims; i++) {
+      ind[3 * i] = 0;
+      ind[3 * i + 1] = dims[i] - 1;
+      ind[3 * i + 2] = 1;
+   }
+
+   idata = db_GetDatatypeString(datatype);
+   if (!PJ_write_alt(dbfile->pdb, vname, idata,
+                     var, ndims, ind)) {
+      return db_perror("PJ_write_alt", E_CALLFAIL, me);
+   }
+   FREE(idata);
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_WriteSlice
+ *
+ * Purpose:     Similar to db_pdb_Write except only part of the data is
+ *              written.  If VNAME doesn't exist, space is reserved for
+ *              the entire variable based on DIMS; otherwise we check
+ *              that DIMS has the same value as originally.  Then we
+ *              write the specified slice to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May  9, 1996
+ *
+ * Modifications:
+ *      Sean Ahern, Tue Mar 31 11:15:03 PST 1998
+ *      Freed dtype_s.
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_WriteSlice (DBfile *_dbfile, char *vname, void *values, int dtype,
+                   int offset[], int length[], int stride[], int dims[],
+                   int ndims)
+{
+   char         *dtype_s ;
+   long         dim_extents[9] ;
+   int          i ;
+   DBfile_pdb   *dbfile = (DBfile_pdb*)_dbfile ;
+   syment       *ep ;
+   dimdes       *dimensions ;
+   static char  *me = "db_pdb_WriteSlice" ;
+
+   if (NULL==(dtype_s=db_GetDatatypeString (dtype))) {
+      return db_perror ("db_GetDatatypeString", E_CALLFAIL, me) ;
+   }
+
+   if ((ep=lite_PD_inquire_entry (dbfile->pdb, vname, TRUE, NULL))) {
+      /*
+       * Variable already exists.  Make sure the supplied dimensions
+       * are the same as what was originally used when space was reserved.
+       */
+      for (i=0, dimensions=ep->dimensions;
+           i<ndims && dimensions;
+           i++, dimensions=dimensions->next) {
+         if (0!=dimensions->index_min) {
+            FREE(dtype_s);
+            return db_perror ("index_min!=0", E_BADARGS, me) ;
+         }
+         if (dimensions->number!=dims[i]) {
+            FREE(dtype_s);
+            return db_perror ("dims", E_BADARGS, me) ;
+         }
+      }
+      if (i!=ndims) {
+         FREE(dtype_s);
+         return db_perror ("ndims", E_BADARGS, me) ;
+      }
+   } else {
+      /*
+       * Variable doesn't exist yet.  Reserve space for the variable
+       * in the database and enter it's name in the symbol table.
+       */
+      for (i=0; i<3 && i<ndims; i++) {
+         dim_extents[i*2+0] = 0 ;               /*minimum index*/
+         dim_extents[i*2+1] = dims[i]-1 ;       /*maximum index*/
+      }
+      if (!lite_PD_defent_alt (dbfile->pdb, vname, dtype_s, ndims,
+                               dim_extents)) {
+         FREE(dtype_s);
+         return db_perror ("PD_defent_alt", E_CALLFAIL, me) ;
+      }
+   }
+
+   /*
+    * Verify that offset and length are compatible with
+    * the supplied dimensions.
+    */
+   for (i=0; i<ndims; i++) {
+      if (offset[i]<0 || offset[i]>=dims[i]) {
+         FREE(dtype_s);
+         return db_perror ("offset", E_BADARGS, me) ;
+      }
+      if (length[i]<=0 || length[i]>dims[i]) {
+         FREE(dtype_s);
+         return db_perror ("length", E_BADARGS, me) ;
+      }
+      if (offset[i]+length[i]>dims[i]) {
+         FREE(dtype_s);
+         return db_perror ("offset+length", E_BADARGS, me) ;
+      }
+   }
+
+
+   /*
+    * Write the specified chunk of the values to the file.
+    */
+   for (i=0; i<3 && i<ndims; i++) {
+      dim_extents[i*3+0] = offset[i] ;
+      dim_extents[i*3+1] = offset[i] + length[i] - 1 ;
+      dim_extents[i*3+2] = stride[i] ;
+   }
+   PJ_write_alt (dbfile->pdb, vname, dtype_s, values, ndims, dim_extents);
+   FREE(dtype_s);
+
+   return 0 ;
+}
+#endif /* PDB_WRITE */
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_MkDir
+ *
+ * Purpose:     Creates a new directory in the open database file.
+ *
+ * Return:      Success:        directory ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 15:13:44 EST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Sun Oct  1 03:14:25 PDT 1995
+ *     Made "me" static.
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_MkDir (DBfile *_dbfile, char *name)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   static char   *me = "db_pdb_MkDir";
+
+   if (!lite_PD_mkdir(dbfile->pdb, name)) {
+      return db_perror("PD_mkdir", E_CALLFAIL, me);
+   }
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_PutCompoundarray
+ *
+ * Purpose:     Put a compound array object into the PDB data file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_errno set
+ *
+ * Programmer:  matzke at viper
+ *              Thu Nov  3 11:04:22 PST 1994
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, Thu Nov 3 14:21:25 PST 1994
+ *      Sets db_errno on failure.
+ *
+ *      Robb Matzke, Fri Dec 2 14:08:24 PST 1994
+ *      Remove all references to SCORE memory management.
+ *
+ *      Robb Matzke, Sun Dec 18 17:04:29 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and
+ *      removed associated memory leak.
+ *
+ *      Sean Ahern, Sun Oct  1 03:09:48 PDT 1995
+ *      Added "me" and made it static.
+ *
+ *      Hank Childs, Thu Jan  6 13:48:40 PST 2000
+ *      Casted strlen to long to remove compiler warning.
+ *      Put in lint directive for unused arguments.
+ *
+ *      Hank Childs, Wed Apr 11 08:05:24 PDT 2001
+ *      Concatenate strings more intelligently [HYPer02535].
+ *
+ *      Hank Childs, Mon May 14 14:27:29 PDT 2001
+ *      Fixed bug where there was an assumption that the string is
+ *      NULL terminated.
+ *
+ *      Eric Brugger, Tue Apr 23 10:14:46 PDT 2002
+ *      I modified the routine to add a ';' delimiter to the end of the
+ *      name string so that GetCompoundarray would work properly since it
+ *      makes that assumption.
+ *
+ *      Eric Brugger, Mon Sep 16 15:40:20 PDT 2002
+ *      I corrected a bug where the routine would write out the string
+ *      containing the component names one too large.  It still writes out
+ *      the same number of characters, but now the array is one larger
+ *      and the last character is set to a NULL character.  This seemed
+ *      the safest thing to do.
+ *
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutCompoundarray (DBfile    *_dbfile,     /*pointer to open file  */
+                         char      *array_name,  /*name of array object  */
+                         char      *elemnames[], /*simple array names  */
+                         int       *elemlengths, /*lengths of simple arrays */
+                         int       nelems,       /*number of simple arrays */
+                         void      *values,      /*vector of simple values */
+                         int       nvalues,      /*num of values (redundant) */
+                         int       datatype,     /*type of simple all values */
+                         DBoptlist *optlist)     /*option list   */
+{
+   DBobject      *obj;
+   char          *tmp, *cur;
+   int            i, acc, len;
+   long           count[3];
+
+   /*
+    * Build the list of simple array names in the format:
+    *  `;name1;name2;...;nameN;'  The string must have a ';' at
+    * the end for GetCompoundarray to work properly.
+    */
+   for (i = 0, acc = 1; i < nelems; i++)
+      acc += strlen(elemnames[i]) + 1;
+   acc++;
+   tmp = ALLOC_N(char, acc);
+
+   tmp[0] = '\0';
+   cur = tmp;
+   for (i = 0; i < nelems; i++) {
+      strncpy(cur, ";", 1);
+      cur += 1;
+      len = strlen(elemnames[i]);
+      strncpy(cur, elemnames[i], len);
+      cur += len;
+   }
+   cur[0] = ';';
+   cur++;
+   cur[0] = '\0';
+
+#if 0                           /*No global options available at this time */
+   db_ProcessOptlist(DB_ARRAY, optlist);
+#endif
+   obj = DBMakeObject(array_name, DB_ARRAY, 25);
+
+   /*
+    * Write the compound array components to the database.
+    */
+   count[0] = (long) (cur - tmp) + 1;
+   DBWriteComponent(_dbfile, obj, "elemnames", array_name,
+                    "char", tmp, 1, count);
+   FREE(tmp);
+
+   count[0] = nelems;
+   DBWriteComponent(_dbfile, obj, "elemlengths", array_name,
+                    "integer", elemlengths, 1, count);
+
+   DBAddIntComponent(obj, "nelems", nelems);
+
+   count[0] = nvalues;
+   tmp = db_GetDatatypeString(datatype);
+   DBWriteComponent(_dbfile, obj, "values", array_name,
+                    tmp, values, 1, count);
+   FREE(tmp);
+
+   DBAddIntComponent(obj, "nvalues", nvalues);
+   DBAddIntComponent(obj, "datatype", datatype);
+
+   DBWriteObject(_dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return OKAY;
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_pdb_PutCurve
+ *
+ * Purpose:     Put a curve object into the PDB data file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_errno set
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 15, 1996
+ *
+ * Modifications:
+ *
+ *      Thomas R. Treadway, Fri Jul  7 11:43:41 PDT 2006
+ *      Added DBOPT_REFERENCE support.
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutCurve (DBfile *_dbfile, char *name, void *xvals, void *yvals,
+                 int dtype, int npts, DBoptlist *opts)
+{
+   DBobject     *obj ;
+   char         *dtype_s ;
+   long         lnpts = npts ;
+   static char  *me = "db_pdb_PutCurve" ;
+
+   /*
+    * Set global curve options to default values, then initialize
+    * them with any values specified in the options list.
+    */
+   db_InitCurve (opts) ;
+   obj = DBMakeObject (name, DB_CURVE, 18) ;
+
+   /*
+    * Write the X and Y arrays.  If the user specified a variable
+    * name with the OPTS for the X or Y arrays then we assume that
+    * the arrays have already been stored in the file.  This allows
+    * us to share X values (or Y values) among several curves.
+    * If a variable name is specified, then the corresponding X or
+    * Y values array must be the null pointer!
+    */
+   dtype_s = db_GetDatatypeString (dtype) ;
+   if (_cu._reference && (xvals || yvals)) {
+      return db_perror ("vals argument can not be used with reference option",
+                        E_BADARGS, me) ;
+   }
+   if (_cu._varname[0]) {
+      if (xvals) {
+         return db_perror ("xvals argument specified with xvarname option",
+                           E_BADARGS, me) ;
+      } else if (!_cu._varname[0]) {
+         DBAddVarComponent (obj, "xvals", _cu._varname[0]) ;
+      } 
+   } else {
+      if (!xvals && !_cu._reference) {
+         return db_perror ("xvals", E_BADARGS, me) ;
+      } else if (xvals && !_cu._reference) {
+         DBWriteComponent (_dbfile, obj, "xvals", name, dtype_s,
+                        xvals, 1, &lnpts);
+      }
+   }
+   if (_cu._varname[1]) {
+      if (yvals) {
+         return db_perror ("yvals argument specified with yvarname option",
+                           E_BADARGS, me) ;
+      } else if (!_cu._varname[1]) {
+         DBAddVarComponent (obj, "yvals", _cu._varname[1]) ;
+      }
+   } else {
+      if (!yvals && !_cu._reference) {
+         return db_perror ("yvals", E_BADARGS, me) ;
+      } else if (yvals && !_cu._reference) {
+         DBWriteComponent (_dbfile, obj, "yvals", name, dtype_s,
+                        yvals, 1, &lnpts);
+      }
+   }
+   FREE (dtype_s) ;
+
+   /*
+    * Now output the other values of the curve.
+    */
+   DBAddIntComponent (obj, "npts", npts) ;
+   DBAddIntComponent (obj, "datatype", dtype) ;
+   if (_cu._label)      DBAddStrComponent (obj, "label",    _cu._label) ;
+   if (_cu._varname[0]) DBAddStrComponent (obj, "xvarname", _cu._varname[0]) ;
+   if (_cu._labels[0])  DBAddStrComponent (obj, "xlabel",   _cu._labels[0]) ;
+   if (_cu._units[0])   DBAddStrComponent (obj, "xunits",   _cu._units[0]) ;
+   if (_cu._varname[1]) DBAddStrComponent (obj, "yvarname", _cu._varname[1]) ;
+   if (_cu._labels[1])  DBAddStrComponent (obj, "ylabel",   _cu._labels[1]) ;
+   if (_cu._units[1])   DBAddStrComponent (obj, "yunits",   _cu._units[1]) ;
+   if (_cu._reference)  DBAddStrComponent (obj, "reference",_cu._reference) ;
+   if (_cu._guihide)    DBAddIntComponent (obj, "guihide",  _cu._guihide);
+   DBWriteObject (_dbfile, obj, TRUE) ;
+   DBFreeObject(obj);
+
+   return 0 ;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ * Routine                                           db_pdb_PutDefvars
+ *
+ * Purpose
+ *
+ *    Write a defvars object into the open SILO file.
+ *
+ * Programmer
+ *
+ *    Mark C. Miller
+ *    August 8, 2005
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutDefvars (DBfile *dbfile, const char *name, int ndefs,
+                     char *names[], const int types[],
+                     char *defns[], DBoptlist *optlists[]) {
+
+   int            i, len;
+   long           count[1];
+   DBobject      *obj;
+   char          *tmp = NULL, *cur = NULL;
+   int           *guihide = NULL;
+
+   /*
+    * Optlists are a little funky for this object because we were
+    * concerned about possibly handling things like units, etc. So,
+    * we really have an array of optlists that needs to get serialized.
+    */
+   if (optlists)
+   {
+       for (i = 0; i < ndefs; i++)
+       {
+           db_InitDefvars(optlists[i]);
+           if (_dv._guihide)
+           {
+               if (guihide == NULL)
+                   guihide = (int* ) calloc(ndefs, sizeof(int));
+               guihide[i] = _dv._guihide;
+           }
+       }
+   }
+
+   /*-------------------------------------------------------------
+    *  Build object description from literals and var-id's
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_DEFVARS, 10);
+   DBAddIntComponent(obj, "ndefs", ndefs);
+
+   /*-------------------------------------------------------------
+    *  Define and write variables types
+    *-------------------------------------------------------------*/
+   count[0] = ndefs;
+   DBWriteComponent(dbfile, obj, "types", name, "integer",
+                    (int*) types, 1, count);
+
+   /*-------------------------------------------------------------
+    *  Define and write variable names 
+    *-------------------------------------------------------------*/
+   DBStringArrayToStringList(names, ndefs, &tmp, &len);
+   count[0] = len;  
+   DBWriteComponent(dbfile, obj, "names", name, "char",
+                    tmp, 1, count);
+   FREE(tmp);
+   tmp = NULL;
+
+   /*-------------------------------------------------------------
+    *  Define and write variable definitions 
+    *-------------------------------------------------------------*/
+   DBStringArrayToStringList(defns, ndefs, &tmp, &len);
+   count[0] = len;  
+   DBWriteComponent(dbfile, obj, "defns", name, "char",
+                    tmp, 1, count);
+   FREE(tmp);
+   tmp = NULL;
+
+   if (guihide != NULL) {
+
+      count[0] = ndefs;
+      DBWriteComponent(dbfile, obj, "guihide", name, "integer", guihide,
+                       1, count);
+      free(guihide);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write defvars object to SILO file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_PutFacelist
+ *
+ *  Purpose
+ *
+ *      Write a ucd facelist object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Wed Nov 16 11:39:19 EST 1994
+ *      Added device independence.
+ *
+ *      Robb Matzke, Fri Dec 2 14:12:48 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutFacelist (DBfile *dbfile, char *name, int nfaces, int ndims,
+                    int *nodelist, int lnodelist, int origin,
+                    int *zoneno, int *shapesize, int *shapecnt, int nshapes,
+                    int *types, int *typelist, int ntypes)
+{
+   long           count[5];
+   DBobject      *obj;
+
+   /*--------------------------------------------------
+    *  Build up object description by defining literals
+    *  and defining/writing arrays.
+    *-------------------------------------------------*/
+   obj = DBMakeObject(name, DB_FACELIST, 15);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nfaces", nfaces);
+   DBAddIntComponent(obj, "nshapes", nshapes);
+   DBAddIntComponent(obj, "ntypes", ntypes);
+   DBAddIntComponent(obj, "lnodelist", lnodelist);
+   DBAddIntComponent(obj, "origin", origin);
+
+   count[0] = lnodelist;
+
+   DBWriteComponent(dbfile, obj, "nodelist", name, "integer",
+                    nodelist, 1, count);
+
+   if (ndims == 3) {
+      count[0] = nshapes;
+
+      DBWriteComponent(dbfile, obj, "shapecnt", name, "integer",
+                       shapecnt, 1, count);
+
+      DBWriteComponent(dbfile, obj, "shapesize", name, "integer",
+                       shapesize, 1, count);
+   }
+
+   if (ntypes > 0 && typelist != NULL) {
+      count[0] = ntypes;
+      DBWriteComponent(dbfile, obj, "typelist", name, "integer",
+                       typelist, 1, count);
+   }
+
+   if (ntypes > 0 && types != NULL) {
+      count[0] = nfaces;
+      DBWriteComponent(dbfile, obj, "types", name, "integer",
+                       types, 1, count);
+   }
+
+   if (zoneno != NULL) {
+      count[0] = nfaces;
+      DBWriteComponent(dbfile, obj, "zoneno", name, "integer",
+                       zoneno, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_PutMaterial
+ *
+ *  Purpose
+ *
+ *      Write a material object into the open SILO file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *      See the prologue for DBPutMaterial for a description of this
+ *      data.
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Sun Dec 18 17:05:39 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and removed
+ *      associated memory leak.
+ *
+ *      Robb Matzke, Fri Dec 2 14:13:55 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *      Robb Matzke, Wed Nov 16 11:45:08 EST 1994
+ *      Added device independence.
+ *
+ *      Al Leibee, Tue Jul 13 17:14:31 PDT 1993
+ *      FREE of obj to SCFREE for consistant MemMan usage.
+ *
+ *      Sean Ahern, Wed Jan 17 17:02:31 PST 1996
+ *      Added writing of the datatype parameter.
+ *
+ *      Sean Ahern, Tue Feb  5 10:19:53 PST 2002
+ *      Added naming of Silo materials.
+ *
+ *      Mark C. Miller, Thu Feb 11 09:40:10 PST 2010
+ *      Set global values in _ma to zero after use.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMaterial (DBfile *dbfile, char *name, char *mname,
+                    int nmat, int matnos[], int matlist[],
+                    int dims[], int ndims,
+                    int mix_next[], int mix_mat[], int mix_zone[],
+                    DB_DTPTR1 mix_vf, int mixlen, int datatype,
+                    DBoptlist *optlist)
+{
+   int            i, nels;
+   long           count[3];
+   DBobject      *obj;
+   char          *datatype_str;
+
+   /*-------------------------------------------------------------
+    *  Process option list; build object description.
+    *-------------------------------------------------------------*/
+   db_ProcessOptlist(DB_MATERIAL, optlist);
+   obj = DBMakeObject(name, DB_MATERIAL, 26);
+
+   /*-------------------------------------------------------------
+    * Define literals used by material data.
+    *-------------------------------------------------------------*/
+
+   DBAddStrComponent(obj, "meshid", mname);
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nmat", nmat);
+   DBAddIntComponent(obj, "mixlen", mixlen);
+   DBAddIntComponent(obj, "origin", _ma._origin);
+   DBAddIntComponent(obj, "major_order", _ma._majororder);
+   DBAddIntComponent(obj, "datatype", datatype);
+   if (_ma._allowmat0)
+      DBAddIntComponent(obj, "allowmat0", _ma._allowmat0);
+   if (_ma._guihide)
+      DBAddIntComponent(obj, "guihide", _ma._guihide);
+
+   /*-------------------------------------------------------------
+    * Define variables, write them into object description.
+    *-------------------------------------------------------------*/
+   count[0] = ndims;
+   DBWriteComponent(dbfile, obj, "dims", name, "integer", dims, 1, count);
+
+   /* Do zonal material ID array */
+   for (nels = 1, i = 0; i < ndims; i++)
+      nels *= dims[i];
+
+   count[0] = nels;
+   DBWriteComponent(dbfile, obj, "matlist", name, "integer",
+                    matlist, 1, count);
+
+   /* Do material numbers list */
+   count[0] = nmat;
+   DBWriteComponent(dbfile, obj, "matnos", name, "integer",
+                    matnos, 1, count);
+
+   /* Now do mixed data arrays (mix_zone is optional) */
+   if (mixlen > 0) {
+
+      datatype_str = db_GetDatatypeString(datatype);
+      count[0] = mixlen;
+      DBWriteComponent(dbfile, obj, "mix_vf", name, datatype_str,
+                       mix_vf, 1, count);
+      FREE(datatype_str);
+
+      DBWriteComponent(dbfile, obj, "mix_next", name, "integer",
+                       mix_next, 1, count);
+      DBWriteComponent(dbfile, obj, "mix_mat", name, "integer",
+                       mix_mat, 1, count);
+
+      if (mix_zone != NULL) {
+         DBWriteComponent(dbfile, obj, "mix_zone", name, "integer",
+                          mix_zone, 1, count);
+      }
+   }
+
+   /* If we have material names, write them out */
+   if (_ma._matnames != NULL)
+   {
+      int len; long llen; char *tmpstr = 0;
+      DBStringArrayToStringList(_ma._matnames, nmat, &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "matnames", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+      _ma._matnames = NULL;
+   }
+   if (_ma._matcolors != NULL)
+   {
+      int len; long llen; char *tmpstr = 0;
+      DBStringArrayToStringList(_ma._matcolors, nmat, &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "matcolors", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+      _ma._matcolors = NULL;
+   }
+
+   /*-------------------------------------------------------------
+    *  Write material object to output file. Request that underlying
+    *  memory be freed (the 'TRUE' argument.)
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_PutMatspecies
+ *
+ *  Purpose
+ *
+ *      Write a material species object into the open SILO file.
+ *
+ *  Programmer
+ *
+ *      Al Leibee, DSAD-B
+ *
+ *  Notes
+ *
+ *      See the prologue for DBPutMatspecies for a description of this
+ *      data.
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Fri Dec 2 14:14:27 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *      Robb Matzke, Sun Dec 18 17:06:28 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and removed
+ *      associated memory leak.
+ *
+ *      Jeremy Meredith, Wed Jul  7 12:15:31 PDT 1999
+ *      I removed the origin value from the species object.
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added names and colors for species.
+ *
+ *      Mark C. Miller, Thu Feb 11 09:40:10 PST 2010
+ *      Set global values in _ma to zero after use.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMatspecies (DBfile *dbfile, char *name, char *matname,
+                      int nmat, int nmatspec[], int speclist[],
+                      int dims[], int ndims, int nspecies_mf,
+                      DB_DTPTR1 species_mf, int mix_speclist[],
+                      int mixlen, int datatype, DBoptlist *optlist) {
+
+   long           count[3];
+   int            i, nels, nstrs;
+   DBobject      *obj;
+   char          *datatype_str;
+
+   /*-------------------------------------------------------------
+    *  Process option list; build object description.
+    *-------------------------------------------------------------*/
+   db_ProcessOptlist(DB_MATSPECIES, optlist);
+   obj = DBMakeObject(name, DB_MATSPECIES, 15);
+
+   /*-------------------------------------------------------------
+    * Define literals used by material species data.
+    *-------------------------------------------------------------*/
+   DBAddStrComponent(obj, "matname", matname);
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nmat", nmat);
+   DBAddIntComponent(obj, "nspecies_mf", nspecies_mf);
+   DBAddIntComponent(obj, "mixlen", mixlen);
+   DBAddIntComponent(obj, "datatype", datatype);
+   DBAddIntComponent(obj, "major_order", _ms._majororder);
+   if (_ms._guihide)
+      DBAddIntComponent(obj, "guihide", _ms._guihide);
+
+   /*-------------------------------------------------------------
+    * Define variables, write them into object description.
+    *-------------------------------------------------------------*/
+   count[0] = ndims;
+   DBWriteComponent(dbfile, obj, "dims", name, "integer", dims, 1, count);
+
+   /* Do zonal material species ID array */
+   for (nels = 1, i = 0; i < ndims; i++)
+      nels *= dims[i];
+
+   count[0] = nels;
+   DBWriteComponent(dbfile, obj, "speclist", name, "integer",
+                    speclist, 1, count);
+
+   /* Do material species count per material list */
+   count[0] = nmat;
+   DBWriteComponent(dbfile, obj, "nmatspec", name, "integer",
+                    nmatspec, 1, count);
+
+   /* Do material species mass fractions */
+   datatype_str = db_GetDatatypeString(datatype);
+   count[0] = nspecies_mf;
+   DBWriteComponent(dbfile, obj, "species_mf", name, datatype_str,
+                    species_mf, 1, count);
+   FREE(datatype_str);
+
+   /* Now do mixed data arrays */
+   if (mixlen > 0) {
+      count[0] = mixlen;
+      DBWriteComponent(dbfile, obj, "mix_speclist", name, "integer",
+                       mix_speclist, 1, count);
+   }
+
+   /* If we have species names or colors, write them out */
+   nstrs = 0;
+   if (_ms._specnames != NULL)
+   {
+      int len; long llen; char *tmpstr = 0;
+
+      /* count how many names we have */
+      for (i=0; i < nmat; i++)
+          nstrs += nmatspec[i];
+      DBStringArrayToStringList(_ms._specnames, nstrs, &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "species_names", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+      _ms._specnames = NULL;
+   }
+   if (_ms._speccolors != NULL)
+   {
+      int len; long llen; char *tmpstr = 0;
+
+      /* count how many names we have */
+      if (nstrs == 0)
+      {
+          for (i=0; i < nmat; i++)
+              nstrs += nmatspec[i];
+      }
+      DBStringArrayToStringList(_ms._speccolors, nstrs, &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "speccolors", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+      _ms._speccolors = NULL;
+   }
+
+   /*-------------------------------------------------------------
+    *  Write material object to output file. Request that underlying
+    *  memory be freed (the 'TRUE' argument.)
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ * Routine                                           db_pdb_PutMultimesh
+ *
+ * Purpose
+ *
+ *    Write a multi-block mesh object into the open SILO file.
+ *
+ * Programmer
+ *
+ *    Jeffery W. Long, NSSD-B
+ *
+ * Notes
+ *
+ * Modified
+ *    Robb Matzke, Fri Dec 2 14:15:31 PST 1994
+ *    Changed  SCFREE(obj) to DBFreeObject(obj)
+ *
+ *    Eric Brugger, Fri Jan 12 17:42:55 PST 1996
+ *    I added cycle, time and dtime as options.
+ *
+ *    Sean Ahern, Thu Aug 15 11:16:18 PDT 1996
+ *    Allowed the mesh names to be any length, rather than hardcoded.
+ *
+ *    Eric Brugger, Fri Oct 17 09:11:58 PDT 1997
+ *    I corrected the outputing of the cyle, time and dtime options to
+ *    use the values from the global _mm instead of _pm.  A cut
+ *    and paste error.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *    Casted a strlen to long to remove compiler warning.
+ *
+ *    Hank Childs, Wed Apr 11 08:05:24 PDT 2001
+ *    Concatenate strings more intelligently [HYPer02535].
+ *
+ *    Hank Childs, Mon May 14 14:27:29 PDT 2001
+ *    Fixed bug where there was an assumption that the string is
+ *    NULL terminated.
+ *
+ *    Thomas R. Treadway, Thu Jul 20 13:34:57 PDT 2006
+ *    Added lgroupings, groupings, and groupnames options.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMultimesh (DBfile *dbfile, char *name, int nmesh,
+                     char *meshnames[], int meshtypes[],
+                     DBoptlist *optlist) {
+
+   int            i, len;
+   long           count[3];
+   DBobject      *obj;
+   char          *tmp = NULL, *cur = NULL;
+   char          *gtmp = NULL;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitMulti(dbfile, optlist);
+
+   /*-------------------------------------------------------------
+    *  Build object description from literals and var-id's
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_MULTIMESH, 30);
+   DBAddIntComponent(obj, "nblocks", nmesh);
+   DBAddIntComponent(obj, "ngroups", _mm._ngroups);
+   DBAddIntComponent(obj, "blockorigin", _mm._blockorigin);
+   DBAddIntComponent(obj, "grouporigin", _mm._grouporigin);
+   if (_mm._guihide)
+      DBAddIntComponent(obj, "guihide", _mm._guihide);
+   if (_mm._mrgtree_name)
+      DBAddStrComponent(obj, "mrgtree_name", _mm._mrgtree_name);
+   if (_mm._tv_connectivity)
+      DBAddIntComponent(obj, "tv_connectivity", _mm._tv_connectivity);
+   if (_mm._disjoint_mode)
+      DBAddIntComponent(obj, "disjoint_mode", _mm._disjoint_mode);
+   if (_mm._topo_dim > 0)
+      DBAddIntComponent(obj, "topo_dim", _mm._topo_dim);
+
+   /*-------------------------------------------------------------
+    *  Define and write variables before adding them to object.
+    *-------------------------------------------------------------*/
+   count[0] = nmesh;
+   if (meshtypes)
+       DBWriteComponent(dbfile, obj, "meshtypes", name, "integer",
+                        meshtypes, 1, count);
+
+   if (meshnames)
+   {
+       /* Compute size needed for string of concatenated block names.
+        *
+        * Note that we start with 2 so that we have one `;' and the NULL
+        * terminator.  Also, the +1 in the "len +=" line is for the `;'
+        * character.
+        */
+       len = 2;
+       for(i=0; i<nmesh; i++)
+       {
+           len += strlen(meshnames[i]) + 1;
+       }
+       tmp = ALLOC_N(char,len);
+
+      /* Build 1-D character string from 2-D mesh-name array */
+      tmp[0] = ';';
+      tmp[1] = '\0';
+
+      cur = tmp+1;
+      for (i = 0; i < nmesh; i++) {
+         int len2;
+         len2 = strlen(meshnames[i]);
+         strncpy(cur, meshnames[i], len2);
+         cur += len2;
+         strncpy(cur, ";", 1);
+         cur += 1;
+      }
+
+      count[0] = (long) (cur - tmp);
+      DBWriteComponent(dbfile, obj, "meshnames", name, "char",
+                       tmp, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Define and write the time and cycle.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "cycle", _mm._cycle);
+
+   if (_mm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _mm._nm_time);
+   if (_mm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _mm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_EXTENTS_SIZE and DBOPT_EXTENTS options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._extents != NULL && _mm._extentssize > 0) {
+      DBAddIntComponent(obj, "extentssize", _mm._extentssize);
+
+      count[0] = _mm._extentssize * nmesh;
+      DBWriteComponent(dbfile, obj, "extents", name, "double", _mm._extents,
+                       1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_ZONECOUNTS option if present.
+    *-------------------------------------------------------------*/
+   if (_mm._zonecounts != NULL) {
+
+      count[0] = nmesh;
+      DBWriteComponent(dbfile, obj, "zonecounts", name, "integer", 
+                       _mm._zonecounts, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_HAS_EXTERNAL_ZONES option if present.
+    *-------------------------------------------------------------*/
+   if (_mm._has_external_zones != NULL) {
+
+      count[0] = nmesh;
+      DBWriteComponent(dbfile, obj, "has_external_zones", name, "integer", 
+                       _mm._has_external_zones, 1, count);
+   }
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_GROUP* options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._lgroupings > 0)
+      DBAddIntComponent(obj, "lgroupings", _mm._lgroupings);
+   if ((_mm._lgroupings  > 0) && (_mm._groupnames != NULL)) {
+      DBStringArrayToStringList(_mm._groupnames, 
+                    _mm._lgroupings, &gtmp, &len);
+
+      count[0] = len;
+      DBWriteComponent(dbfile, obj, "groupnames", name, "char",
+                    gtmp, 1, count);
+      FREE(gtmp);
+   }
+   if ((_mm._lgroupings  > 0) && (_mm._groupings != NULL)) {
+      count[0] = _mm._lgroupings;
+      DBWriteComponent(dbfile, obj, "groupings", name, "integer",
+                    _mm._groupings, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MB_... options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._file_ns)
+   { 
+      count[0] = strlen(_mm._file_ns)+1;
+      DBWriteComponent(dbfile, obj, "file_ns", name, "char",
+                    _mm._file_ns, 1, count);
+   }
+   if (_mm._block_ns)
+   { 
+      count[0] = strlen(_mm._block_ns)+1;
+      DBWriteComponent(dbfile, obj, "block_ns", name, "char",
+                    _mm._block_ns, 1, count);
+   }
+   if (_mm._block_type)
+      DBAddIntComponent(obj, "block_type", _mm._block_type);
+   if (_mm._empty_list && _mm._empty_cnt>0)
+   {
+      DBAddIntComponent(obj, "empty_cnt", _mm._empty_cnt);
+      count[0] = _mm._empty_cnt;
+      DBWriteComponent(dbfile, obj, "empty_list", name, "integer", 
+                       _mm._empty_list, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write multi-mesh object to SILO file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   FREE(tmp);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ * Routine                                        db_pdb_PutMultimeshadj
+ *
+ * Purpose
+ *
+ *    Write some or all of a multi-block mesh adjacency object into the
+ *    open SILO file. This routine is designed to permit multiple
+ *    writes to the same object with different pieces being written
+ *    each time.
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, August 23, 2005 
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMultimeshadj (DBfile *_dbfile, const char *name, int nmesh,
+                  const int *meshtypes, const int *nneighbors,
+                  const int *neighbors, const int *back,
+                  const int *lnodelists, int *nodelists[],
+                  const int *lzonelists, int *zonelists[],
+                  DBoptlist *optlist) {
+
+
+   long         count[2];
+   int          i, len, noff, zoff, lneighbors;
+   DBfile_pdb   *dbfile = (DBfile_pdb*)_dbfile;
+   syment       *ep;
+   dimdes       *dimensions;
+   static char  *me = "db_pdb_PutMultimeshadj";
+   char tmpn[256];
+
+   if ((ep=lite_PD_inquire_entry (dbfile->pdb, (char*)name, TRUE, NULL))) {
+      /*
+       * Object already exists. Do whatever sanity checking we can do without
+       * reading back problem-sized data. Basically, this means checking
+       * existence and size of various components.
+       */
+
+      /* meshtypes should *always* exist and be of size nmesh */
+      db_mkname(dbfile->pdb, (char*)name, "meshtypes", tmpn);
+      if ((ep=lite_PD_inquire_entry(dbfile->pdb, tmpn, TRUE, NULL)))
+      {
+         len = 0;
+         for (dimensions=ep->dimensions; dimensions; dimensions=dimensions->next)
+            len += dimensions->number;
+
+         if (len != nmesh)
+            return db_perror("inconsistent meshtypes", E_BADARGS, me);
+      }
+      else
+      {
+         return db_perror("not a DBmultimeshadj object", E_BADARGS, me);
+      }
+
+      /* nneirhbors should *always* exist and be of size nmesh */
+      db_mkname(dbfile->pdb, (char*)name, "nneighbors", tmpn);
+      if ((ep=lite_PD_inquire_entry(dbfile->pdb, tmpn, TRUE, NULL)))
+      {
+         len = 0;
+         for (dimensions=ep->dimensions; dimensions; dimensions=dimensions->next)
+            len += dimensions->number;
+
+         if (len != nmesh)
+            return db_perror("inconsistent nneighbors", E_BADARGS, me);
+      }
+      else
+      {
+         return db_perror("not a DBmultimeshadj object", E_BADARGS, me);
+      }
+
+      /* compute expected size of neighbors array */
+      lneighbors = 0;
+      for (i = 0; i < nmesh; i++)
+          lneighbors += nneighbors[i];
+
+      /* neighbors should always exist and be of size lneighbors */
+      db_mkname(dbfile->pdb, (char*)name, "neighbors", tmpn);
+      if ((ep=lite_PD_inquire_entry(dbfile->pdb, tmpn, TRUE, NULL)))
+      {
+         len = 0;
+         for (dimensions=ep->dimensions; dimensions; dimensions=dimensions->next)
+            len += dimensions->number;
+
+         if (len != lneighbors)
+            return db_perror("inconsistent neighbors", E_BADARGS, me);
+      }
+      else
+      {
+         return db_perror("not a DBmultimeshadj object", E_BADARGS, me);
+      }
+
+      /* if lnodelists exists, it should be of size lneighbors AND it
+         should be non-NULL in the argument list. Otherwise, it should be NULL */
+      db_mkname(dbfile->pdb, (char*)name, "lnodelists", tmpn);
+      if ((ep=lite_PD_inquire_entry(dbfile->pdb, tmpn, TRUE, NULL)))
+      {
+         if (lnodelists == 0)
+            return db_perror("inconsistent lnodelists", E_BADARGS, me);
+         len = 0;
+         for (dimensions=ep->dimensions; dimensions; dimensions=dimensions->next)
+            len += dimensions->number;
+         if (len != lneighbors)
+            return db_perror("inconsistent lnodelists", E_BADARGS, me);
+      }
+      else
+      {
+         if (lnodelists != 0)
+            return db_perror("inconsistent lnodelists", E_BADARGS, me);
+      }
+
+      /* if lzonelists exists, it should be of size lneighbors AND it
+         should be non-NULL in the argument list. Otherwise, it should be NULL */
+      db_mkname(dbfile->pdb, (char*)name, "lzonelists", tmpn);
+      if ((ep=lite_PD_inquire_entry(dbfile->pdb, tmpn, TRUE, NULL)))
+      {
+         if (lzonelists == 0)
+            return db_perror("inconsistent lzonelists", E_BADARGS, me);
+         len = 0;
+         for (dimensions=ep->dimensions; dimensions; dimensions=dimensions->next)
+            len += dimensions->number;
+         if (len != lneighbors)
+            return db_perror("inconsistent lzonelists", E_BADARGS, me);
+      }
+      else
+      {
+         if (lzonelists != 0)
+            return db_perror("inconsistent lzonelists", E_BADARGS, me);
+      }
+
+   } else {
+      /*
+       * Object doesn't exist yet.  Write all the object's invariant
+       * components and reserve space for the nodelists and/or
+       * zonelists and enter names in the symbol table.
+       */
+      DBobject *obj;
+
+      /* compute length of neighbors, back, lnodelists, nodelists,
+         lzonelists, zonelists arrays */
+      lneighbors = 0;
+      for (i = 0; i < nmesh; i++)
+          lneighbors += nneighbors[i];
+
+      db_InitMulti(_dbfile, optlist);
+      obj = DBMakeObject(name, DB_MULTIMESHADJ, 13);
+
+      DBAddIntComponent(obj, "nblocks", nmesh);
+      DBAddIntComponent(obj, "blockorigin", _mm._blockorigin);
+      DBAddIntComponent(obj, "lneighbors", lneighbors);
+
+      count[0] = nmesh;
+      DBWriteComponent(_dbfile, obj, "meshtypes", name, "integer",
+                       meshtypes, 1, count);
+      DBWriteComponent(_dbfile, obj, "nneighbors", name, "integer",
+                       nneighbors, 1, count);
+
+      count[0] = lneighbors;
+      if (count[0] > 0) {
+          DBWriteComponent(_dbfile, obj, "neighbors", name, "integer",
+                           neighbors, 1, count);
+          if (back) {
+              DBWriteComponent(_dbfile, obj, "back", name, "integer",
+                               back, 1, count);
+          }
+          if (lnodelists) {
+              DBWriteComponent(_dbfile, obj, "lnodelists", name, "integer",
+                               lnodelists, 1, count);
+          }
+          if (lzonelists) {
+              DBWriteComponent(_dbfile, obj, "lzonelists", name, "integer",
+                               lzonelists, 1, count);
+          }
+      }
+
+      /* All object components up to here are invariant and *should*
+         be identical in repeated calls. Now, handle the parts of the
+         object that can vary from call to call. Reserve space for
+         the entire nodelists and/or zonelists arrays */
+
+      if (nodelists) {
+
+          /* compute total length of nodelists array */
+          len = 0;
+          for (i = 0; i < lneighbors; i++)
+              len += lnodelists[i];
+
+          if (len > 0) {
+              DBAddIntComponent(obj, "totlnodelists", len);
+
+              /* reserve space for the nodelists array in the file */
+              count[0] = 0;
+              count[1] = len - 1;
+              db_mkname(dbfile->pdb, (char*)name, "nodelists", tmpn);
+              if (!lite_PD_defent_alt (dbfile->pdb, tmpn, "integer", 1, count)) {
+                 return db_perror ("PD_defent_alt", E_CALLFAIL, me) ;
+              }
+
+              /* add the nodelists array to this object */
+              DBAddVarComponent(obj, "nodelists", tmpn);
+          }
+      }
+
+      if (zonelists) {
+
+          /* compute total length of nodelists array */
+          len = 0;
+          for (i = 0; i < lneighbors; i++)
+              len += lzonelists[i];
+
+          if (len > 0) {
+              DBAddIntComponent(obj, "totlzonelists", len);
+
+              /* reserve space for the nodelists array in the file */
+              count[0] = 0;
+              count[1] = len - 1;
+              db_mkname(dbfile->pdb, (char*)name, "zonelists", tmpn);
+              if (!lite_PD_defent_alt (dbfile->pdb, tmpn, "integer", 1, count)) {
+                 return db_perror ("PD_defent_alt", E_CALLFAIL, me) ;
+              }
+
+              /* add the nodelists array to this object */
+              DBAddVarComponent(obj, "zonelists", tmpn);
+          }
+      }
+
+      /* Ok, finally, create the object in the file */
+      DBWriteObject(_dbfile, obj, TRUE);
+      DBFreeObject(obj);
+   }
+
+   /* Ok, now write contents of nodelists and/or zonelists */
+   noff = 0;
+   zoff = 0;
+   for (i = 0; i < lneighbors; i++)
+   {
+      long dim_extents[3];
+
+      if (nodelists)
+      {
+         if (nodelists[i])
+         {
+            dim_extents[0] = noff;
+            dim_extents[1] = noff + lnodelists[i] - 1;
+            dim_extents[2] = 1;
+            db_mkname(dbfile->pdb, (char*)name, "nodelists", tmpn);
+            PJ_write_alt (dbfile->pdb, tmpn, "integer", (int*) nodelists[i], 1, dim_extents);
+         }
+         noff += lnodelists[i];
+      }
+
+      if (zonelists)
+      {
+         if (zonelists[i])
+         {
+            dim_extents[0] = zoff;
+            dim_extents[1] = zoff + lzonelists[i] - 1;
+            dim_extents[2] = 1;
+            db_mkname(dbfile->pdb, (char*)name, "zonelists", tmpn);
+            PJ_write_alt (dbfile->pdb, tmpn, "integer", (int*) zonelists[i], 1, dim_extents);
+         }
+         zoff += lzonelists[i];
+      }
+   }
+
+   return 0;
+}
+#endif
+
+
+/*----------------------------------------------------------------------
+ * Routine                                            db_pdb_PutMultivar
+ *
+ * Purpose
+ *
+ *    Write a multi-block variable object into the open SILO file.
+ *
+ * Programmer
+ *
+ *    Jeffery W. Long, NSSD-B
+ *
+ * Notes
+ *
+ * Modified
+ *    Robb Matzke, Fri Dec 2 14:16:09 PST 1994
+ *    Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *    Eric Brugger, Fri Jan 12 17:42:55 PST 1996
+ *    I added cycle, time and dtime as options.
+ *
+ *    Sean Ahern, Thu Aug 15 11:16:18 PDT 1996
+ *    Allowed the mesh names to be any length, rather than hardcoded.
+ *
+ *    Eric Brugger, Fri Oct 17 09:11:58 PDT 1997
+ *    I corrected the outputing of the cyle, time and dtime options to
+ *    use the values from the global _mm instead of _pm.  A cut
+ *    and paste error.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *    Casted a strlen to long to remove a compiler warning.
+ *
+ *    Hank Childs, Wed Apr 11 08:05:24 PDT 2001
+ *    Concatenate strings more intelligently [HYPer02535].
+ *
+ *    Hank Childs, Mon May 14 14:27:29 PDT 2001
+ *    Fixed bug where there was an assumption that the string is
+ *    NULL terminated.
+ *
+ *    Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *    Added support for conserved/extensive options.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMultivar (DBfile *dbfile, char *name, int nvars,
+                    char *varnames[], int vartypes[], DBoptlist *optlist) {
+
+   int            i, len;
+   long           count[3];
+   char          *tmp = NULL, *cur = NULL;
+   DBobject      *obj;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitMulti(dbfile, optlist);
+
+   /*-------------------------------------------------------------
+    *  Build object description from literals and var-id's
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_MULTIVAR, 30);
+   DBAddIntComponent(obj, "nvars", nvars);
+   DBAddIntComponent(obj, "ngroups", _mm._ngroups);
+   DBAddIntComponent(obj, "blockorigin", _mm._blockorigin);
+   DBAddIntComponent(obj, "grouporigin", _mm._grouporigin);
+   if (_mm._guihide)
+      DBAddIntComponent(obj, "guihide", _mm._guihide);
+   if (_mm._region_pnames != NULL)
+   {
+        char *s=0; int len=0; long llen;
+        DBStringArrayToStringList(_mm._region_pnames, -1, &s, &len);
+        llen = len;
+        DBWriteComponent(dbfile, obj, "region_pnames", name, "char", s, 1, &llen);
+        FREE(s);
+   }
+   if (_mm._tensor_rank)
+      DBAddIntComponent(obj, "tensor_rank", _mm._tensor_rank);
+   if (_mm._mmesh_name != NULL)
+      DBAddStrComponent(obj, "mmesh_name", _mm._mmesh_name);
+   if (_mm._conserved)
+      DBAddIntComponent(obj, "conserved", _mm._conserved);
+   if (_mm._extensive)
+      DBAddIntComponent(obj, "extensive", _mm._extensive);
+
+   /*-------------------------------------------------------------
+    *  Define and write variables before adding them to object.
+    *-------------------------------------------------------------*/
+   count[0] = nvars;
+   if (vartypes)
+       DBWriteComponent(dbfile, obj, "vartypes", name, "integer",
+                        vartypes, 1, count);
+
+    /* Compute size needed for string of concatenated block names.
+     *
+     * Note that we start with 2 so that we have one `;' and the NULL
+     * terminator.  Also, the +1 in the "len +=" line is for the `;'
+     * character.
+     */
+    if (varnames)
+    {
+        len = 2;
+        for(i=0; i<nvars; i++)
+        {
+            len += strlen(varnames[i]) + 1;
+        }
+        tmp = ALLOC_N(char,len);
+
+        /* Build 1-D character string from 2-D mesh-name array */
+        tmp[0] = ';';
+        tmp[1] = '\0';
+
+        cur = tmp+1;
+        for (i = 0; i < nvars; i++) {
+           int len2;
+           len2 = strlen(varnames[i]);
+           strncpy(cur, varnames[i], len2);
+           cur += len2;
+           strncpy(cur, ";", 1);
+           cur += 1;
+        }
+
+        count[0] = (long) (cur - tmp);
+        DBWriteComponent(dbfile, obj, "varnames", name, "char",
+                    tmp, 1, count);
+    }
+
+   /*-------------------------------------------------------------
+    *  Define and write the time and cycle.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "cycle", _mm._cycle);
+
+   if (_mm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _mm._nm_time);
+   if (_mm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _mm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_EXTENTS_SIZE and DBOPT_EXTENTS options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._extents != NULL && _mm._extentssize > 0) {
+      DBAddIntComponent(obj, "extentssize", _mm._extentssize);
+
+      count[0] = _mm._extentssize * nvars;
+      DBWriteComponent(dbfile, obj, "extents", name, "double", _mm._extents,
+                       1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MB_... options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._file_ns)
+   { 
+      count[0] = strlen(_mm._file_ns)+1;
+      DBWriteComponent(dbfile, obj, "file_ns", name, "char",
+                    _mm._file_ns, 1, count);
+   }
+   if (_mm._block_ns)
+   { 
+      count[0] = strlen(_mm._block_ns)+1;
+      DBWriteComponent(dbfile, obj, "block_ns", name, "char",
+                    _mm._block_ns, 1, count);
+   }
+   if (_mm._block_type)
+      DBAddIntComponent(obj, "block_type", _mm._block_type);
+   if (_mm._empty_list && _mm._empty_cnt>0) {
+      DBAddIntComponent(obj, "empty_cnt", _mm._empty_cnt);
+      count[0] = _mm._empty_cnt;
+      DBWriteComponent(dbfile, obj, "empty_list", name, "integer", 
+                       _mm._empty_list, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write multi-var object to SILO file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   FREE(tmp);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ * Routine                                            db_pdb_PutMultimat
+ *
+ * Purpose
+ *
+ *    Write a multi-material object into the open SILO file.
+ *
+ * Programmer
+ *
+ *    robb at cloud
+ *    Tue Feb 21 12:42:07 EST 1995
+ *
+ * Notes
+ *
+ * Modified
+ *    Eric Brugger, Fri Jan 12 17:42:55 PST 1996
+ *    I added cycle, time and dtime as options.
+ *
+ *    Sean Ahern, Thu Aug 15 11:16:18 PDT 1996
+ *    Allowed the mesh names to be any length, rather than hardcoded.
+ *
+ *    Eric Brugger, Fri Oct 17 09:11:58 PDT 1997
+ *    I corrected the outputing of the cyle, time and dtime options to
+ *    use the values from the global _mm instead of _pm.  A cut
+ *    and paste error.  I added code to write out the DPOPT_NMATNOS
+ *    and DPOPT_MATNOS options if provided.
+ *
+ *    Jeremy Meredith, Sept 23 1998
+ *    Corrected a bug where 'browser' wouldn't read "matnos": changed
+ *    type used when writing "matnos" from "int" to "integer".
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *    Cast a strlen to long to avoid a compiler warning.
+ *
+ *    Hank Childs, Wed Apr 11 08:05:24 PDT 2001
+ *    Concatenate strings more intelligently [HYPer02535].
+ *
+ *    Hank Childs, Mon May 14 14:27:29 PDT 2001
+ *    Fixed bug where there was an assumption that the string is
+ *    NULL terminated.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added matnames and matcolors options
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMultimat (DBfile *dbfile, char *name, int nmats,
+                    char *matnames[], DBoptlist *optlist) {
+
+   int            i, len;
+   long           count[3];
+   char          *tmp = NULL, *cur = NULL;
+   DBobject      *obj;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitMulti(dbfile, optlist);
+
+   /*-------------------------------------------------------------
+    *  Build object description from literals and var-id's
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_MULTIMAT, 30);
+   DBAddIntComponent(obj, "nmats", nmats);
+   DBAddIntComponent(obj, "ngroups", _mm._ngroups);
+   DBAddIntComponent(obj, "blockorigin", _mm._blockorigin);
+   DBAddIntComponent(obj, "grouporigin", _mm._grouporigin);
+   if (_mm._allowmat0)
+      DBAddIntComponent(obj, "allowmat0", _mm._allowmat0);
+   if (_mm._guihide)
+      DBAddIntComponent(obj, "guihide", _mm._guihide);
+   if (_mm._mmesh_name != NULL)
+      DBAddStrComponent(obj, "mmesh_name", _mm._mmesh_name);
+
+   /*-------------------------------------------------------------
+    *  Define and write materials before adding them to object.
+    *-------------------------------------------------------------*/
+
+    /* Compute size needed for string of concatenated block names.
+     *
+     * Note that we start with 2 so that we have one `;' and the NULL
+     * terminator.  Also, the +1 in the "len +=" line is for the `;'
+     * character.
+     */
+    if (matnames)
+    {
+        len = 2;
+        for(i=0; i<nmats; i++)
+        {
+            len += strlen(matnames[i]) + 1;
+        }
+        tmp = ALLOC_N(char,len);
+
+       /* Build 1-D character string from 2-D mesh-name array */
+       tmp[0] = ';';
+       tmp[1] = '\0';
+
+       cur = tmp+1;
+       for (i = 0; i < nmats; i++) {
+          int len2;
+          len2 = strlen(matnames[i]);
+          strncpy(cur, matnames[i], len2);
+          cur += len2;
+          strncpy(cur, ";", 1);
+          cur += 1;
+       }
+
+       count[0] = (long) (cur - tmp);
+       DBWriteComponent(dbfile, obj, "matnames", name, "char",
+                    tmp, 1, count);
+    }
+
+   /*-------------------------------------------------------------
+    *  Define and write the time and cycle.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "cycle", _mm._cycle);
+
+   if (_mm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _mm._nm_time);
+   if (_mm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _mm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MATNOS and DBOPT_NMATNOS options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._matnos != NULL && _mm._nmatnos > 0) {
+      DBAddIntComponent(obj, "nmatnos", _mm._nmatnos);
+
+      count[0] = _mm._nmatnos;
+      DBWriteComponent(dbfile, obj, "matnos", name, "integer", _mm._matnos,
+                       1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MIXLENS option if present.
+    *-------------------------------------------------------------*/
+   if (_mm._mixlens != NULL) {
+
+      count[0] = nmats; 
+      DBWriteComponent(dbfile, obj, "mixlens", name, "integer", _mm._mixlens,
+                       1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MATCOUNTS and DBOPT_MATLISTS options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._matcounts != NULL && _mm._matlists != NULL) {
+
+      count[0] = nmats; 
+      DBWriteComponent(dbfile, obj, "matcounts", name, "integer", _mm._matcounts,
+                       1, count);
+      count[0] = 0;
+      for (i = 0; i < nmats; i++)
+         count[0] += _mm._matcounts[i];
+      DBWriteComponent(dbfile, obj, "matlists", name, "integer", _mm._matlists,
+                       1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MATNAMES option if present
+    *-------------------------------------------------------------*/
+   if (_mm._matnames && _mm._nmatnos > 0) {
+      int len; long llen; char *tmpstr = 0;
+      DBStringArrayToStringList(_mm._matnames, _mm._nmatnos,
+          &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "material_names", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MATCOLORS option if present
+    *-------------------------------------------------------------*/
+   if (_mm._matcolors && _mm._nmatnos > 0) {
+      int len; long llen; char *tmpstr = 0;
+      DBStringArrayToStringList(_mm._matcolors, _mm._nmatnos,
+          &tmpstr, &len);
+      llen = (long) len;
+      DBWriteComponent(dbfile, obj, "matcolors", name, "char", tmpstr, 1, &llen);
+      FREE(tmpstr);
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MB_... options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._file_ns)
+   { 
+      count[0] = strlen(_mm._file_ns)+1;
+      DBWriteComponent(dbfile, obj, "file_ns", name, "char",
+                    _mm._file_ns, 1, count);
+   }
+   if (_mm._block_ns)
+   { 
+      count[0] = strlen(_mm._block_ns)+1;
+      DBWriteComponent(dbfile, obj, "block_ns", name, "char",
+                    _mm._block_ns, 1, count);
+   }
+   if (_mm._empty_list && _mm._empty_cnt>0) {
+      DBAddIntComponent(obj, "empty_cnt", _mm._empty_cnt);
+      count[0] = _mm._empty_cnt;
+      DBWriteComponent(dbfile, obj, "empty_list", name, "integer", 
+                       _mm._empty_list, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write multi-material object to SILO file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   FREE(tmp);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ * Routine                                     db_pdb_PutMultimatspecies
+ *
+ * Purpose
+ *
+ *    Write a multi-species object into the open SILO file.
+ *
+ * Programmer
+ *    Jeremy S. Meredith
+ *    Sept 17 1998
+ *
+ * Notes
+ *
+ * Modified
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added ngroups, blockorigin, and grouporigin.
+ *
+ *    Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *    Cast a strlen to long to avoid a compiler warning.
+ *
+ *    Jeremy Meredith, Thu Feb 10 16:00:53 PST 2000
+ *    Fixed an off-by-one error on the max number of components.
+ *
+ *    Hank Childs, Wed Apr 11 08:05:24 PDT 2001
+ *    Concatenate strings more intelligently [HYPer02535].
+ *
+ *    Hank Childs, Mon May 14 14:27:29 PDT 2001
+ *    Fixed bug where there was an assumption that the string is
+ *    NULL terminated.
+ *
+ *    Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *    Added names and colors for species.
+ *
+ *   Mark C. Miller, Wed Jul 14 20:40:55 PDT 2010
+ *   Added support for namescheme/empty list options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMultimatspecies (DBfile *dbfile, char *name, int nspec,
+                    char *specnames[], DBoptlist *optlist) {
+
+   int            i, len, nstrs;
+   long           count[3];
+   char          *tmp = NULL, *cur = NULL;
+   DBobject      *obj;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitMulti(dbfile, optlist);
+
+   /*-------------------------------------------------------------
+    *  Build object description from literals and var-id's
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_MULTIMATSPECIES, 30);
+   DBAddIntComponent(obj, "nspec", nspec);
+   DBAddIntComponent(obj, "ngroups", _mm._ngroups);
+   DBAddIntComponent(obj, "blockorigin", _mm._blockorigin);
+   DBAddIntComponent(obj, "grouporigin", _mm._grouporigin);
+   if (_mm._guihide)
+      DBAddIntComponent(obj, "guihide", _mm._guihide);
+
+   /*-------------------------------------------------------------
+    *  Define and write species before adding them to object.
+    *-------------------------------------------------------------*/
+
+    /* Compute size needed for string of concatenated block names.
+     *
+     * Note that we start with 2 so that we have one `;' and the NULL
+     * terminator.  Also, the +1 in the "len +=" line is for the `;'
+     * character.
+     */
+    if (specnames)
+    {
+        len = 2;
+        for(i=0; i<nspec; i++)
+        {
+            len += strlen(specnames[i]) + 1;
+        }
+        tmp = ALLOC_N(char,len);
+
+       /* Build 1-D character string from 2-D mesh-name array */
+       tmp[0] = ';';
+       tmp[1] = '\0';
+
+       cur = tmp+1;
+       for (i = 0; i < nspec; i++) {
+          int len2;
+          len2 = strlen(specnames[i]);
+          strncpy(cur, specnames[i], len2);
+          cur += len2;
+          strncpy(cur, ";", 1);
+          cur += 1;
+       }
+
+       count[0] = (long) (cur - tmp);
+       DBWriteComponent(dbfile, obj, "specnames", name, "char",
+                    tmp, 1, count);
+    }
+
+   /*-------------------------------------------------------------
+    *  Define and write the time and cycle.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "cycle", _mm._cycle);
+
+   if (_mm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _mm._nm_time);
+   if (_mm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _mm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Write the DBOPT_MATNAME, _NMAT, and _NMATSPEC to the file.
+    *-------------------------------------------------------------*/
+   if (_mm._matname != NULL)
+      DBAddStrComponent(obj, "matname", _mm._matname);
+
+   if (_mm._nmat > 0 && _mm._nmatspec != NULL) {
+      DBAddIntComponent(obj, "nmat", _mm._nmat);
+
+      count[0]=_mm._nmat;
+      DBWriteComponent(dbfile, obj, "nmatspec", name, "integer", _mm._nmatspec,
+                       1, count);
+
+      /* If we have species names or colors, write them out */
+      nstrs = 0;
+      if (_mm._specnames != NULL)
+      {
+         int len; long llen; char *tmpstr = 0;
+
+         /* count how many names we have */
+         for (i=0; i < _mm._nmat; i++)
+             nstrs += _mm._nmatspec[i];
+         DBStringArrayToStringList(_mm._specnames, nstrs, &tmpstr, &len);
+         llen = (long) len;
+         DBWriteComponent(dbfile, obj, "species_names", name, "char", tmpstr, 1, &llen);
+         FREE(tmpstr);
+      }
+      if (_mm._speccolors != NULL)
+      {
+         int len; long llen; char *tmpstr = 0;
+
+         /* count how many names we have */
+         if (nstrs == 0)
+         {
+             for (i=0; i < _mm._nmat; i++)
+                 nstrs += _mm._nmatspec[i];
+         }
+         DBStringArrayToStringList(_mm._speccolors, nstrs, &tmpstr, &len);
+         llen = (long) len;
+         DBWriteComponent(dbfile, obj, "speccolors", name, "char", tmpstr, 1, &llen);
+         FREE(tmpstr);
+      }
+   }
+
+   /*-------------------------------------------------------------
+    *  Add the DBOPT_MB_... options if present.
+    *-------------------------------------------------------------*/
+   if (_mm._file_ns)
+   { 
+      count[0] = strlen(_mm._file_ns)+1;
+      DBWriteComponent(dbfile, obj, "file_ns", name, "char",
+                    _mm._file_ns, 1, count);
+   }
+   if (_mm._block_ns)
+   { 
+      count[0] = strlen(_mm._block_ns)+1;
+      DBWriteComponent(dbfile, obj, "block_ns", name, "char",
+                    _mm._block_ns, 1, count);
+   }
+   if (_mm._empty_list && _mm._empty_cnt>0) {
+      DBAddIntComponent(obj, "empty_cnt", _mm._empty_cnt);
+      count[0] = _mm._empty_cnt;
+      DBWriteComponent(dbfile, obj, "empty_list", name, "integer", 
+                       _mm._empty_list, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write multi-species object to SILO file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   FREE(tmp);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_PutPointmesh
+ *
+ *  Purpose
+ *
+ *      Write a point mesh object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *      Added _dtime.
+ *
+ *      Robb Matzke, Fri Dec 2 14:16:41 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *      Robb Matzke, Sun Dec 18 17:07:34 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and
+ *      removed associated memory leak.
+ *
+ *      Sean Ahern, Sun Oct  1 03:15:18 PDT 1995
+ *      Made "me" static.
+ *
+ *      Robb Matzke, 11 Nov 1997
+ *      Added `datatype' to the file.
+ *
+ *      Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *      Added group_no.
+ *
+ *      Eric Brugger, Fri Mar  8 12:23:35 PST 2002
+ *      I modified the routine to output min and max extents as either
+ *      float or doubles, depending on the datatype of the coordinates.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *
+ *      Mark C. Miller, Tue Nov 17 22:22:09 PST 2009
+ *      Changed name of long long datatype to match what PDB proper
+ *      would call it.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutPointmesh (DBfile *dbfile, char *name, int ndims, DB_DTPTR2 _coords,
+                     int nels, int datatype, DBoptlist *optlist) {
+
+   int            i;
+   long           count[3];
+   DBobject      *obj;
+   char          *datatype_str, tmp[1024];
+   float          fmin_extents[3], fmax_extents[3];
+   double         dmin_extents[3], dmax_extents[3];
+   static char   *me = "db_pdb_PutPointmesh";
+   DB_DTPTR     **coords = (DB_DTPTR**) _coords;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitPoint(dbfile, optlist, ndims, nels);
+   obj = DBMakeObject(name, DB_POINTMESH, 31);
+
+   /*-------------------------------------------------------------
+    *  Write coordinate arrays.
+    *-------------------------------------------------------------*/
+   datatype_str = db_GetDatatypeString(datatype);
+   count[0] = nels;
+   for (i = 0; i < ndims; i++) {
+      sprintf(tmp, "coord%d", i);
+      DBWriteComponent(dbfile, obj, tmp, name, datatype_str,
+                       coords[i], 1, count);
+   }
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Find the mesh extents from the coordinate arrays. Write
+    *  them out to output file.
+    *-------------------------------------------------------------*/
+   count[0] = ndims;
+   switch (datatype) {
+
+   case DB_FLOAT:
+      switch (ndims) {
+      case 3:
+         _DBarrminmax(coords[2], nels, &fmin_extents[2], &fmax_extents[2]);
+      case 2:
+         _DBarrminmax(coords[1], nels, &fmin_extents[1], &fmax_extents[1]);
+      case 1:
+         _DBarrminmax(coords[0], nels, &fmin_extents[0], &fmax_extents[0]);
+         break;
+      default:
+         return db_perror("ndims", E_BADARGS, me);
+      }
+
+      DBWriteComponent(dbfile, obj, "min_extents", name, "float",
+                       fmin_extents, 1, count);
+      DBWriteComponent(dbfile, obj, "max_extents", name, "float",
+                       fmax_extents, 1, count);
+
+      break;
+   case DB_DOUBLE:
+      switch (ndims) {
+      case 3:
+         _DBdarrminmax((double *)coords[2], nels,
+                       &dmin_extents[2], &dmax_extents[2]);
+      case 2:
+         _DBdarrminmax((double *)coords[1], nels,
+                       &dmin_extents[1], &dmax_extents[1]);
+      case 1:
+         _DBdarrminmax((double *)coords[0], nels,
+                       &dmin_extents[0], &dmax_extents[0]);
+         break;
+      default:
+         return db_perror("ndims", E_BADARGS, me);
+      }
+
+      DBWriteComponent(dbfile, obj, "min_extents", name, "double",
+                       dmin_extents, 1, count);
+      DBWriteComponent(dbfile, obj, "max_extents", name, "double",
+                       dmax_extents, 1, count);
+
+      break;
+   default:
+      return db_perror("type not supported", E_NOTIMP, me);
+   }
+
+   if (_pm._gnodeno)
+   {
+       count[0] = nels;
+       if (_pm._llong_gnodeno)
+           DBWriteComponent(dbfile, obj, "gnodeno", name, "long_long",
+               _pm._gnodeno, 1, count);
+       else
+           DBWriteComponent(dbfile, obj, "gnodeno", name, "integer",
+               _pm._gnodeno, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Build a SILO object definition for a point mesh. The minimum
+    *  required information for a point mesh is the coordinate arrays,
+    *  the number of dimensions, and the type (RECT/CURV). Process
+    *  the provided options to complete the definition.
+    *
+    *  The SILO object definition is composed of a string of delimited
+    *  component names plus an array of SILO *identifiers* of
+    *  previously defined variables.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nspace", _pm._nspace);
+   DBAddIntComponent(obj, "nels", _pm._nels);
+   DBAddIntComponent(obj, "cycle", _pm._cycle);
+   DBAddIntComponent(obj, "origin", _pm._origin);
+   DBAddIntComponent(obj, "min_index", _pm._minindex);
+   DBAddIntComponent(obj, "max_index", _pm._maxindex);
+   DBAddIntComponent(obj, "datatype", datatype);
+   if (_pm._llong_gnodeno)
+       DBAddIntComponent(obj, "gnznodtype", DB_LONG_LONG);
+   if (_pm._guihide)
+       DBAddIntComponent(obj, "guihide", _pm._guihide);
+   if (_pm._group_no >= 0)
+       DBAddIntComponent(obj, "group_no", _pm._group_no);
+   if (_pm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _pm._nm_time);
+   if (_pm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _pm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for x, y, &/or z,
+    *-------------------------------------------------------------*/
+   if (_pm._labels[0] != NULL)
+      DBAddStrComponent(obj, "label0", _pm._labels[0]);
+
+   if (_pm._labels[1] != NULL)
+      DBAddStrComponent(obj, "label1", _pm._labels[1]);
+
+   if (_pm._labels[2] != NULL)
+      DBAddStrComponent(obj, "label2", _pm._labels[2]);
+
+   if (_pm._units[0] != NULL)
+      DBAddStrComponent(obj, "units0", _pm._units[0]);
+
+   if (_pm._units[1] != NULL)
+      DBAddStrComponent(obj, "units1", _pm._units[1]);
+
+   if (_pm._units[2] != NULL)
+      DBAddStrComponent(obj, "units2", _pm._units[2]);
+
+   if (_pm._mrgtree_name != NULL)
+      DBAddStrComponent(obj, "mrgtree_name", _pm._mrgtree_name);
+
+   /*-------------------------------------------------------------
+    *  Write point-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return (OKAY);
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_PutPointvar
+ *
+ *  Purpose
+ *
+ *      Write a point variable object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Robb Matzke, Sun Dec 18 17:08:42 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and removed
+ *      associated memory leak.
+ *
+ *      Robb Matzke, Fri Dec 2 14:17:15 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *      Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *      Added _dtime.
+ *
+ *      Sean Ahern, Tue Mar 24 17:23:04 PST 1998
+ *      Bumped up the min number of attributes so that we can write out 3D
+ *      point meshes.
+ *
+ *      Mark C. Miller, Tue Sep  6 11:05:58 PDT 2005
+ *      Removed duplicate DBAddStr call for "meshid"
+ *
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutPointvar (DBfile *dbfile, char *name, char *meshname, int nvars,
+                    DB_DTPTR2 _vars, int nels, int datatype,
+                    DBoptlist *optlist) {
+
+   int            i;
+   long           count[3];
+   DBobject      *obj;
+   char          *datatype_str;
+   char           tmp[1024];
+   DB_DTPTR     **vars = (DB_DTPTR**) _vars;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+#if 1                      /*Which one is correct? (1st one is the original) */
+   db_InitPoint(dbfile, optlist, _pm._ndims, nels);
+#else
+   db_InitPoint(dbfile, optlist, ndims, nels);
+#endif
+
+   obj = DBMakeObject(name, DB_POINTVAR, 24);
+
+   /*-------------------------------------------------------------
+    *  Write variable arrays.
+    *  Set index variables and counters.
+    *-----------------------------------------------------------*/
+   datatype_str = db_GetDatatypeString(datatype);
+   count[0] = nels;
+   if (nvars == 1) {
+      DBWriteComponent(dbfile, obj, "_data", name, datatype_str,
+                       vars[0], 1, count);
+   }
+   else {
+      for (i = 0; i < nvars; i++) {
+         sprintf(tmp, "%d_data", i);
+         DBWriteComponent(dbfile, obj, tmp, name, datatype_str,
+                          vars[i], 1, count);
+      }
+   }
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a SILO object definition for a point var. The
+    *  minimum required information for a point var is the variable
+    *  itself, plus the ID for the associated point mesh object.
+    *  Process any additional options to complete the definition.
+    *-------------------------------------------------------------*/
+
+   DBAddStrComponent(obj, "meshid", meshname);
+   if (_pm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _pm._nm_time);
+   if (_pm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _pm._nm_dtime);
+
+   DBAddIntComponent(obj, "nvals", nvars);
+   DBAddIntComponent(obj, "nels", nels);
+   DBAddIntComponent(obj, "ndims", 1);
+   DBAddIntComponent(obj, "datatype", datatype);
+   DBAddIntComponent(obj, "nspace", _pm._nspace);
+   DBAddIntComponent(obj, "origin", _pm._origin);
+   DBAddIntComponent(obj, "cycle", _pm._cycle);
+   DBAddIntComponent(obj, "min_index", _pm._minindex);
+   DBAddIntComponent(obj, "max_index", _pm._maxindex);
+   if (_pm._guihide)
+      DBAddIntComponent(obj, "guihide", _pm._guihide);
+   if (_pm._ascii_labels)
+       DBAddIntComponent(obj, "ascii_labels", _pm._ascii_labels);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for variable.
+    *-------------------------------------------------------------*/
+   if (_pm._label != NULL)
+      DBAddStrComponent(obj, "label", _pm._label);
+
+   if (_pm._unit != NULL)
+      DBAddStrComponent(obj, "units", _pm._unit);
+
+   if (_pm._region_pnames != NULL)
+   {
+        char *s=0; int len=0; long llen;
+        DBStringArrayToStringList(_pm._region_pnames, -1, &s, &len);
+        llen = len;
+        DBWriteComponent(dbfile, obj, "region_pnames", name, "char", s, 1, &llen);
+        FREE(s);
+   }
+
+   if (_pm._conserved)
+      DBAddIntComponent(obj, "conserved", _pm._conserved);
+
+   if (_pm._extensive)
+      DBAddIntComponent(obj, "extensive", _pm._extensive);
+
+   /*-------------------------------------------------------------
+    *  Write point-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, 0);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                           db_pdb_PutQuadmesh
+ *
+ *  Purpose
+ *
+ *      Write a quad mesh object into the open SILO file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *     Robb Matzke, Sun Dec 18 17:10:00 EST 1994
+ *     Changed SW_GetDatatypeString to db_GetDatatypeString and removed
+ *     associated memory leak.
+ *
+ *     Robb Matzke, Fri Dec 2 14:17:56 PST 1994
+ *     Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *     Robb Matzke, Wed Nov 23 12:00:20 EST 1994
+ *     Increased third argument of DBMakeObject from 25 to 40 because
+ *     we were running out of room.  Thanks to the new error mechanism,
+ *     we actually got a message for this!
+ *
+ *     Al Leibee, Sun Apr 17 07:54:25 PDT 1994
+ *     Added dtime.
+ *
+ *     Sean Ahern, Fri Oct 16 17:48:23 PDT 1998
+ *     Reformatted whitespace.
+ *
+ *     Sean Ahern, Tue Oct 20 17:22:58 PDT 1998
+ *     Changed the extents so that they are written out in the datatype that
+ *     is passed to the call.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Added group_no and base_index[].
+ *
+ *     Hank Childs, Thu Jan  6 13:48:40 PST 2000
+ *     Put in lint directive for unused argument.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutQuadmesh (DBfile *dbfile, char *name, char *coordnames[],
+                    DB_DTPTR2 _coords, int dims[], int ndims, int datatype,
+                    int coordtype, DBoptlist *optlist)
+{
+    int             i;
+    long            count[3];
+    int             nd;
+    char           *datatype_str;
+    DBobject       *obj;
+    char            tmp[1024];
+    DB_DTPTR      **coords = (DB_DTPTR**) _coords;
+
+    /* The following is declared as double for worst case. */
+    double         min_extents[3], max_extents[3];
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+    db_InitQuad(dbfile, name, optlist, dims, ndims);
+    obj = DBMakeObject(name, coordtype, 44);
+
+   /*-------------------------------------------------------------
+    *  Write coordinate arrays.
+    *-------------------------------------------------------------*/
+    for (i = 0; i < ndims; i++)
+        count[i] = dims[i];
+    if (coordtype == DB_COLLINEAR)
+        nd = 1;
+    else
+        nd = ndims;
+
+    datatype_str = db_GetDatatypeString(datatype);
+    for (i = 0; i < ndims; i++)
+    {
+        if (coordtype == DB_COLLINEAR)
+            count[0] = dims[i];
+
+        /* Do coordinate array, in form: coordN, where n = 0, 1, ... */
+        sprintf(tmp, "coord%d", i);
+        DBWriteComponent(dbfile, obj, tmp, name, datatype_str,
+                         coords[i], nd, count);
+    }
+
+   /*-------------------------------------------------------------
+    *  Find the mesh extents from the coordinate arrays. Write
+    *  them out to SILO file.
+    *-------------------------------------------------------------*/
+
+    _DBQMCalcExtents(coords, datatype, _qm._minindex, _qm._maxindex_n, dims,
+                     ndims, coordtype, min_extents, max_extents);
+
+    count[0] = ndims;
+    DBWriteComponent(dbfile, obj, "min_extents", name, datatype_str,
+                     min_extents, 1, count);
+
+    DBWriteComponent(dbfile, obj, "max_extents", name, datatype_str,
+                     max_extents, 1, count);
+    FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a SILO object definition for a quad mesh. The minimum
+    *  required information for a quad mesh is the coordinate arrays,
+    *  the number of dimensions, and the type (RECT/CURV). Process
+    *  the provided options to complete the definition.
+    *
+    *  The SILO object definition is composed of a string of delimited
+    *  component names plus an array of internal PDB variable names.
+    *-------------------------------------------------------------*/
+
+    DBAddIntComponent(obj, "ndims", ndims);
+    DBAddIntComponent(obj, "coordtype", coordtype);
+    DBAddIntComponent(obj, "datatype", datatype);
+    DBAddIntComponent(obj, "nspace", _qm._nspace);
+    DBAddIntComponent(obj, "nnodes", _qm._nnodes);
+    DBAddIntComponent(obj, "facetype", _qm._facetype);
+    DBAddIntComponent(obj, "major_order", _qm._majororder);
+    DBAddIntComponent(obj, "cycle", _qm._cycle);
+    DBAddIntComponent(obj, "coord_sys", _qm._coordsys);
+    DBAddIntComponent(obj, "planar", _qm._planar);
+    DBAddIntComponent(obj, "origin", _qm._origin);
+
+   if (_qm._group_no >= 0)
+       DBAddIntComponent(obj, "group_no", _qm._group_no);
+
+    DBAddVarComponent(obj, "dims", _qm._nm_dims);
+    DBAddVarComponent(obj, "min_index", _qm._nm_minindex);
+    DBAddVarComponent(obj, "max_index", _qm._nm_maxindex_n);
+    DBAddVarComponent(obj, "baseindex", _qm._nm_baseindex);
+
+    if (_qm._time_set == TRUE)
+        DBAddVarComponent(obj, "time", _qm._nm_time);
+    if (_qm._dtime_set == TRUE)
+        DBAddVarComponent(obj, "dtime", _qm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for x, y, &/or z,
+    *-------------------------------------------------------------*/
+    if (_qm._labels[0] != NULL)
+        DBAddStrComponent(obj, "label0", _qm._labels[0]);
+
+    if (_qm._labels[1] != NULL)
+        DBAddStrComponent(obj, "label1", _qm._labels[1]);
+
+    if (_qm._labels[2] != NULL)
+        DBAddStrComponent(obj, "label2", _qm._labels[2]);
+
+    if (_qm._units[0] != NULL)
+        DBAddStrComponent(obj, "units0", _qm._units[0]);
+
+    if (_qm._units[1] != NULL)
+        DBAddStrComponent(obj, "units1", _qm._units[1]);
+
+    if (_qm._units[2] != NULL)
+        DBAddStrComponent(obj, "units2", _qm._units[2]);
+
+    if (_qm._guihide)
+        DBAddIntComponent(obj, "guihide", _qm._guihide);
+
+    if (_qm._mrgtree_name != NULL)
+        DBAddStrComponent(obj, "mrgtree_name", _qm._mrgtree_name);
+
+   /*-------------------------------------------------------------
+    *  Write quad-mesh object to SILO file.
+    *-------------------------------------------------------------*/
+    DBWriteObject(dbfile, obj, TRUE);
+    DBFreeObject(obj);
+
+    return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                            db_pdb_PutQuadvar
+ *
+ *  Purpose
+ *
+ *      Write a quad variable object into the open SILO file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Sun Apr 17 07:54:25 PDT 1994
+ *      Added dtime.
+ *
+ *      Al Leibee, Wed Jul 20 07:56:37 PDT 1994
+ *      Added write of mixlen component.
+ *
+ *      Al Leibee, Wed Aug  3 16:57:38 PDT 1994
+ *      Added _use_specmf.
+ *
+ *      Robb Matzke, Fri Dec 2 14:18:34 PST 1994
+ *      Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *      Robb Matzke, Sun Dec 18 17:11:12 EST 1994
+ *      Changed SW_GetDatatypeString to db_GetDatatypeString and
+ *      removed associated memory leak.
+ *
+ *      Sean Ahern, Sun Oct  1 03:16:19 PDT 1995
+ *      Made "me" static.
+ *
+ *      Robb Matzke, 1 May 1996
+ *      The `dims' is actually used.  Before we just used the
+ *      dimension variable whose name was based on the centering.  Now
+ *      we store the dimensions for every quadvar.
+ *
+ *      Robb Matzke, 19 Jun 1997
+ *      Added the `ascii_labels' optional field.  The default is
+ *      false, so we write `ascii_labels' to the file only if it isn't
+ *      false.
+ *
+ *      Eric Brugger, Mon Oct  6 15:11:26 PDT 1997
+ *      I modified the routine to output the maximum index properly.
+ *
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options. Also, split
+ *      out the logic for centering and alignment to make clearer.
+ *      Added logic to support edge/face centering -- need to
+ *      multiply by ndims for each of i-,j- and k- associated edges
+ *      or faces. In addition, needed to add a 'centering' member
+ *      to quadvars.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutQuadvar (DBfile *_dbfile, char *name, char *meshname, int nvars,
+                   char *varnames[], DB_DTPTR2 _vars, int dims[], int ndims,
+                   DB_DTPTR2 _mixvars, int mixlen, int datatype, int centering,
+                   DBoptlist *optlist) {
+
+   DBfile_pdb   *dbfile = (DBfile_pdb *) _dbfile;
+   int          i, nels;
+   long         count[4], mcount[1];
+   char         *suffix, *datatype_str, tmp1[1024], tmp2[1024];
+   static char  *me = "db_pdb_PutQuadvar";
+   DBobject     *obj;
+   int          maxindex[3] ;
+   DB_DTPTR   **vars = (DB_DTPTR**) _vars;
+   DB_DTPTR   **mixvars = (DB_DTPTR**) _mixvars;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   db_InitQuad(_dbfile, meshname, optlist, dims, ndims);
+
+   obj = DBMakeObject(name, DB_QUADVAR, 30);
+
+   DBAddStrComponent(obj, "meshid", meshname);
+
+   /*-------------------------------------------------------------
+    *  Write variable arrays.
+    *  Set index variables and counters.
+    *-----------------------------------------------------------*/
+   nels = 1;
+   for (i = 0; i < ndims; i++) {
+      count[i] = dims[i];
+      nels *= dims[i];
+   }
+   if ((ndims > 1 && centering == DB_EDGECENT) ||
+       (ndims > 2 && centering == DB_FACECENT))
+      nels *= ndims;
+
+   switch (centering) {
+   case DB_NODECENT:
+      DBAddVarComponent(obj, "align", _qm._nm_alignn);
+      break;
+
+   case DB_EDGECENT:
+      if (ndims == 1) /* edge centering on 1D mesh is like zone centering */
+          DBAddVarComponent(obj, "align", _qm._nm_alignz);
+      break;
+
+   case DB_FACECENT:
+      if (ndims == 2) /* face centering on 2D mesh is like zone centering */
+          DBAddVarComponent(obj, "align", _qm._nm_alignz);
+      break;
+
+   case DB_ZONECENT:
+      DBAddVarComponent(obj, "align", _qm._nm_alignz);
+      break;
+
+   default:
+      return db_perror("centering", E_BADARGS, me);
+   }
+
+   /*
+    * Dimensions
+    */
+   db_mkname (dbfile->pdb, name, "dims", tmp2) ;
+   mcount[0] = ndims ;
+   PJ_write_len (dbfile->pdb, tmp2, "integer", dims, 1, mcount) ;
+   DBAddVarComponent (obj, "dims", tmp2) ;
+
+   /*
+    * Max indices
+    */
+   for (i=0; i<ndims; i++) maxindex[i] = dims[i] - _qm._hi_offset[i] - 1 ;
+   db_mkname (dbfile->pdb, name, "maxindex", tmp2) ;
+   mcount[0] = ndims ;
+   PJ_write_len (dbfile->pdb, tmp2, "integer", maxindex, 1, mcount) ;
+   DBAddVarComponent (obj, "max_index", tmp2) ;
+
+   /*-------------------------------------------------------------
+    *  We first will write the given variables to SILO, then
+    *  we'll define a Quadvar object in SILO composed of the
+    *  variables plus the given options.
+    *-------------------------------------------------------------*/
+
+   suffix = "data";
+
+   datatype_str = db_GetDatatypeString(datatype);
+   for (i = 0; i < nvars; i++) {
+
+      db_mkname(dbfile->pdb, varnames[i], suffix, tmp2);
+      if ((ndims > 1 && centering == DB_EDGECENT) ||
+          (ndims > 2 && centering == DB_FACECENT))
+      {
+          int j, tmpndims = ndims+1;
+          long tmpcnt[4];
+          for (j = ndims; j > 0; j--)
+              tmpcnt[j] = count[j-1];
+          tmpcnt[0] = ndims;
+          PJ_write_len(dbfile->pdb, tmp2, datatype_str, vars[i],
+                       tmpndims, tmpcnt);
+      }
+      else
+      {
+          PJ_write_len(dbfile->pdb, tmp2, datatype_str, vars[i],
+                       ndims, count);
+      }
+
+      sprintf(tmp1, "value%d", i);
+      DBAddVarComponent(obj, tmp1, tmp2);
+
+      /* Write the mixed data component if present */
+      if (mixvars != NULL && mixvars[i] != NULL && mixlen > 0) {
+         mcount[0] = mixlen;
+
+         db_mkname(dbfile->pdb, varnames[i], "mix", tmp2);
+         PJ_write_len(dbfile->pdb, tmp2, datatype_str, mixvars[i],
+                      1, mcount);
+
+         sprintf(tmp1, "mixed_value%d", i);
+         DBAddVarComponent(obj, tmp1, tmp2);
+      }
+   }
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a SILO object definition for a quad mesh var. The
+    *  minimum required information for a quad var is the variable
+    *  itself, plus the ID for the associated quad mesh object.
+    *  Process any additional options to complete the definition.
+    *-------------------------------------------------------------*/
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nvals", nvars);
+   DBAddIntComponent(obj, "nels", nels);
+   DBAddIntComponent(obj, "origin", _qm._origin);
+   DBAddIntComponent(obj, "datatype", datatype);
+   DBAddIntComponent(obj, "centering", centering);
+   DBAddIntComponent(obj, "mixlen", mixlen);
+
+   /*-------------------------------------------------------------
+    * Add 'recommended' optional components.
+    *-------------------------------------------------------------*/
+   DBAddIntComponent(obj, "major_order", _qm._majororder);
+   DBAddIntComponent(obj, "cycle", _qm._cycle);
+
+   if (_qm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _qm._nm_time);
+   if (_qm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _qm._nm_dtime);
+
+   DBAddVarComponent(obj, "min_index", _qm._nm_minindex);
+   DBAddIntComponent(obj, "use_specmf", _qm._use_specmf);
+   if (_qm._ascii_labels) {
+      DBAddIntComponent(obj, "ascii_labels", _qm._ascii_labels);
+   }
+
+   if (_qm._guihide)
+      DBAddIntComponent(obj, "guihide", _qm._guihide);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for variable.
+    *-------------------------------------------------------------*/
+   if (_qm._label != NULL)
+      DBAddStrComponent(obj, "label", _qm._label);
+
+   if (_qm._unit != NULL)
+      DBAddStrComponent(obj, "units", _qm._unit);
+
+   if (_qm._region_pnames != NULL)
+   {
+        char *s=0; int len=0; long llen;
+        DBStringArrayToStringList(_qm._region_pnames, -1, &s, &len);
+        llen = len;
+        DBWriteComponent(_dbfile, obj, "region_pnames", name, "char", s, 1, &llen);
+        FREE(s);
+   }
+
+   if (_qm._conserved)
+      DBAddIntComponent(obj, "conserved", _qm._conserved);
+
+   if (_qm._extensive)
+      DBAddIntComponent(obj, "extensive", _qm._extensive);
+
+
+   /*-------------------------------------------------------------
+    *  Write quad-var object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(_dbfile, obj, 0);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                           db_pdb_PutCsgmesh
+ *
+ *  Purpose
+ *
+ *      Write a csg mesh object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller , Tue Aug  2 19:15:39 PDT 2005
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutCsgmesh (DBfile *dbfile, const char *name, int ndims,
+                   int nbounds,
+                   const int *typeflags, const int *bndids,
+                   const void *coeffs, int lcoeffs, int datatype,
+                   const double *extents, const char *zlname,
+                   DBoptlist *optlist) {
+
+   long           count[3];
+   DBobject      *obj;
+   char          *datatype_str;
+   double         min_extents[3], max_extents[3];
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   strcpy(_csgm._meshname, name);
+
+   db_InitCsg(dbfile, (char*) name, optlist);
+
+   obj = DBMakeObject(name, DB_CSGMESH, 34);
+
+   count[0] = nbounds;
+
+   DBWriteComponent(dbfile, obj, "typeflags", name, "integer",
+                    typeflags, 1, count);
+
+   if (bndids)
+       DBWriteComponent(dbfile, obj, "bndids", name, "integer",
+                        bndids, 1, count);
+
+   datatype_str = db_GetDatatypeString(datatype);
+   count[0] = lcoeffs;
+   DBWriteComponent(dbfile, obj, "coeffs", name, datatype_str,
+                       coeffs, 1, count);
+   FREE(datatype_str);
+
+   min_extents[0] = extents[0];
+   min_extents[1] = extents[1];
+   min_extents[2] = extents[2];
+   max_extents[0] = extents[3];
+   max_extents[1] = extents[4];
+   max_extents[2] = extents[5];
+
+   count[0] = ndims;
+   DBWriteComponent(dbfile, obj, "min_extents", name, "double",
+                    min_extents, 1, count);
+   DBWriteComponent(dbfile, obj, "max_extents", name, "double",
+                    max_extents, 1, count);
+
+   /*-------------------------------------------------------------
+    *  Build a output object definition for a ucd mesh. The minimum
+    *  required information for a ucd mesh is the coordinate arrays,
+    *  the number of dimensions, and the type (RECT/CURV). Process
+    *  the provided options to complete the definition.
+    *
+    *  The output object definition is composed of a string of delimited
+    *  component names plus an array of output *identifiers* of
+    *  previously defined variables.
+    *-------------------------------------------------------------*/
+
+   if (zlname)
+      DBAddStrComponent(obj, "csgzonelist", zlname);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nbounds", nbounds);
+   DBAddIntComponent(obj, "cycle", _csgm._cycle);
+   DBAddIntComponent(obj, "datatype", datatype);
+   DBAddIntComponent(obj, "lcoeffs", lcoeffs);
+   if (_csgm._guihide)
+       DBAddIntComponent(obj, "guihide", _csgm._guihide);
+
+   if (_csgm._group_no >= 0)
+       DBAddIntComponent(obj, "group_no", _csgm._group_no);
+
+   if (_csgm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _csgm._nm_time);
+   if (_csgm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _csgm._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for x, y, &/or z,
+    *-------------------------------------------------------------*/
+   if (_csgm._labels[0] != NULL)
+      DBAddStrComponent(obj, "label0", _csgm._labels[0]);
+
+   if (_csgm._labels[1] != NULL)
+      DBAddStrComponent(obj, "label1", _csgm._labels[1]);
+
+   if (_csgm._labels[2] != NULL)
+      DBAddStrComponent(obj, "label2", _csgm._labels[2]);
+
+   if (_csgm._units[0] != NULL)
+      DBAddStrComponent(obj, "units0", _csgm._units[0]);
+
+   if (_csgm._units[1] != NULL)
+      DBAddStrComponent(obj, "units1", _csgm._units[1]);
+
+   if (_csgm._units[2] != NULL)
+      DBAddStrComponent(obj, "units2", _csgm._units[2]);
+
+   if (_csgm._mrgtree_name != NULL)
+      DBAddStrComponent(obj, "mrgtree_name", _csgm._mrgtree_name);
+
+   if (_csgm._tv_connectivity)
+       DBAddIntComponent(obj, "tv_connectivity", _csgm._tv_connectivity);
+
+   if (_csgm._disjoint_mode)
+       DBAddIntComponent(obj, "disjoint_mode", _csgm._disjoint_mode);
+
+   /*-------------------------------------------------------------
+    *  Write csg-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                            db_pdb_PutCsgvar
+ *
+ *  Purpose
+ *
+ *      Write a csg variable object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, August 10. 2005 
+ *
+ *  Modifications:
+ *      Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *      Added support for conserved/extensive options.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutCsgvar (DBfile *_dbfile, const char *name, const char *meshname,
+                  int nvars, char *varnames[], void *vars[],
+                  int nels, int datatype, int centering,
+                  DBoptlist *optlist) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            i;
+   long           count[3];
+   DBobject      *obj;
+   char          *suffix, *datatype_str, tmp1[256], tmp2[256];
+   static char   *me = "db_pdb_PutCsgvar";
+
+   db_InitCsg(_dbfile, (char*) name, optlist);
+
+   obj = DBMakeObject(name, DB_CSGVAR, 29);
+
+   DBAddStrComponent(obj, "meshid", meshname);
+
+   /*-------------------------------------------------------------
+    *  Write variable arrays.
+    *  Set index variables and counters.
+    *-----------------------------------------------------------*/
+
+   count[0] = nels;
+
+   switch (centering) {
+   case DB_NODECENT:
+   case DB_ZONECENT:
+   case DB_FACECENT:
+      break;
+
+   default:
+      return db_perror("centering", E_BADARGS, me);
+   }
+
+   /*-------------------------------------------------------------
+    *  We first will write the given variables to output, then
+    *  we'll define a Ucdvar object in output composed of the
+    *  variables plus the given options.
+    *-------------------------------------------------------------*/
+
+   suffix = "data";
+   datatype_str = db_GetDatatypeString(datatype);
+
+   for (i = 0; i < nvars; i++) {
+
+      db_mkname(dbfile->pdb, (char*) varnames[i], suffix, tmp2);
+      PJ_write_len(dbfile->pdb, tmp2, datatype_str, vars[i],
+                   1, count);
+
+      sprintf(tmp1, "value%d", i);
+      DBAddVarComponent(obj, tmp1, tmp2);
+
+   }
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a output object definition for a ucd mesh var. The
+    *  minimum required information for a ucd var is the variable
+    *  itself, plus the ID for the associated ucd mesh object.
+    *  Process any additional options to complete the definition.
+    *-------------------------------------------------------------*/
+
+   DBAddIntComponent(obj, "nvals", nvars);
+   DBAddIntComponent(obj, "nels", nels);
+   DBAddIntComponent(obj, "centering", centering);
+   DBAddIntComponent(obj, "datatype", datatype);
+   if (_csgm._guihide)
+      DBAddIntComponent(obj, "guihide", _csgm._guihide);
+
+   /*-------------------------------------------------------------
+    * Add 'recommended' optional components.
+    *-------------------------------------------------------------*/
+   if (_csgm._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _csgm._nm_time);
+   if (_csgm._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _csgm._nm_dtime);
+
+   if (centering == DB_ZONECENT)
+   {
+      if (_csgm._hi_offset_set == TRUE)
+         DBAddIntComponent(obj, "hi_offset", _csgm._hi_offset);
+      if (_csgm._lo_offset_set == TRUE)
+         DBAddIntComponent(obj, "lo_offset", _csgm._lo_offset);
+   }
+
+   DBAddIntComponent(obj, "cycle", _csgm._cycle);
+   DBAddIntComponent(obj, "use_specmf", _csgm._use_specmf);
+   if (_csgm._ascii_labels) {
+      DBAddIntComponent(obj, "ascii_labels", _csgm._ascii_labels);
+   }
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for variable.
+    *-------------------------------------------------------------*/
+   if (_csgm._label != NULL)
+      DBAddStrComponent(obj, "label", _csgm._label);
+
+   if (_csgm._unit != NULL)
+      DBAddStrComponent(obj, "units", _csgm._unit);
+
+   if (_csgm._region_pnames != NULL)
+   {
+        char *s=0; int len=0; long llen;
+        DBStringArrayToStringList(_csgm._region_pnames, -1, &s, &len);
+        llen = len;
+        DBWriteComponent(_dbfile, obj, "region_pnames", name, "char", s, 1, &llen);
+        FREE(s);
+   }
+
+   if (_csgm._conserved)
+      DBAddIntComponent(obj, "conserved", _csgm._conserved);
+
+   if (_csgm._extensive)
+      DBAddIntComponent(obj, "extensive", _csgm._extensive);
+
+   /*-------------------------------------------------------------
+    *  Write ucd-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(_dbfile, obj, 0);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                        db_pdb_PutCSGZonelist
+ *
+ *  Purpose
+ *
+ *      Write a csg zonelist object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller 
+ *      August 9, 2005 
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutCSGZonelist (DBfile *dbfile, const char *name, int nregs,
+                 const int *typeflags,
+                 const int *leftids, const int *rightids,
+                 const void *xforms, int lxforms, int datatype,
+                 int nzones, const int *zonelist, DBoptlist *optlist) {
+
+   long           count[1];
+   DBobject      *obj;
+
+   memset(&_csgzl, 0, sizeof(_csgzl));
+   db_ProcessOptlist(DB_CSGZONELIST, optlist);
+
+   /*--------------------------------------------------
+    *  Build up object description by defining literals
+    *  and defining/writing arrays.
+    *-------------------------------------------------*/
+   obj = DBMakeObject(name, DB_CSGZONELIST, 15);
+
+   DBAddIntComponent(obj, "nregs", nregs);
+   DBAddIntComponent(obj, "datatype", datatype);
+   DBAddIntComponent(obj, "nzones", nzones);
+
+   count[0] = nregs;
+   DBWriteComponent(dbfile, obj, "typeflags", name, "integer",
+                    typeflags, 1, count);
+   DBWriteComponent(dbfile, obj, "leftids", name, "integer",
+                    leftids, 1, count);
+   DBWriteComponent(dbfile, obj, "rightids", name, "integer",
+                    rightids, 1, count);
+   count[0] = nzones;
+   DBWriteComponent(dbfile, obj, "zonelist", name, "integer",
+                    zonelist, 1, count);
+
+   if (xforms && lxforms > 0)
+   {
+       char *datatype_str = db_GetDatatypeString(datatype);
+       count[0] = lxforms;
+       DBWriteComponent(dbfile, obj, "xforms", name, datatype_str,
+                           xforms, 1, count);
+   }
+
+   if (_csgzl._regnames)
+   {
+       int len; char *tmp;
+       DBStringArrayToStringList(_csgzl._regnames, nregs, &tmp, &len);
+       count[0] = len;
+       DBWriteComponent(dbfile, obj, "regnames", name, "char",
+                        tmp, 1, count);
+       FREE(tmp);
+   }
+
+   if (_csgzl._zonenames)
+   {
+       int len; char *tmp;
+       DBStringArrayToStringList(_csgzl._zonenames, nzones, &tmp, &len);
+       count[0] = len;
+       DBWriteComponent(dbfile, obj, "zonenames", name, "char",
+                        tmp, 1, count);
+       FREE(tmp);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                           db_pdb_PutUcdmesh
+ *
+ *  Purpose
+ *
+ *      Write a ucd mesh object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *     Robb Matzke, Sun Dec 18 17:12:16 EST 1994
+ *     Changed SW_GetDatatypeString to db_GetDatatypeString and
+ *     removed associated memory leak.
+ *
+ *     Robb Matzke, Fri Dec 2 14:19:04 PST 1994
+ *     Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *     Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *     Added _dtime.
+ *
+ *     Sean Ahern, Wed Oct 21 09:22:30 PDT 1998
+ *     Changed how we pass extents data to the UM_CalcExtents function.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Added group_no and gnodeno.
+ *
+ *     Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *     Put in lint directive for unused arguments.
+ *
+ *     Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *     Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *
+ *      Mark C. Miller, Tue Nov 17 22:22:09 PST 2009
+ *      Changed name of long long datatype to match what PDB proper
+ *      would call it.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutUcdmesh (DBfile *dbfile, char *name, int ndims, char *coordnames[],
+                   DB_DTPTR2 _coords, int nnodes, int nzones, char *zlname,
+                   char *flname, int datatype, DBoptlist *optlist) {
+
+   int            i;
+   long           count[3];
+   DBobject      *obj;
+   char          *datatype_str;
+   char           tmp[256];
+   DB_DTPTR     **coords = (DB_DTPTR**) _coords;
+
+   /* Following is declared as double for worst case */
+   double         min_extents[3], max_extents[3];
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   strcpy(_um._meshname, name);
+
+   db_InitUcd(dbfile, name, optlist, ndims, nnodes, nzones);
+
+   obj = DBMakeObject(name, DB_UCDMESH, 33);
+
+   /*-------------------------------------------------------------
+    *  We first will write the given coordinate arrays to output,
+    *  then we'll define a UCD-mesh object in output composed of the
+    *  coordinates plus the given options.
+    *-------------------------------------------------------------*/
+
+   datatype_str = db_GetDatatypeString(datatype);
+   count[0] = nnodes;
+
+   for (i = 0; i < ndims; i++) {
+
+      sprintf(tmp, "coord%d", i);
+
+      DBWriteComponent(dbfile, obj, tmp, name, datatype_str,
+                       coords[i], 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Find the mesh extents from the coordinate arrays. Write
+    *  them out to output file.
+    *-------------------------------------------------------------*/
+
+   UM_CalcExtents(coords, datatype, ndims, nnodes, min_extents, max_extents);
+
+   count[0] = ndims;
+   DBWriteComponent(dbfile, obj, "min_extents", name, datatype_str,
+                    min_extents, 1, count);
+
+   DBWriteComponent(dbfile, obj, "max_extents", name, datatype_str,
+                    max_extents, 1, count);
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a output object definition for a ucd mesh. The minimum
+    *  required information for a ucd mesh is the coordinate arrays,
+    *  the number of dimensions, and the type (RECT/CURV). Process
+    *  the provided options to complete the definition.
+    *
+    *  The output object definition is composed of a string of delimited
+    *  component names plus an array of output *identifiers* of
+    *  previously defined variables.
+    *-------------------------------------------------------------*/
+
+   if (flname)
+      DBAddStrComponent(obj, "facelist", flname);
+   if (zlname)
+      DBAddStrComponent(obj, "zonelist", zlname);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nnodes", nnodes);
+   DBAddIntComponent(obj, "nzones", nzones);
+   DBAddIntComponent(obj, "facetype", _um._facetype);
+   DBAddIntComponent(obj, "cycle", _um._cycle);
+   DBAddIntComponent(obj, "coord_sys", _um._coordsys);
+   if (_um._topo_dim > 0)
+      DBAddIntComponent(obj, "topo_dim", _um._topo_dim);
+   DBAddIntComponent(obj, "planar", _um._planar);
+   DBAddIntComponent(obj, "origin", _um._origin);
+   DBAddIntComponent(obj, "datatype", datatype);
+   if (_um._llong_gnodeno)
+       DBAddIntComponent(obj, "gnznodtype", DB_LONG_LONG);
+
+   if (_um._gnodeno)
+   {
+       count[0] = nnodes;
+       if (_um._llong_gnodeno)
+           DBWriteComponent(dbfile, obj, "gnodeno", name, "long_long",
+               _um._gnodeno, 1, count);
+       else
+           DBWriteComponent(dbfile, obj, "gnodeno", name, "integer",
+               _um._gnodeno, 1, count);
+   }
+
+   if (_um._group_no >= 0)
+       DBAddIntComponent(obj, "group_no", _um._group_no);
+
+   if (_um._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _um._nm_time);
+   if (_um._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _um._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for x, y, &/or z,
+    *-------------------------------------------------------------*/
+   if (_um._labels[0] != NULL)
+      DBAddStrComponent(obj, "label0", _um._labels[0]);
+
+   if (_um._labels[1] != NULL)
+      DBAddStrComponent(obj, "label1", _um._labels[1]);
+
+   if (_um._labels[2] != NULL)
+      DBAddStrComponent(obj, "label2", _um._labels[2]);
+
+   if (_um._units[0] != NULL)
+      DBAddStrComponent(obj, "units0", _um._units[0]);
+
+   if (_um._units[1] != NULL)
+      DBAddStrComponent(obj, "units1", _um._units[1]);
+
+   if (_um._units[2] != NULL)
+      DBAddStrComponent(obj, "units2", _um._units[2]);
+
+   if (_um._guihide)
+      DBAddIntComponent(obj, "guihide", _um._guihide);
+
+   /*-------------------------------------------------------------
+    *  Optional polyhedral zonelist 
+    *-------------------------------------------------------------*/
+   if (_um._phzl_name != NULL)
+      DBAddStrComponent(obj, "phzonelist", _um._phzl_name);
+
+   if (_um._mrgtree_name != NULL)
+      DBAddStrComponent(obj, "mrgtree_name", _um._mrgtree_name);
+
+   if (_um._tv_connectivity)
+      DBAddIntComponent(obj, "tv_connectivity", _um._tv_connectivity);
+
+   if (_um._disjoint_mode)
+      DBAddIntComponent(obj, "disjoint_mode", _um._disjoint_mode);
+
+   /*-------------------------------------------------------------
+    *  Write ucd-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_PutUcdsubmesh
+ *
+ *  Purpose
+ *
+ *      Write a subset of a ucd mesh object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jim Reus
+ *
+ *  Notes
+ *
+ *  Modifications
+ *     none yet.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutUcdsubmesh (DBfile *dbfile, char *name, char *parentmesh,
+                      int nzones, char *zlname, char *flname,
+                      DBoptlist *optlist) {
+
+   int            i;
+   DBobject      *obj;
+   int           *Pdatatype,datatype;
+   int           *Pndims,ndims;
+   int           *Pnnodes,nnodes;
+
+   /*-------------------------------------------------------------
+    *  We first retreive certain attributes from the parent mesh.
+    *  Of course this had better succeed...
+    *-------------------------------------------------------------*/
+
+   Pndims       = DBGetComponent(dbfile,parentmesh,"ndims");
+          ndims = *Pndims;
+   Pnnodes      = DBGetComponent(dbfile,parentmesh,"nnodes");
+         nnodes = *Pnnodes;
+   Pdatatype    = DBGetComponent(dbfile,parentmesh,"datatype");
+       datatype = *Pdatatype;
+
+   /*-------------------------------------------------------------
+    *  Now we can initialize global data, and process options.
+    *-------------------------------------------------------------*/
+
+   strcpy(_um._meshname, name);
+
+   db_InitUcd(dbfile, name, optlist, ndims, nnodes, nzones);
+
+   obj = DBMakeObject(name, DB_UCDMESH, 28);
+
+   /*-------------------------------------------------------------
+    *  Then we will add references to the coordinate arrays of the
+    *  parent mesh...
+    *-------------------------------------------------------------*/
+
+   for (i = 0; i < ndims; i++) {
+      char           myComponName[256];
+      char           parentComponName[256];
+
+      sprintf(myComponName, "coord%d", i);
+      sprintf(parentComponName, "%s_coord%d", parentmesh, i);
+      DBAddVarComponent(obj,myComponName,parentComponName);
+   }
+
+   /*-------------------------------------------------------------
+    *  For now we'll simply refer to the extents provided for the
+    *  parent mesh.  It would be be better to compute extents for
+    *  the cordinates actually used, but then we'd have to retrieve
+    *  the coords...
+    *-------------------------------------------------------------*/
+
+   {  char           myComponName[256];
+      char           parentComponName[256];
+
+      sprintf(myComponName, "min_extents");
+      sprintf(parentComponName, "%s_min_extents", parentmesh);
+      DBAddVarComponent(obj,myComponName,parentComponName);
+
+      sprintf(myComponName, "max_extents");
+      sprintf(parentComponName, "%s_max_extents", parentmesh);
+      DBAddVarComponent(obj,myComponName,parentComponName);
+   }
+
+   /*-------------------------------------------------------------
+    *  Build a output object definition for a ucd mesh. The minimum
+    *  required information for a ucd mesh is the coordinate arrays,
+    *  the number of dimensions, and the type (RECT/CURV). Process
+    *  the provided options to complete the definition.
+    *
+    *  The output object definition is composed of a string of delimited
+    *  component names plus an array of output *identifiers* of
+    *  previously defined variables.
+    *-------------------------------------------------------------*/
+
+   if (flname)
+      DBAddStrComponent(obj, "facelist", flname);
+   if (zlname)
+      DBAddStrComponent(obj, "zonelist", zlname);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nnodes", nnodes);
+   DBAddIntComponent(obj, "nzones", nzones);
+   DBAddIntComponent(obj, "facetype", _um._facetype);
+   DBAddIntComponent(obj, "cycle", _um._cycle);
+   DBAddIntComponent(obj, "coord_sys", _um._coordsys);
+   if (_um._topo_dim > 0)
+      DBAddIntComponent(obj, "topo_dim", _um._topo_dim);
+   DBAddIntComponent(obj, "planar", _um._planar);
+   DBAddIntComponent(obj, "origin", _um._origin);
+   DBAddIntComponent(obj, "datatype", datatype);
+
+   if (_um._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _um._nm_time);
+   if (_um._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _um._nm_dtime);
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for x, y, &/or z,
+    *-------------------------------------------------------------*/
+   if (_um._labels[0] != NULL)
+      DBAddStrComponent(obj, "label0", _um._labels[0]);
+
+   if (_um._labels[1] != NULL)
+      DBAddStrComponent(obj, "label1", _um._labels[1]);
+
+   if (_um._labels[2] != NULL)
+      DBAddStrComponent(obj, "label2", _um._labels[2]);
+
+   if (_um._units[0] != NULL)
+      DBAddStrComponent(obj, "units0", _um._units[0]);
+
+   if (_um._units[1] != NULL)
+      DBAddStrComponent(obj, "units1", _um._units[1]);
+
+   if (_um._units[2] != NULL)
+      DBAddStrComponent(obj, "units2", _um._units[2]);
+
+   if (_um._guihide)
+      DBAddIntComponent(obj, "guihide", _um._guihide);
+
+   if (_um._tv_connectivity)
+      DBAddIntComponent(obj, "tv_connectivity", _um._tv_connectivity);
+
+   if (_um._disjoint_mode)
+      DBAddIntComponent(obj, "disjoint_mode", _um._disjoint_mode);
+
+
+   /*-------------------------------------------------------------
+    *  Write ucd-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+
+   FREE(Pdatatype);
+   FREE(Pnnodes);
+   FREE(Pndims);
+
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                            db_pdb_PutUcdvar
+ *
+ *  Purpose
+ *
+ *      Write a ucd variable object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *     Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *     Added _dtime.
+ *
+ *     Al Leibee, Mon Jul 11 12:00:00 PDT 1994
+ *     Use mixlen, not _mixlen.
+ *
+ *     Al Leibee, Wed Jul 20 07:56:37 PDT 1994
+ *     Write mixlen component.
+ *
+ *     Al Leibee, Wed Aug  3 16:57:38 PDT 1994
+ *     Added _use_specmf.
+ *
+ *     Robb Matzke, Fri Dec 2 14:19:42 PST 1994
+ *     Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *     Robb Matzke, Sun Dec 18 17:13:17 EST 1994
+ *     Changed SW_GetDatatypeString to db_GetDatatypeString and
+ *     removed associated memory leak.
+ *
+ *     Sean Ahern, Sun Oct  1 03:17:35 PDT 1995
+ *     Made "me" static.
+ *
+ *     Eric Brugger, Wed Oct 15 14:45:47 PDT 1997
+ *     Added _hi_offset and _lo_offset.
+ *
+ *     Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *     Removed unused variable nm_cent.
+ *
+ *     Robb Matzke, 2000-05-23
+ *     Removed the duplicate `meshid' field.
+ *
+ *     Brad Whitlock, Wed Jan 18 15:09:57 PST 2006
+ *     Added ascii_labels.
+ *
+ *     Mark C. Miller, Thu Nov  5 16:15:49 PST 2009
+ *     Added support for conserved/extensive options.
+ *
+ *     Mark C. Miller, Wed Nov 11 22:17:40 PST 2009
+ *     Removed unnecessary code checking centering.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutUcdvar (DBfile *_dbfile, char *name, char *meshname, int nvars,
+                  char *varnames[], DB_DTPTR2 _vars, int nels, DB_DTPTR2 _mixvars,
+                  int mixlen, int datatype, int centering,
+                  DBoptlist *optlist) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            i;
+   long           count[3], mcount[1];
+   DBobject      *obj;
+   char          *suffix, *datatype_str, tmp1[256], tmp2[256];
+   static char   *me = "db_pdb_PutUcdvar";
+   DB_DTPTR     **vars = (DB_DTPTR**) _vars;
+   DB_DTPTR     **mixvars = (DB_DTPTR**) _mixvars;
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+#if 1                       /*which way is right?  (1st one is the original) */
+   db_InitUcd(_dbfile, meshname, optlist, _um._ndims,
+              _um._nnodes, _um._nzones);
+#else
+   db_InitUcd(_dbfile, meshname, optlist, ndims, nnodes, nzones);
+#endif
+
+   obj = DBMakeObject(name, DB_UCDVAR, 29);
+
+   DBAddStrComponent(obj, "meshid", meshname);
+
+   /*-------------------------------------------------------------
+    *  Write variable arrays.
+    *  Set index variables and counters.
+    *-----------------------------------------------------------*/
+
+   count[0] = nels;
+
+   /*-------------------------------------------------------------
+    *  We first will write the given variables to output, then
+    *  we'll define a Ucdvar object in output composed of the
+    *  variables plus the given options.
+    *-------------------------------------------------------------*/
+
+   suffix = "data";
+   datatype_str = db_GetDatatypeString(datatype);
+
+   for (i = 0; i < nvars; i++) {
+
+      db_mkname(dbfile->pdb, varnames[i], suffix, tmp2);
+      PJ_write_len(dbfile->pdb, tmp2, datatype_str, vars[i],
+                   1, count);
+
+      sprintf(tmp1, "value%d", i);
+      DBAddVarComponent(obj, tmp1, tmp2);
+
+      /* Write the mixed data component if present */
+      if (mixvars != NULL && mixvars[i] != NULL && mixlen > 0) {
+         mcount[0] = mixlen;
+
+         db_mkname(dbfile->pdb, varnames[i], "mix", tmp2);
+         PJ_write_len(dbfile->pdb, tmp2, datatype_str, mixvars[i],
+                      1, mcount);
+
+         sprintf(tmp1, "mixed_value%d", i);
+         DBAddVarComponent(obj, tmp1, tmp2);
+      }
+   }
+   FREE(datatype_str);
+
+   /*-------------------------------------------------------------
+    *  Build a output object definition for a ucd mesh var. The
+    *  minimum required information for a ucd var is the variable
+    *  itself, plus the ID for the associated ucd mesh object.
+    *  Process any additional options to complete the definition.
+    *-------------------------------------------------------------*/
+
+   DBAddIntComponent(obj, "ndims", _um._ndims);
+   DBAddIntComponent(obj, "nvals", nvars);
+   DBAddIntComponent(obj, "nels", nels);
+   DBAddIntComponent(obj, "centering", centering);
+   DBAddIntComponent(obj, "origin", _um._origin);
+   DBAddIntComponent(obj, "mixlen", mixlen);
+   DBAddIntComponent(obj, "datatype", datatype);
+
+   /*-------------------------------------------------------------
+    * Add 'recommended' optional components.
+    *-------------------------------------------------------------*/
+   if (_um._time_set == TRUE)
+      DBAddVarComponent(obj, "time", _um._nm_time);
+   if (_um._dtime_set == TRUE)
+      DBAddVarComponent(obj, "dtime", _um._nm_dtime);
+
+   if (centering == DB_ZONECENT)
+   {
+      if (_um._hi_offset_set == TRUE)
+         DBAddIntComponent(obj, "hi_offset", _um._hi_offset);
+      if (_um._lo_offset_set == TRUE)
+         DBAddIntComponent(obj, "lo_offset", _um._lo_offset);
+   }
+
+   DBAddIntComponent(obj, "cycle", _um._cycle);
+   DBAddIntComponent(obj, "use_specmf", _um._use_specmf);
+   if (_um._ascii_labels) {
+      DBAddIntComponent(obj, "ascii_labels", _um._ascii_labels);
+   }
+
+   /*-------------------------------------------------------------
+    *  Process character strings: labels & units for variable.
+    *-------------------------------------------------------------*/
+   if (_um._label != NULL)
+      DBAddStrComponent(obj, "label", _um._label);
+
+   if (_um._unit != NULL)
+      DBAddStrComponent(obj, "units", _um._unit);
+
+   if (_um._guihide)
+      DBAddIntComponent(obj, "guihide", _um._guihide);
+
+   if (_um._region_pnames != NULL)
+   {
+        char *s=0; int len=0; long llen;
+        DBStringArrayToStringList(_um._region_pnames, -1, &s, &len);
+        llen = len;
+        DBWriteComponent(_dbfile, obj, "region_pnames", name, "char", s, 1, &llen);
+        FREE(s);
+   }
+
+   if (_um._conserved)
+      DBAddIntComponent(obj, "conserved", _um._conserved);
+
+   if (_um._extensive)
+      DBAddIntComponent(obj, "extensive", _um._extensive);
+
+   /*-------------------------------------------------------------
+    *  Write ucd-mesh object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(_dbfile, obj, 0);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                           db_pdb_PutZonelist
+ *
+ *  Purpose
+ *
+ *      Write a ucd zonelist object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modified
+ *     Robb Matzke, Fri Dec 2 14:20:10 PST 1994
+ *     Changed SCFREE(obj) to DBFreeObject(obj)
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutZonelist (DBfile *dbfile, char *name, int nzones, int ndims,
+                    int nodelist[], int lnodelist, int origin, int shapesize[],
+                    int shapecnt[], int nshapes) {
+
+   long           count[5];
+   DBobject      *obj;
+
+   /*--------------------------------------------------
+    *  Build up object description by defining literals
+    *  and defining/writing arrays.
+    *-------------------------------------------------*/
+   obj = DBMakeObject(name, DB_ZONELIST, 15);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nzones", nzones);
+   DBAddIntComponent(obj, "nshapes", nshapes);
+   DBAddIntComponent(obj, "lnodelist", lnodelist);
+   DBAddIntComponent(obj, "origin", origin);
+
+   count[0] = lnodelist;
+
+   DBWriteComponent(dbfile, obj, "nodelist", name, "integer",
+                    nodelist, 1, count);
+
+   count[0] = nshapes;
+
+   DBWriteComponent(dbfile, obj, "shapecnt", name, "integer",
+                    shapecnt, 1, count);
+
+   DBWriteComponent(dbfile, obj, "shapesize", name, "integer",
+                    shapesize, 1, count);
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_pdb_PutZonelist2
+ *
+ *  Purpose
+ *
+ *      Write a ucd zonelist object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Eric Brugger
+ *      March 30, 1999
+ *
+ *  Notes
+ *
+ *  Modified
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added an option list, a call to initialize it, and gzoneno.
+ *
+ *    Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *    Add support for long long global node/zone numbers.
+ *
+ *    Mark C. Miller, Tue Nov 17 22:22:09 PST 2009
+ *    Changed name of long long datatype to match what PDB proper
+ *    would call it.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutZonelist2 (DBfile *dbfile, char *name, int nzones, int ndims,
+                     int nodelist[], int lnodelist, int origin,
+                     int lo_offset, int hi_offset, int shapetype[],
+                     int shapesize[], int shapecnt[], int nshapes,
+                     DBoptlist *optlist) {
+
+   long           count[5];
+   DBobject      *obj;
+
+   db_InitZonelist(dbfile, optlist);
+
+   /*--------------------------------------------------
+    *  Build up object description by defining literals
+    *  and defining/writing arrays.
+    *-------------------------------------------------*/
+   obj = DBMakeObject(name, DB_ZONELIST, 16);
+
+   DBAddIntComponent(obj, "ndims", ndims);
+   DBAddIntComponent(obj, "nzones", nzones);
+   DBAddIntComponent(obj, "nshapes", nshapes);
+   DBAddIntComponent(obj, "lnodelist", lnodelist);
+   DBAddIntComponent(obj, "origin", origin);
+   DBAddIntComponent(obj, "lo_offset", lo_offset);
+   DBAddIntComponent(obj, "hi_offset", hi_offset);
+   if (_uzl._llong_gzoneno)
+       DBAddIntComponent(obj, "gnznodtype", DB_LONG_LONG);
+
+   count[0] = lnodelist;
+
+   DBWriteComponent(dbfile, obj, "nodelist", name, "integer",
+                    nodelist, 1, count);
+
+   count[0] = nshapes;
+
+   DBWriteComponent(dbfile, obj, "shapecnt", name, "integer",
+                    shapecnt, 1, count);
+
+   DBWriteComponent(dbfile, obj, "shapesize", name, "integer",
+                    shapesize, 1, count);
+
+   DBWriteComponent(dbfile, obj, "shapetype", name, "integer",
+                    shapetype, 1, count);
+
+   if (_uzl._gzoneno)
+   {
+       count[0] = nzones;
+       if (_uzl._llong_gzoneno)
+           DBWriteComponent(dbfile, obj, "gzoneno", name, "long_long",
+               _uzl._gzoneno, 1, count);
+       else
+           DBWriteComponent(dbfile, obj, "gzoneno", name, "integer",
+               _uzl._gzoneno, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                 db_pdb_PutPHZonelist
+ *
+ *  Purpose
+ *
+ *      Write a polyhedral zonelist object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller 
+ *      July 27, 2004
+ *
+ *  Modifications:
+ *      Mark C. Miller, Fri Nov 13 15:26:38 PST 2009
+ *      Add support for long long global node/zone numbers.
+ *
+ *      Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *      Changed how long long global node/zone numbers are supported
+ *      from a int (bool), "llong_gnode|zoneno" to an int holding
+ *      the actual datatype. The type is assumed int if it its
+ *      value is zero or it does not exist. Otherwise, the type is
+ *      is whatever is stored in gnznodtype member. 
+ *
+ *      Mark C. Miller, Tue Nov 17 22:22:09 PST 2009
+ *      Changed name of long long datatype to match what PDB proper
+ *      would call it.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutPHZonelist (DBfile *dbfile, char *name,
+   int nfaces, int *nodecnt, int lnodelist, int *nodelist, char *extface,
+   int nzones, int *facecnt, int lfacelist, int *facelist,
+   int origin, int lo_offset, int hi_offset,
+   DBoptlist *optlist) {
+
+   long           count[1];
+   DBobject      *obj;
+
+   db_InitPHZonelist(dbfile, optlist);
+
+   /*--------------------------------------------------
+    *  Build up object description by defining literals
+    *  and defining/writing arrays.
+    *-------------------------------------------------*/
+   obj = DBMakeObject(name, DB_PHZONELIST, 16);
+
+   DBAddIntComponent(obj, "nfaces", nfaces);
+   DBAddIntComponent(obj, "lnodelist", lnodelist);
+   DBAddIntComponent(obj, "nzones", nzones);
+   DBAddIntComponent(obj, "lfacelist", lfacelist);
+   DBAddIntComponent(obj, "origin", origin);
+   DBAddIntComponent(obj, "lo_offset", lo_offset);
+   DBAddIntComponent(obj, "hi_offset", hi_offset);
+   if (_phzl._llong_gzoneno)
+       DBAddIntComponent(obj, "gnznodtype", DB_LONG_LONG);
+
+   count[0] = nfaces;
+
+   DBWriteComponent(dbfile, obj, "nodecnt", name, "integer",
+                    nodecnt, 1, count);
+
+   count[0] = lnodelist;
+
+   DBWriteComponent(dbfile, obj, "nodelist", name, "integer",
+                    nodelist, 1, count);
+
+   if (facecnt)
+   {
+       count[0] = nzones;
+
+       DBWriteComponent(dbfile, obj, "facecnt", name, "integer",
+                        facecnt, 1, count);
+   }
+
+   if (facelist)
+   {
+       count[0] = lfacelist;
+
+       DBWriteComponent(dbfile, obj, "facelist", name, "integer",
+                        facelist, 1, count);
+
+   }
+
+   if (extface)
+   {
+       count[0] = nfaces;
+
+       DBWriteComponent(dbfile, obj, "extface", name, "char",
+                        extface, 1, count);
+   }
+
+   if (_phzl._gzoneno)
+   {
+       count[0] = nzones;
+       if (_phzl._llong_gzoneno)
+           DBWriteComponent(dbfile, obj, "gzoneno", name, "long_long",
+               _phzl._gzoneno, 1, count);
+       else
+           DBWriteComponent(dbfile, obj, "gzoneno", name, "integer",
+               _phzl._gzoneno, 1, count);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                            db_pdb_PutMrgtree
+ *
+ *  Purpose
+ *
+ *      Write mrg tree object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Oct 10 10:25:53 PDT 2007
+ *
+ *  Modifications:
+ *
+ *      Mark C. Miller, Mon Nov 17 19:02:58 PST 2008
+ *      Fixed output of src_mesh_name
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutMrgtree(DBfile *dbfile, const char *name,
+    const char *mesh_name, DBmrgtree *tree, DBoptlist *optlist)
+{
+    int                 i, j, n, len, pass, num_nodes = tree->num_nodes;
+    int                 tot_segs, tot_children;
+    long                count;
+    char               *s = 0;
+    DBmrgtnode        **ltree = 0;
+    char              **strArray = 0;
+    int                *intArray = 0;
+    DBobject           *obj;
+
+    obj = DBMakeObject(name, DB_MRGTREE, 17);
+
+    /* Set global options */
+    db_ResetGlobalData_Mrgtree();
+    db_ProcessOptlist(DB_MRGTREE, optlist);
+
+    /* allocate an emtpy, linearized list of tree node pointers */
+    ltree = (DBmrgtnode **) malloc(num_nodes * sizeof(DBmrgtnode*));
+
+    /* walk tree to populate the linearized list of nodes ptrs */
+    DBWalkMrgtree(tree, DBLinearizeMrgtree, ltree, DB_POSTORDER);
+
+    /* form an array of the integer, scalar data at each node */
+    intArray = (int *) malloc(num_nodes * sizeof(int) * 6);
+    for (i = 0; i < num_nodes; i++)
+    {
+        intArray[i*6+0] = ltree[i]->narray;
+        intArray[i*6+1] = ltree[i]->type_info_bits;
+        intArray[i*6+2] = ltree[i]->max_children;
+        intArray[i*6+3] = ltree[i]->nsegs;
+        intArray[i*6+4] = ltree[i]->num_children;
+        intArray[i*6+5] = ltree[i] != tree->root ? ltree[i]->parent->walk_order : -1;
+    }
+    count = num_nodes * 6;
+    DBWriteComponent(dbfile, obj, "scalars", name, "integer", intArray, 1, &count);
+    FREE(intArray);
+
+    /* form an array of strings of the name data member */
+    strArray = (char **) malloc(num_nodes * sizeof(char *));
+    for (i = 0; i < num_nodes; i++)
+        strArray[i] = ltree[i]->name;
+
+    /* output all the node names as one long dataset */
+    s = 0;
+    DBStringArrayToStringList(strArray, num_nodes, &s, &len);
+    count = len;
+    DBWriteComponent(dbfile, obj, "name", name, "char", s, 1, &count);
+    FREE(s);
+    FREE(strArray);
+
+    /* form an array of strings of names data member */
+    /* requires 2 passes; first pass only counts, 2nd pass builds the array */
+    for (pass = 0; pass < 2; pass ++)
+    {
+        if (pass == 1)
+        {
+            if (n == 0)
+                break;
+            strArray = (char **) malloc(n * sizeof(char *));
+        }
+        n = 0;
+        for (i = 0; i < num_nodes; i++)
+        {
+            if (ltree[i]->narray > 0)
+            {
+                if (strchr(ltree[i]->names[0], '%') == 0)
+                {
+                    for (j = 0; j < ltree[i]->narray; j++)
+                    {
+                        if (pass == 1)
+                            strArray[n] = ltree[i]->names[j];
+                        n++;
+                    }
+                }
+                else
+                {
+                    if (pass == 1)
+                        strArray[n] = ltree[i]->names[0];
+                    n++;
+                }
+            }
+        }
+    }
+    if (n > 0)
+    {
+        s = 0;
+        DBStringArrayToStringList(strArray, n, &s, &len);
+        count = len;
+        DBWriteComponent(dbfile, obj, "names", name, "char", s, 1, &count);
+        FREE(s);
+        FREE(strArray);
+    }
+
+    /* linearize and output map name data */
+    strArray = (char **) malloc(num_nodes * sizeof(char*));
+    for (i = 0; i < num_nodes; i++)
+        strArray[i] = ltree[i]->maps_name;
+    s = 0;
+    len = 0;
+    DBStringArrayToStringList(strArray, num_nodes, &s, &len);
+    count = len;
+    DBWriteComponent(dbfile, obj, "maps_name", name, "char", s, 1, &count);
+    FREE(s);
+    FREE(strArray);
+
+    tot_segs = 0;
+    for (i = 0; i < num_nodes; i++)
+        tot_segs += ltree[i]->nsegs * (ltree[i]->narray?ltree[i]->narray:1);
+    count = tot_segs;
+
+    /* linearize and output map segment id data */
+    intArray = (int *) malloc(tot_segs * sizeof(int));
+    n = 0;
+    for (i = 0; i < num_nodes; i++)
+        for (j = 0; j < ltree[i]->nsegs * (ltree[i]->narray?ltree[i]->narray:1); j++)
+            intArray[n++] = ltree[i]->seg_ids[j];
+    DBWriteComponent(dbfile, obj, "seg_ids", name, "integer", intArray, 1, &count);
+    FREE(intArray);
+
+    /* linearize and output seg len type data */
+    intArray = (int *) malloc(tot_segs * sizeof(int));
+    n = 0;
+    for (i = 0; i < num_nodes; i++)
+        for (j = 0; j < ltree[i]->nsegs * (ltree[i]->narray?ltree[i]->narray:1); j++)
+            intArray[n++] = ltree[i]->seg_lens[j];
+    DBWriteComponent(dbfile, obj, "seg_lens", name, "integer", intArray, 1, &count);
+    FREE(intArray);
+
+    /* linearize and output seg type data */
+    intArray = (int *) malloc(tot_segs * sizeof(int));
+    n = 0;
+    for (i = 0; i < num_nodes; i++)
+        for (j = 0; j < ltree[i]->nsegs * (ltree[i]->narray?ltree[i]->narray:1); j++)
+            intArray[n++] = ltree[i]->seg_types[j];
+    DBWriteComponent(dbfile, obj, "seg_types", name, "integer", intArray, 1, &count);
+    FREE(intArray);
+
+    /* form integer array for children data */
+    tot_children = 0;
+    for (i = 0; i < num_nodes; i++)
+        tot_children += ltree[i]->num_children;
+    count = tot_children;
+    intArray = (int *) malloc(tot_children * sizeof(int));
+    n = 0;
+    for (i = 0; i < num_nodes; i++)
+        for (j = 0; j < ltree[i]->num_children; j++)
+            intArray[n++] = ltree[i]->children[j]->walk_order;
+    DBWriteComponent(dbfile, obj, "children", name, "integer", intArray, 1, &count);
+    FREE(intArray);
+    FREE(ltree);
+
+    if (_mrgt._mrgvar_onames)
+    {
+        s = 0;
+        len = 0;
+        DBStringArrayToStringList(_mrgt._mrgvar_onames, -1, &s, &len);
+        count = len;
+        DBWriteComponent(dbfile, obj, "mrgvar_onames", name, "char", s, 1, &count);
+        FREE(s);
+    }
+
+    if (_mrgt._mrgvar_rnames)
+    {
+        s = 0;
+        len = 0;
+        DBStringArrayToStringList(_mrgt._mrgvar_rnames, -1, &s, &len);
+        count = len;
+        DBWriteComponent(dbfile, obj, "mrgvar_rnames", name, "char", s, 1, &count);
+        FREE(s);
+    }
+
+    DBAddIntComponent(obj, "src_mesh_type", tree->src_mesh_type);
+    DBAddStrComponent(obj, "src_mesh_name", mesh_name);
+    DBAddIntComponent(obj, "type_info_bits", tree->type_info_bits);
+    DBAddIntComponent(obj, "num_nodes", tree->num_nodes);
+    DBAddIntComponent(obj, "root", tree->root->walk_order);
+
+   /*-------------------------------------------------------------
+    *  Write object to output file.
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_pdb_PutGroupelmap
+ *
+ *  Purpose
+ *
+ *      Write groupel map object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Oct 10 10:25:53 PDT 2007
+ *
+ *  Modifications:
+ *    Mark C. Miller, Wed Aug 18 20:55:42 PDT 2010
+ *    Fix bug setting correct size for frac_lengths array.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+SILO_CALLBACK int
+db_pdb_PutGroupelmap(DBfile *dbfile, const char *name,
+    int num_segments, int *groupel_types, int *segment_lengths,
+    int *segment_ids, int **segment_data, void **segment_fracs,
+    int fracs_data_type, DBoptlist *opts)
+{
+   int            i, j, tot_len;
+   int           *intArray;
+   long           count;
+   DBobject      *obj;
+
+   /*-------------------------------------------------------------
+    *  Process option list; build object description.
+    *-------------------------------------------------------------*/
+   db_ProcessOptlist(DB_GROUPELMAP, opts);
+   obj = DBMakeObject(name, DB_GROUPELMAP, 10);
+
+   DBAddIntComponent(obj, "num_segments", num_segments);
+   DBAddIntComponent(obj, "fracs_data_type", fracs_data_type);
+
+   /* Write raw data arrays */
+   count = num_segments;
+   DBWriteComponent(dbfile, obj, "groupel_types", name, "integer",
+                    groupel_types, 1, &count);
+   DBWriteComponent(dbfile, obj, "segment_lengths", name, "integer",
+                    segment_lengths, 1, &count);
+   if (segment_ids)
+       DBWriteComponent(dbfile, obj, "segment_ids", name, "integer",
+                        segment_ids, 1, &count);
+
+   tot_len = 0;
+   for (i = 0; i < num_segments; i++)
+       tot_len += segment_lengths[i];
+   intArray = (int *) malloc(tot_len * sizeof(int));
+   tot_len = 0;
+   for (i = 0; i < num_segments; i++)
+       for (j = 0; j < segment_lengths[i]; j++)
+           intArray[tot_len++] = segment_data[i][j];
+   count = tot_len;
+   DBWriteComponent(dbfile, obj, "segment_data", name, "integer",
+                    intArray, 1, &count);
+   FREE(intArray);
+
+   /* write out fractional data if we have it */
+   if (segment_fracs)
+   {
+       void *fracsArray;
+       char *datatype_str;
+
+       /* write array of frac lengths */
+       tot_len = 0;
+       intArray = (int *) malloc(num_segments * sizeof(int));
+       for (i = 0; i < num_segments; i++)
+       {
+           int len = segment_fracs[i] == 0 ? 0 : segment_lengths[i];
+           intArray[i] = len;
+           tot_len += len;
+       }
+       count = num_segments;
+       DBWriteComponent(dbfile, obj, "frac_lengths", name, "integer",
+                        intArray, 1, &count);
+       FREE(intArray);
+
+       /* build and write out fractional data array */
+       fracsArray = (void *) malloc(tot_len * ((fracs_data_type==DB_FLOAT)?sizeof(float):sizeof(double)));
+       tot_len = 0;
+       for (i = 0; i < num_segments; i++)
+       {
+           if (segment_fracs[i] == 0)
+               continue;
+
+           for (j = 0; j < segment_lengths[i]; j++)
+           {
+               if (fracs_data_type == DB_FLOAT)
+               {
+                   float *pfa = (float *) fracsArray;
+                   float *psf = (float *) segment_fracs[i];
+                   pfa[tot_len++] = psf[j];
+               }
+               else
+               {
+                   double *pfa = (double *) fracsArray;
+                   double *psf = (double *) segment_fracs[i];
+                   pfa[tot_len++] = psf[j];
+               }
+           }
+       }
+       count = tot_len;
+       datatype_str = db_GetDatatypeString(fracs_data_type);
+       DBWriteComponent(dbfile, obj, "segment_fracs", name, datatype_str, 
+                        fracsArray, 1, &count);
+       FREE(fracsArray);
+       FREE(datatype_str);
+   }
+
+   /*-------------------------------------------------------------
+    *  Write material object to output file. Request that underlying
+    *  memory be freed (the 'TRUE' argument.)
+    *-------------------------------------------------------------*/
+   DBWriteObject(dbfile, obj, TRUE);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                            db_pdb_PutMrgvar
+ *
+ *  Purpose
+ *
+ *      Write a mrg variable object into the open output file.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Thu Oct 18 09:35:47 PDT 2007
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+SILO_CALLBACK int
+db_pdb_PutMrgvar(DBfile *_dbfile, const char *name, const char *mrgt_name,
+    int ncomps, char **compnames,
+    int nregns, char **reg_pnames,
+    int datatype, void **data, DBoptlist *optlist)
+{
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            i, nstrs;
+   char *s=0; int len=0; long llen;
+   DBobject      *obj;
+   char          *suffix, *datatype_str, tmp1[256], tmp2[256];
+   static char   *me = "db_pdb_PutMrgvar";
+
+   /*-------------------------------------------------------------
+    *  Initialize global data, and process options.
+    *-------------------------------------------------------------*/
+   obj = DBMakeObject(name, DB_MRGVAR, 20);
+
+   DBAddStrComponent(obj, "mrgt_name", mrgt_name);
+
+   suffix = "data";
+   datatype_str = db_GetDatatypeString(datatype);
+
+   llen = nregns;
+   for (i = 0; i < ncomps; i++) {
+      char tmp3[256];
+
+      if (compnames && compnames[i])
+      {
+          sprintf(tmp3, "%s_%s", name, compnames[i]);
+          db_mkname(dbfile->pdb, tmp3, suffix, tmp2);
+      }
+      else
+      {
+          sprintf(tmp3, "%s_comp%d", name, i);
+          db_mkname(dbfile->pdb, tmp3, suffix, tmp2);
+      }
+      PJ_write_len(dbfile->pdb, tmp2, datatype_str, data[i],
+                   1, &llen);
+
+      sprintf(tmp1, "value%d", i);
+      DBAddVarComponent(obj, tmp1, tmp2);
+   }
+   FREE(datatype_str);
+
+   DBAddIntComponent(obj, "ncomps", ncomps);
+   DBAddIntComponent(obj, "nregns", nregns);
+   DBAddIntComponent(obj, "datatype", datatype);
+
+   if (compnames)
+   {
+       DBStringArrayToStringList(compnames, ncomps, &s, &len);
+       llen = len;
+       DBWriteComponent(_dbfile, obj, "compnames", name, "char", s, 1, &llen);
+       FREE(s);
+   }
+
+   nstrs = nregns;
+   if (strchr(reg_pnames[0], '%') != 0)
+       nstrs = 1;
+   DBStringArrayToStringList(reg_pnames, nstrs, &s, &len);
+   llen = len;
+   DBWriteComponent(_dbfile, obj, "reg_pnames", name, "char", s, 1, &llen);
+   FREE(s);
+
+   DBWriteObject(_dbfile, obj, 0);
+   DBFreeObject(obj);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                   db_pdb_SortObjectsByOffset
+ *
+ *  Purpose: Returned array of sorted indices for a list of object names
+ *           sorted by offset within the file.
+ *
+ *  Programmer: Mark C. Miller, Thu Jul 15 08:06:27 PDT 2010
+ *
+ *--------------------------------------------------------------------*/
+/* Support type for db_hdf5_SortObjectsByOffset */
+typedef struct _index_offset_pair_t {
+    int index;
+    long offset;
+} index_offset_pair_t;
+
+/* Support function for db_hdf5_SortObjectsByOffset */
+static int compare_index_offset_pair(const void *a1, const void *a2)
+{
+    index_offset_pair_t *p1 = (index_offset_pair_t*) a1;
+    index_offset_pair_t *p2 = (index_offset_pair_t*) a2;
+    if (p1->offset < p2->offset) return -1;
+    else if (p1->offset > p2->offset) return 1;
+    else return 0;
+}
+
+SILO_CALLBACK int
+db_pdb_SortObjectsByOffset(DBfile *_dbfile, int nobjs,
+    const char *const *const names, int *ordering)
+{
+   DBfile_pdb *dbfile = (DBfile_pdb *) _dbfile;
+   static char *me = "db_pdb_SortObjectsByOffset";
+   index_offset_pair_t *iop = (index_offset_pair_t*)
+       malloc(nobjs * sizeof(index_offset_pair_t));
+   int i;
+
+   for (i = 0; i < nobjs; i++)
+   {
+       iop[i].index = i;
+       if (strchr(names[i], ':')) iop[i].offset = LONG_MAX;
+       else
+       {
+           syment *ep = lite_PD_inquire_entry (dbfile->pdb, (char*)names[i], TRUE, NULL);
+           if (!ep) iop[i].offset = LONG_MAX;
+           else iop[i].offset = PD_entry_address(ep); 
+        }
+    }
+
+    /* Ok, sort the index/offset pairs */
+    qsort(iop, nobjs, sizeof(index_offset_pair_t), compare_index_offset_pair);
+
+    /* Populate ordering array */
+    for (i = 0; i < nobjs; i++)
+        ordering[i] = iop[i].index;
+
+    free(iop);
+
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  db_InitCsg
+ *
+ *  Purpose
+ *
+ *      Initialize the csg output package. This involves
+ *      setting global data (vars, dim-ids, var-ids), writing standard
+ *      dimensions and variables to the output file, and processing the
+ *      option list provided by the caller.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Aug  3 14:39:03 PDT 2005
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_InitCsg(DBfile *_dbfile, char *meshname, DBoptlist *optlist) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   long           count[3];
+   char           tmp[256];
+
+   db_mkname(dbfile->pdb, meshname, "typeflags", tmp);
+   if (lite_PD_inquire_entry(dbfile->pdb, tmp, FALSE, NULL) != NULL) {
+      db_ResetGlobalData_Csgmesh();
+      db_ProcessOptlist(DB_CSGMESH, optlist);
+      db_build_shared_names_csgmesh(_dbfile, meshname);
+      return 0;
+   }
+
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_Csgmesh();
+   db_ProcessOptlist(DB_CSGMESH, optlist);
+   db_build_shared_names_csgmesh(_dbfile, meshname);
+
+   /*  Write some scalars */
+   count[0] = 1L;
+   if (_csgm._time_set == TRUE)
+      PJ_write_len(dbfile->pdb, _csgm._nm_time, "float", &(_csgm._time), 1, count);
+   if (_csgm._dtime_set == TRUE)
+      PJ_write_len(dbfile->pdb, _csgm._nm_dtime, "double",
+                   &(_csgm._dtime), 1, count);
+
+   PJ_write_len(dbfile->pdb, _csgm._nm_cycle, "integer", &(_csgm._cycle),
+                1, count);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  db_InitPoint
+ *
+ *  Purpose
+ *
+ *      Initialize the point output package. This involves
+ *      setting global data (vars, dim-ids, var-ids), writing standard
+ *      dimensions and variables to the output file, and processing the
+ *      option list provided by the caller.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *      Added _dtime.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_InitPoint (DBfile *_dbfile, DBoptlist *optlist, int ndims, int nels) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   long           count[3];
+
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_PointMesh(ndims);
+   db_ProcessOptlist(DB_POINTMESH, optlist);
+
+   /*--------------------------------------------------
+    *  Assign values to global data.
+    *--------------------------------------------------*/
+   _pm._nels = nels;
+
+   _pm._minindex = _pm._lo_offset;
+   _pm._maxindex = nels - _pm._hi_offset - 1;
+
+   _pm._coordnames[0] = "xpt_data";
+   _pm._coordnames[1] = "ypt_data";
+   _pm._coordnames[2] = "zpt_data";
+
+   /*------------------------------------------------------
+    * Define all attribute arrays and scalars which are
+    * likely to be needed. Some require a zonal AND nodal
+    * version.
+    *-----------------------------------------------------*/
+
+   /*  Write some scalars */
+   count[0] = 1L;
+   if (_pm._time_set == TRUE) {
+      db_mkname(dbfile->pdb, NULL, "time", _pm._nm_time);
+      PJ_write_len(dbfile->pdb, _pm._nm_time, "float", &(_pm._time),
+                   1, count);
+   }
+
+   if (_pm._dtime_set == TRUE) {
+      db_mkname(dbfile->pdb, NULL, "dtime", _pm._nm_dtime);
+      PJ_write_len(dbfile->pdb, _pm._nm_dtime, "double", &(_pm._dtime),
+                   1, count);
+   }
+
+   db_mkname(dbfile->pdb, NULL, "cycle", _pm._nm_cycle);
+   PJ_write_len(dbfile->pdb, _pm._nm_cycle, "integer", &(_pm._cycle),
+                1, count);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  db_InitQuad
+ *
+ *  Purpose
+ *
+ *      Initialize the quadrilateral output package. This involves
+ *      setting global data (vars, dim-ids, var-ids), writing standard
+ *      dimensions and variables to the SILO file, and processing the
+ *      option list provided by the caller.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *  Modifications
+ *
+ *     Al Leibee, Sun Apr 17 07:54:25 PDT 1994
+ *     Added dtime.
+ *      Al Leibee, Mon Aug  9 10:30:54 PDT 1993
+ *      Converted to new PD_inquire_entry interface.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Added baseindex[].
+ *
+ *     Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *     Removed unused variable error.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_InitQuad (DBfile *_dbfile, char *meshname, DBoptlist *optlist,
+             int dims[], int ndims) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   int            i;
+   int            nzones, nnodes;
+   long           count[3];
+   float          a[3];
+   char           tmp[1024];
+   char          *p=NULL;
+
+   /*--------------------------------------------------
+    *  Define number of zones and nodes.
+    *--------------------------------------------------*/
+   nzones = nnodes = 1;
+
+   for (i = 0; i < ndims; i++) {
+      nzones *= (dims[i] - 1);
+      nnodes *= dims[i];
+   }
+
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+
+   db_ResetGlobalData_QuadMesh(ndims);
+   db_ProcessOptlist(DB_QUADMESH, optlist);
+   db_build_shared_names_quadmesh(_dbfile, meshname);
+
+   /*--------------------------------------------------
+    *  Determine if this directory has already been
+    *  initialized for the given mesh. If so, set
+    *  the names of the shared variables (e.g., 'dims')
+    *  and return. If not, write out the dimensions
+    *  and set the names.
+    *--------------------------------------------------*/
+
+   db_mkname(dbfile->pdb, meshname, "dims", tmp);
+
+   if (lite_PD_inquire_entry(dbfile->pdb, tmp, FALSE, NULL) != NULL) {
+      return 0;
+   }
+
+   /*--------------------------------------------------
+    *  Assign values to global data.
+    *--------------------------------------------------*/
+   _qm._nzones = nzones;
+   _qm._nnodes = nnodes;
+   _qm._meshname = STRDUP(meshname);
+
+   for (i = 0; i < ndims; i++) {
+      _qm._dims[i] = dims[i];
+      _qm._zones[i] = dims[i] - 1;
+
+      _qm._minindex[i] = _qm._lo_offset[i];
+      _qm._maxindex_n[i] = dims[i] - _qm._hi_offset[i] - 1;
+      _qm._maxindex_z[i] = _qm._maxindex_n[i] - 1;
+   }
+
+   /*--------------------------------------------------
+    * This directory is uninitialized.
+    *
+    * Define all attribute arrays and scalars which are
+    * likely to be needed. Some require a zonal AND nodal
+    * version.
+    *-----------------------------------------------------*/
+
+   count[0] = ndims;
+   /*  File name contained within meshname */
+   p = strchr(meshname, ':');
+   if (p == NULL) {
+      PJ_write_len(dbfile->pdb, _qm._nm_dims, "integer", dims, 1, count);
+      PJ_write_len(dbfile->pdb, _qm._nm_zones, "integer", _qm._zones,
+                1, count);
+      PJ_write_len(dbfile->pdb, _qm._nm_maxindex_n, "integer",
+                _qm._maxindex_n, 1, count);
+      PJ_write_len(dbfile->pdb, _qm._nm_maxindex_z, "integer",
+                _qm._maxindex_z, 1, count);
+      PJ_write_len(dbfile->pdb, _qm._nm_minindex, "integer",
+                _qm._minindex, 1, count);
+      PJ_write_len(dbfile->pdb, _qm._nm_baseindex, "integer",
+                _qm._baseindex, 1, count);
+
+      a[0] = a[1] = a[2] = 0.5;
+      PJ_write_len(dbfile->pdb, _qm._nm_alignz, "float", a, 1, count);
+
+      a[0] = a[1] = a[2] = 0.0;
+      PJ_write_len(dbfile->pdb, _qm._nm_alignn, "float", a, 1, count);
+   }
+
+   /*  Write some scalars */
+   count[0] = 1L;
+
+   if (_qm._time_set == TRUE) {
+      PJ_write_len(dbfile->pdb, _qm._nm_time, "float", &(_qm._time), 1, count);
+   }
+   if (_qm._dtime_set == TRUE) {
+      PJ_write_len(dbfile->pdb, _qm._nm_dtime, "double",
+                   &(_qm._dtime), 1, count);
+   }
+   PJ_write_len(dbfile->pdb, _qm._nm_cycle, "integer",
+                &(_qm._cycle), 1, count);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  db_InitUcd
+ *
+ *  Purpose
+ *
+ *      Initialize the uc output package. This involves
+ *      setting global data (vars, dim-ids, var-ids), writing standard
+ *      dimensions and variables to the output file, and processing the
+ *      option list provided by the caller.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Mon Aug  9 10:30:54 PDT 1993
+ *      Converted to new PD_inquire_entry interface.
+ *
+ *      Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *      Removed unused variable error.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_InitUcd (DBfile *_dbfile, char *meshname, DBoptlist *optlist,
+            int ndims, int nnodes, int nzones) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   long           count[3];
+   float          a[3];
+   char           tmp[256];
+   char          *p=NULL;
+
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_Ucdmesh(ndims, nnodes, nzones);
+   db_ProcessOptlist(DB_UCDMESH, optlist);
+   db_build_shared_names_ucdmesh(_dbfile, meshname);
+
+   /*--------------------------------------------------
+    *  Determine if this directory has already been
+    *  initialized. Return if it has.
+    *--------------------------------------------------*/
+
+   db_mkname(dbfile->pdb, meshname, "align_zonal", tmp);
+
+   if (lite_PD_inquire_entry(dbfile->pdb, tmp, FALSE, NULL) != NULL) {
+      return 0;
+   }
+
+   /*--------------------------------------------------
+    *  Assign values to global data.
+    *--------------------------------------------------*/
+   _um._nzones = nzones;
+   _um._nnodes = nnodes;
+
+   /*------------------------------------------------------
+    * Define all attribute arrays and scalars which are
+    * likely to be needed. Some require a zonal AND nodal
+    * version.
+    *-----------------------------------------------------*/
+   count[0] = ndims;
+   if (count[0] <= 0)
+      return 0;
+
+   /*------------------------------------------------------
+    * Assume that if there is a file in the meshname, that 
+    * there is possibily another  mesh that may be pointing to,
+    * so we'll use that meshes discriptions.
+    *-----------------------------------------------------*/
+   p = strchr(meshname, ':');
+   if (p == NULL) {
+      a[0] = a[1] = a[2] = 0.5;
+      PJ_write_len(dbfile->pdb, _um._nm_alignz, "float", a, 1, count);
+   
+      a[0] = a[1] = a[2] = 0.0;
+      PJ_write_len(dbfile->pdb, _um._nm_alignn, "float", a, 1, count);
+   }
+
+   /*  Write some scalars */
+   count[0] = 1L;
+   if (_um._time_set == TRUE)
+      PJ_write_len(dbfile->pdb, _um._nm_time, "float", &(_um._time), 1, count);
+   if (_um._dtime_set == TRUE)
+      PJ_write_len(dbfile->pdb, _um._nm_dtime, "double",
+                   &(_um._dtime), 1, count);
+
+   PJ_write_len(dbfile->pdb, _um._nm_cycle, "integer", &(_um._cycle),
+                1, count);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                              db_InitZonelist
+ *
+ *  Purpose
+ *
+ *      Initialize the ucd zonelist output package.  This involves
+ *      setting global data and processing the option list provided
+ *      by the caller.
+ *
+ *  Programmer
+ *
+ *      Jeremy Meredith, May 21 1999
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *     Hank Childs, Thu Jan  6 13:51:22 PST 2000
+ *     Put in lint directive for unused arguments. Removed unused
+ *     argument dbfile.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+PRIVATE int
+db_InitZonelist (DBfile *_dbfile, DBoptlist *optlist)
+{
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_Ucdzonelist();
+   db_ProcessOptlist(DB_ZONELIST, optlist);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                          db_InitPHZonelist
+ *
+ *  Purpose
+ *
+ *      Initialize the polyhedral zonelist output package.  This involves
+ *      setting global data and processing the option list provided
+ *      by the caller.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, July 27, 2004
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+/* ARGSUSED */
+PRIVATE int
+db_InitPHZonelist (DBfile *_dbfile, DBoptlist *optlist)
+{
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_phzonelist();
+   db_ProcessOptlist(DB_PHZONELIST, optlist);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                db_build_shared_names_csgmesh
+ *
+ *  Purpose
+ *
+ *      Build the names of the shared variables, based on the name
+ *      of the current mesh. Store the names in the global variables
+ *      (which all begin with the prefix "_nm_".
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, Wed Aug  3 14:39:03 PDT 2005 
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_build_shared_names_csgmesh(DBfile *_dbfile, char *meshname) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+
+   if (_csgm._time_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "time", _csgm._nm_time);
+   if (_csgm._dtime_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "dtime", _csgm._nm_dtime);
+
+   db_mkname(dbfile->pdb, NULL, "cycle", _csgm._nm_cycle);
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                  db_build_shared_names_quadmesh
+ *
+ *  Purpose
+ *
+ *      Build the names of the shared variables, based on the name
+ *      of the current mesh. Store the names in the global variables
+ *      (which all begin with the prefix "_nm_").
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Modifications
+ *
+ *     Al Leibee, Sun Apr 17 07:54:25 PDT 1994
+ *     Added dtime.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Added _nm_baseindex.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_build_shared_names_quadmesh (DBfile *_dbfile, char *meshname) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+
+   db_mkname(dbfile->pdb, meshname, "dims", _qm._nm_dims);
+   db_mkname(dbfile->pdb, meshname, "zonedims", _qm._nm_zones);
+   db_mkname(dbfile->pdb, meshname, "max_index_n", _qm._nm_maxindex_n);
+   db_mkname(dbfile->pdb, meshname, "max_index_z", _qm._nm_maxindex_z);
+   db_mkname(dbfile->pdb, meshname, "min_index", _qm._nm_minindex);
+   db_mkname(dbfile->pdb, meshname, "align_zonal", _qm._nm_alignz);
+   db_mkname(dbfile->pdb, meshname, "align_nodal", _qm._nm_alignn);
+   db_mkname(dbfile->pdb, meshname, "baseindex", _qm._nm_baseindex);
+
+   if (_qm._time_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "time", _qm._nm_time);
+   if (_qm._dtime_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "dtime", _qm._nm_dtime);
+
+   db_mkname(dbfile->pdb, NULL, "cycle", _qm._nm_cycle);
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                              db_ResetGlobalData_phzonelist
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, July 27, 2004 
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_ResetGlobalData_phzonelist (void) {
+
+   memset(&_phzl, 0, sizeof(_phzl));
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                db_build_shared_names_ucdmesh
+ *
+ *  Purpose
+ *
+ *      Build the names of the shared variables, based on the name
+ *      of the current mesh. Store the names in the global variables
+ *      (which all begin with the prefix "_nm_".
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Modifications
+ *
+ *     Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *     Added _dtime.
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_build_shared_names_ucdmesh (DBfile *_dbfile, char *meshname) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+
+   db_mkname(dbfile->pdb, meshname, "align_zonal", _um._nm_alignz);
+   db_mkname(dbfile->pdb, meshname, "align_nodal", _um._nm_alignn);
+   if (_um._time_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "time", _um._nm_time);
+   if (_um._dtime_set == TRUE)
+      db_mkname(dbfile->pdb, NULL, "dtime", _um._nm_dtime);
+
+   db_mkname(dbfile->pdb, NULL, "cycle", _um._nm_cycle);
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ *  Routine                                                    db_mkname
+ *
+ *  Purpose
+ *
+ *      Generate a name based on current directory, given name, and
+ *      the given suffix.
+ *
+ *  Modifications:
+ *      Sean Ahern, Mon Dec 18 17:48:30 PST 2000
+ *      If the "name" starts with "/", then we don't need to determine our
+ *      current working directory.  I added this logic path.
+ *
+ *      Eric Brugger, Fri Apr  6 11:15:37 PDT 2001
+ *      I changed a comparison between an integer and NULL to an integer
+ *      and 0.
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_mkname (PDBfile *pdb, char *name, char *suffix, char *out)
+{
+    char   *cwd;
+
+    out[0] = '\0';
+
+    /* Check if the "name" starts with "/", indicating an absolute
+     * pathname. */
+    if (!name || (strncmp(name, "/", 1) != 0))
+    {
+        /* Get the directory name. */
+        if ((cwd = lite_PD_pwd(pdb)))
+        {
+            strcat(out, cwd);
+            if (!STR_EQUAL("/", cwd))
+                strcat(out, "/");
+        } else
+        {
+            strcat(out, "/");
+        }
+    }
+
+    /* And tack on the file name and extension is supplied. */
+    if (name)
+        strcat(out, name);
+    if (suffix)
+    {
+        if (name)
+            strcat(out, "_");
+        strcat(out, suffix);
+    }
+}
+#endif /* PDB_WRITE */
+
+/*----------------------------------------------------------------------
+ * Routine                                                  db_InitMulti
+ *
+ * Purpose
+ *
+ *    Initialize the quadrilateral output package. This involves
+ *    setting global data (vars, dim-ids, var-ids), writing standard
+ *    dimensions and variables to the SILO file, and processing the
+ *    option list provided by the caller.
+ *
+ * Programmer
+ *
+ *    Eric Brugger, January 12, 1996
+ *
+ * Notes
+ *
+ * Modifications
+ *
+ *--------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE int
+db_InitMulti (DBfile *_dbfile, DBoptlist *optlist) {
+
+   DBfile_pdb    *dbfile = (DBfile_pdb *) _dbfile;
+   long           count[3];
+
+   /*--------------------------------------------------
+    *  Process the given option list (this function
+    *  modifies the global variable data based on
+    *  the option values.)
+    *--------------------------------------------------*/
+   db_ResetGlobalData_MultiMesh();
+   db_ProcessOptlist(DB_MULTIMESH, optlist);
+
+   /*------------------------------------------------------
+    * Define all attribute arrays and scalars which are
+    * likely to be needed. Some require a zonal AND nodal
+    * version.
+    *-----------------------------------------------------*/
+
+   /*  Write some scalars */
+   count[0] = 1L;
+   if (_mm._time_set == TRUE) {
+      db_mkname(dbfile->pdb, NULL, "time", _mm._nm_time);
+      PJ_write_len(dbfile->pdb, _mm._nm_time, "float", &(_mm._time),
+                   1, count);
+   }
+
+   if (_mm._dtime_set == TRUE) {
+      db_mkname(dbfile->pdb, NULL, "dtime", _mm._nm_dtime);
+      PJ_write_len(dbfile->pdb, _mm._nm_dtime, "double", &(_mm._dtime),
+                   1, count);
+   }
+
+   db_mkname(dbfile->pdb, NULL, "cycle", _mm._nm_cycle);
+   PJ_write_len(dbfile->pdb, _mm._nm_cycle, "integer", &(_mm._cycle),
+                1, count);
+
+   return 0;
+}
+#endif /* PDB_WRITE */
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_InitCurve
+ *
+ * Purpose:     Inititalize global curve data.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 16, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_InitCurve (DBoptlist *opts) {
+
+   db_ResetGlobalData_Curve () ;
+   db_ProcessOptlist (DB_CURVE, opts) ;
+}
+#endif /* PDB_WRITE */
+
+/*-------------------------------------------------------------------------
+ * Function:    db_InitDefvars
+ *
+ * Purpose:     Inititalize global defvars data.
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              March 22, 2006
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------*/
+#ifdef PDB_WRITE
+PRIVATE void
+db_InitDefvars (DBoptlist *opts) {
+
+   db_ResetGlobalData_Defvars () ;
+   db_ProcessOptlist (DB_DEFVARS, opts) ;
+}
+#endif /* PDB_WRITE */
diff --git a/src/pdb_drv/silo_pdb_private.h b/src/pdb_drv/silo_pdb_private.h
new file mode 100644
index 0000000..def68c6
--- /dev/null
+++ b/src/pdb_drv/silo_pdb_private.h
@@ -0,0 +1,320 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#ifndef SILO_PDB_PRIVATE_H
+#define SILO_PDB_PRIVATE_H
+
+#include "pdb.h"
+/* 'VERSION' is defined in PDB proper and Silo's config.h */
+#ifdef USING_PDB_PROPER
+#    ifdef VERSION
+#    undef VERSION
+#    endif
+#endif
+#include "silo_private.h"
+
+/*
+ * The private version of the DBfile structure is defined here.
+ */
+typedef struct DBfile_pdb {
+    DBfile_pub     pub;
+    PDBfile       *pdb;
+} DBfile_pdb;
+
+typedef struct {
+    char          *name;
+    char          *type;        /* Type of group/object */
+    char         **comp_names;  /* Array of component names */
+    char         **pdb_names;   /* Array of internal (PDB) variable names */
+    int            ncomponents; /* Number of components */
+} PJgroup;
+
+/*
+ * Generally, nothing uses SCORE memory management any more.  However,
+ * sometimes we need it when talking to SCORE or PDB at the low levels.
+ * Those few source files that need SCORE memory management should
+ * define NEED_SCORE_MM before including this file.
+ */
+#ifdef NEED_SCORE_MM
+#define SCALLOC(T)	((T*)lite_SC_alloc(1L,(long)sizeof(T),NULL))
+#define SCALLOC_N(T,N)  ((T*)lite_SC_alloc((long)(N),(long)sizeof(T),NULL))
+#define SCFREE(M)       if(M){lite_SC_free((void*)M);(M)=NULL;}
+#define SC_strdup(S)    (strcpy(SCALLOC_N(char,strlen((S))+1),(S)))
+#endif
+
+typedef struct {
+    int            id;
+} PJdir;
+
+typedef struct {
+    char          *name[80];    /* Component name */
+    void          *ptr[80];     /* Address of component value */
+    int            type[80];    /* Datatype of component */
+    unsigned char  alloced[80]; /* Sentinel: 1 == space already alloc'd */
+    int            num;         /* Number of components */
+} PJcomplist;
+
+#ifndef SILO_NO_CALLBACKS
+SILO_CALLBACK int db_pdb_close (DBfile *);
+SILO_CALLBACK int db_pdb_InqVarExists (DBfile *, char *);
+SILO_CALLBACK void *db_pdb_GetComponent (DBfile *, char *, char *);
+SILO_CALLBACK int db_pdb_GetComponentType (DBfile *, char *, char *);
+SILO_CALLBACK void *db_pdb_GetAtt (DBfile *, char *, char *);
+SILO_CALLBACK int db_pdb_GetDir (DBfile *, char *);
+
+SILO_CALLBACK DBobject *db_pdb_GetObject (DBfile*, char*);
+SILO_CALLBACK DBcompoundarray *db_pdb_GetCompoundarray (DBfile *, char *);
+SILO_CALLBACK DBcurve *db_pdb_GetCurve (DBfile *, char *);
+SILO_CALLBACK DBdefvars *db_pdb_GetDefvars (DBfile *, const char *);
+SILO_CALLBACK DBmaterial *db_pdb_GetMaterial (DBfile *, char *);
+SILO_CALLBACK DBmatspecies *db_pdb_GetMatspecies (DBfile *, char *);
+SILO_CALLBACK DBmultimesh *db_pdb_GetMultimesh (DBfile *, char *);
+SILO_CALLBACK DBmultimeshadj *db_pdb_GetMultimeshadj (DBfile *, const char *,
+                            int, const int *);
+SILO_CALLBACK DBmultivar *db_pdb_GetMultivar (DBfile *, char *);
+SILO_CALLBACK DBmultimat *db_pdb_GetMultimat (DBfile *, char *);
+SILO_CALLBACK DBmultimatspecies *db_pdb_GetMultimatspecies (DBfile *, char *);
+SILO_CALLBACK DBpointmesh *db_pdb_GetPointmesh (DBfile *, char *);
+SILO_CALLBACK DBmeshvar *db_pdb_GetPointvar (DBfile *, char *);
+SILO_CALLBACK DBquadmesh *db_pdb_GetQuadmesh (DBfile *, char *);
+SILO_CALLBACK DBquadvar *db_pdb_GetQuadvar (DBfile *, char *);
+SILO_CALLBACK DBucdmesh *db_pdb_GetUcdmesh (DBfile *, char *);
+SILO_CALLBACK DBucdvar *db_pdb_GetUcdvar (DBfile *, char *);
+SILO_CALLBACK DBcsgmesh *db_pdb_GetCsgmesh (DBfile *, const char *);
+SILO_CALLBACK DBcsgvar *db_pdb_GetCsgvar (DBfile *, const char *);
+SILO_CALLBACK DBfacelist *db_pdb_GetFacelist(DBfile*, char*);
+SILO_CALLBACK DBzonelist *db_pdb_GetZonelist(DBfile*, char*);
+SILO_CALLBACK DBphzonelist *db_pdb_GetPHZonelist(DBfile*, char*);
+SILO_CALLBACK DBcsgzonelist *db_pdb_GetCSGZonelist(DBfile*, const char*);
+SILO_CALLBACK DBmrgtree *db_pdb_GetMrgtree(DBfile *_dbfile, const char *name);
+SILO_CALLBACK DBmrgvar *db_pdb_GetMrgvar(DBfile *dbfile, const char *name);
+SILO_CALLBACK DBgroupelmap *db_pdb_GetGroupelmap(DBfile *dbfile, const char *name);
+SILO_CALLBACK void *db_pdb_GetVar (DBfile *, char *);
+SILO_CALLBACK int db_pdb_GetVarByteLength (DBfile *, char *);
+SILO_CALLBACK int db_pdb_GetVarLength (DBfile *, char *);
+SILO_CALLBACK int db_pdb_GetVarDims (DBfile*, char*, int, int*);
+SILO_CALLBACK int db_pdb_GetVarType (DBfile *, char *);
+SILO_CALLBACK DBObjectType db_pdb_InqVarType (DBfile *, char *);
+SILO_CALLBACK int db_pdb_InqMeshname (DBfile *, char *, char *);
+SILO_CALLBACK int db_pdb_InqMeshtype (DBfile *, char *);
+SILO_CALLBACK int db_pdb_ReadAtt (DBfile *, char *, char *, void *);
+SILO_CALLBACK int db_pdb_ReadVar (DBfile *, char *, void *);
+SILO_CALLBACK int db_pdb_ReadVarSlice (DBfile *, char *, int *, int *, int *,
+				  int, void *);
+SILO_CALLBACK int db_pdb_SetDir (DBfile *, char *);
+SILO_CALLBACK int db_pdb_Filters (DBfile *, FILE *);
+SILO_CALLBACK int db_pdb_NewToc (DBfile *);
+SILO_CALLBACK int db_pdb_GetComponentNames (DBfile *, char *, char ***, char ***);
+
+SILO_CALLBACK int db_pdb_FreeCompressionResources(DBfile *_dbfile, const char *meshname);
+
+PRIVATE int db_pdb_getobjinfo (PDBfile *, char *, char *, int *);
+PRIVATE int db_pdb_getvarinfo (PDBfile *, char *, char *, int *, int *, int);
+
+#ifdef PDB_WRITE
+SILO_CALLBACK int db_pdb_WriteObject (DBfile *, DBobject *, int);
+SILO_CALLBACK int db_pdb_WriteComponent (DBfile *, DBobject *, char *,
+				    char *, char *, const void *, int, long *);
+SILO_CALLBACK int db_pdb_MkDir (DBfile *, char *);
+SILO_CALLBACK int db_pdb_PutCompoundarray (DBfile *, char *, char **, int *,
+				      int, void *, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutCurve (DBfile *, char *, void *, void *, int, int,
+			      DBoptlist *);
+SILO_CALLBACK int db_pdb_PutDefvars(DBfile *, const char *, int, char **,
+                               const int *, char **, DBoptlist **);
+SILO_CALLBACK int db_pdb_PutFacelist (DBfile *, char *, int, int, int *, int,
+				 int, int *, int *, int *, int, int *,
+				 int *, int);
+SILO_CALLBACK int db_pdb_PutMaterial (DBfile *, char *, char *, int, int *,
+				 int *, int *, int, int *, int *, int *,
+				 DB_DTPTR1, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMatspecies (struct DBfile *, char *, char *, int,
+				   int *, int *, int *, int, int, DB_DTPTR1,
+				   int *, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMultimesh (DBfile *, char *, int, char **, int *,
+				  DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMultimeshadj (DBfile *, const char *, int, const int *,
+                               const int *, const int *, const int *, const int *,
+                               int **, const int *, int **,
+                               DBoptlist *optlist);
+SILO_CALLBACK int db_pdb_PutMultivar (DBfile *, char *, int, char **, int *,
+				 DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMultimat (DBfile *, char *, int, char **,
+				 DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMultimatspecies (DBfile *, char *, int, char **,
+					DBoptlist *);
+SILO_CALLBACK int db_pdb_PutPointmesh (DBfile *, char *, int, DB_DTPTR2, int,
+				  int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutPointvar (DBfile *, char *, char *, int, DB_DTPTR2,
+				 int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutQuadmesh (DBfile *, char *, char **, DB_DTPTR2,
+				 int *, int, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutQuadvar (DBfile *, char *, char *, int, char **,
+				DB_DTPTR2, int *, int, DB_DTPTR2, int, int,
+				int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutUcdmesh (DBfile *, char *, int, char **, DB_DTPTR2,
+				int, int, char *, char *, int,
+				DBoptlist *);
+SILO_CALLBACK int db_pdb_PutUcdsubmesh (DBfile *, char *, char *,
+				int, char *, char *,
+				DBoptlist *);
+SILO_CALLBACK int db_pdb_PutUcdvar (DBfile *, char *, char *, int, char **,
+			       DB_DTPTR2, int, DB_DTPTR2, int, int, int,
+			       DBoptlist *);
+SILO_CALLBACK int db_pdb_PutCsgmesh (DBfile *, const char *, int, int,
+                                const int *, const int *,
+                                const void *, int, int, const double *,
+                                const char *, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutCsgvar (DBfile *, const char *, const char *, int,
+                               char **varnames, void **vars,
+                               int, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutZonelist (DBfile *, char *, int, int, int *, int,
+				 int, int *, int *, int);
+SILO_CALLBACK int db_pdb_PutZonelist2 (DBfile *, char *, int, int, int *, int,
+				  int, int, int, int *, int *, int *, int,
+                                  DBoptlist *);
+SILO_CALLBACK int db_pdb_PutPHZonelist(DBfile *, char *,
+                                  int, int *, int, int *, char *,
+                                  int, int *, int, int *,
+                                  int, int, int, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutCSGZonelist (DBfile *, const char *, int,
+                                    const int *, const int *, const int *,
+                                    const void *, int, int,
+                                    int, const int *, DBoptlist *);
+SILO_CALLBACK int db_pdb_PutMrgtree(DBfile *_dbfile, const char *name,
+                               const char *mesh_name, DBmrgtree *tree,
+                               DBoptlist *optlist);
+SILO_CALLBACK int db_pdb_PutGroupelmap(DBfile *_dbfile, const char *map_name,
+                                  int num_segments, int *groupel_types,
+                                  int *segment_lengths, int *segment_ids,
+                                  int **segment_data, void **segment_fracs,
+                                  int fracs_data_type, DBoptlist *opts);
+SILO_CALLBACK int db_pdb_PutMrgvar(DBfile *dbfile, const char *name,
+                             const char *mrgt_name,
+                             int ncomps, char **compnames,
+                             int nregns, char **reg_pnames,
+                             int datatype, void **data, DBoptlist *opts);
+
+SILO_CALLBACK int db_pdb_Write (DBfile *, char *, void *, int *, int, int);
+SILO_CALLBACK int db_pdb_WriteSlice (DBfile*, char*, void*, int, int[], int[],
+				int[], int[], int);
+
+SILO_CALLBACK int db_pdb_SortObjectsByOffset(DBfile *_dbfile, int nobjs,
+    const char *const *const names, int *ordering);
+
+PRIVATE int db_InitCsg (DBfile *, char *, DBoptlist *);
+PRIVATE int db_InitPoint (DBfile *, DBoptlist *, int, int);
+PRIVATE int db_InitQuad (DBfile *, char *, DBoptlist *, int *, int);
+PRIVATE void db_InitCurve (DBoptlist*);
+PRIVATE void db_build_shared_names_csgmesh (DBfile *, char *);
+PRIVATE void db_build_shared_names_quadmesh (DBfile *, char *);
+PRIVATE int db_InitUcd (DBfile *, char *, DBoptlist *, int, int, int);
+PRIVATE int db_InitZonelist (DBfile *, DBoptlist *);
+PRIVATE int db_ResetGlobalData_phzonelist (void);
+PRIVATE int db_InitPHZonelist (DBfile *, DBoptlist *);
+PRIVATE void db_build_shared_names_ucdmesh (DBfile *, char *);
+PRIVATE void db_mkname (PDBfile*, char*, char*, char*);
+PRIVATE int db_InitMulti (DBfile*, DBoptlist*);
+PRIVATE void db_InitDefvars (DBoptlist*);
+#endif /* PDB_WRITE */
+#endif /* !SILO_NO_CALLBACKS */
+
+/*-------------------------------------------------------------------------
+ * Macros...
+ *-------------------------------------------------------------------------
+ */
+#define MAXNAME         256
+#define INIT_OBJ(A)     (_tcl=(A),_tcl->num=0)
+#define DEFINE_OBJ(NM,PP,TYP) DEF_OBJ(NM,PP,TYP,1)
+#define DEFALL_OBJ(NM,PP,TYP) DEF_OBJ(NM,PP,TYP,0)
+#define DEF_OBJ(NM,PP,TYP,AL) {                                         \
+     (_tcl->name[_tcl->num]=(NM),                                       \
+      _tcl->ptr[_tcl->num]=(void*)(PP),                                 \
+      _tcl->type[_tcl->num]=(TYP),                                      \
+      _tcl->alloced[_tcl->num]=(AL));                                   \
+      _tcl->num++;}
+
+/*-------------------------------------------------------------------------
+ * Private functions.
+ *-------------------------------------------------------------------------
+ */
+PRIVATE char **PJ_ls (PDBfile *, char *, char *, int *);
+PRIVATE int PJ_get_fullpath (PDBfile *, char *, char *, char *);
+
+PRIVATE int PJ_read (PDBfile *, char *, void *);
+PRIVATE int PJ_read_alt (PDBfile *, char *, void *, long *);
+PRIVATE int PJ_read_as (PDBfile *, char *, char *, void *);
+PRIVATE int PJ_read_as_alt (PDBfile *, char *, char *, void *, long *);
+PRIVATE syment *PJ_inquire_entry (PDBfile *, char *);
+PRIVATE int pdb_getvarinfo (PDBfile *, char *, char *, int *, int *, int);
+
+PRIVATE int PJ_ForceSingle (int);
+PRIVATE int PJ_GetObject (PDBfile *, char *, PJcomplist *, char **ret_type);
+PRIVATE int PJ_ClearCache(void);
+PRIVATE int PJ_InqForceSingle (void);
+PRIVATE void PJ_NoCache ( void );
+PRIVATE void *PJ_GetComponent (PDBfile *, char *, char *);
+PRIVATE int PJ_GetComponentType (PDBfile *, char *, char *);
+PRIVATE int PJ_ReadVariable (PDBfile *, char *, int, int, char **);
+
+PRIVATE int PJ_get_group (PDBfile *, char *, PJgroup **);
+PRIVATE PJgroup *PJ_make_group (char *, char *, char **, char **, int);
+PRIVATE int PJ_rel_group (PJgroup *);
+PRIVATE int PJ_print_group (PJgroup *, FILE *);
+
+#ifdef PDB_WRITE
+PRIVATE int PJ_put_group (PDBfile*,PJgroup*, int);
+PRIVATE int PJ_write (PDBfile*,char*,char*,void*) ;
+PRIVATE int PJ_write_len (PDBfile*,char*,char*,const void*,int,long*);
+PRIVATE int PJ_write_alt (PDBfile*,char*,char*,void*,int,long*);
+#endif /* PDB_WRITE */
+
+#endif /* !SILO_PDB_PRIVATE_H */
diff --git a/src/pdbp_drv/Makefile.am b/src/pdbp_drv/Makefile.am
new file mode 100644
index 0000000..6a7b828
--- /dev/null
+++ b/src/pdbp_drv/Makefile.am
@@ -0,0 +1,61 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_pdbp_drv.la
+libsilo_pdbp_drv_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo -I$(srcdir)/../pdb_drv
+
+FILES = \
+ silo_pdbp.c
diff --git a/src/pdbp_drv/Makefile.in b/src/pdbp_drv/Makefile.in
new file mode 100644
index 0000000..b096f57
--- /dev/null
+++ b/src/pdbp_drv/Makefile.in
@@ -0,0 +1,544 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/pdbp_drv
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_pdbp_drv_la_LIBADD =
+am__objects_1 = silo_pdbp.lo
+am_libsilo_pdbp_drv_la_OBJECTS = $(am__objects_1)
+libsilo_pdbp_drv_la_OBJECTS = $(am_libsilo_pdbp_drv_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_pdbp_drv_la_SOURCES)
+DIST_SOURCES = $(libsilo_pdbp_drv_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_pdbp_drv.la
+libsilo_pdbp_drv_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo -I$(srcdir)/../pdb_drv
+FILES = \
+ silo_pdbp.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/pdbp_drv/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/pdbp_drv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_pdbp_drv.la: $(libsilo_pdbp_drv_la_OBJECTS) $(libsilo_pdbp_drv_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_pdbp_drv_la_OBJECTS) $(libsilo_pdbp_drv_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_pdbp.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/pdbp_drv/silo_pdbp.c b/src/pdbp_drv/silo_pdbp.c
new file mode 100644
index 0000000..e069049
--- /dev/null
+++ b/src/pdbp_drv/silo_pdbp.c
@@ -0,0 +1,99 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/* Use C pre-processor to re-define the 3 public functions for the driver */
+#define db_pdb_Open(NAME, MODE, OPTS) db_pdbp_Open(NAME, MODE, OPTS)
+#define db_pdb_Create(NAME, MODE, TARGET, OPTS, FINFO) db_pdbp_Create(NAME, MODE, TARGET, OPTS, FINFO)
+#define db_pdb_ForceSingle(STATUS) db_pdbp_ForceSingle(STATUS)
+
+/* Use C pre-processor to map all 'lite' PDB symbols to PDB proper symbols */
+#define lite_CRAY_STD CRAY_STD
+#define lite_IEEEA_STD IEEEA_STD
+#define lite_INTELA_ALIGNMENT INTELA_ALIGNMENT
+#define lite_M68000_ALIGNMENT M68000_ALIGNMENT
+#define lite_MIPS_ALIGNMENT MIPS_ALIGNMENT
+#define lite_RS6000_ALIGNMENT RS6000_ALIGNMENT
+#define lite_SPARC_ALIGNMENT SPARC_ALIGNMENT
+#define lite_UNICOS_ALIGNMENT UNICOS_ALIGNMENT
+#define lite_LAST LAST
+
+#define lite_PD_cd PD_cd
+#define lite_PD_close PD_close
+#define lite_PD_defent_alt PD_defent_alt
+#define lite_PD_defstr PD_defstr
+#define lite_PD_err PD_err
+#define lite_PD_get_attribute PD_get_attribute
+#define lite_PD_inquire_entry PD_inquire_entry
+#define lite_PD_ls PD_ls
+#define lite_PD_mkdir PD_mkdir
+#define lite_PD_open PD_open
+#define lite_PD_pwd PD_pwd
+#define lite_PD_read PD_read
+#define lite_PD_read_alt PD_read_alt
+#define lite_PD_read_as PD_read_as
+#define lite_PD_read_as_alt PD_read_as_alt
+#define lite_PD_reset_ptr_list PD_reset_ptr_list
+#define lite_PD_target PD_target
+#define lite_PD_write PD_write
+#define lite_PD_write_alt PD_write_alt
+
+#define lite_SC_alloc SC_alloc
+#define lite_SC_arrlen SC_arrlen
+#define lite_SC_free SC_free
+#define lite_SC_hash_dump SC_hash_dump
+#define lite_SC_lookup SC_lookup
+
+/* Ok, now we're ready to include the PDB (lite) driver code. The macros defined
+   above will result in renaming the driver's public functions as well as the
+   PDB functions it calls to use PDB proper. */
+#define PDB_WRITE        /* Include code to write to pdb files */
+#define USING_PDB_PROPER /* turn on extra code blocks specific to PDB proper */
+#include "silo_pdb.c"
diff --git a/src/score/Makefile.am b/src/score/Makefile.am
new file mode 100644
index 0000000..067744b
--- /dev/null
+++ b/src/score/Makefile.am
@@ -0,0 +1,66 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+noinst_LTLIBRARIES = libsilo_score.la
+libsilo_score_la_SOURCES = $(FILES)
+
+noinst_HEADERS = \
+ score.h
+FILES = \
+ memmove.c \
+ scctla.c \
+ scctl.c \
+ schash.c \
+ scstr.c
diff --git a/src/score/Makefile.in b/src/score/Makefile.in
new file mode 100644
index 0000000..c08d343
--- /dev/null
+++ b/src/score/Makefile.in
@@ -0,0 +1,557 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/score
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_score_la_LIBADD =
+am__objects_1 = memmove.lo scctla.lo scctl.lo schash.lo scstr.lo
+am_libsilo_score_la_OBJECTS = $(am__objects_1)
+libsilo_score_la_OBJECTS = $(am_libsilo_score_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_score_la_SOURCES)
+DIST_SOURCES = $(libsilo_score_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_score.la
+libsilo_score_la_SOURCES = $(FILES)
+noinst_HEADERS = \
+ score.h
+
+FILES = \
+ memmove.c \
+ scctla.c \
+ scctl.c \
+ schash.c \
+ scstr.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/score/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/score/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_score.la: $(libsilo_score_la_OBJECTS) $(libsilo_score_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_score_la_OBJECTS) $(libsilo_score_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/memmove.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/scctl.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/scctla.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/schash.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/scstr.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/score/memmove.c b/src/score/memmove.c
new file mode 100644
index 0000000..8d2a4ae
--- /dev/null
+++ b/src/score/memmove.c
@@ -0,0 +1,94 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+#include "score.h"
+
+

+/*-------------------------------------------------------------------------
+ * Function:	memmove
+ *
+ * Purpose:	Copies the SIZE bytes at FROM into the SIZE bytes at TO,
+ *		even if those two blocks of space overlap.  In the case
+ *		of overlap, `memmove' is careful to copy the original
+ *		values of the bytes in the block at FROM, including those
+ *		bytes which also belong to the block at TO.
+ *
+ * Return:	Success:	TO
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.matzke.cioe.com
+ *		Mar 25, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef HAVE_MEMMOVE
+void *
+memmove (void *_to, const void *_from, size_t size) {
+
+   int i ;
+   unsigned char *to=(unsigned char *)_to ;
+   unsigned char *from=(unsigned char *)_from ;
+   
+   if (to<from) {
+      for (i=0; i<size; i++) to[i] = from[i] ;
+   } else if (to>from) {
+      for (i=size-1; i>=0; --i) to[i] = from[i] ;
+   }
+   return _to ;
+}
+#endif /* !HAVE_MEMMOVE */
diff --git a/src/score/scctl.c b/src/score/scctl.c
new file mode 100644
index 0000000..040ad55
--- /dev/null
+++ b/src/score/scctl.c
@@ -0,0 +1,216 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+/*
+ * SCCTL.C - some core routines used by many packages
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ */
+
+#include "config.h" /* For the pointer checks. */
+#include <time.h>
+#include "score.h"
+
+/* Prototypes for other external functions. */
+#ifndef WIN32
+extern char *ctime(const time_t *);
+#endif
+
+int	*lite_LAST ;
+int	lite_SC_c_sp_alloc ;
+int	lite_SC_c_sp_diff ;
+int	lite_SC_c_sp_free ;
+int	lite_SC_c_sp_max ;
+char	*lite_SC_CHAR_S = "char";
+
+/* These prototypes are only included if we can't get them any other place.
+ * We need them for their pointers, below.
+ */
+#ifndef HAVE_FCLOSE_POINTER
+extern int fclose(FILE*);
+#endif
+#ifndef HAVE_FFLUSH_POINTER
+extern int fflush(FILE*);
+#endif
+#ifndef HAVE_FOPEN_POINTER
+extern FILE* fopen(const char*, const char*);
+#endif
+#ifndef HAVE_FPRINTF_POINTER
+extern int fprintf(FILE*, const char*, ...);
+#endif
+#ifndef HAVE_FREAD_POINTER
+extern size_t fread(void*, size_t, size_t, FILE*);
+#endif
+#ifndef HAVE_FSEEK_POINTER
+extern int fseek(FILE*, long, int);
+#endif
+#ifndef HAVE_SETVBUF_POINTER
+extern int setvbuf(FILE*, char*, int, size_t);
+#endif
+#ifndef HAVE_FTELL_POINTER
+extern long ftell(FILE*);
+#endif
+#ifndef HAVE_FWRITE_POINTER
+extern size_t fwrite(const void*, size_t, size_t, FILE*);
+#endif
+
+/* declare the IO hooks */
+PFfclose  lite_io_close_hook   = (PFfclose)  fclose;
+PFfflush  lite_io_flush_hook   = (PFfflush)  fflush;
+PFfopen   lite_io_open_hook    = (PFfopen)   fopen;
+PFfprintf lite_io_printf_hook  = (PFfprintf) fprintf;
+PFfread   lite_io_read_hook    = (PFfread)   fread;
+PFfseek   lite_io_seek_hook    = (PFfseek)   fseek;
+PFsetvbuf lite_io_setvbuf_hook = (PFsetvbuf) setvbuf;
+PFftell   lite_io_tell_hook    = (PFftell)   ftell;
+PFfwrite  lite_io_write_hook   = (PFfwrite)  fwrite;
+
+
+
+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_regx_match
+ *
+ * Purpose:	Returns TRUE iff the first string arg matched the
+ *		regular expression defined by the second string arg.
+ *
+ * 		Regular expression specifiers (so far)
+ *
+ * 		   `*'	Matches any number of characters.
+ * 		   `?'  Matches any single character.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_regx_match (char *s, char *patt) {
+
+   int c;
+   char *ps, *pp;
+
+   if (patt == NULL) return(TRUE);
+   if (s == NULL) return(FALSE);
+
+   ps = s;
+   pp = patt;
+   while ((c = *pp++) != '\0') {
+      switch (c) {
+      case '*' :
+	 while (*pp == '*') pp++;
+	 c = *pp;
+	 while ((ps = strchr(ps, c)) != NULL) {
+	    if (lite_SC_regx_match(ps, pp)) return(TRUE);
+	    ps++;
+	 }
+	 return(FALSE);
+
+      case '?' :
+	 return(lite_SC_regx_match(++ps, pp));
+
+      case '\\' :
+	 c = *pp++;
+
+      default :
+	 if (*ps++ != c) return(FALSE);
+      }
+
+      if (((*ps == '\0') && (*pp != '\0') && (*pp != '*')) ||
+	  ((*ps != '\0') && (*pp == '\0'))) {
+	 return(FALSE);
+      }
+   }
+
+   if (*ps == '\0') return(TRUE);
+   else return(FALSE);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_date
+ *
+ * Purpose:	Return a string with the time and date defined by the
+ *		ANSI function ctime.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.matzke.cioe.com
+ *		Apr 17, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_SC_date (void) {
+
+   time_t tm;
+   char t[MAXLINE];
+
+   tm = time(NULL);
+   strcpy(t, ctime(&tm));
+   return lite_SC_strsavef (strtok(t, "\n"), "char*:SC_DATE:time");
+}
+
diff --git a/src/score/scctla.c b/src/score/scctla.c
new file mode 100644
index 0000000..74195b1
--- /dev/null
+++ b/src/score/scctla.c
@@ -0,0 +1,897 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+/*
+ * SCCTLA.C - auxilliary functions for control structure package
+ *          - these should NEVER be modified for a specific application
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ *
+ */
+#include "config.h"
+#include <score.h>
+#include <limits.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+
+typedef union u_mem_header mem_header;
+typedef struct s_mem_descriptor mem_descriptor;
+
+#define SC_MEM_ID       0xF1E2D3C4
+#define UNIT_SIZE_MAX   10
+
+/*
+ * This parameter controls wether small requests for memory go to
+ * the system memory manager or are allocated out of a larger chunks
+ * of memory which score manages.
+ */
+#undef CACHE_SMALL_MEM_REQ
+
+/*
+ * The struct s_mem_descriptor will contain prev and next fields if
+ * NEED_MEM_TRACE is defined and the macros ASSIGN_BLOCK, SAVE_LINKS,
+ * REASSIGN_BLOCK, UNASSIGN_BLOCK and the function lite_SC_realloc() use
+ * these fields.  These machines need this defined: irix, linux.
+ * These machines might get away with not defining this: meiko, solaris,
+ * sun, sun-gnu.
+ */
+#undef NEED_MEM_TRACE
+#ifdef NEED_MEM_TRACE
+
+/*
+ * Use the mem_header struct to force alignment to that of a double
+ * this solves all alignment problems (especially for RISC chips).
+ */
+
+struct s_mem_descriptor {
+   char			*name;
+   long 		id;
+   short 		ref_count;
+   short 		type;
+   long 		length;
+   mem_header 		*prev;
+   mem_header 		*next;
+};
+
+union u_mem_header {
+   mem_descriptor	block;
+   double 		align[3];
+};
+
+static mem_header	*_SC_latest_block ;
+
+#define ASSIGN_BLOCK(space, nb, name) {                                \
+      mem_descriptor *desc;                                            \
+      desc = &space->block;                                            \
+      desc->id        = SC_MEM_ID;                                     \
+      desc->ref_count = 1;                                             \
+      desc->type      = 0;                                             \
+      desc->length    = nb;                                            \
+      desc->name      = name;                                          \
+      if (_SC_latest_block != NULL) {                                  \
+	 mem_header *prev, *next;                                      \
+	 next = _SC_latest_block->block.next;                          \
+	 prev = _SC_latest_block;                                      \
+	 next->block.prev = space;                                     \
+	 prev->block.next = space;                                     \
+	 desc->next = next;                                            \
+	 desc->prev = prev;                                            \
+	 _SC_latest_block = space;                                     \
+      } else {                                                         \
+	 _SC_latest_block             = space;                         \
+	 _SC_latest_block->block.prev = space;                         \
+	 _SC_latest_block->block.next = space;			       \
+      }								       \
+   }
+
+#define SAVE_LINKS(desc) {                                             \
+      prev = desc->prev;                                               \
+      next = desc->next;                                               \
+      if (space == _SC_latest_block) _SC_latest_block = next;          \
+   }
+
+#define REASSIGN_BLOCK(space) {                                        \
+       desc = &space->block;                                           \
+       desc->length = nb;                                              \
+       prev->block.next = space;                                       \
+       next->block.prev = space;				       \
+    }
+
+#define UNASSIGN_BLOCK(desc) {                                         \
+       mem_header *prev, *next;                                        \
+       prev = desc->prev;                                              \
+       next = desc->next;                                              \
+       if (prev == next) _SC_latest_block = NULL;                      \
+       prev->block.next = next;                                        \
+       next->block.prev = prev;                                        \
+       if (space == _SC_latest_block) _SC_latest_block = next;         \
+    }
+
+#else /* NEED_MEM_TRACE */
+
+/*
+ * Use the mem_header struct to force alignment to that of a double
+ * this solves all alignment problems (especially for RISC chips)
+ */
+struct s_mem_descriptor {
+   char			*name;
+   long 		id;
+   short 		ref_count;
+   short 		type;
+   long 		length;
+};
+
+union u_mem_header {
+   mem_descriptor 	block;
+   double 		align[2];
+};
+
+#define ASSIGN_BLOCK(space, nb, name) {                                \
+      mem_descriptor *desc;                                            \
+      desc = &space->block;                                            \
+      desc->id        = SC_MEM_ID;                                     \
+      desc->ref_count = 1;                                             \
+      desc->type      = 0;                                             \
+      desc->length    = nb;                                            \
+      desc->name      = name;					       \
+   }
+
+#define SAVE_LINKS(desc) /*void*/
+
+#define REASSIGN_BLOCK(space) {                                        \
+       desc = &space->block;                                           \
+       desc->length = nb;					       \
+    }
+
+#define UNASSIGN_BLOCK(desc) /*void*/
+
+#endif /* NEED_MEM_TRACE */
+
+#define SCORE_BLOCK_P(desc)                                            \
+    ((desc)->id == SC_MEM_ID)
+
+#define BLOCK_LENGTH(desc)                                             \
+    (desc)->length
+
+#define REF_COUNT(desc)                                                \
+    ((desc)->ref_count)
+
+
+#define EXTRA_WORD_SIZE sizeof(long)
+#define NBITS (8*EXTRA_WORD_SIZE - 4)
+
+#define _SC_REALLOC (*_lite_SC_realloc_hook)
+#define _SC_ALLOC   (*_lite_SC_alloc_hook)
+#define _SC_FREE    (*_lite_SC_free_hook)
+
+#define SC_MEM_COUNT                                                   \
+    lite_SC_c_sp_diff = lite_SC_c_sp_alloc - lite_SC_c_sp_free;        \
+    lite_SC_c_sp_max  = (lite_SC_c_sp_max > lite_SC_c_sp_diff) ?       \
+                   lite_SC_c_sp_max : lite_SC_c_sp_diff
+
+FreeFuncType   		_lite_SC_free_hook    = (FreeFuncType) free;
+ReallocFuncType		_lite_SC_realloc_hook = (ReallocFuncType) realloc;
+MallocFuncType		_lite_SC_alloc_hook   = (MallocFuncType) malloc;
+
+
+#ifdef CACHE_SMALL_MEM_REQ
+static mem_descriptor	 *_SC_free_list[UNIT_SIZE_MAX];
+static char		**_SC_major_block_list ;
+static long		_SC_nx_major_blocks ;
+static long	 	_SC_n_major_blocks ;
+#endif
+
+static long		_SC_max_mem_blocks ;
+static long		_SC_n_mem_blocks ;
+static unsigned long	Sz_max = ( 1L << NBITS) - 1;        /* maximum value */
+static unsigned long	Sz = sizeof(mem_header);  /* size in bytes of header */
+static char		tokbuffer[MAXLINE];  /* used by firsttok and lasttok */
+static int		_SC_zero_space = TRUE;
+static byte *		_SC_prim_alloc (size_t) ;
+static void		_SC_prim_free (byte*,unsigned long) ;
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_alloc
+ *
+ * Purpose:	Add a layer of control over the C level mamory management
+ *		system to store the byte length of allocated spaces.
+ *		A space EXTRA_WORD_SIZE greater than requested is allocated.
+ *		The length in bytes is written into the first EXTRA_WORD_SIZE
+ *		bytes with a 4 bit marker in the high bits and a pointer
+ *		to the next byte is returned.
+ *
+ * Return:	Success:	Ptr to user memory
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+byte *
+lite_SC_alloc (long nitems, long bytepitem, char *name) {
+
+   long nb;
+   unsigned long nbp;
+   mem_header *space;
+
+   nb = nitems*bytepitem;
+
+   if ((nb <= 0) || (nb > Sz_max)) return(NULL);
+
+   nbp = (unsigned long) nb + Sz;
+   space = (mem_header *) _SC_prim_alloc((size_t) nbp);
+
+   if (space != NULL) {
+      ASSIGN_BLOCK(space, nb, name);
+
+      lite_SC_c_sp_alloc += nb;
+      SC_MEM_COUNT;
+    
+      _SC_max_mem_blocks++;
+      _SC_n_mem_blocks++;
+
+      space++;
+
+      /*
+       * Zero out the space.
+       */
+      if (_SC_zero_space) memset(space, 0, nb);
+   }
+
+   return((byte *) space);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_realloc
+ *
+ * Purpose:	Add a layer of control over the C level memory management
+ *		system to store the byte length of allocated spaces.  A
+ *		space EXTRA_WORD_SIZE greater than requested is reallocated.
+ *		The length in bytes is written into the first EXTRA_WORD_SIZE
+ *		bytes with a 4 bit marker in the high bits and a pointer to
+ *		the next byte is returned.  
+ *
+ * Return:	Success:	Ptr to move memory.
+ *
+ *		Failure:	If the maximum size implied by the
+ *				EXTRA_WORD_SIZE-4 is exceeded a NULL
+ *				ptr is returned.
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+byte *
+lite_SC_realloc (byte *p, long nitems, long bytepitem) {
+
+   long nb, ob, db;
+   unsigned long nbp, obp;
+   mem_header *space, *tmp;
+   mem_descriptor *desc;
+
+#ifdef NEED_MEM_TRACE
+   mem_header *prev, *next;
+#endif
+
+   if (p == NULL) return(NULL);
+
+   space = ((mem_header *) p) - 1;
+   desc  = &space->block;
+   if (!SCORE_BLOCK_P(desc)) return(NULL);
+
+   nb  = nitems*bytepitem;
+   nbp = nb + Sz;
+
+   if ((nb <= 0) || (nb > Sz_max)) return(NULL);
+
+   ob = lite_SC_arrlen(p);
+   db = nb - ob;
+    
+   SAVE_LINKS(desc);
+
+   tmp = (mem_header *) _SC_prim_alloc((size_t) nbp);
+   obp = ob + Sz;
+   memcpy(tmp, space, MIN(obp, nbp));
+   _SC_prim_free(space, obp);
+   space = tmp;
+    
+   if (space != NULL) {
+      REASSIGN_BLOCK(space);
+
+      lite_SC_c_sp_alloc += db;
+      SC_MEM_COUNT;
+
+      space++;
+
+      /*
+       * Zero out the new space.
+       */
+      if ((db > 0) && (_SC_zero_space)) memset(((char *) space + ob), 0, db);
+   }
+
+   return((byte *) space);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_free
+ *
+ * Purpose:	The complementary routine for lite_SC_alloc().  Free all
+ *		the space including the counter.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_free (byte *p) {
+
+   mem_header *space;
+   mem_descriptor *desc;
+   unsigned long nbp;
+
+   if (p == NULL) return(TRUE);
+
+   space = ((mem_header *) p) - 1;
+   desc  = &space->block;
+   if (!SCORE_BLOCK_P(desc)) return(FALSE);
+
+   if (REF_COUNT(desc) == UNCOLLECT) return(TRUE);
+
+   if (--REF_COUNT(desc) > 0) return(TRUE);
+
+   nbp = BLOCK_LENGTH(desc) + Sz;
+
+   UNASSIGN_BLOCK(desc);
+
+   lite_SC_c_sp_free += (nbp - Sz);
+   SC_MEM_COUNT;
+
+   if (_SC_zero_space) {
+      memset(space, 0, nbp);
+   } else {
+      desc->name      = NULL;
+      desc->id        = 0L;
+      desc->ref_count = 0;
+      desc->type      = 0;
+      desc->length    = 0L;
+   }
+
+   _SC_prim_free((byte *) space, nbp);
+   _SC_n_mem_blocks--;
+   return(TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_arrlen
+ *
+ * Purpose:	Return the length of an array which was allocated
+ *		with lite_SC_alloc().
+ *
+ * Return:	Success:	Length of array.
+ *
+ *		Failure:	-1
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+lite_SC_arrlen (byte *p) {
+
+   mem_header *space;
+   mem_descriptor *desc;
+   long nb;
+
+   if (p == NULL) return(-1);
+
+   space = ((mem_header *) p) - 1;
+   desc  = &space->block;
+   if (!SCORE_BLOCK_P(desc)) return(-1L);
+
+   nb = BLOCK_LENGTH(desc);
+   if (nb < 0L) return(-1L);
+   else return(nb);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_mark
+ *
+ * Purpose:	Change the reference count by N
+ *
+ * Return:	Success:	New reference count.
+ *
+ *		Failure:	-1
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_mark (byte *p, int n) {
+
+   mem_header *space;
+   mem_descriptor *desc;
+
+   if (p == NULL) return(-1);
+
+   space = ((mem_header *) p) - 1;
+   desc  = &space->block;
+   if (!SCORE_BLOCK_P(desc)) return(-1);
+
+   if (REF_COUNT(desc) < UNCOLLECT) REF_COUNT(desc) += n;
+
+   return(REF_COUNT(desc));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_ref_count
+ *
+ * Purpose:	Reference count.
+ *
+ * Return:	Success:	Return the reference count of the given
+ *				object.
+ *
+ *		Failure:	-1
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_ref_count (byte *p) {
+
+   mem_header *space;
+   mem_descriptor *desc;
+
+   if (p == NULL) return(-1);
+
+   space = ((mem_header *) p) - 1;
+   desc  = &space->block;
+   if (!SCORE_BLOCK_P(desc)) return(-1);
+
+   return((int) REF_COUNT(desc));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_SC_prim_alloc
+ *
+ * Purpose:	Memory allocator that manages banks of small chunks
+ *		for efficiency.
+ *
+ * Return:	Success:	Ptr to user memory
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Dec 10 12:00:55 PST 1998
+ *    I made the caching of small memory chunks depend on a C preprocessor
+ *    variable.
+ *
+ *-------------------------------------------------------------------------
+ */
+static byte *
+_SC_prim_alloc (size_t nbp) {
+
+   byte *p;
+#ifdef CACHE_SMALL_MEM_REQ
+   char *pn;
+   mem_descriptor *md, *ths;
+   size_t tnb;
+   long nb, unsz;
+   int nu, us, ns, i;
+#endif
+
+   if (nbp <= 0) return(NULL);
+
+#ifdef CACHE_SMALL_MEM_REQ
+   nb   = nbp - Sz;
+   unsz = nb >> 3;
+   if (unsz < UNIT_SIZE_MAX) {
+      md = _SC_free_list[unsz];
+      if (md == NULL) {
+	 us = Sz + ((unsz + 1) << 3);
+	 nu = 4096/us;
+	 ns = nu*us;
+	 pn = _SC_ALLOC((size_t) ns);
+
+	 /*
+	  * SC_REMEMBER would be nice but it would also be a recursive
+	  * infinite loop.
+	  */
+	 if (_SC_major_block_list == NULL) {
+	    _SC_nx_major_blocks = 10L;
+	    _SC_n_major_blocks  = 0;
+	    tnb = sizeof(char *)*_SC_nx_major_blocks;
+	    _SC_major_block_list = (char **) _SC_ALLOC(tnb);
+	 }
+
+	 _SC_major_block_list[_SC_n_major_blocks++] = pn;
+
+	 if (_SC_n_major_blocks >= _SC_nx_major_blocks) {
+	    _SC_nx_major_blocks += 10L;
+	    tnb = sizeof(char *)*_SC_nx_major_blocks;
+	    _SC_major_block_list = (char **) _SC_REALLOC(_SC_major_block_list,
+							 tnb);
+	 }
+
+	 md = (mem_descriptor *) pn;
+	 nu--;
+	 for (i = 0; i < nu; i++, pn += us) {
+	    ths       = (mem_descriptor *) pn;
+	    ths->name = (char *) (pn + us);
+	 }
+	 ths       = (mem_descriptor *) pn;
+	 ths->name = NULL;
+      }
+
+      _SC_free_list[unsz] = (mem_descriptor *) (md->name);
+      p = (byte *) md;
+   } else {
+      p = _SC_ALLOC((size_t) nbp);
+   }
+#else
+   p = _SC_ALLOC((size_t) nbp);
+#endif
+
+   return(p);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_SC_prim_free
+ *
+ * Purpose:	Free small block counterpart to _SC_prim_alloc()
+ *		for efficiency.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Dec 10 12:00:55 PST 1998
+ *    I made the caching of small memory chunks depend on a C preprocessor
+ *    variable.
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+static void
+_SC_prim_free (byte *p, unsigned long nbp) {
+
+#ifdef CACHE_SMALL_MEM_REQ
+   mem_descriptor *lst, *ths;
+   unsigned long nb, unsz;
+#endif
+
+   if (p == NULL) return;
+
+#ifdef CACHE_SMALL_MEM_REQ
+   nb   = nbp - Sz;
+   unsz = nb >> 3;
+   if (unsz < UNIT_SIZE_MAX) {
+      ths = (mem_descriptor *) p;
+      lst = _SC_free_list[unsz];
+      ths->name = (char *) lst;
+      _SC_free_list[unsz] = ths;
+   } else {
+      _SC_FREE(p);
+   }
+#else
+   _SC_FREE(p);
+#endif
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_strsavef
+ *
+ * Purpose:	Save string S somewhere.  Remember its name.  Allocate
+ *		one extra character so that firsttok won't kill things
+ *		in the one bad case.
+ *
+ * Return:	Success:	New memory for string.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_SC_strsavef (char *s, char *name) {
+
+   char *p;
+   int sz;
+
+   if (s == NULL) return(NULL);
+
+   sz = strlen(s) + 2;
+   p  = FMAKE_N(char, sz, name);
+   if (p != NULL) strcpy(p, s);
+   else return(NULL);
+
+   return(p);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_strrev
+ *
+ * Purpose:	Copy the string onto itself in reverse order.
+ *
+ * Return:	Success:	The string
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_SC_strrev (char *s) {
+
+   int i;
+   char *t, *p;
+
+   p = s;
+   i = strlen(s) + 1;
+   t = MAKE_N(char, i);
+   if (t == NULL) return(NULL);
+
+   t[--i] = '\0';
+   while (*p) t[--i] = *p++;
+
+   strcpy(s, t);
+   SFREE(t);
+
+   return(s);
+}
+
+/*--------------------------------------------------------------------------*/
+/*                           TOKENIZERS                                     */
+/*--------------------------------------------------------------------------*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_firsttok
+ *
+ * Purpose:	Returns a pointer to the first token and points
+ *		S to the next element in the string.
+ *
+ * Return:	Success:	Ptr to first token.
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_SC_firsttok (char *s, char *delim) {
+
+   char *t, *r;
+        
+   if (*s == '\0') return(NULL);
+
+   /*
+    * T is the pointer to the token.
+    */
+   for (t = s; strchr(delim, *t) != NULL; t++) {
+      if (*t == '\0') return(NULL);
+   }
+
+   /*
+    * R is the pointer to the remainder.
+    */
+   for (r = t; strchr(delim, *r) == NULL; r++) /*void*/ ;
+
+   /*
+    * If we aren't at the end of the string.
+    */
+   if (*r != '\0') {
+      *r++ = '\0';
+
+      /*
+       * Copy the token into a temporary.
+       */
+      strcpy(tokbuffer, t);
+
+      /*
+       * Copy the remainder down into the original string
+       * GOTCHA: this should be replaced by MEMMOVE (ANSI standard C function)
+       */
+      /*strcpy(s, r);*/
+      memmove(s, r, strlen(r)+1);
+
+      /*
+       * Copy the token in the space left over.
+       */
+      t = s + strlen(s) + 1;
+      strcpy(t, tokbuffer);
+      
+   } else {
+      /*
+       * If we are at the end of the string we may overindex the string
+       * by adding one more character (sigh).
+       */
+      strcpy(tokbuffer, t);
+      *s = '\0';
+      t = s + 1;
+      strcpy(t, tokbuffer);
+   }
+
+   return(t);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_SC_pr_tok
+ *
+ * Purpose:	Returns a pointer to the first token and points S to
+ *		the next element in the string.
+ *
+ * Return:	Success:	First token in S
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+_lite_SC_pr_tok (char *s, char *delim) {
+
+   int i, j;
+        
+   i = strcspn(s, delim);
+   j = strlen(s);
+   if ((i == 0) && (i != j)) {
+      s++;
+      return(lite_SC_firsttok(s, delim));
+   }
+
+   s[i] = '\0';
+   strcpy(tokbuffer, s);
+
+   /*
+    * Take care of last token in string.
+    */
+   if (i == j) *s = '\0';
+   else strcpy(s, s+i+1);
+
+   s += strlen(s) + 1;
+   strcpy(s, tokbuffer);
+
+   return(s);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_lasttok
+ *
+ * Purpose:	Find last token on a string, return it and the
+ *		preceeding string.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lite_SC_lasttok (char *s, char *delim) {
+
+   char *temp, *r;
+
+   r    = lite_SC_strrev(s);
+   temp = _lite_SC_pr_tok(r, delim);
+   s    = lite_SC_strrev(r);
+
+   return lite_SC_strrev (temp);
+}
diff --git a/src/score/schash.c b/src/score/schash.c
new file mode 100644
index 0000000..65808f6
--- /dev/null
+++ b/src/score/schash.c
@@ -0,0 +1,510 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+/*
+ * SCHASH.C - routines to manipulate hash tables
+ *          - intended to be a complete module that
+ *          - can be used with any application by defining
+ *          - the struct, hashel, in SCORE.H suitably
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ */
+#include "score.h"
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_hash
+ *
+ * Purpose:	Compute hash value for string S in a table of SIZE
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_hash (char *s, int size) {
+
+   int hashval;
+
+   for (hashval = 0; *s != '\0'; ) {
+      hashval = (hashval << 1) ^ (*s++);
+   }
+
+   return(abs(hashval) % size);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_lookup
+ *
+ * Purpose:	Lookup S in hash table TABLE.
+ *
+ * Return:	Success:	Ptr to object
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hashel *
+lite_SC_lookup (char *s, HASHTAB *tab) {
+
+   hashel *np, **tb;
+   int sz;
+
+   if (tab == NULL) return(NULL);
+
+   sz = tab->size;
+   tb = tab->table;
+   for (np = tb[lite_SC_hash(s, sz)]; np != NULL; np = np->next) {
+      if (strcmp(s, np->name) == 0) return(np); /* found it */
+   }
+
+   return(NULL); /* not found */
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_def_lookup
+ *
+ * Purpose:	Return a ptr to the object version of LOOKUP.
+ *
+ * Return:	Success:	ptr to the object version of LOOKUP.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+byte *
+lite_SC_def_lookup (char *s, HASHTAB *tab) {
+
+   hashel *np;
+   
+   if (tab == NULL) return(NULL);
+
+   np = lite_SC_lookup(s, tab);
+   if (np != NULL) return(np->def);
+   else return(NULL);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_install
+ *
+ * Purpose:	
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hashel *
+lite_SC_install (char *name, byte *obj, char *type, HASHTAB *tab) {
+
+   return _lite_SC_install (name, obj, type, tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_SC_install
+ *
+ * Purpose:	Install an object in the hash table.  The object type is
+ *		defined in hash.h and is generic to enhance the
+ *		portability of this code.  WARNING: do NOT use litereals
+ *		or volatiles for the type--for efficiency they are
+ *		not strsave'd!!!
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Dec  8 16:57:20 PST 1998
+ *    Remove unnecessary calls to lite_SC_mark, since reference count now
+ *    set when allocated.  The mark flag is now rendered useless since
+ *    the memory will always be marked when it is allocated.
+ *
+ *    Eric Brugger, Thu Sep 23 10:16:30 PDT 1999
+ *    Remove the mark flag from the argument list.
+ *
+ *-------------------------------------------------------------------------
+ */
+hashel *
+_lite_SC_install (char *name, byte *obj, char *type, HASHTAB *tab) {
+
+   hashel *np, **tb;
+   int hashval, sz;
+
+   sz = tab->size;
+   tb = tab->table;
+   np = lite_SC_lookup(name, tab);
+
+   /*
+    * If not found install it.
+    */
+   if (np == NULL) {
+      np = FMAKE(hashel, "SC_INSTALL:np");
+      if (np == NULL) return(NULL);
+
+      np->name = lite_SC_strsavef(name, "char*:SC_INSTALL:name");
+      if (np->name == NULL) return(NULL);
+
+      hashval     = lite_SC_hash(np->name, sz);
+      np->next    = tb[hashval];
+      tb[hashval] = np;
+      (tab->nelements)++;
+   }
+
+   np->type = type;
+   np->def  = obj;
+
+   return(np);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_hash_rem
+ *
+ * Purpose:	Remove the specified entry from the given hash table.
+ *
+ * Return:	Success:	TRUE
+ *
+ *		Failure:	FALSE
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_hash_rem (char *name, HASHTAB *tab) {
+
+   hashel *np, *nxt, **tb;
+   int sz, i;
+
+   sz = tab->size;
+   tb = tab->table;
+   i  = lite_SC_hash(name, sz);
+   np = tb[i];
+
+   /*
+    * If not found nothing else to do.
+    */
+   if (np == NULL) {
+      return(FALSE);
+   } else {
+      if (strcmp(name, np->name) == 0) {
+	 tb[i] = np->next;
+
+	 /*
+	  * Undo the MARK in SC_install.
+	  */
+	 SFREE(np->def);
+	 SFREE(np->name);
+	 SFREE(np);
+	 (tab->nelements)--;
+	 return(TRUE);
+
+      } else {
+	 /*
+	  * Otherwise search for it.
+	  */
+	 for (; np->next != NULL; np = np->next) {
+	    nxt = np->next;
+	    if (strcmp(name, nxt->name) == 0) {
+	       np->next = nxt->next;
+	       SFREE(nxt->def);
+	       SFREE(nxt->name);
+	       SFREE(nxt);
+	       (tab->nelements)--;
+	       return(TRUE);
+	    }
+	 }
+      }
+   }
+   return(FALSE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_hash_clr
+ *
+ * Purpose:	Clear the specified hash table.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+lite_SC_hash_clr (HASHTAB *tab) {
+
+   int i, sz;
+   hashel **tb, *np, *nxt;
+
+   sz = tab->size;
+   tb = tab->table;
+   for (i = 0; i < sz; i++) {
+      for (np = tb[i]; np != NULL; np = nxt) {
+	 nxt = np->next;
+
+	 /*
+	  * Undo the MARK in SC_install.
+	  */
+	 SFREE(np->def);
+	 SFREE(np->name);
+	 SFREE(np);
+      }
+      tb[i] = NULL;
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_make_hash_table
+ *
+ * Purpose:	Allocate and initialize a hash table of size SZ.
+ *
+ * Return:	Success:	HASHTAB pointer
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+HASHTAB *
+lite_SC_make_hash_table (int sz, int docflag) {
+
+   HASHTAB *tab;
+   hashel **tb;
+   int i;
+
+   /*
+    * Allocate a new hash table.
+    */
+   tab = FMAKE(HASHTAB, "SC_MAKE_HASH_TABLE:tab");
+
+   if (tab == NULL) {
+      printf("\nCannot allocate a new hash table of size %d\n", sz);
+      return(NULL);
+   }
+
+   tb = FMAKE_N(hashel *, sz, "SC_MAKE_HASH_TABLE:tb");
+   if (tb == NULL) return(NULL);
+
+   tab->size      = sz;
+   tab->docp      = docflag;
+   tab->nelements = 0;
+   tab->table     = tb;
+
+   /*
+    * Explicitly NULL the pointers.
+    */
+   for (i = 0; i < sz; i++) tb[i] = NULL;
+
+   return(tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_rl_hash_table
+ *
+ * Purpose:	Release a hash table.  Call SC_HASH_CLR first to
+ *		release the contents of the table.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+lite_SC_rl_hash_table (HASHTAB *tab) {
+
+   lite_SC_hash_clr(tab);
+
+   SFREE(tab->table);
+   SFREE(tab);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_hash_dump
+ *
+ * Purpose:	Return a array of pointers whose entries point to the
+ *		installed names in the given hash table and are alphabetically
+ *		ordered by strcmp().
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char **
+lite_SC_hash_dump (HASHTAB *tab, char *patt) {
+   
+   return lite_SC_dump_hash (tab, patt, TRUE);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_dump_hash
+ *
+ * Purpose:	Return an array of pointers whose entries point to the
+ *		installed names in the given hash table.
+ *
+ * Return:	Success:	Array of ptrs to entries.
+ *
+ *		Failure:	NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char **
+lite_SC_dump_hash (HASHTAB *tab, char *patt, int sort) {
+
+   hashel *np, **tb;
+   char **lineptr, *name;
+   int i, sz, nlines;
+
+   if (tab == NULL) return(NULL);
+
+   /*
+    * Allocate a list of pointers to the names in the hash table.
+    */
+   lineptr = FMAKE_N(char *, tab->nelements, "SC_HASH_DUMP:lineptr");
+   if (lineptr == NULL) return(NULL);
+
+   /*
+    * Fill in the list of pointers to names in the hash table.
+    */
+   sz = tab->size;
+   tb = tab->table;
+   nlines = 0;
+   for (i = 0; i < sz; i++) {
+      for (np = tb[i]; np != NULL; np = np->next) {
+	 name = np->name;
+	 if (patt == NULL) lineptr[nlines++] = name;
+	 else if (lite_SC_regx_match(name, patt)) lineptr[nlines++] = name;
+      }
+   }
+
+   /*
+    * Check that the number of names found is what is expected.
+    */
+   if (nlines > tab->nelements) return(NULL);
+
+   REMAKE_N(lineptr, char *, nlines + 1);
+   lineptr[nlines] = NULL;
+
+   /*
+    * Sort the names.
+    */
+   if (sort) lite_SC_string_sort(lineptr, nlines);
+
+   /*
+    * Return the list of names.
+    */
+   return(lineptr);
+}
diff --git a/src/score/score.h b/src/score/score.h
new file mode 100644
index 0000000..6b835bd
--- /dev/null
+++ b/src/score/score.h
@@ -0,0 +1,367 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+/*
+ * SCORE.H - include file for PACT standard core package
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ */
+
+#ifndef _SCORE_H
+#define _SCORE_H
+
+/*
+ * Standard include files...
+ */
+
+#include "config.h"
+#include <limits.h>		/*needed for SHRT_MAX*/
+#include <stdio.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+/* Macros used for exporting symbols on Win32 systems. */
+#ifndef SILO_API
+#ifdef _WIN32
+#ifndef HAVE_MEMMOVE
+#define HAVE_MEMMOVE
+#endif
+/* Make Silo a DLL by default. */
+#ifdef SILO_STATIC_LIBRARY
+#define SILO_API
+#else
+#ifdef SILO_EXPORTS
+#define SILO_API __declspec(dllexport)
+#else
+#define SILO_API __declspec(dllimport)
+#endif
+#endif
+#else
+#define SILO_API
+#endif
+#endif
+
+/*--------------------------------------------------------------------------*/
+/*                           DEFINED CONSTANTS                              */
+/*--------------------------------------------------------------------------*/
+
+#ifndef FALSE
+#  define FALSE			0
+#  define TRUE			1
+#endif
+
+#define ERR_FREE   		2            /*error free ret flg for longjmp*/
+#define ABORT     		3            /*error return flag for longjmps*/
+
+#define BINARY_MODE_R		"rb"
+#define BINARY_MODE_RPLUS 	"r+b"
+#define BINARY_MODE_WPLUS 	"w+b"
+#define LRG_TXT_BUFFER		4096
+#define NODOC			0
+#define HSZLARGE		521
+#define SC_BITS_BYTE		8
+
+#define SC_CHAR_I        	1
+#define SC_SHORT_I       	2
+#define SC_INTEGER_I     	3
+#define SC_LONG_I        	4
+#define SC_FLOAT_I       	5
+#define SC_DOUBLE_I      	6
+#define SC_REAL_I        	7
+#define SC_STRING_I      	8
+#define SC_POINTER_I     	9
+#define SC_PCONS_P_I     	10
+#define SC_VOID_I        	11
+#define SC_SHORT_P_I   		12
+#define SC_INTEGER_P_I   	13
+#define SC_LONG_P_I      	14
+#define SC_FLOAT_P_I     	15
+#define SC_REAL_P_I      	16
+#define SC_DOUBLE_P_I    	17
+#define SC_PCONS_I       	18
+#define SC_STRUCT_I      	19	/*is this pointer type? */
+#define SC_UNKNOWN_I     	20
+#define SC_CHAR_8_I      	21	/*for F77 users and interfacers */
+#define SC_USER_I        	22	/*first user defined index available */
+
+#define UNCOLLECT       	SHRT_MAX
+#define MAXLINE			    FILENAME_MAX
+
+#undef PRINT
+#define PRINT (*putln)
+
+#undef CONVERT
+#define CONVERT (*SC_convert_hook)
+
+#undef SIZEOF
+#define SIZEOF (*SC_sizeof_hook)
+
+#define io_close   (*lite_io_close_hook)
+#define io_flush   (*lite_io_flush_hook)
+#define io_open    (*lite_io_open_hook)
+#define io_printf  (*lite_io_printf_hook)
+#define io_read    (*lite_io_read_hook)
+#define io_seek    (*lite_io_seek_hook)
+#define io_setvbuf (*lite_io_setvbuf_hook)
+#define io_tell    (*lite_io_tell_hook)
+#define io_write   (*lite_io_write_hook)
+
+
+#undef MAKE
+#undef MAKE_N
+#undef REMAKE
+#undef REMAKE_N
+#undef SFREE
+#undef SFREE_N
+
+/*--------------------------------------------------------------------------*/
+/*                           PROCEDURAL MACROS                              */
+/*--------------------------------------------------------------------------*/
+
+#ifndef MIN
+#  define MIN(X,Y)	((X)<(Y)?(X):(Y))
+#endif
+
+#ifndef MAX
+#  define MAX(X,Y)	((X)>(Y)?(X):(Y))
+#endif
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+#define DEREF(x) (*(char **) (x))
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* FMAKE - memory allocation and bookkeeping macro */
+
+#define FMAKE(x, name) ((x *) lite_SC_alloc(1L, (long) sizeof(x), name))
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* FMAKE_N - allocate a block of type x and return a pointer to it */
+
+#define FMAKE_N(x, n, name) ((x *)lite_SC_alloc((long)n,(long)sizeof(x),name))
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* MAKE_N - allocate a block of type x and return a pointer to it */
+
+#define MAKE_N(x, n) ((x *) lite_SC_alloc((long) n, (long) sizeof(x), NULL))
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* REMAKE_N - reallocate a block of type x and return a pointer to it */
+
+#define REMAKE_N(p, x, n)                                                    \
+   (p = (x *) lite_SC_realloc((byte *) p, (long) (n), (long) sizeof(x)))
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/* SFREE - release memory and do bookkeeping */
+
+#define SFREE(x)                                                             \
+   {lite_SC_free(x);                                                         \
+    x = NULL;}
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------------*/
+/*                         TYPEDEFS AND STRUCTS                             */
+/*--------------------------------------------------------------------------*/
+
+
+typedef void		byte ;
+typedef void		(*FreeFuncType)(void *) ;
+typedef void		*((*MallocFuncType)(size_t));
+typedef void		*((*ReallocFuncType)(void *,size_t));
+typedef void		(*PFVoid)() ;
+typedef int		(*PFInt)() ;
+typedef long		(*PFLong)() ;
+typedef double		(*PFDouble)() ;
+
+/*
+ * Pcons definition
+ *    - useful for linked lists, association lists and whatnot
+ *    - the type fields are for bookkeeping that may be crucial to
+ *    - other packages
+ */
+typedef struct s_pcons {
+   char		*car_type;
+   byte 	*car;
+   char 	*cdr_type;
+   byte 	*cdr;
+} pcons;
+
+/*
+ * Hashel definition
+ *          - hashel have two members, the name and def
+ *          - the name is a string on which the function hash operates
+ *          - type is a string which names the type of object associated
+ *          - with the name and type checking on the object can be used
+ *          - to determine appropriate casts for accessing the object
+ *          - def is a pointer to an object, usually a struct with
+ *          - the necessary members for the specific application
+ */
+typedef struct s_hashel {
+   char 	*name;
+   char 	*type;
+   byte 	*def;
+   struct s_hashel *next; /* next entry in chain */
+} hashel ;
+
+/*
+ * Hash table type.
+ */
+typedef struct s_hashtab {
+   int 		size;
+   int 		nelements;
+   int 		docp;
+   hashel 	**table;
+} HASHTAB ;
+
+typedef union u_SC_address {
+   long		diskaddr;
+   PFInt 	funcaddr;
+   char 	*memaddr;
+} SC_address ;
+
+typedef FILE *	(*PFfopen)(char*,char*);
+typedef long 	(*PFftell)(void*);
+typedef size_t	(*PFfread)(byte*,size_t,size_t,void*);
+typedef size_t	(*PFfwrite)(void*,size_t,size_t,void*);
+typedef int	(*PFsetvbuf)(void*,char*,int,size_t);
+typedef int	(*PFfclose)(void*);
+typedef int	(*PFfseek)(void*,long,int);
+typedef int	(*PFfprintf)(void*,char*,...);
+typedef int	(*PFungetc)(int,void*);
+typedef int	(*PFfflush)(void*);
+
+/*--------------------------------------------------------------------------*/
+/*                         VARIABLE DECLARATIONS                            */
+/*--------------------------------------------------------------------------*/
+
+extern int		lite_SC_c_sp_alloc;
+extern int		lite_SC_c_sp_free;
+extern int		lite_SC_c_sp_diff;
+extern int		lite_SC_c_sp_max;
+extern int *		lite_LAST;
+extern char *		lite_SC_CHAR_S ;
+
+/* IO hooks */
+extern PFfclose lite_io_close_hook;
+extern PFfflush lite_io_flush_hook;
+extern PFfopen lite_io_open_hook;
+extern PFfprintf lite_io_printf_hook;
+extern PFfread lite_io_read_hook;
+extern PFfseek lite_io_seek_hook;
+extern PFsetvbuf lite_io_setvbuf_hook;
+extern PFftell lite_io_tell_hook;
+extern PFfwrite lite_io_write_hook;
+
+
+
+/*--------------------------------------------------------------------------*/
+/*                          FUNCTION DECLARATIONS                           */
+/*--------------------------------------------------------------------------*/
+
+SILO_API extern byte *	lite_SC_alloc (long,long,char*);
+SILO_API extern long	lite_SC_arrlen (byte*);
+SILO_API extern char *	lite_SC_date (void);
+SILO_API extern byte *	lite_SC_def_lookup (char*,HASHTAB*);
+SILO_API extern char **	lite_SC_dump_hash (HASHTAB*,char*,int);
+SILO_API extern char *	lite_SC_firsttok (char*,char*);
+SILO_API extern int	lite_SC_free (byte*);
+SILO_API extern int	lite_SC_hash (char*,int);
+SILO_API extern void	lite_SC_hash_clr (HASHTAB*);
+SILO_API extern char **	lite_SC_hash_dump (HASHTAB*,char*);
+SILO_API extern int	lite_SC_hash_rem (char*,HASHTAB*);
+SILO_API extern hashel *lite_SC_install (char*,byte*,char*,HASHTAB*);
+SILO_API extern char *	lite_SC_lasttok (char*,char*);
+SILO_API extern hashel *lite_SC_lookup (char*,HASHTAB*);
+SILO_API extern HASHTAB *lite_SC_make_hash_table (int,int);
+SILO_API extern int	lite_SC_mark (byte*,int);
+SILO_API extern byte *	lite_SC_realloc (byte*,long,long);
+SILO_API extern int	lite_SC_ref_count (byte*);
+SILO_API extern int	lite_SC_regx_match (char*,char*);
+SILO_API extern void	lite_SC_rl_hash_table (HASHTAB*);
+SILO_API extern int	lite_SC_stoi (char*);
+SILO_API extern long	lite_SC_stol (char*);
+SILO_API extern void	lite_SC_string_sort (char**,int);
+SILO_API extern char *	lite_SC_strrev (char*);
+SILO_API extern char *	lite_SC_strsavef (char*,char*);
+extern hashel *		_lite_SC_install (char*,byte*,char*,HASHTAB*);
+extern char *		_lite_SC_pr_tok (char*,char*);
+extern long int		_lite_SC_strtol (char*,char**,int);
+
+#ifndef HAVE_MEMMOVE
+extern void *	memmove (void*,const void*,size_t) ;
+#endif
+
+#endif /* !_SCORE_H */
diff --git a/src/score/scstr.c b/src/score/scstr.c
new file mode 100644
index 0000000..e87762f
--- /dev/null
+++ b/src/score/scstr.c
@@ -0,0 +1,223 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include "config.h" /* For HAVE_MEMMOVE test. */
+/*
+ * SCSTR.C - string manipulation functions
+ *
+ * Source Version: 2.0
+ * Software Release #92-0043
+ *
+ */
+#include <ctype.h>
+#include "score.h"
+
+#define MBASE 32
+
+#define ishexdigit(x) (isdigit(x)?(x)-'0':islower(x)?(x)+10-'a':(x)+10-'A')
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_stoi
+ *
+ * Purpose:	String to integer.  Returns 0 if string is NULL.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lite_SC_stoi (char *s) {
+
+   if (s == NULL) return(0);
+   else return (atoi(s));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_stol
+ *
+ * Purpose:	String to long integer.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	0 if string is NULL
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long
+lite_SC_stol (char *s) {
+
+   if (s == NULL) return(0);
+   else return(atol(s));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	_lite_SC_strtol
+ *
+ * Purpose:	Strtol done right (since some libraries are bad)
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+long int
+_lite_SC_strtol (char *str, char **ptr, int base) {
+
+   long val;
+   int c;
+   int xx, neg = 0;
+
+   /*
+    * In case no number is formed.
+    */
+   if (ptr != (char **) 0) *ptr = str;
+
+   /*
+    * Base is invalid -- should be a fatal error.
+    */
+   if (base < 0 || base > MBASE) return (0);
+
+   if (!isalnum(c = *str)) {
+      while (isspace(c)) c = *++str;
+      switch (c) {
+      case '-' : neg++;
+      case '+' : c = *++str;
+      }
+   }
+
+   if (base == 0) {
+      if (c != '0') base = 10;
+      else if (str[1] == 'x' || str[1] == 'X') base = 16;
+      else base = 8;
+   }
+
+   /*
+    * For any base > 10, the digits incrementally following
+    * 9 are assumed to be "abc...z" or "ABC...Z".
+    */
+   if (!isalnum(c) || (xx = ishexdigit(c)) >= base) {
+      return(0);                                       /* no number formed */
+   }
+
+   /*
+    * Skip over leading "0x" or "0X".
+    */
+   if ((base == 16) && (c == '0') && isxdigit(str[2]) &&
+       ((str[1] == 'x') || (str[1] == 'X'))) {
+      c = *(str += 2);
+   }
+
+   /*
+    * Accumulate neg avoids surprises near MAXLONG.
+    */
+   for (val = -ishexdigit(c);
+	isalnum(c = *++str) && (xx = ishexdigit(c)) < base; ) {
+      val = base * val - xx;
+   }
+
+   if (ptr != (char **) 0) *ptr = str;
+
+   return(neg ? val : -val);
+}
+
+/*--------------------------------------------------------------------------*/
+/*                           STRING SORT ROUTINES                           */
+/*--------------------------------------------------------------------------*/
+
+static int
+qsort_strcmp(const void *str1, const void *str2)
+{
+   return(strcmp(*((const char **)str1), *((const char **)str2)));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	lite_SC_string_sort
+ *
+ * Purpose:	Sort an array of character pointers by what they point to.
+ *
+ * Return:	void
+ *
+ * Programmer:	Adapted from PACT SCORE
+ *		Mar 12, 1996
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Mar  2 09:42:18 PST 2001
+ *      Changed this sort to be a qsort, as suggested by Dan Schikore.
+ *
+ *-------------------------------------------------------------------------*/
+void
+lite_SC_string_sort (char **v, int n) {
+   qsort(v, n, sizeof(char *), qsort_strcmp);
+}
diff --git a/src/silo/Makefile.am b/src/silo/Makefile.am
new file mode 100644
index 0000000..5cbaca4
--- /dev/null
+++ b/src/silo/Makefile.am
@@ -0,0 +1,98 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_silo.la
+libsilo_silo_la_SOURCES = $(FILES)
+
+EXTRAFILES =
+EXTRAINCS =
+if FORTRAN_NEEDED
+ EXTRAFILES += silo_f.c
+ EXTRAINCS += silo_f.h
+endif
+
+EXTRA_DIST = \
+ silo_fcb.c \
+ silo_f.h \
+ silo_f.c \
+ silo.h.in
+
+include_HEADERS = \
+ silo.inc \
+ pmpio.h
+
+nodist_include_HEADERS = \
+ silo.h
+
+noinst_HEADERS = \
+ silo_drivers.h \
+ silo_private.h \
+ silo_win32_compatibility.h \
+ $(EXTRAINCS)
+
+FILES = \
+ alloc.c \
+ extface.c \
+ silo.c  \
+ silo_ns.c \
+ $(EXTRAFILES)
+
+BUILT_SOURCES = silo.inc
+DISTCLEANFILES = silo_version.h
+
+# built if it doesn't exit, could cause problem with VPATH
+# be extra careful about check-in time-stamps! silo.inc MUST be the oldest.
+silo.inc: silo.h.in silo_f.h
+	if test ! -e $@; then \
+	  cat ./silo.h $(srcdir)/silo_f.h | $(top_srcdir)/config/mkinc > $@; fi
diff --git a/src/silo/Makefile.in b/src/silo/Makefile.in
new file mode 100644
index 0000000..92edbdf
--- /dev/null
+++ b/src/silo/Makefile.in
@@ -0,0 +1,649 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at FORTRAN_NEEDED_TRUE@am__append_1 = silo_f.c
+ at FORTRAN_NEEDED_TRUE@am__append_2 = silo_f.h
+subdir = src/silo
+DIST_COMMON = $(am__noinst_HEADERS_DIST) $(include_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/silo.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = silo.h
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_silo_la_LIBADD =
+am__libsilo_silo_la_SOURCES_DIST = alloc.c extface.c silo.c silo_ns.c \
+	silo_f.c
+ at FORTRAN_NEEDED_TRUE@am__objects_1 = silo_f.lo
+am__objects_2 = $(am__objects_1)
+am__objects_3 = alloc.lo extface.lo silo.lo silo_ns.lo \
+	$(am__objects_2)
+am_libsilo_silo_la_OBJECTS = $(am__objects_3)
+libsilo_silo_la_OBJECTS = $(am_libsilo_silo_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_silo_la_SOURCES)
+DIST_SOURCES = $(am__libsilo_silo_la_SOURCES_DIST)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
+am__noinst_HEADERS_DIST = silo_drivers.h silo_private.h \
+	silo_win32_compatibility.h silo_f.h
+HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \
+	$(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_silo.la
+libsilo_silo_la_SOURCES = $(FILES)
+EXTRAFILES = $(am__append_1)
+EXTRAINCS = $(am__append_2)
+EXTRA_DIST = \
+ silo_fcb.c \
+ silo_f.h \
+ silo_f.c \
+ silo.h.in
+
+include_HEADERS = \
+ silo.inc \
+ pmpio.h
+
+nodist_include_HEADERS = \
+ silo.h
+
+noinst_HEADERS = \
+ silo_drivers.h \
+ silo_private.h \
+ silo_win32_compatibility.h \
+ $(EXTRAINCS)
+
+FILES = \
+ alloc.c \
+ extface.c \
+ silo.c  \
+ silo_ns.c \
+ $(EXTRAFILES)
+
+BUILT_SOURCES = silo.inc
+DISTCLEANFILES = silo_version.h
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/silo/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/silo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+silo.h: $(top_builddir)/config.status $(srcdir)/silo.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_silo.la: $(libsilo_silo_la_OBJECTS) $(libsilo_silo_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_silo_la_OBJECTS) $(libsilo_silo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/alloc.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/extface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_f.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_ns.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+install-nodist_includeHEADERS: $(nodist_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(nodist_include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-nodist_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_include_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS install-nodist_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-nodist_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-includeHEADERS install-info \
+	install-info-am install-man install-nodist_includeHEADERS \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-includeHEADERS uninstall-nodist_includeHEADERS
+
+
+# built if it doesn't exit, could cause problem with VPATH
+# be extra careful about check-in time-stamps! silo.inc MUST be the oldest.
+silo.inc: silo.h.in silo_f.h
+	if test ! -e $@; then \
+	  cat ./silo.h $(srcdir)/silo_f.h | $(top_srcdir)/config/mkinc > $@; fi
+# 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/src/silo/alloc.c b/src/silo/alloc.c
new file mode 100644
index 0000000..2d7bf3f
--- /dev/null
+++ b/src/silo/alloc.c
@@ -0,0 +1,1963 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo_private.h"
+
+/*======================================================================
+ *||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ *======================================================================
+ *  File                                                         alloc.c
+ *
+ *  Purpose
+ *
+ *     Source file for allocating and freeing DB data structures.
+ *
+ *  Author
+ *
+ *      Jeff Long
+ *
+ *  Routine Summary
+ *
+ *      mmesh   = DBAllocMultimesh (num)<< Multi-block mesh >>
+ *      mvar    = DBAllocMultivar (num) << Multi-block var >>
+ *      qmesh   = DBAllocQuadmesh ()    << Quad mesh >>
+ *      umesh   = DBAllocUcdmesh ()     << UCD mesh >>
+ *      pmesh   = DBAllocPointmesh ()   << Point mesh >>
+ *      qvar    = DBAllocQuadvar ()     << Quad var >>
+ *      uvar    = DBAllocUcdvar ()      << UCD var >>
+ *      var     = V_Alloc ()            << Mesh var >>
+ *      elist   = DBAllocEdgelist ()    << Edgelist >>
+ *      flist   = DBAllocFacelist ()    << Facelist >>
+ *      zlist   = DBAllocZonelist ()    << Zonelist >>
+ *      mat     = DBAllocMaterial()     << Material >>
+ *      species = DBAllocMatspecies()   << Matspecies >>
+ *      array   = DBAllocCompoundarray()<< Compoundarray >>
+ *
+ *      Also, corresponding routines for 'free'.
+ *
+ *======================================================================
+ *||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ *=====================================================================*/
+
+/*
+ * Modification History
+ *
+ * Robb Matzke, Tue Oct 25 08:13:04 PDT 1994
+ * Added routines for Compound Arrays.
+ *
+ * Robb Matzke, Thu Nov 3 15:33:48 PST 1994
+ * Restructured for device independence.
+ *
+ * Al Leibee, Tue Jul 26 08:44:01 PDT 1994
+ * Replaced composition by species.
+ *
+ */
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocDefvars
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a defvars object.
+ *
+ *  Programmer:
+ *     Mark C. Miller
+ *     August 8, 2005
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBdefvars *
+DBAllocDefvars(int num)
+{
+    DBdefvars *defv;
+
+    API_BEGIN("DBAllocDefvars", DBdefvars *, NULL) {
+        if (NULL == (defv = ALLOC(DBdefvars)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(defv, 0, sizeof(DBdefvars));
+
+        defv->ndefs = num;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            defv->names = ALLOC_N(char *, num);
+            defv->types = ALLOC_N(int, num);
+            defv->defns = ALLOC_N(char *, num);
+
+            if (!defv->names || !defv->types || !defv->defns)
+            {
+                DBFreeDefvars(defv);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (defv);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocMultimesh
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a multi-block mesh object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:12:09 PST 1994
+ *      Added error mechanism.
+ *
+ *      Eric Brugger, Wed Jul  2 13:19:07 PDT 1997
+ *      Added code to allocate the dirids array.
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group origins to 1.
+ *
+ *      Mark C. Miller, Wed Jul 27 19:04:00 PDT 2005
+ *      Initialized nblocks member 
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBmultimesh *
+DBAllocMultimesh(int num)
+{
+    DBmultimesh   *msh;
+
+    API_BEGIN("DBAllocMultimesh", DBmultimesh *, NULL) {
+        if (NULL == (msh = ALLOC(DBmultimesh)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(msh, 0, sizeof(DBmultimesh));
+
+        msh->nblocks = num;
+        msh->blockorigin = 1;
+        msh->grouporigin = 1;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            msh->meshids = ALLOC_N(int, num);
+            msh->meshnames = ALLOC_N(char *, num);
+            msh->meshtypes = ALLOC_N(int, num);
+            msh->dirids = ALLOC_N(int, num);
+
+            if (!msh->meshids || !msh->meshtypes || !msh->meshnames ||
+                !msh->dirids) {
+                DBFreeMultimesh(msh);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                         DBAllocMultimeshadj
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a multi-block mesh adjacency object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:12:09 PST 1994
+ *      Added error mechanism.
+ *
+ *      Eric Brugger, Wed Jul  2 13:19:07 PDT 1997
+ *      Added code to allocate the dirids array.
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group origins to 1.
+ *
+ *      Mark C. Miller, Wed Jul 27 19:04:00 PDT 2005
+ *      Initialized nblocks member 
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBmultimeshadj *
+DBAllocMultimeshadj(int num)
+{
+    DBmultimeshadj   *mshadj;
+
+    API_BEGIN("DBAllocMultimeshadj", DBmultimeshadj *, NULL) {
+        if (NULL == (mshadj = ALLOC(DBmultimeshadj)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(mshadj, 0, sizeof(DBmultimeshadj));
+
+        mshadj->nblocks = num;
+        mshadj->blockorigin = 1;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            mshadj->meshtypes = ALLOC_N(int, num);
+            mshadj->nneighbors = ALLOC_N(int, num);
+
+            if (!mshadj->meshtypes || !mshadj->nneighbors) {
+                DBFreeMultimeshadj(mshadj);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (mshadj);
+}
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocMultivar
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a multi-block mesh object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:13:34 PST 1994
+ *      Added error mechanism
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group origins to 1.
+ *
+ *      Mark C. Miller, Wed Jul 27 19:04:00 PDT 2005
+ *      Initialized nvars member 
+ *----------------------------------------------------------------------*/
+PUBLIC DBmultivar *
+DBAllocMultivar(int num)
+{
+    DBmultivar    *var;
+
+    API_BEGIN("DBAllocMultivar", DBmultivar *, NULL) {
+        if (NULL == (var = ALLOC(DBmultivar)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(var, 0, sizeof(DBmultivar));
+
+        var->nvars = num;
+        var->blockorigin = 1;
+        var->grouporigin = 1;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            var->varnames = ALLOC_N(char *, num);
+            var->vartypes = ALLOC_N(int, num);
+
+            if (!var->varnames || !var->vartypes) {
+                DBFreeMultivar(var);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocMultimat
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a multi-material object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:13:34 PST 1994
+ *      Added error mechanism
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group origins to 1.
+ *
+ *      Mark C. Miller, Wed Jul 27 19:04:00 PDT 2005
+ *      Initialized nmats member 
+ *----------------------------------------------------------------------*/
+PUBLIC DBmultimat *
+DBAllocMultimat(int num)
+{
+    DBmultimat    *mat;
+
+    API_BEGIN("DBAllocMultimat", DBmultimat *, NULL) {
+        if (NULL == (mat = ALLOC(DBmultimat)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(mat, 0, sizeof(DBmultimat));
+
+        mat->nmats = num;
+        mat->blockorigin = 1;
+        mat->grouporigin = 1;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            mat->matnames = ALLOC_N(char *, num);
+
+            if (!mat->matnames) {
+                DBFreeMultimat(mat);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (mat);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                      DBAllocMultimatspecies
+ *
+ *  Programmer
+ *     Jeremy Meredith, Sept 18 1998
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a multi-species object.
+ *
+ *  Modified
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group origins to 1.
+ *
+ *      Mark C. Miller, Wed Jul 27 19:04:00 PDT 2005
+ *      Initialized nspec member 
+ *----------------------------------------------------------------------*/
+PUBLIC DBmultimatspecies *
+DBAllocMultimatspecies(int num)
+{
+    DBmultimatspecies    *spec;
+
+    API_BEGIN("DBAllocMultimatspecies", DBmultimatspecies *, NULL) {
+        if (NULL == (spec = ALLOC(DBmultimatspecies)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(spec, 0, sizeof(DBmultimatspecies));
+
+        spec->nspec = num;
+        spec->blockorigin = 1;
+        spec->grouporigin = 1;
+
+        /* Allocate sub-arrays of requested lengths */
+        if (num > 0) {
+            spec->specnames = ALLOC_N(char *, num);
+
+            if (!spec->specnames) {
+                DBFreeMultimatspecies(spec);
+                API_ERROR(NULL, E_NOMEM);
+            }
+        }
+    }
+    API_END;
+
+    return (spec);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeDefvars
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given defvars object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeDefvars(DBdefvars *defv)
+{
+    int            i;
+
+    if (defv == NULL)
+        return;
+
+    for (i = 0; i < defv->ndefs; i++) {
+        FREE(defv->names[i]);
+        FREE(defv->defns[i]);
+    }
+
+    FREE(defv->names);
+    FREE(defv->types);
+    FREE(defv->defns);
+    FREE(defv->guihides);
+    FREE(defv);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeMultimesh
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given multi mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modificaitions:
+ *     Eric Brugger, Wed Jul  2 13:19:07 PDT 1997
+ *     I added code to free msh->meshnames to close a memory leak.
+ *
+ *     Mark C. Miller, Wed Jul 14 20:26:09 PDT 2010
+ *     Added support for namescheme options on multi-block objects.
+ *     When these options are in use, the ...names member can be null.
+ *     So, modified to only delete the ...names member if it is non-null.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMultimesh(DBmultimesh *msh)
+{
+    int            i;
+
+    if (msh == NULL)
+        return;
+
+    if (msh->meshnames)
+    {
+        for (i = 0; i < msh->nblocks; i++) {
+            FREE(msh->meshnames[i]);
+        }
+    }
+
+    if (msh->groupnames)
+    {
+        for(i=0;i<msh->lgroupings;i++)
+            FREE(msh->groupnames[i]);
+        FREE(msh->groupnames);
+    }
+    if (msh->groupings)
+        FREE(msh->groupings);
+    FREE(msh->meshids);
+    FREE(msh->meshnames);
+    FREE(msh->meshtypes);
+    FREE(msh->dirids);
+    FREE(msh->mrgtree_name);
+    FREE(msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                          DBFreeMultimeshadj
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given multi mesh adjacency object. Also
+ *     frees items pointed to by the structure.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMultimeshadj(DBmultimeshadj *mshadj)
+{
+    int            i;
+    int lneighbors = 0;
+
+    if (mshadj == NULL)
+        return;
+
+    /* compute how long various arrays are */
+    for (i = 0; i < mshadj->nblocks; i++)
+        lneighbors += mshadj->nneighbors[i];
+
+    if (mshadj->nodelists) {
+       for (i = 0; i < lneighbors; i++)
+          FREE(mshadj->nodelists[i]);
+    }
+    if (mshadj->zonelists) {
+       for (i = 0; i < lneighbors; i++)
+          FREE(mshadj->zonelists[i]);
+    }
+
+    FREE(mshadj->meshtypes);
+    FREE(mshadj->nneighbors);
+    FREE(mshadj->neighbors);
+    FREE(mshadj->back);
+    FREE(mshadj->lnodelists);
+    FREE(mshadj->lzonelists);
+    FREE(mshadj);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeMultivar
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given multi variable object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modificaitions:
+ *     Eric Brugger, Wed Jul  2 13:19:07 PDT 1997
+ *     I added code to free mv->varnames to close a memory leak.
+ *
+ *     Mark C. Miller, Thu Oct 29 15:55:34 PDT 2009
+ *     Added free for mmesh_name
+ *
+ *     Mark C. Miller, Wed Jul 14 20:26:09 PDT 2010
+ *     Added support for namescheme options on multi-block objects.
+ *     When these options are in use, the ...names member can be null.
+ *     So, modified to only delete the ...names member if it is non-null.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMultivar (DBmultivar *mv)
+{
+     int   i;
+
+     if (mv == NULL)
+          return;
+
+     if (mv->varnames)
+     {
+         for (i = 0; i < mv->nvars; i++) {
+              FREE(mv->varnames[i]);
+         }
+     }
+
+     FREE(mv->varnames);
+     FREE(mv->vartypes);
+     FREE(mv->mmesh_name);
+     FREE(mv);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeMultimat
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given multi material object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modifications
+ *     Sean Ahern, Fri Jun 21 10:56:49 PDT 1996
+ *     Freed a pointer we were forgetting about.
+ *
+ *     Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *     Added code to deal with material_names, matcolors and other
+ *     stuff that has been added in past several years
+ *
+ *     Mark C. Miller, Thu Oct 29 15:55:34 PDT 2009
+ *     Added free for mmesh_name
+ *
+ *     Mark C. Miller, Wed Jul 14 20:26:09 PDT 2010
+ *     Added support for namescheme options on multi-block objects.
+ *     When these options are in use, the ...names member can be null.
+ *     So, modified to only delete the ...names member if it is non-null.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMultimat (DBmultimat *mat)
+{
+     int   i;
+
+     if (mat == NULL)
+          return;
+
+     if (mat->matnames)
+     {
+         for (i = 0; i < mat->nmats; i++) {
+              FREE(mat->matnames[i]);
+         }
+     }
+     FREE(mat->matnames);
+     if (mat->material_names)
+     {
+         for (i = 0; i < mat->nmatnos; i++)
+             FREE(mat->material_names[i]);
+         FREE(mat->material_names);
+     }
+     if (mat->matcolors)
+     {
+         for (i = 0; i < mat->nmatnos; i++)
+             FREE(mat->matcolors[i]);
+         FREE(mat->matcolors);
+     }
+
+     FREE(mat->mixlens);
+     FREE(mat->matcounts);
+     FREE(mat->matlists);
+     FREE(mat->matnos);
+     FREE(mat->mmesh_name);
+     FREE(mat);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                       DBFreeMultimatspecies
+ *
+ *  Programmer
+ *     Jeremy Meredith, Sept 18 1998
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given multi material species object.  
+ *     Also frees items pointed to by the structure.
+ *
+ *  Modifications
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added code to free nmatspec
+ *
+ *    Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *    Added names and colors for species.
+ *
+ *     Mark C. Miller, Wed Jul 14 20:26:09 PDT 2010
+ *     Added support for namescheme options on multi-block objects.
+ *     When these options are in use, the ...names member can be null.
+ *     So, modified to only delete the ...names member if it is non-null.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMultimatspecies (DBmultimatspecies *spec)
+{
+     int   i, j, k;
+
+     if (spec == NULL)
+          return;
+
+     if (spec->species_names)
+     {
+         for(i=0,k=0;i<spec->nmat;i++)
+         {
+             for(j=0;j<spec->nmatspec[i];j++,k++)
+                 FREE(spec->species_names[k]);
+         }
+         FREE(spec->species_names);
+     }
+
+     if (spec->speccolors)
+     {
+         for(i=0,k=0;i<spec->nmat;i++)
+         {
+             for(j=0;j<spec->nmatspec[i];j++,k++)
+                 FREE(spec->speccolors[k]);
+         }
+         FREE(spec->speccolors);
+     }
+
+     if (spec->specnames)
+     {
+         for (i = 0; i < spec->nspec; i++) {
+              FREE(spec->specnames[i]);
+         }
+     }
+     FREE(spec->specnames);
+
+     FREE(spec->nmatspec);
+     FREE(spec);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                              DBAllocCsgmesh
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a CSG mesh object.
+ *
+ * Programmer:  Mark C. Miller
+ *              Wed Jul 27 14:22:03 PDT 2005
+ *----------------------------------------------------------------------*/
+PUBLIC DBcsgmesh *
+DBAllocCsgmesh(void)
+{
+    DBcsgmesh    *msh;
+
+    API_BEGIN("DBAllocCsgmesh", DBcsgmesh *, NULL) {
+        if (NULL == (msh = ALLOC(DBcsgmesh)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(msh, 0, sizeof(DBcsgmesh));
+
+        msh->block_no = -1;
+        msh->group_no = -1;
+    }
+    API_END;
+
+    return (msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                               DBFreeCsgmesh
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given CSG mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Programmer:  Mark C. Miller
+ *               Wed Jul 27 14:22:03 PDT 2005
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeCsgmesh(DBcsgmesh *msh)
+{
+    int i;
+
+    if (msh == NULL)
+        return;
+
+    for (i = 0; i < msh->ndims; i++) {
+        FREE(msh->labels[i]);
+        FREE(msh->units[i]);
+    }
+
+    if (msh->bndnames && msh->nbounds)
+    {
+        for (i = 0; i < msh->nbounds; i++)
+            FREE(msh->bndnames[i]);
+    }
+
+    FREE(msh->typeflags);
+    FREE(msh->bndids);
+    FREE(msh->coeffs);
+    FREE(msh->coeffidx);
+    FREE(msh->bndnames);
+    FREE(msh->name);
+    FREE(msh->mrgtree_name);
+
+    DBFreeCSGZonelist(msh->zones);
+
+    FREE(msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocQuadmesh
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a quad mesh object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:14:44 PST 1994
+ *      Added error mechanism
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group numbers to -1.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBquadmesh *
+DBAllocQuadmesh(void)
+{
+    DBquadmesh    *msh;
+
+    API_BEGIN("DBAllocQuadmesh", DBquadmesh *, NULL) {
+        if (NULL == (msh = ALLOC(DBquadmesh)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(msh, 0, sizeof(DBquadmesh));
+
+        msh->block_no = -1;
+        msh->group_no = -1;
+    }
+    API_END;
+
+    return (msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeQuadmesh
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given quad mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeQuadmesh(DBquadmesh *msh)
+{
+    int            i;
+
+    if (msh == NULL)
+        return;
+
+    for (i = 0; i < 3; i++) {
+        FREE(msh->coords[i]);
+        FREE(msh->labels[i]);
+        FREE(msh->units[i]);
+    }
+
+    FREE(msh->name);
+    FREE(msh->mrgtree_name);
+    FREE(msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocPointmesh
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a point mesh object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:16:44 PST 1994
+ *      Added error mechanism
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group numbers to -1.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBpointmesh *
+DBAllocPointmesh(void)
+{
+    DBpointmesh   *msh;
+
+    API_BEGIN("DBAllocPointmesh", DBpointmesh *, NULL) {
+        if (NULL == (msh = ALLOC(DBpointmesh)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(msh, 0, sizeof(DBpointmesh));
+
+        msh->block_no = -1;
+        msh->group_no = -1;
+    }
+    API_END;
+
+    return (msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreePointmesh
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given point mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreePointmesh(DBpointmesh *msh)
+{
+    int            i;
+
+    if (msh == NULL)
+        return;
+
+    for (i = 0; i < 3; i++) {
+        FREE(msh->coords[i]);
+        FREE(msh->labels[i]);
+        FREE(msh->units[i]);
+    }
+
+    FREE(msh->gnodeno);
+    FREE(msh->name);
+    FREE(msh->title);
+    FREE(msh->mrgtree_name);
+    FREE(msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                              DBAllocMeshvar
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a generic mesh variable object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:18:20 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBmeshvar *
+DBAllocMeshvar(void)
+{
+    DBmeshvar     *var;
+
+    API_BEGIN("DBAllocMeshvar", DBmeshvar *, NULL) {
+        if (NULL == (var = ALLOC(DBmeshvar)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(var, 0, sizeof(DBmeshvar));
+    }
+    API_END;
+
+    return (var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                               DBFreeMeshvar
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given mesh var object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *
+ * Modifications:
+ *      Sean Ahern, Fri Aug  3 12:53:04 PDT 2001
+ *      Fixed a problem with freeing a partially-retried object.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMeshvar(DBmeshvar *var)
+{
+    int            i;
+
+    if (var == NULL)
+        return;
+
+    if (var->vals != NULL)
+    {
+        for (i = 0; i < var->nvals; i++) {
+            FREE(var->vals[i]);
+        }
+    }
+
+    FREE(var->vals);
+    FREE(var->name);
+    FREE(var->units);
+    FREE(var->label);
+    FREE(var->meshname);
+    FREE(var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocUcdmesh
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a ucd mesh object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:19:21 PST 1994
+ *      Added error mechanism.
+ *
+ *      Jeremy Meredith, Fri May 21 09:58:34 PDT 1999
+ *      Added code to initialize the block and group numbers to -1.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBucdmesh *
+DBAllocUcdmesh(void)
+{
+    DBucdmesh     *msh;
+
+    API_BEGIN("DBAllocUcdmesh", DBucdmesh *, NULL) {
+        if (NULL == (msh = ALLOC(DBucdmesh)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(msh, 0, sizeof(DBucdmesh));
+
+        msh->block_no = -1;
+        msh->group_no = -1;
+    }
+    API_END;
+
+    return (msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeUcdmesh
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given ucd mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modifications:
+ *
+ *    Lisa J. Roberts, Tue Mar 30 17:10:11 PST 1999
+ *    I added code to free the new nodeno array.
+ *
+ *    Mark C. Miller, Wed Jul 28 11:09:42 PDT 2004
+ *    Added missing call to free optional gnodeno array
+ *    Added call to free new, optional, polyhedral zonelist
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeUcdmesh(DBucdmesh *msh)
+{
+    int            i;
+
+    if (msh == NULL)
+        return;
+
+    for (i = 0; i < 3; i++) {
+        FREE(msh->coords[i]);
+        FREE(msh->labels[i]);
+        FREE(msh->units[i]);
+    }
+
+    DBFreeFacelist(msh->faces);
+    DBFreeZonelist(msh->zones);
+    DBFreeEdgelist(msh->edges);
+    DBFreePHZonelist(msh->phzones);
+
+    FREE(msh->nodeno);
+    FREE(msh->gnodeno);
+    FREE(msh->name);
+    FREE(msh->mrgtree_name);
+    FREE(msh);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                               DBAllocCsgvar
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a CSG var object.
+ *
+ *  Programmer:  Mark C. Miller
+ *               Wed Jul 27 14:22:03 PDT 2005
+ *----------------------------------------------------------------------*/
+PUBLIC DBcsgvar *
+DBAllocCsgvar(void)
+{
+    DBcsgvar     *csgvar;
+
+    API_BEGIN("DBAllocCsgvar", DBcsgvar *, NULL) {
+        if (NULL == (csgvar = ALLOC(DBcsgvar)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(csgvar, 0, sizeof(DBcsgvar));
+    }
+    API_END;
+
+    return (csgvar);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                                DBFreeCsgvar
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given CSG var object.
+ *
+ *  Programmer:  Mark C. Miller
+ *               Wed Jul 27 14:22:03 PDT 2005
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeCsgvar(DBcsgvar *var)
+{
+    int            i;
+
+    if (var == NULL)
+        return;
+
+    if (var->vals != NULL) {
+        for (i = 0; i < var->nvals; i++) {
+            FREE(var->vals[i]);
+        }
+    }
+
+    FREE(var->vals);
+    FREE(var->name);
+    FREE(var->label);
+    FREE(var->units);
+    FREE(var->meshname);
+    FREE(var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocQuadvar
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a quad var object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:20:11 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBquadvar *
+DBAllocQuadvar(void)
+{
+    DBquadvar     *qvar;
+
+    API_BEGIN("DBAllocQuadvar", DBquadvar *, NULL) {
+        if (NULL == (qvar = ALLOC(DBquadvar)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(qvar, 0, sizeof(DBquadvar));
+    }
+    API_END;
+
+    return (qvar);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                              DBResetQuadvar
+ *
+ *  Purpose
+ *
+ *     Reset a quad variable.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBResetQuadvar(DBquadvar *qv)
+{
+
+    memset(qv, 0, sizeof(DBquadvar));
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeQuadvar
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given quad mesh object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modifications:
+ *      Sean Ahern, Thu Jul  9 16:18:51 PDT 1998
+ *      Freed the mixvals, fixing a memory leak.
+ *
+ *      Sean Ahern, Thu Aug  2 12:51:36 PDT 2001
+ *      Fixed the case where the variable might only be partially filled,
+ *      due to the read mask.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeQuadvar(DBquadvar *var)
+{
+    int            i;
+
+    if (var == NULL)
+        return;
+
+    if (var->vals != NULL) {
+        for (i = 0; i < var->nvals; i++) {
+            FREE(var->vals[i]);
+            if (var->mixvals != NULL)
+                FREE(var->mixvals[i]);
+        }
+    }
+
+    FREE(var->vals);
+    FREE(var->mixvals);
+    FREE(var->name);
+    FREE(var->label);
+    FREE(var->units);
+    FREE(var->meshname);
+    FREE(var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocUcdvar
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a ucd variable object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:21:11 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBucdvar *
+DBAllocUcdvar(void)
+{
+    DBucdvar      *uvar;
+
+    API_BEGIN("DBAllocUcdvar", DBucdvar *, NULL) {
+        if (NULL == (uvar = ALLOC(DBucdvar)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        DBResetUcdvar(uvar);
+    }
+    API_END;
+
+    return (uvar);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                               DBResetUcdvar
+ *
+ *  Purpose
+ *
+ *     Reset a ucd variable.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBResetUcdvar(DBucdvar *uv)
+{
+
+    memset(uv, 0, sizeof(DBucdvar));
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeUcdvar
+ *
+ *  Purpose
+ *
+ *     Free the space used by the given ucd var object.  Also frees
+ *     items pointed to by the structure.
+ *
+ *  Modifications
+ *     Eric Brugger, Wed Sep  1 11:35:24 PDT 1999
+ *     Freed the mixvals, fixing a memory leak.
+ *
+ *     Sean Ahern, Fri Aug  3 12:53:31 PDT 2001
+ *     Fixed a problem with freeing a partially-read object.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeUcdvar(DBucdvar *var)
+{
+    int            i;
+
+    if (var == NULL)
+        return;
+
+    if (var->vals != NULL)
+    {
+        for (i = 0; i < var->nvals; i++) {
+            FREE(var->vals[i]);
+            if (var->mixvals != NULL)
+                FREE(var->mixvals[i]);
+        }
+    }
+
+    FREE(var->vals);
+    FREE(var->mixvals);
+    FREE(var->name);
+    FREE(var->label);
+    FREE(var->units);
+    FREE(var->meshname);
+    FREE(var);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocZonelist
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a zonelist object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:22:06 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBzonelist *
+DBAllocZonelist(void)
+{
+    DBzonelist    *zl;
+
+    API_BEGIN("DBAllocZonelist", DBzonelist *, NULL) {
+        if (NULL == (zl = ALLOC(DBzonelist)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(zl, 0, sizeof(DBzonelist));
+    }
+    API_END;
+
+    return (zl);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocPHZonelist
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a DBphzonelist object.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBphzonelist *
+DBAllocPHZonelist(void)
+{
+    DBphzonelist    *phzl;
+
+    API_BEGIN("DBAllocPHZonelist", DBphzonelist *, NULL) {
+        if (NULL == (phzl = ALLOC(DBphzonelist)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(phzl, 0, sizeof(DBphzonelist));
+    }
+    API_END;
+
+    return (phzl);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                          DBAllocCSGZonelist
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a DBcsgzonelist object.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC DBcsgzonelist *
+DBAllocCSGZonelist(void)
+{
+    DBcsgzonelist    *csgzl;
+
+    API_BEGIN("DBAllocCSGZonelist", DBcsgzonelist *, NULL) {
+        if (NULL == (csgzl = ALLOC(DBcsgzonelist)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(csgzl, 0, sizeof(DBcsgzonelist));
+    }
+    API_END;
+
+    return (csgzl);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeZonelist
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given zonelist.
+ *
+ *  Modified
+ *
+ *    Mark C. Miller, Wed Jul 28 10:53:35 PDT 2004
+ *    Added missing free for gzoneno
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeZonelist(DBzonelist *list)
+{
+    if (list == NULL)
+        return;
+
+    FREE(list->shapecnt);
+    FREE(list->shapesize);
+    FREE(list->shapetype);
+    FREE(list->nodelist);
+    FREE(list->zoneno);
+    FREE(list->gzoneno);
+    FREE(list);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBFreePHZonelist
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given DBphzonelist.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreePHZonelist(DBphzonelist *list)
+{
+    if (list == NULL)
+        return;
+
+    FREE(list->nodecnt);
+    FREE(list->nodelist);
+    FREE(list->extface);
+    FREE(list->facecnt);
+    FREE(list->facelist);
+    FREE(list->zoneno);
+    FREE(list->gzoneno);
+    FREE(list);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                           DBFreeCSGZonelist
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given DBcsgzonelist.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeCSGZonelist(DBcsgzonelist *list)
+{
+    if (list == NULL)
+        return;
+
+    if (list->zonenames && list->nzones)
+    {
+        int i;
+        for (i = 0; i < list->nzones; i++)
+            FREE(list->zonenames[i]);
+    }
+
+    if (list->regnames && list->nregs)
+    {
+        int i;
+        for (i = 0; i < list->nregs; i++)
+            FREE(list->regnames[i]);
+    }
+
+    FREE(list->typeflags);
+    FREE(list->leftids);
+    FREE(list->rightids);
+    FREE(list->xform);
+    FREE(list->zonelist);
+    FREE(list->zonenames);
+    FREE(list->regnames);
+
+    FREE(list);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocEdgelist
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a edgelist object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:22:55 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBedgelist *
+DBAllocEdgelist(void)
+{
+    DBedgelist    *el;
+
+    API_BEGIN("DBAllocEdgelist", DBedgelist *, NULL) {
+        if (NULL == (el = ALLOC(DBedgelist)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(el, 0, sizeof(DBedgelist));
+    }
+    API_END;
+
+    return (el);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeEdgelist
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given edgelist.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeEdgelist(DBedgelist *list)
+{
+    if (list == NULL)
+        return;
+
+    FREE(list->edge_beg);
+    FREE(list->edge_end);
+    FREE(list);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                            DBAllocFacelist
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a facelist object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:23:59 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBfacelist *
+DBAllocFacelist(void)
+{
+    DBfacelist    *fl;
+
+    API_BEGIN("DBAllocFacelist", DBfacelist *, NULL) {
+        if (NULL == (fl = ALLOC(DBfacelist)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(fl, 0, sizeof(DBfacelist));
+    }
+    API_END;
+
+    return (fl);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                             DBFreeFacelist
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given facelist.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeFacelist(DBfacelist *list)
+{
+    if (list == NULL)
+        return;
+
+    FREE(list->shapecnt);
+    FREE(list->shapesize);
+    FREE(list->nodelist);
+    FREE(list->types);
+    FREE(list->typelist);
+    FREE(list->nodeno);
+    FREE(list->zoneno);
+    FREE(list);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                           DBAllocMaterial
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a material-data object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:24:51 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBmaterial *
+DBAllocMaterial(void)
+{
+    DBmaterial    *mats;
+
+    API_BEGIN("DBAllocMaterial", DBmaterial *, NULL) {
+        if (NULL == (mats = ALLOC(DBmaterial)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(mats, 0, sizeof(DBmaterial));
+    }
+    API_END;
+
+    return (mats);
+}
+/*----------------------------------------------------------------------
+ *  Function                                            DBFreeMaterial
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given material object.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMaterial(DBmaterial *mats)
+{
+    int i;
+    if (mats == NULL)
+        return;
+
+    if (mats->matnames)
+    {
+        for(i=0;i<mats->nmat;i++)
+            FREE(mats->matnames[i]);
+        FREE(mats->matnames);
+    }
+
+    if (mats->matcolors)
+    {
+        for(i=0;i<mats->nmat;i++)
+            FREE(mats->matcolors[i]);
+        FREE(mats->matcolors);
+    }
+
+    FREE(mats->name);
+    FREE(mats->matnos);
+    FREE(mats->matlist);
+    FREE(mats->mix_vf);
+    FREE(mats->mix_next);
+    FREE(mats->mix_zone);
+    FREE(mats->mix_mat);
+    FREE(mats->meshname);
+    FREE(mats);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                          DBAllocMatspecies
+ *
+ *  Purpose
+ *
+ *     Allocate and initialize a matspecies-data object.
+ *
+ *  Modified
+ *
+ *      Robb Matzke, Tue Nov 8 07:25:42 PST 1994
+ *      Added error mechanism
+ *----------------------------------------------------------------------*/
+PUBLIC DBmatspecies *
+DBAllocMatspecies(void)
+{
+    DBmatspecies  *species;
+
+    API_BEGIN("DBAllocMatspecies", DBmatspecies *, NULL) {
+        if (NULL == (species = ALLOC(DBmatspecies)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(species, 0, sizeof(DBmatspecies));
+    }
+    API_END;
+
+    return (species);
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                           DBFreeMatspecies
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given matspecies object.
+ *
+ *  Modifications:
+ *
+ *   Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *   Added names and colors for species.
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeMatspecies(DBmatspecies *species)
+{
+    int i, j, k;
+
+    if (species == NULL)
+        return;
+
+    if (species->specnames)
+    {
+        for(i=0,k=0;i<species->nmat;i++)
+        {
+            for(j=0;j<species->nmatspec[i];j++,k++)
+                FREE(species->specnames[k]);
+        }
+        FREE(species->specnames);
+    }
+
+    if (species->speccolors)
+    {
+        for(i=0,k=0;i<species->nmat;i++)
+        {
+            for(j=0;j<species->nmatspec[i];j++,k++)
+                FREE(species->speccolors[k]);
+        }
+        FREE(species->speccolors);
+    }
+
+    FREE(species->name);
+    FREE(species->matname);
+    FREE(species->nmatspec);
+    FREE(species->species_mf);
+    FREE(species->speclist);
+    FREE(species->mix_speclist);
+    FREE(species);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBAllocCompoundarray
+ *
+ * Purpose:     Allocate a compound array object
+ *
+ * Return:      Success:        pointer to object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 07:26:44 PST 1994
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PUBLIC DBcompoundarray *
+DBAllocCompoundarray(void)
+{
+
+    DBcompoundarray *array;
+
+    API_BEGIN("DBAllocCompoundarray", DBcompoundarray *, NULL) {
+        if (NULL == (array = ALLOC(DBcompoundarray)))
+            API_ERROR(NULL, E_NOMEM);
+
+        memset(array, 0, sizeof(DBcompoundarray));
+    }
+    API_END;
+
+    return array;
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                           DBFreeCompoundarray
+ *
+ *  Purpose
+ *
+ *     Release all storage associated with the given compound array.
+ *
+ *----------------------------------------------------------------------*/
+PUBLIC void
+DBFreeCompoundarray(DBcompoundarray *array)
+{
+
+    int            i;
+
+    if (array) {
+        FREE(array->name);
+        if (array->elemnames) {
+            for (i = 0; i < array->nelems; i++)
+                FREE(array->elemnames[i]);
+            FREE(array->elemnames);
+        }
+        FREE(array->elemlengths);
+        FREE(array->values);
+        FREE(array);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	DBAllocCurve
+ *
+ * Purpose:	Allocate a curve array object.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.nuance.com
+ *		May 16, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PUBLIC DBcurve *
+DBAllocCurve (void)
+{
+
+   DBcurve	*cu ;
+
+   API_BEGIN ("DBAllocCurve", DBcurve *, NULL) {
+      if (NULL==(cu=ALLOC(DBcurve)))
+	 API_ERROR (NULL, E_NOMEM) ;
+      memset (cu, 0, sizeof(DBcurve)) ;
+   } API_END ;
+
+   return cu ;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:	DBFreeCurve
+ *
+ * Purpose:	Release all storage associated with the given curve object.
+ *
+ * Return:	void
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.nuance.com
+ *		May 16, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+PUBLIC void
+DBFreeCurve (DBcurve *cu)
+{
+
+   if (cu) {
+      FREE (cu->title) ;
+      FREE (cu->xvarname) ;
+      FREE (cu->yvarname) ;
+      FREE (cu->xlabel) ;
+      FREE (cu->ylabel) ;
+      FREE (cu->xunits) ;
+      FREE (cu->yunits) ;
+      FREE (cu->x) ;
+      FREE (cu->y) ;
+      FREE (cu) ;
+   }
+}
+
+PUBLIC void
+DBFreeGroupelmap(DBgroupelmap *map)
+{
+    int i;
+
+    if (map == 0)
+        return;
+
+    FREE(map->name);
+    FREE(map->groupel_types);
+    FREE(map->segment_lengths);
+    FREE(map->segment_ids);
+
+    for (i = 0; i < map->num_segments; i++)
+        FREE(map->segment_data[i]);
+    FREE(map->segment_data);
+
+    if (map->segment_fracs)
+    {
+        for (i = 0; i < map->num_segments; i++)
+            FREE(map->segment_fracs[i]);
+        FREE(map->segment_fracs);
+    }
+    FREE(map);
+}
+
+PUBLIC void
+DBFreeMrgvar(DBmrgvar *mrgv)
+{
+    int i;
+
+    if (mrgv == 0)
+        return;
+
+    if (mrgv->compnames)
+    {
+        for (i = 0; i < mrgv->ncomps; i++)
+            FREE(mrgv->compnames[i]);
+        FREE(mrgv->compnames);
+    }
+
+    if (strchr(mrgv->reg_pnames[0], '%') == 0)
+    {
+        for (i = 0; i < mrgv->nregns; i++)
+            FREE(mrgv->reg_pnames[i]);
+    }
+    else
+    {
+        FREE(mrgv->reg_pnames[0]);
+    }
+    FREE(mrgv->reg_pnames);
+
+    for (i = 0; i < mrgv->ncomps; i++)
+        FREE(mrgv->data[i]);
+    FREE(mrgv->data);
+
+    FREE(mrgv);
+}
+
+PUBLIC void
+DBFreeNamescheme(DBnamescheme *ns)
+{
+    int i;
+
+    /* Always free up the old name scheme and clear it out */
+    FREE(ns->fmt);
+    FREE(ns->fmtptrs);
+    for (i = 0; i < DB_MAX_EXPSTRS; i++)
+        FREE(ns->embedstrs[i]);
+    for (i = 0; i < ns->ncspecs; i++)
+        FREE(ns->exprstrs[i]);
+    FREE(ns->exprstrs);
+    for (i = 0; i < ns->narrefs; i++)
+    {
+        FREE(ns->arrnames[i]);
+        /*FREE(ns->arrvals[i]); user allocates these */
+    }
+    FREE(ns->arrnames);
+    FREE(ns->arrvals);
+    FREE(ns);
+}
+
+PUBLIC DBnamescheme *
+DBAllocNamescheme()
+{
+    DBnamescheme *ns;
+
+    API_BEGIN("DBAllocNamescheme", DBnamescheme*, NULL) {
+        if (NULL == (ns = ALLOC(DBnamescheme)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(ns, 0, sizeof(DBnamescheme));
+
+    }
+    API_END;
+
+    return (ns);
+}
+
+PUBLIC DBgroupelmap *
+DBAllocGroupelmap(int num_segs, DBdatatype frac_type)
+{
+    DBgroupelmap *gm;
+
+    API_BEGIN("DBAllocGroupelmap", DBgroupelmap*, NULL) {
+        if (NULL == (gm = ALLOC(DBgroupelmap)))
+            API_ERROR(NULL, E_NOMEM);
+
+        /* Initialize all memory to zero. */
+        memset(gm, 0, sizeof(DBgroupelmap));
+
+        /* initialize all the arrays */
+        gm->num_segments = num_segs;
+        gm->groupel_types = ALLOC_N(int, num_segs);
+        gm->segment_lengths = ALLOC_N(int, num_segs);
+        gm->segment_ids = ALLOC_N(int, num_segs);
+        gm->segment_data = ALLOC_N(int *, num_segs);
+        switch (frac_type)
+        {
+            case DB_CHAR:
+                gm->segment_fracs = (void**) ALLOC_N(char*, num_segs);
+                break;
+            case DB_INT:
+                gm->segment_fracs = (void**) ALLOC_N(int*, num_segs);
+                break;
+            case DB_SHORT:
+                gm->segment_fracs = (void**) ALLOC_N(short*, num_segs);
+                break;
+            case DB_LONG:
+                gm->segment_fracs = (void**) ALLOC_N(long*, num_segs);
+                break;
+            case DB_FLOAT:
+                gm->segment_fracs = (void**) ALLOC_N(float*, num_segs);
+                break;
+            case DB_DOUBLE:
+                gm->segment_fracs = (void**) ALLOC_N(double*, num_segs);
+                break;
+        }
+
+        if (!gm->groupel_types || ! gm->segment_lengths ||
+            !gm->segment_ids || !gm->segment_data ||
+            (frac_type != DB_NOTYPE && !gm->segment_fracs))
+        {
+            DBFreeGroupelmap(gm);
+            API_ERROR(NULL, E_NOMEM);
+        }
+    }
+
+    API_END;
+
+    return (gm);
+}
diff --git a/src/silo/extface.c b/src/silo/extface.c
new file mode 100644
index 0000000..3a46951
--- /dev/null
+++ b/src/silo/extface.c
@@ -0,0 +1,860 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo_private.h"
+
+/*
+ * Maximum size of the hash table.  This should be a prime number.  This
+ * was pulled off the web from
+ *    http://www.utm.edu/research/primes/notes/10000.txti 
+ */
+#define HASH_MAX 100003
+
+#define MALLOC_N(T,N)            ((T*)malloc((size_t)((N)*sizeof(T))))
+
+typedef struct Face
+{
+    int       nNodes;           /* The number of nodes in the face. */
+    int       *nodes;           /* The nodes making up the face. */
+    int       zoneNo;           /* The zone number associated with the face. */
+    struct Face *next;          /* Pointer to another face. */
+} Face;
+
+typedef struct FaceHash
+{
+    Face      **table;          /* The hash table. */
+    int       size;             /* The size of the hash table. */
+} FaceHash;
+
+typedef struct CalcExternalFacesState
+{
+    int       *zoneList;
+    int       nNodes;
+    int       lowOffset;
+    int       highOffset;
+    int       origin;
+    int       *shapeType;
+    int       *shapeSize;
+    int       *shapeCnt;
+    int       nShapes;
+    int       *matList;
+    int       bndMethod;
+    FaceHash  faceHash;
+} CalcExternalFacesState;
+
+PRIVATE Face *AllocFace(void);
+PRIVATE DBfacelist *CalcExternalFaces(int *zoneList, int nNodes,
+    int lowOffset, int highOffset, int origin, int *shapeType, int *shapeSize,
+    int *shapeCnt, int nShapes, int *matList, int bndMethod);
+PRIVATE DBfacelist *FormFaceList(CalcExternalFacesState *st);
+PRIVATE void FreeFace(Face *face);
+PRIVATE void InsertFace(CalcExternalFacesState *st, int *nodes, int nNodes,
+    int zoneNo);
+
+/***********************************************************************
+ *
+ * Purpose:  Given a zonelist, calculate a facelist describing all of
+ *           the external faces.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    nodeList  : List of nodes making up the zones in the mesh.
+ *    nNodes    : Number of nodes in mesh.
+ *    origin    : Origin for nodelist (0 or 1).
+ *    shapeSize : For each shape, the number of nodes per zone.
+ *    shapeCnt  : For each shape, the number of zones of that size.
+ *    nShapes   : Number of zone shapes.
+ *    matList   : Zonal array giving material numbers (else NULL).
+ *    bndMethod : Method to use regarding boundaries.
+ *
+ * Output arguments:
+ *    fl        : The resulting facelist.
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ **********************************************************************/
+
+PUBLIC DBfacelist *
+DBCalcExternalFacelist(int *nodeList, int nNodes, int origin,
+                       int *shapeSize, int *shapeCnt, int nShapes,
+                       int *matList, int bndMethod)
+{
+    int         i;
+    int         *shapeType=NULL;
+    DBfacelist  *fl=NULL;
+
+    shapeType = MALLOC_N(int, nShapes);
+    for (i = 0; i < nShapes; i++)
+    {
+        switch (shapeSize[i])
+        {
+            case 4:
+                shapeType[i] = DB_ZONETYPE_TET;
+                break;
+            case 5:
+                shapeType[i] = DB_ZONETYPE_PYRAMID;
+                break;
+            case 6:
+                shapeType[i] = DB_ZONETYPE_PRISM;
+                break;
+            case 8:
+                shapeType[i] = DB_ZONETYPE_HEX;
+                break;
+        }
+    }
+     
+    fl = CalcExternalFaces(nodeList, nNodes, 0, 0, origin, shapeType,
+                           shapeSize, shapeCnt, nShapes, matList, bndMethod);
+
+    FREE(shapeType);
+
+    return fl;
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Given a zonelist, calculate a facelist describing all of
+ *           the external faces.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    nodeList  : List of nodes making up the zones in the mesh.
+ *    nNodes    : Number of nodes in mesh.
+ *    lowOffset : The number of ghost zones at the beginning of
+ *                the zonelist.
+ *    highOffset : The number of ghost zones at the end of the
+ *                zonelist.
+ *    origin    : Origin for nodelist (0 or 1).
+ *    shapeType : For each shape, the type of the shape.
+ *    shapeSize : For each shape, the number of nodes per zone.
+ *    shapeCnt  : For each shape, the number of zones of that size.
+ *    nShapes   : Number of zone shapes.
+ *    matList   : Zonal array giving material numbers (else NULL).
+ *    bndMethod : Method to use regarding boundaries.
+ *
+ * Output arguments:
+ *    fl        : The resulting facelist.
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ **********************************************************************/
+
+PUBLIC DBfacelist *
+DBCalcExternalFacelist2(int *nodeList, int nNodes, int lowOffset,
+                        int highOffset, int origin, int *shapeType,
+                        int *shapeSize, int *shapeCnt, int nShapes,
+                        int *matList, int bndMethod)
+{
+    DBfacelist *fl=NULL;
+
+    fl = CalcExternalFaces(nodeList, nNodes, lowOffset, highOffset,
+                           origin, shapeType, shapeSize, shapeCnt,
+                           nShapes, matList, bndMethod);
+
+    return fl;
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Given a zonelist, calculate a facelist describing all of
+ *           the external faces.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    zoneList  : List of nodes making up the zones in the mesh.
+ *    nNodes    : Number of nodes in mesh.
+ *    lowOffset : The number of ghost zones at the beginning of
+ *                the zonelist.
+ *    highOffset : The number of ghost zones at the end of the
+ *                zonelist.
+ *    origin    : Origin for nodelist (0 or 1).
+ *    shapeType : For each shape, the type of the shape.
+ *    shapeSize : For each shape, the number of nodes per zone.
+ *    shapeCnt  : For each shape, the number of zones of that size.
+ *    nShapes   : Number of zone shapes.
+ *    matList   : Zonal array giving material numbers (else NULL).
+ *    bndMethod : Method to use regarding boundaries.
+ *
+ * Output arguments:
+ *    faceList : The resulting facelist.
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ *    Jeremy Meredith, Thu Mar 23 09:44:40 PST 2000
+ *    Fixed the tetrahedron node ordering.
+ *
+ *    Jeremy Meredith, Fri Apr 28 13:58:05 PDT 2000
+ *    Allowed 2D zone types.  Simply copy the shape as a polygon.
+ *
+ *    Jeremy Meredith, Fri Jun 16 14:31:36 PDT 2000
+ *    Allowed 1D zone type (BEAM).  Simply copy the shape as a line segment.
+ *
+ *    Hank Childs, Wed Feb 16 16:14:52 PST 2005
+ *    Reverse hexahedrons faces, since we are now defining hexes to have
+ *    the opposite orientations.
+ *
+ **********************************************************************/
+
+PRIVATE DBfacelist *
+CalcExternalFaces(int *zoneList, int nNodes, int lowOffset, int highOffset,
+                  int origin, int *shapeType, int *shapeSize, int *shapeCnt,
+                  int nShapes, int *matList, int bndMethod)
+{
+    int       i, j, k;
+    CalcExternalFacesState st;
+    int       nFaces;
+    int       nEdges;
+    int       iZone, iZoneList;
+    int       nodes[4];
+    DBfacelist *faceList=NULL;
+
+    /*
+     * Copy relevant global information to a structure for easy
+     * passing among routines.
+     */
+    st.zoneList   = zoneList;
+    st.nNodes     = nNodes;
+    st.lowOffset  = lowOffset;
+    st.highOffset = highOffset;
+    st.origin     = origin;
+    st.shapeType  = shapeType;
+    st.shapeSize  = shapeSize;
+    st.shapeCnt   = shapeCnt;
+    st.nShapes    = nShapes;
+    st.matList    = matList;
+    st.bndMethod  = bndMethod;
+
+    st.faceHash.size  = MIN(nNodes, HASH_MAX);
+    st.faceHash.table = MALLOC_N(Face *, st.faceHash.size);
+    memset(st.faceHash.table, 0, st.faceHash.size * sizeof(Face *));
+
+    /*
+     * Loop over all the shapes, adding the faces for each shape,
+     * removing duplicates as they are encountered.
+     */
+    iZone = 0;
+    iZoneList = 0;
+    for (i = 0; i < nShapes; i++)
+    {
+        switch (shapeType[i])
+        {
+            case DB_ZONETYPE_TET:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+1];
+                    nodes[2] = zoneList[iZoneList+2];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+2];
+                    nodes[2] = zoneList[iZoneList+3];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+3];
+                    nodes[2] = zoneList[iZoneList+1];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+1];
+                    nodes[1] = zoneList[iZoneList+3];
+                    nodes[2] = zoneList[iZoneList+2];
+                    InsertFace(&st, nodes, 3, iZone);
+                    iZone++;
+                    iZoneList += 4;
+                }
+                break;
+            case DB_ZONETYPE_PYRAMID:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+1];
+                    nodes[2] = zoneList[iZoneList+2];
+                    nodes[3] = zoneList[iZoneList+3];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+4];
+                    nodes[2] = zoneList[iZoneList+1];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+1];
+                    nodes[1] = zoneList[iZoneList+4];
+                    nodes[2] = zoneList[iZoneList+2];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+2];
+                    nodes[1] = zoneList[iZoneList+4];
+                    nodes[2] = zoneList[iZoneList+3];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+3];
+                    nodes[1] = zoneList[iZoneList+4];
+                    nodes[2] = zoneList[iZoneList+0];
+                    InsertFace(&st, nodes, 3, iZone);
+                    iZone++;
+                    iZoneList += 5;
+                }
+                break;
+            case DB_ZONETYPE_PRISM:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+1];
+                    nodes[2] = zoneList[iZoneList+2];
+                    nodes[3] = zoneList[iZoneList+3];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+3];
+                    nodes[1] = zoneList[iZoneList+2];
+                    nodes[2] = zoneList[iZoneList+5];
+                    nodes[3] = zoneList[iZoneList+4];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+4];
+                    nodes[1] = zoneList[iZoneList+5];
+                    nodes[2] = zoneList[iZoneList+1];
+                    nodes[3] = zoneList[iZoneList+0];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+3];
+                    nodes[1] = zoneList[iZoneList+4];
+                    nodes[2] = zoneList[iZoneList+0];
+                    InsertFace(&st, nodes, 3, iZone);
+                    nodes[0] = zoneList[iZoneList+1];
+                    nodes[1] = zoneList[iZoneList+5];
+                    nodes[2] = zoneList[iZoneList+2];
+                    InsertFace(&st, nodes, 3, iZone);
+                    iZone++;
+                    iZoneList += 6;
+                }
+                break;
+            case DB_ZONETYPE_HEX:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+3];
+                    nodes[2] = zoneList[iZoneList+2];
+                    nodes[3] = zoneList[iZoneList+1];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+1];
+                    nodes[1] = zoneList[iZoneList+2];
+                    nodes[2] = zoneList[iZoneList+6];
+                    nodes[3] = zoneList[iZoneList+5];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+5];
+                    nodes[1] = zoneList[iZoneList+6];
+                    nodes[2] = zoneList[iZoneList+7];
+                    nodes[3] = zoneList[iZoneList+4];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+4];
+                    nodes[1] = zoneList[iZoneList+7];
+                    nodes[2] = zoneList[iZoneList+3];
+                    nodes[3] = zoneList[iZoneList+0];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+0];
+                    nodes[1] = zoneList[iZoneList+1];
+                    nodes[2] = zoneList[iZoneList+5];
+                    nodes[3] = zoneList[iZoneList+4];
+                    InsertFace(&st, nodes, 4, iZone);
+                    nodes[0] = zoneList[iZoneList+3];
+                    nodes[1] = zoneList[iZoneList+7];
+                    nodes[2] = zoneList[iZoneList+6];
+                    nodes[3] = zoneList[iZoneList+2];
+                    InsertFace(&st, nodes, 4, iZone);
+                    iZone++;
+                    iZoneList += 8;
+                }
+                break;
+            case DB_ZONETYPE_POLYHEDRON:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    nFaces = zoneList[iZoneList++];
+                    for (k = 0; k < nFaces; k++)
+                    {
+                        nEdges = zoneList[iZoneList++];
+                        InsertFace(&st, &zoneList[iZoneList], nEdges, iZone);
+                        iZoneList += nEdges;
+                    }
+                    iZone++;
+                }
+                break;
+            case DB_ZONETYPE_BEAM:
+            case DB_ZONETYPE_TRIANGLE:
+            case DB_ZONETYPE_QUAD:
+            case DB_ZONETYPE_POLYGON:
+                for (j = 0; j < shapeCnt[i]; j++)
+                {
+                    InsertFace(&st, &zoneList[iZoneList], shapeSize[i], iZone);
+                    iZoneList += shapeSize[i];
+                    iZone++;
+                }
+                break;
+            default:
+                iZone += shapeCnt[i];
+                iZoneList += shapeSize[i] * shapeCnt[i];
+                break;
+        }
+    }
+
+    /*
+     * Form a DBfacelist structure from the remaining faces.
+     */
+    faceList = FormFaceList(&st);
+
+    return faceList;
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Form a DBfacelist structure from the remaining faces in
+ *           the face hash table.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    st       : The external facelist state.
+ *
+ * Output arguments:
+ *    fl       : The resulting facelist.
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Sep 24 08:53:32 PDT 1999
+ *    Modify the routine to handle the case where there are no
+ *    external faces.
+ *
+ *    Jeremy Meredith, Thu Jul  6 11:05:12 PDT 2000
+ *    Added the origin to the final zoneno[] array.  It was always
+ *    creating it as a zero-origin array.
+ *
+ *    Eric Brugger, Fri Dec 29 08:34:38 PST 2000
+ *    Replaced a comparison to NULL with a comparison to 0 since the
+ *    value was an integer not a pointer.
+ *
+ **********************************************************************/
+
+PRIVATE DBfacelist *
+FormFaceList(CalcExternalFacesState *st)
+{
+    int       i, j;
+    FaceHash  *faceHash=NULL;
+    int       origin;
+    int       minIndex, maxIndex;
+    int       nZones;
+    int       iFaceList;
+    int       lFaceList;
+    int       iFace;
+    int       nFaces;
+    Face      firstFace;
+    Face      *prevFace=NULL, *curFace=NULL, *tmpFace=NULL;
+    int       zoneNoNext;
+    int       *faceList=NULL, *zoneNo=NULL;
+    int       curSize;
+    int       nShapes;
+    int       lShapeList;
+    int       *shapeCnt=NULL, *shapeSize=NULL;
+    DBfacelist *fl=NULL;
+
+    faceHash = &(st->faceHash);
+    origin = st->origin;
+
+    /*
+     * Calculate the number of zones in the zonelist.
+     */
+    nZones = 0;
+    for (i = 0; i < st->nShapes; i++) nZones += st->shapeCnt[i];
+
+    minIndex = st->lowOffset;
+    maxIndex = nZones - st->highOffset - 1;
+
+    /*
+     * Link all the faces into a list and determine the total number
+     * faces and the total number of nodes in the resulting facelist.
+     * Faces that are associated with ghost elements are eliminated
+     * during the chaining process.  The first element in the list is
+     * an extra face that is allocated from the stack.  This eliminates
+     * special cases in the coding.  Once the faces have been linked
+     * together the hash table is no longer needed so it is freed.
+     */
+    firstFace.nNodes = 0;
+    firstFace.nodes  = NULL;
+    firstFace.zoneNo = 0;
+    firstFace.next   = NULL;
+    curFace = &firstFace;
+    nFaces = 0;
+    lFaceList = 0;
+    for (i = 0; i < faceHash->size; i++)
+    {
+        if (faceHash->table[i] != NULL)
+        {
+            curFace->next = faceHash->table[i];
+            while (curFace->next != NULL)
+            {
+                /*
+                 * If the face came from a real zone, add it to
+                 * the list, otherwise delete it.
+                 */
+                zoneNoNext = curFace->next->zoneNo;
+                if (zoneNoNext >= minIndex && zoneNoNext <= maxIndex)
+                {
+                    nFaces++;
+                    lFaceList += curFace->nNodes;
+                    curFace = curFace->next;
+                }
+                else
+                {
+                    tmpFace = curFace->next;
+                    curFace->next = tmpFace->next;
+                    FreeFace(tmpFace);
+                }
+            }
+        }
+    }
+    lFaceList += curFace->nNodes;
+    FREE(faceHash->table);
+    faceHash->size = 0;
+
+    /*
+     * Build the arrays necessary for the DBfacelist structure.  Loop
+     * over all the faces, extracting all the faces of a particular type
+     * each time until all the faces have been extracted.
+     */
+    nShapes    = 0;
+    lShapeList = 10;
+    if (nFaces != 0)
+    {
+        shapeSize  = MALLOC_N(int, lShapeList);
+        shapeCnt   = MALLOC_N(int, lShapeList);
+        faceList   = MALLOC_N(int, lFaceList);
+        zoneNo     = MALLOC_N(int, nFaces);
+    }
+    iFace      = 0;
+    iFaceList  = 0;
+
+    while (firstFace.next != NULL)
+    {
+        /*
+         * Allocate more space for the shape structures if necessary.
+         */
+        if (nShapes >= lShapeList)
+        {
+            lShapeList += 10;
+            shapeSize = REALLOC_N(shapeSize, int, lShapeList);
+            shapeCnt  = REALLOC_N(shapeCnt, int, lShapeList);
+        }
+
+        /*
+         * Add an entry in the shape structure for the current shape
+         * type.
+         */
+        prevFace = &firstFace;
+        curFace  = firstFace.next;
+        curSize  = curFace->nNodes;
+        shapeSize[nShapes] = curSize;
+        shapeCnt[nShapes]  = 0;
+
+        /*
+         * Loop over all the faces, adding all the faces with the current
+         * size to the output face list and removing them from the input
+         * list of faces.
+         */
+        while (curFace != NULL)
+        {
+            if (curFace->nNodes == curSize)
+            {
+                shapeCnt[nShapes] += 1;
+                zoneNo[iFace] = curFace->zoneNo + origin;
+                iFace++;
+                for (j = 0; j < curSize; j++)
+                {
+                    faceList[iFaceList+j] = curFace->nodes[j];
+                }
+                iFaceList += curSize;
+                prevFace->next = curFace->next;
+                FreeFace(curFace);
+                curFace = prevFace;
+            }
+            prevFace = curFace;
+            curFace = curFace->next;
+        }
+
+        nShapes++;
+    }
+
+    /*
+     * Put all the pieces together into the DBfacelist structure.
+     */
+    fl = DBAllocFacelist();
+
+    fl->ndims     = 3;
+    fl->nfaces    = nFaces;
+    fl->origin    = origin;
+    fl->nodelist  = faceList;
+    fl->lnodelist = lFaceList;
+    fl->nshapes   = nShapes;
+    fl->shapecnt  = shapeCnt;
+    fl->shapesize = shapeSize;
+    fl->zoneno    = zoneNo;
+
+    return fl;
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Insert a face into the face hash table.  If the face is
+ *           not in the hash table it gets added.  If it already exists
+ *           then the existing one is deleted.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    st       : The external facelist state.
+ *    nodes    : The nodes making up the face.
+ *    nNodes   : The number of nodes in the face.
+ *    zoneNo   : The zone number associated with the face.
+ *
+ * Output arguments:
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ **********************************************************************/
+
+PRIVATE void
+InsertFace(CalcExternalFacesState *st, int *nodes, int nNodes, int zoneNo)
+{
+    int       i, j;
+    FaceHash  *faceHash=NULL;
+    int       bndMethod;
+    int       *matList;
+    int       iMin;
+    int       match;
+    int       deleteIt;
+    Face      *prevFace=NULL, *curFace=NULL;
+
+    faceHash  = &(st->faceHash);
+    bndMethod = st->bndMethod;
+    matList   = st->matList;
+
+    /*
+     * Find index of the minimum node number in the node list
+     * for the face.  Since it is used to index into the hash
+     * table and as the starting point for performing a match.
+     */
+    iMin = 0;
+    for (i = 1; i < nNodes; i++)
+    {
+        if (nodes[i] < nodes[iMin]) iMin = i;
+    }
+
+    /*
+     * Search the list of faces in the linked list of possible
+     * matches for a match.
+     */
+    curFace = faceHash->table[nodes[iMin] % faceHash->size];
+    match = 0;
+    while (match == 0 && curFace != NULL)
+    {
+        if (curFace->nNodes == nNodes)
+        {
+            match = 1;
+            j = (iMin + nNodes - 1) % nNodes;
+            for (i = 1; i < nNodes && match == 1; i++)
+            {
+                match = (curFace->nodes[i] == nodes[j]);
+                j = (j + nNodes - 1) % nNodes;
+            }
+        }
+
+        if (match == 0)
+        {
+            prevFace = curFace;
+            curFace = curFace->next;
+        }
+    }
+
+    /*
+     * Determine if the face should be deleted based on getting
+     * a match and the bndMethod.
+     */
+    deleteIt = 0;
+    if (match == 1)
+    {
+        if (bndMethod == 0)
+        {
+            deleteIt = 1;
+        }
+        else if (matList[curFace->zoneNo] == matList[zoneNo])
+        {
+            deleteIt = 1;
+        }
+    }
+        
+    /*
+     * Either delete the matching face or add the new one based on
+     * the deleteIt flag.
+     */
+    if (deleteIt == 1)
+    {
+        /*
+         * Delete the face.
+         */
+        if (prevFace == NULL)
+        {
+            /*
+             * The previous element is the beginning of the list.
+             */
+            faceHash->table[nodes[iMin] % faceHash->size] = curFace->next;
+        }
+        else
+        {
+            /*
+             * The previous element is in the middle of the list.
+             */
+            prevFace->next = curFace->next;
+        } 
+        FreeFace(curFace);
+    }
+    else
+    {
+        /*
+         * Add the face.
+         */
+        curFace = AllocFace();
+        curFace->nNodes = nNodes;
+        curFace->nodes = MALLOC_N(int, nNodes);
+        for (i = 0, j = iMin; i < nNodes; i++, j = (j + 1) % nNodes)
+        {
+            curFace->nodes[i] = nodes[j];
+        }
+        curFace->zoneNo = zoneNo;
+        curFace->next = faceHash->table[nodes[iMin] % faceHash->size];
+        faceHash->table[nodes[iMin] % faceHash->size] = curFace;
+    }
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Free a Face structure.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *    face     : The face to free.
+ *
+ * Output arguments:
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ **********************************************************************/
+
+PRIVATE void
+FreeFace(Face *face)
+{
+
+    FREE(face->nodes);
+    FREE(face);
+}
+
+/***********************************************************************
+ *
+ * Purpose:  Allocate a Face structure.
+ *
+ * Programmer: Eric Brugger
+ * Date:       March 12, 1999
+ *
+ * Input arguments:
+ *
+ * Output arguments:
+ *    face     : The newly allocated face.
+ *
+ * Input/Output arguments:
+ *
+ * Notes
+ *
+ * Modifications:
+ *
+ **********************************************************************/
+
+PRIVATE Face *
+AllocFace(void)
+{
+    Face      *face=NULL;
+
+    face = MALLOC_N(Face, 1);
+
+    return face;
+}
diff --git a/src/silo/pmpio.h b/src/silo/pmpio.h
new file mode 100644
index 0000000..9fe0d2c
--- /dev/null
+++ b/src/silo/pmpio.h
@@ -0,0 +1,554 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#ifndef PMPIO_H
+#define PMPIO_H
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Introduction 
+ *
+ * Description:
+ * This header file defines the Poor Main's Parallel I/O support interface.
+ * To use it, include pmpio.h /after/ mpi.h in your application.
+ *
+ * PMPIO makes it *very*simple* to take an existing application that writes
+ * a file per processor and add the ability to vary the number of files
+ * the application writes to from 1 (e.g. serial I/O) to one for each
+ * processor and anything in between.
+ *
+ * I/O libraries like serial HDF5 and Silo can be used very effectively
+ * in parallel without having to resort to writing a file per processor.
+ * PMPIO impliments a simple approach to using serial I/O libraries
+ * effectively in parallel by having the application decompose the set of
+ * processors into /N/ groups and write a file per group. At any one moment,
+ * only one processor from each group has a file open for writing. Hence,
+ * the I/O is serial /within/ a group. However, because a processor in each
+ * of the /N/ groups is writing to its own file, simultaneously, the I/O is
+ * parallel /across/ groups.
+ *
+ * The number of files, /N/, can be chosen wholly
+ * independently of the total number of processors permitting the application
+ * to tune /N/ to the underlying filesystem. For example, a parallel
+ * application running on 2,000 processors and writing to a filesystem that
+ * supports 8 parallel I/O channels could select /N=8/ and achieve nearly
+ * optimum I/O performance and create only 8 files.
+ *
+ * This is a simple and effective I/O strategy that has been used by codes
+ * like Ale3d and SAMRAI for many years. PMPIO impliments some basic
+ * functions to help take an existing application that generates a file per
+ * processor and modify it to generate a file per group of processors.
+ *
+ * In order for the strategy implemented here to work, some functionality
+ * must be available in the I/O library being used to read/write the data.
+ * The I/O library needs to support the following
+ * A) Random access to named data objects
+ * B) Separate name spaces within a file (e.g. like unix directories)
+ * C) Variable sized I/O requests for same data objects from different
+ *    processors
+ *
+ * A large number of I/O libraries and/or file formats support these
+ * features including HDF5, Silo, PDB (Portable Database),
+ * HDF4, Boxlib. There are probably numerous others. Some noteable I/O
+ * libraries and/or file formats that do not support these features are
+ * netCDF and VTK.
+ *
+ * The pmpio.h header file contains three key routines to facilitate
+ * using a basic serial I/O library in the fashion of
+ * 'Poor Man's Parallel I/O'. Pseudocode pattern of its use is below...
+ *
+ *        PMPIO_baton_t *bat = PMPIO_Init(MPI_COMM_WORLD,...)
+ *        fileHandle = (<fileHandleType> *) PMPIO_WaitForBaton(bat, a, b)
+ *        .
+ *        do this processor's work on the file
+ *        .
+ *        PMPIO_HandOffBaton(fileHandle,...)
+ *            
+ * All processors call all of these methods. PMPIO_Init() returns immediately.
+ * PMPIO_WaitForBaton() returns immediatly only on the /first/ processor in
+ * each group sharing a file. All other processors wait to recieve a baton
+ * from the previous processor. When a processor finishes its work on the file
+ * and reaches the PMPIO_HandOffBaton(), that call returns immediately and it
+ * also passes the baton to the next processor in the group. In turn, that
+ * processor then returns from the PMPIO_WaitForBaton() call it is waiting.
+ * This process continues with each processor in a group handing off a baton
+ * to the next processor.
+ *-----------------------------------------------------------------------------
+ */
+
+#include <stdlib.h>
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Initialization 
+ * Purpose:     I/O Modes
+ * Description:
+ * Used to indicate if PMPIO is being used to write data or
+ * read it 
+ *-----------------------------------------------------------------------------
+ */
+typedef enum {
+    PMPIO_READ=0x1,
+    PMPIO_WRITE=0x3
+} PMPIO_iomode_t;
+
+struct _PMPIO_baton_t;
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Create Callback
+ * Description:
+ * Defines the create file callback interface. When used for
+ * writing, the create file callback should 1) create a file, 2) create a
+ * namespace in the file for the first processor of the group to write to
+ * and 3) set the file to that namespace. The create file call back is
+ * never called during reading. 
+ *
+ *     typedef void * (*PMPIO_CreateFileCallBack)(
+ *         const char *fname,  name of the file to create
+ *         const char *nsname, name of the namespace in the file to create
+ *         void *udata         optional, user data passed by PMPIO
+ *     );
+ *-----------------------------------------------------------------------------
+ */
+typedef void * (*PMPIO_CreateFileCallBack)(const char *fname, const char *nsname,
+                                           void *udata);
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Open Callback
+ * Description:
+ * Defines the open file callback interface. When used for
+ * writing, the open file callback should 1) open a file, 2) create a
+ * namespace in the file for the current processor of the group to write
+ * to and 3) set the file to that namespace. When used for  reading,
+ * the open file callback should 1) open a file and 2) set the file
+ * to the namespace the current processor should read from.
+ *
+ *     typedef void * (*PMPIO_OpenFileCallBack)(
+ *         const char *fname,     name of the file to open
+ *         const char *nsname,    name of the namespace to create (write)
+ *                                or set (read)
+ *         PMPIO_iomode_t iomode, indicates if read or write
+ *         void *udata            optional user data passed by PMPIO
+ *     );
+ *-----------------------------------------------------------------------------
+ */
+typedef void * (*PMPIO_OpenFileCallBack)(const char *fname, const char *nsname,
+                                         PMPIO_iomode_t iomode, void *udata);
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Close Callback
+ * Description:
+ * Defines the close file callback interface. This should close the file.
+ *
+ *     typedef void  (*PMPIO_CloseFileCallBack)(
+ *         void *file,   pointer to the file object to close
+ *         void *udata   optional user data passed by PMPIO
+ *     );
+ *-----------------------------------------------------------------------------
+ */
+typedef void  (*PMPIO_CloseFileCallBack)(void *file, void *udata);
+
+typedef struct _PMPIO_baton_t
+{
+    PMPIO_iomode_t ioMode;
+    int commSize;
+    int rankInComm;
+    int numGroups;
+    int groupSize;
+    int numGroupsWithExtraProc;
+    int commSplit;
+    int groupRank;
+    int rankInGroup;
+    int procBeforeMe;
+    int procAfterMe;
+    int mpiVal;
+    int mpiTag;
+    MPI_Comm mpiComm;
+    PMPIO_CreateFileCallBack createCb;
+    PMPIO_OpenFileCallBack openCb;
+    PMPIO_CloseFileCallBack closeCb;
+    void *userData;
+
+} PMPIO_baton_t;
+
+#define PMPIO_BATON_OK  0xBabeFace
+#define PMPIO_BATON_ERR 0xDeadBeef
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Initialization 
+ * Purpose:     Initialize a PMPIO baton
+ * Description:
+ * Initializes PMPIO to write a specified number of files. If the
+ * specified number of files is one (1), the result will effectively be serial
+ * I/O. If the number of files is equal to the number of processors, the result
+ * will be file per processor. It is best to choose a number of files that does
+ * not exceed the total number of available I/O channels. On large parallel
+ * systems, this number can typically be between 8 and 64.
+ * 
+ * Given the MPI communicator, and the desired number of files, this function
+ * will divide all processors in the communicator into a number of groups.
+ * If the number of groups does not equally divide the number of processors,
+ * some groups will contain an extra processor.
+ * Each group of processors will write to its own file.
+ *
+ * PMPIO_Init() makes no MPI calls other than obtaining the size of the MPI
+ * communicator and the rank of the calling processor.
+ *
+ * A call to PMPIO_Init() should be followed by a call to PMPIO_WaitForBaton,
+ * followed by a call to PMPIO_HandOffBaton and finally by a call to
+ * PMPIO_Finish(). A call to PMPIO_Init() returns a /baton/, a pointer to
+ * a PMPIO_baton_t, that is /active/ until PMPIO_Finish() is called.
+ *
+ * Multiple calls to PMPIO_Init() can be made within a single execution. In
+ * fact, as long as the mpiTag used in baton-passing messages is unique
+ * across all /active/batons/, calls can be interleaved between /active/
+ * batons.
+ *
+ * All processors should call this function with identical arguments otherwise
+ * behavior is undefined. The call returns immediatly on all processors.
+ *-----------------------------------------------------------------------------
+ */
+static PMPIO_baton_t *
+PMPIO_Init(
+    int numFiles,                       /* The number of files to be created */
+    PMPIO_iomode_t ioMode,              /* Indicates whether this is for writing a file or for reading a file.
+                                           Specify either PMPIO_READ or PMPIO_WRITE. Note, read and write
+                                           at the same time is not supported. */
+    MPI_Comm mpiComm,                   /* The MPI communicator PMPIO should use */
+    int mpiTag,                         /* The message tag PMPIO should use for its baton-pass messages. */
+    PMPIO_CreateFileCallBack createCb,  /* The create file callback. In the case of PMPIO_WRITE, this
+                                           callback should 1) create a file, 2) create a namespace in
+                                           the file for the first processor of the group to write to and
+                                           3) set the file to that namespace. In the
+                                           case of PMPIO_READ, this callback is never called. */
+    PMPIO_OpenFileCallBack openCb,      /* The open file callback. In the case of PMPIO_WRITE, this callback 
+                                           should 1) open the file, 2) create a namespace in the file for the
+                                           current processor to write to and 3) set the file to that namespace.
+                                           In the case of PMPIO_READ, this callback should 1) open the file
+                                           and 2) set the file to the namespace for the current processor to
+                                           read from. */
+    PMPIO_CloseFileCallBack closeCb,    /* The close file callback. This method should close the file. */
+    void *userData                      /* Optional, user-specified data that PMPIO passes into the callbacks.
+                                           Pass 0 if you have no need for this. */
+                                          
+    )
+{
+    int numGroups = numFiles;
+    int commSize, rankInComm;
+    int groupSize, numGroupsWithExtraProc, commSplit,
+        groupRank, rankInGroup, procBeforeMe, procAfterMe;
+    PMPIO_baton_t *ret = 0;
+
+    procBeforeMe = -1;
+    procAfterMe = -1;
+
+    MPI_Comm_size(mpiComm, &commSize);
+    MPI_Comm_rank(mpiComm, &rankInComm);
+
+    groupSize              = commSize / numGroups;
+    numGroupsWithExtraProc = commSize % numGroups;
+    commSplit = numGroupsWithExtraProc * (groupSize + 1);
+
+    if (rankInComm < commSplit)
+    {
+        groupRank = rankInComm / (groupSize + 1);
+        rankInGroup = rankInComm % (groupSize + 1);
+        if (rankInGroup < groupSize)
+            procAfterMe = rankInComm + 1;
+    }
+    else
+    {
+        groupRank = numGroupsWithExtraProc + (rankInComm - commSplit) / groupSize; 
+        rankInGroup = (rankInComm - commSplit) % groupSize;
+        if (rankInGroup < groupSize - 1)
+            procAfterMe = rankInComm + 1;
+    }
+    if (rankInGroup > 0)
+        procBeforeMe = rankInComm - 1;
+
+    if (createCb == 0 || openCb == 0 || closeCb == 0)
+        return 0;
+
+    ret = (PMPIO_baton_t *) malloc(sizeof(PMPIO_baton_t));
+    ret->ioMode = ioMode;
+    ret->commSize = commSize;
+    ret->rankInComm = rankInComm;
+    ret->numGroups = numGroups;
+    ret->groupSize = groupSize;
+    ret->numGroupsWithExtraProc = numGroupsWithExtraProc;
+    ret->commSplit = commSplit;
+    ret->groupRank = groupRank;
+    ret->rankInGroup = rankInGroup;
+    ret->procBeforeMe = procBeforeMe;
+    ret->procAfterMe = procAfterMe;
+    ret->mpiVal = PMPIO_BATON_OK;
+    ret->mpiTag = mpiTag;
+    ret->mpiComm = mpiComm;
+    ret->createCb = createCb;
+    ret->openCb = openCb;
+    ret->closeCb = closeCb;
+    ret->userData = userData;
+
+    return ret;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Initialization 
+ * Purpose:     Finish use of an active baton 
+ * Description:
+ * Finishes the use of an active PMPIO baton and deallocates any storage.
+ *-----------------------------------------------------------------------------
+ */
+static void
+PMPIO_Finish(
+    PMPIO_baton_t *bat
+)
+{
+    free(bat);
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Baton Passing 
+ * Purpose:     Wait for a PMPIO baton
+ * Description:
+ * Causes the calling processor to wait until it is handed a 
+ * baton. This call will return immediately *only* for the /first/ processor
+ * in each group. All other processors in a group will block, waiting to get
+ * the baton from their predecessor. To give up the baton, a processor must
+ * call PMPIO_HandOffBaton().
+ *-----------------------------------------------------------------------------
+ */
+static void *
+PMPIO_WaitForBaton(
+    PMPIO_baton_t *Bat,         /* The PMPIO baton obtained from a PMPIO_Init() call. */
+    const char *fname,          /* The name of the file this processor will open. */
+    const char *nsname          /* The name of the namespace in the file this processor will work on. */
+)
+{
+    if (Bat->procBeforeMe != -1)
+    {
+        MPI_Status mpi_stat;
+        int baton;
+        int mpi_err =
+            MPI_Recv(&baton, 1, MPI_INT, Bat->procBeforeMe,
+                Bat->mpiTag, Bat->mpiComm, &mpi_stat);
+        if (mpi_err == MPI_SUCCESS && baton != PMPIO_BATON_ERR)
+        {
+            return Bat->openCb(fname, nsname, Bat->ioMode, Bat->userData);
+        }
+        else
+        {
+            Bat->mpiVal = PMPIO_BATON_ERR;
+            return 0;
+        }
+    }
+    else
+    {
+        if (Bat->ioMode == PMPIO_WRITE)
+            return Bat->createCb(fname, nsname, Bat->userData);
+        else
+            return Bat->openCb(fname, nsname, Bat->ioMode, Bat->userData);
+    }
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Baton Passing 
+ * Purpose:     Wait for a PMPIO baton
+ * Description:
+ * Causes the calling processor to hand off its baton to the next processor. 
+ * This call returns immediately.
+ *-----------------------------------------------------------------------------
+ */
+static void
+PMPIO_HandOffBaton(
+    const PMPIO_baton_t *Bat,   /* The PMPIO baton obtained from a PMPIO_Init() call. */
+    void *file                  /* A void pointer to the file object obtained
+                                   from a PMPIO_WaitForBaton() call. */
+)
+{
+    Bat->closeCb(file, Bat->userData);
+    if (Bat->procAfterMe != -1)
+    {
+        int baton = Bat->mpiVal;
+        MPI_Ssend(&baton, 1, MPI_INT, Bat->procAfterMe,
+            Bat->mpiTag, Bat->mpiComm);
+    }
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Ranking 
+ * Purpose:     Return 'group rank' of a given processor in the communicator 
+ * Description:
+ * Given a processor's rank in the communicator used to initialize PMPIO, 
+ * determine the 'group rank' of the processor (e.g. which group) indexed
+ * from zero.
+ *-----------------------------------------------------------------------------
+ */
+static int
+PMPIO_GroupRank(const PMPIO_baton_t *Bat, int rankInComm)
+{
+    int retval;
+
+    if (rankInComm < Bat->commSplit)
+    {
+        retval = rankInComm / (Bat->groupSize + 1);
+    }
+    else
+    {
+        retval = Bat->numGroupsWithExtraProc +
+                 (rankInComm - Bat->commSplit) / Bat->groupSize; 
+    }
+
+    return retval;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Ranking 
+ * Purpose:     Return 'rank in group' of a given processor in the communicator 
+ * Description:
+ * Given a processor's rank in the communicator used to initialize PMPIO, 
+ * determine the 'rank in grouop' of the processor (e.g. which processor in the
+ * group) indexed from zero.
+ *-----------------------------------------------------------------------------
+ */
+static int
+PMPIO_RankInGroup(const PMPIO_baton_t *Bat, int rankInComm)
+{
+    int retval;
+
+    if (rankInComm < Bat->commSplit)
+    {
+        retval = rankInComm % (Bat->groupSize + 1);
+    }
+    else
+    {
+        retval = (rankInComm - Bat->commSplit) % Bat->groupSize;
+    }
+
+    return retval;
+}
+
+/* Define this Default PMPIO functions only if we have silo.h. We use existence
+of 'DB_HDF5' as indication that silo.h is present. */
+#ifdef DB_HDF5X
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks
+ * Purpose:     Impliment the create callback
+ *
+ * Description: The caller can specify which Silo driver to use by passing
+ * a void pointer to the driver specification as the userData argument. If
+ * that pointer is NULL or the value to which it points is not a known
+ * driver type (DB_HDF5 or DB_PDB), it is set to DB_PDB driver as that is
+ * guarenteed to exist in any Silo implmentation.
+ *-----------------------------------------------------------------------------
+ */
+static void *
+PMPIO_DefaultCreate(const char *fname, const char *nsname, void *userData)
+{
+    DBfile *siloFile;
+    int driver = userData ? *((int*) userData) : DB_PDB;
+    if (driver != DB_PDB && driver != DB_HDF5)
+        driver = DB_PDB;
+    siloFile = DBCreate(fname, DB_CLOBBER, DB_LOCAL, "PMPIO_DefaultCreate", driver);
+    if (siloFile)
+    {
+        DBMkDir(siloFile, nsname);
+        DBSetDir(siloFile, nsname);
+    }
+    return (void *) siloFile;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks
+ * Purpose:     Impliment the open callback
+ *-----------------------------------------------------------------------------
+ */
+static void *
+PMPIO_DefaultOpen(const char *fname, const char *nsname, PMPIO_iomode_t ioMode, void *userData)
+{
+    DBfile *siloFile = DBOpen(fname, DB_UNKNOWN,
+        ioMode == PMPIO_WRITE ? DB_APPEND : DB_READ);
+    if (siloFile)
+    {
+        if (ioMode == PMPIO_WRITE)
+            DBMkDir(siloFile, nsname);
+        DBSetDir(siloFile, nsname);
+    }
+    return (void *) siloFile;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks
+ * Purpose:     Impliment the close callback
+ *-----------------------------------------------------------------------------
+ */
+static void
+PMPIO_DefaultClose(void *file, void *userData)
+{
+    DBfile *siloFile = (DBfile *) file;
+    if (siloFile)
+        DBClose(siloFile);
+}
+#endif
+
+#endif
diff --git a/src/silo/silo.c b/src/silo/silo.c
new file mode 100644
index 0000000..057f586
--- /dev/null
+++ b/src/silo/silo.c
@@ -0,0 +1,13430 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/* File-wide modifications:
+ *
+ *  Sean Ahern, Mon Mar 3 15:38:51 PST 1997 Rearranged most functions, adding
+ *  local storage of the return value, to facilitate instrumenting each
+ *  function.  (e.g. timing routines)
+ *
+ *  Sean Ahern, Thu Apr 29 15:41:27 PDT 1999
+ *  Made all function definitions ANSI.  Removed unused local variables.
+ *
+ *  Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *  Added a global _uzl structure.
+ *
+ *  Brad Whitlock, Mon Apr 8 15:17:17 PST 2002
+ *  Changed some headers to allow compilation under windows.
+ *
+ *  Thomas R. Treadway, Fri Jan  5 13:46:26 PST 2007
+ *  Added backward compatible symbols
+ */
+
+/* Private SILO functions.  */
+#include "config.h" /* For a possible redefinition of setjmp/longjmp.
+                       Also for SDX driver detection.  */
+#include <stdio.h>
+#include <assert.h>
+#include <float.h>
+#include <math.h>
+#if HAVE_STDLIB_H
+#include <stdlib.h>         /* For abort(). */
+#endif
+#if !defined(_WIN32)
+#include <sys/file.h>       /* For R_OK and F_OK definitions. */
+#endif
+#include <errno.h>          /* For errno definitions. */
+#if HAVE_STRING_H
+#include <string.h>         /* For strerror */
+#endif
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#if !defined(_WIN32)
+#include <sys/errno.h>      /* For errno definitions. */
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#include <ctype.h>          /* For isalnum */
+#if HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>      /* for O_RDONLY */
+#endif
+#if HAVE_FCNTL_H
+#include <fcntl.h>          /* for O_RDONLY */
+#endif
+#ifdef _WIN32
+#include <windows.h>        /* for FileInfo funcs */
+#include <io.h>             /* for FileInfo funcs */
+#endif
+
+/* DB_MAIN must be defined before including silo_private.h. */
+#define DB_MAIN
+#include "silo_private.h"
+#include "silo_drivers.h"
+
+/* The Silo_version_* variable is used to guarantee that code can't include
+ * one version of silo.h and link with a different version of libsilo.a.  This
+ * variable's name must change with every version of Silo.
+ *
+ * I would ordinary have silo.h be generated by configure so that the
+ * version number will automatically get compiled in.  But this isn't good
+ * for development with clearmake, since that would make silo.h be a
+ * view-private file.  Thus, any object that depends on silo.h would be
+ * invalid as a wink-in candidate.  */
+int SILO_VERS_TAG = 0;
+
+/* Specify versions which are backward compatible with the current. */
+/* No lines of  the form 'int Silo_version_Maj_Min_Pat = 0;' below
+   here indicates that this version is not backwards compatible with
+   any previous versions.*/
+int Silo_version_4_8_pre2;
+int Silo_version_4_8_pre3;
+int Silo_version_4_8_pre4;
+int Silo_version_4_8_pre5;
+
+/* Symbols for error handling */
+PUBLIC int     DBDebugAPI = 0;  /*file desc for API debug messages      */
+PUBLIC int     db_errno = 0;    /*last error number                     */
+PUBLIC char    db_errfunc[64];  /*name of erring function               */
+PUBLIC char   *_db_err_list[] =
+{
+    "No error",                               /*00 */
+    "Bad file format type",                   /*01 */
+    "Not implemented",                        /*02 */
+    "File not found or invalid permissions",  /*03 */
+    "<<Reserved>>",                           /*04 */
+    "Internal error",                         /*05 */
+    "Not enough memory",                      /*06 */
+    "Invalid argument",                       /*07 */
+    "Low-level function call failed",         /*08 */
+    "Object not found",                       /*09 */
+    "Taurus database state error",            /*10 */
+    "Too many server connections",            /*11 */
+    "Protocol error",                         /*12 */
+    "Not a directory",                        /*13 */
+    "Too many open files",                    /*14 */
+    "Requested filter(s) not found",          /*15 */
+    "Too many filters registered",            /*16 */
+    "File already exists",                    /*17 */
+    "Specified file is actually a directory", /*18 */
+    "File lacks read permission",             /*19 */
+    "System level error occured",             /*20 */
+    "File lacks write permission",            /*21 */
+    "Invalid variable name - only alphanumeric and `_'", /* 22 */
+    "Overwrite not allowed. See DBSetAllowOverwrites()", /* 23 */
+    "Checksum failure.",                      /* 24 */
+    "Compression failure.",                   /* 25 */
+    "Grab driver enabled.",                   /* 26 */
+    "File was closed or never opened/created.",/* 27 */
+    "File multiply opened w/>1 not read-only.", /* 28 */
+    "Specified driver cannot open this file.",/* 29 */
+    "Optlist contains options for wrong class.",/* 30 */
+    "Feature not enabled in this build.", /* 31 */
+    "Too many file options sets (missing DBUnregisterFileOptionsSet?).", /* 32 */
+    "\nYou have tried to open or create a Silo file using\n"
+    "the HDF5 driver. However, the installation of Silo\n"
+    "you are using does not have the HDF5 driver enabled.\n"
+    "You need to configure the Silo library using the\n"
+    "--with-hdf5=<INC,LIB> option and re-compile and\n"
+    "re-install Silo. If you do not have an installation\n"
+    "of HDF5 already on your sytem, you will also need\n"
+    "to obtain HDF5 from www.hdfgroup.org and install it." /* 33 */
+};
+
+PRIVATE unsigned char _db_fstatus[DB_NFILES];  /*file status  */
+typedef struct reg_status_t {
+    DBfile *f;
+    unsigned int n;
+    int w;
+} reg_status_t;
+PRIVATE reg_status_t _db_regstatus[DB_NFILES] = /* DB_NFILES triples of zeros */
+    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+PRIVATE filter_t _db_filter[DB_NFILTERS];
+const static char *api_dummy = 0;
+
+/* stat struct definition */
+typedef struct db_silo_stat_t {
+#ifndef SIZEOF_OFF64_T
+#error missing definition for SIZEOF_OFF64_T in silo_private.h
+#else
+#if SIZEOF_OFF64_T > 4
+    struct stat64 s;
+#else
+    struct stat s;
+#endif
+#endif
+#ifdef _WIN32
+    DWORD fileindexlo;
+    DWORD fileindexhi;
+#endif
+} db_silo_stat_t;
+
+PRIVATE int db_isregistered_file(DBfile *dbfile, const db_silo_stat_t *filestate);
+PRIVATE int db_silo_stat(const char *name, db_silo_stat_t *statbuf, int opts_set_id);
+
+/* Global structures for option lists.  */
+struct _ma     _ma;
+struct _ms     _ms;
+struct _csgm   _csgm;
+struct _pm     _pm;
+struct _qm     _qm;
+struct _um     _um;
+struct _uzl    _uzl;
+struct _phzl   _phzl;
+struct _csgzl  _csgzl;
+struct _mm     _mm;
+struct _cu     _cu;
+struct _dv     _dv;
+struct _mrgt   _mrgt;
+
+SILO_Globals_t SILO_Globals = {
+    DBAll, /* dataReadMask */
+    TRUE,  /* allowOverwrites */
+    FALSE, /* enableChecksums */
+    FALSE,  /* enableFriendlyHDF5Names */
+    FALSE, /* enableGrabDriver */
+    3,     /* maxDeprecateWarnings */
+    0,     /* compressionParams (null) */
+    2.0,   /* compressionMinratio */
+    0,     /* compressionErrmode (fallback) */
+    {      /* file options sets [32 of them] */
+        0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0
+    },
+    DB_TOP,/* _db_err_level */
+    0,     /* _db_err_func */
+    DB_NONE,/* _db_err_level_drvr */
+    0,     /* Jstk */
+    DEFAULT_DRIVER_PRIORITIES
+};
+
+INTERNAL int
+db_FullyDeprecatedConvention(const char *name)
+{
+    if (strcmp(name, "_visit_defvars") == 0)
+    {
+        DEPRECATE_MSG(name,4,6,"DBPutDefvars")
+    }
+    else if (strcmp(name, "_visit_domain_groups") == 0)
+    {
+        DEPRECATE_MSG(name,4,6,"DBPutMrgtree")
+    }
+    else if (strcmp(name, "_disjoint_elements") == 0)
+    {
+        DEPRECATE_MSG(name,4,6,"DBOPT_DISJOINT_MODE option")
+    }
+    else if (strncmp(name, "MultivarToMultimeshMap_",23) == 0)
+    {
+        DEPRECATE_MSG(name,4,6,"DBOPT_MMESH_NAME option for DBPutMultivar")
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_perror
+ *
+ * Purpose:     Print error message to standard error
+ *
+ * Return:      Success:        -1
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  matzke at viper
+ *              Thu Nov  3 15:16:42 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Tue Dec 20 20:55:14 EST 1994
+ *    If s is "" then we use the previous value of s.
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+db_perror(const char *s, int errorno, char *fname)
+{
+    int            call_abort = 0;
+    static char    old_s[256];
+
+    /*
+     * Save error number and function name so application
+     * can read them later.
+     */
+    db_errno = errorno;
+    strncpy(db_errfunc, fname, sizeof(db_errfunc) - 1);
+    db_errfunc[sizeof(db_errfunc) - 1] = '\0';
+
+    /*
+     * If `s' is an empty string, then use the same string
+     * as last time.
+     */
+    if (s && !*s) {
+        s = old_s;
+    }
+    else if (s) {
+        strncpy(old_s, s, sizeof(old_s));
+        old_s[sizeof(old_s) - 1] = '\0';
+    }
+    else {
+        old_s[0] = '\0';
+    }
+
+    switch (SILO_Globals._db_err_level) {
+        case DB_NONE:
+            if (SILO_Globals.Jstk)
+                longjmp(SILO_Globals.Jstk->jbuf, -1);
+            return -1;
+        case DB_TOP:
+            if (SILO_Globals.Jstk)
+                longjmp(SILO_Globals.Jstk->jbuf, -1);
+            break;
+        case DB_ALL:
+            break;
+        case DB_ABORT:
+            call_abort = 1;
+            break;
+        default:
+            call_abort = 1;
+            break;
+    }
+
+    /*
+     * Issue the error message to standard error or by calling
+     * the indicated error handling routine.
+     */
+    if (SILO_Globals._db_err_func) {
+        int len;
+        char better_s[1024];
+        better_s[0]='\0';
+        if (fname && *fname)
+            snprintf(better_s, sizeof(better_s), "%s: ", fname);
+        len = strlen(better_s);
+        snprintf(better_s+len, sizeof(better_s)-len, "%s", db_strerror(errorno));
+        len = strlen(better_s);
+        if (s && *s)
+            snprintf(better_s+len, sizeof(better_s)-len, ": %s", s);
+        SILO_Globals._db_err_func((char*)better_s);
+    }
+    else {
+        if (fname && *fname)
+            fprintf(stderr, "%s: ", fname);
+        fprintf(stderr, "%s", db_strerror(errorno));
+        if (s && *s)
+            fprintf(stderr, ": %s", s);
+        putc('\n', stderr);
+    }
+
+    if (call_abort) {
+        fflush(stdout);
+        fprintf(stderr, "SILO Aborting...\n");
+        fflush(stderr);
+        abort();
+    }
+
+    return -1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_strerror
+ *
+ * Purpose:     Return message associated with error number
+ *
+ * Return:      Success:        ptr to string
+ *
+ *              Failure:        ptr to "No error"
+ *
+ * Programmer:  matzke at viper
+ *              Thu Nov  3 15:18:15 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Tue Feb 28 11:08:47 EST 1995
+ *    If error number is out of range, we make a new error message that
+ *    has the error number.  That makes this function act like DBErrString
+ *    and allows for the use of user-defined error numbers that are
+ *    larger than E_NERRORS or less than zero.
+ *-------------------------------------------------------------------------*/
+INTERNAL char *
+db_strerror(int errorno)
+{
+    static char    s[32];
+
+    if (errorno < 0 || errorno >= NELMTS(_db_err_list)) {
+        sprintf(s, "Error %d", errorno);
+        return s;
+    }
+    return _db_err_list[errorno];
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                                  db_strndup
+ *
+ *  Purpose
+ *
+ *      Return a duplicate of the given string (with length), where
+ *      default mem-mgr was used to allocate the necessary space.
+ *
+ *  Modified
+ *    Robb Matzke, Thu Nov 10 12:27:10 EST 1994
+ *    Added error mechanism
+ *
+ *    Eric Brugger, Wed Jul 25 14:57:28 PDT 2001
+ *    Renamed the routine.
+ *
+ *---------------------------------------------------------------------*/
+INTERNAL char *
+db_strndup(const char *string, int len)
+{
+    char          *out = NULL;
+    char          *me = "strndup";
+
+    if (string == NULL || len <= 0)
+        return (NULL);
+
+    if (NULL == (out = ALLOC_N(char, len + 1))) {
+        db_perror(NULL, E_NOMEM, me);
+        return NULL;
+    }
+
+    strncpy(out, string, len);
+    out[len] = '\0';
+
+    return (out);
+}
+
+/*----------------------------------------------------------------------
+ * Function: DBVariableNameValid
+ *
+ * Purpose   Check the validity of a Silo variable name.
+ *
+ * Author:   Sean Ahern, Tue Sep 28 10:47:52 PDT 1999
+ *
+ * Returns:  1 if the name is valid
+ *           0 otherwise
+ *
+ * Modified:
+ *    Sean Ahern, Fri Oct  1 11:36:34 PDT 1999
+ *    Added '/' to the list of allowed characters.  We need this for putting 
+ *    variables in subdirectories.
+ *
+ *    Sean Ahern, Tue Oct  5 13:51:07 PDT 1999
+ *    Added ':' processing so that we can reference variables in other files.
+ *
+ *    Lisa J. Roberts, Thu Dec 16 17:33:26 PST 1999
+ *    Removed the abort called if the name validation fails.
+ *
+ *    Robb Matzke, 2000-06-02
+ *    Omit printing error message if error handling mode is DB_NONE. After
+ *    all, some applications check return values and then print their own
+ *    error message.
+ *
+ *    Hank Childs, Thu Sep  7 14:17:13 PDT 2000
+ *    Allow variable names to be relative. [HYPer02087]
+ *
+ *    Mark C. Miller, Mon Oct 22 22:08:09 PDT 2007
+ *    Made it part of the public API.
+ *
+ *---------------------------------------------------------------------*/
+PUBLIC int
+DBVariableNameValid(const char *s)
+{
+    int             len;
+    int             i;
+    char           *p = NULL;
+
+    /* If there's a ':' in the name, allow anything before the ':'.  After the 
+     * ':' we have to be more strict. */
+
+    p = strchr(s,':');
+    if (p == NULL)
+        p = (char *)s;
+    else
+        p++;    /* Move one character past the ':'. */
+
+    len = strlen(p);
+
+    /* Every character has to be alphanumeric or the `_' character. */
+    for(i=0;i<len;i++)
+    {
+        int  okay = 0;
+
+        if (isalnum(p[i]) || (p[i] == '_') || (p[i] == '/'))
+        {
+            okay = 1;
+        }
+
+        /* Don't need to check for the end of the string because of the
+         * short circuit rule and the null character at end of string. */
+        if ((p[i] == '.') && (p[i+1] == '.') && (p[i+2] == '/'))
+        {
+            okay = 1;
+            i += 2;  /* 2 = strlen("../") - 1 (from `for' loop's i++) */
+        }
+
+        if (! okay)
+        {
+            if (DB_NONE!=SILO_Globals._db_err_level)
+            {
+                fprintf(stderr,"\"%s\" is an invalid name.  Silo variable\n"
+                        "names may contain only alphanumeric characters\n"
+                        "or the _ character.\n", s);
+            }
+            return 0;
+        }
+    }
+
+    return 1;
+}
+/* kept this to deal with non-const qualified API */
+INTERNAL int
+db_VariableNameValid(char *s)
+{
+    return DBVariableNameValid(s);
+}
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                              _DBQQCalcStride
+ *
+ *  Purpose
+ *
+ *      Calculate the strides given the dimensions and major-order.
+ *
+ *      Works for 1D, 2D and 3D variables/meshes, collinear or
+ *      non-collinear, materials, too.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL void
+_DBQQCalcStride(int stride[], int dims[], int ndims, int major_order)
+{
+    int            i;
+
+     /*------------------------------------------------------
+      * Define strides for accessing adjacent elements based
+      * on whether arrays are stored row-major or column-major.
+      *-----------------------------------------------------*/
+
+    if (major_order == DB_ROWMAJOR) {
+        stride[0] = 1;
+
+        for (i = 1; i < ndims; i++) {
+            stride[i] = stride[i - 1] * dims[i - 1];
+        }
+    }
+    else {
+        stride[ndims - 1] = 1;
+
+        for (i = ndims - 2; i >= 0; i--) {
+            stride[i] = stride[i + 1] * dims[i + 1];
+        }
+    }
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 _DBQMSetStride
+ *
+ *  Purpose
+ *
+ *      Set the stride component for the given quad mesh.
+ *
+ *      Works for 1D, 2D and 3D meshes, collinear or non-collinear.
+ *
+ * Modified
+ *    Robb Matzke, Wed Jan 11 06:35:33 PST 1995
+ *    Changed name from QM_SetStride because it conflicted with MeshTV.
+ *--------------------------------------------------------------------*/
+INTERNAL void
+_DBQMSetStride(DBquadmesh *qmesh)
+{
+    _DBQQCalcStride(qmesh->stride, qmesh->dims, qmesh->ndims,
+                    qmesh->major_order);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         SW_GetDatatypeString
+ *
+ *  Function
+ *
+ *      Return the string representation of the given SWAT data type.
+ *
+ *  Modified
+ *    Robb Matzke, Thu Nov 10 12:28:44 EST 1994
+ *    Added error mechanism
+ *
+ *    Robb Matzke, Thu Nov 10 12:30:43 EST 1994
+ *    An invalid `type' is now an error.
+ *
+ *    Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *    Adding support for long long type.
+ *
+ *    Mark C. Miller, Fri Nov 13 15:32:02 PST 2009
+ *    Changed name of "long long" type to "longlong" as PDB is
+ *    sensitive to spaces in type names.
+ *
+ *    Mark C. Miller, Tue Nov 17 22:29:35 PST 2009
+ *    Fixed memory error by extending length of alloc'd string to
+ *    support "long_long". Changed name of long long data type
+ *    to match what PDB proper does.
+ *
+ *    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *    Conditionally compile long long support only when its
+ *    different from long.
+ *
+ *    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *    Made long long support UNconditionally compiled.
+ *---------------------------------------------------------------------*/
+INTERNAL char *
+db_GetDatatypeString(int type)
+{
+    char          *str = NULL;
+    char          *me = "db_GetDatatypeString";
+
+    if (NULL == (str = ALLOC_N(char, 10))) {
+        db_perror(NULL, E_NOMEM, me);
+        return NULL;
+    }
+
+    switch (type) {
+        case DB_INT:
+            strcpy(str, "integer");
+            break;
+        case DB_SHORT:
+            strcpy(str, "short");
+            break;
+        case DB_LONG:
+            strcpy(str, "long");
+            break;
+        case DB_LONG_LONG:
+            strcpy(str, "long_long");
+            break;
+        case DB_FLOAT:
+            strcpy(str, "float");
+            break;
+        case DB_DOUBLE:
+            strcpy(str, "double");
+            break;
+        case DB_CHAR:
+            strcpy(str, "char");
+            break;
+        default:
+            db_perror("type", E_BADARGS, me);
+            FREE(str);
+            return NULL;
+    }
+
+    return (str);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    silo_db_close
+ *
+ * Purpose:     Free public parts of DBfile.  This function is called
+ *              after the file has been closed and the private parts
+ *              have been freed.
+ *
+ * Return:      Success:        NULL
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  matzke at viper
+ *              Wed Nov  2 13:55:22 PST 1994
+ *
+ * Modifications:
+ *   Mark C. Miller, Tue Feb  3 09:53:53 PST 2009
+ *   Changed name to silo_db_close to avoid collision with popular BRLCAD
+ *   libs. Added stuff to free GrabId and set Grab related stuff to zero.
+ *-------------------------------------------------------------------------*/
+INTERNAL DBfile *
+silo_db_close(DBfile *dbfile)
+{
+    if (dbfile) {
+        db_FreeToc(dbfile);
+        FREE(dbfile->pub.GrabId);
+        dbfile->pub.GrabId = 0;
+        dbfile->pub.Grab = FALSE;
+        FREE(dbfile->pub.name);
+        FREE(dbfile);
+    }
+
+    return NULL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_AllocToc
+ *
+ * Purpose:     Allocate an empty table of contents for a new file.
+ *
+ * Return:      Success:        ptr to new DBtoc
+ *
+ *              Failure:        NULL, db_errno set.
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Feb  9 14:43:50 PST 1995
+ *    I modified the routine to handle the obj in the table of contents.
+ *
+ *    Sean Ahern, Fri Aug 23 16:59:02 PDT 1996
+ *    Added multimats.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added multi-block material species.
+ *-------------------------------------------------------------------------*/
+INTERNAL DBtoc *
+db_AllocToc(void)
+{
+    DBtoc         *toc = NULL;
+    char          *me = "db_AllocToc";
+
+    if (NULL == (toc = ALLOC(DBtoc))) {
+        db_perror(NULL, E_NOMEM, me);
+        return NULL;
+    }
+
+    toc->curve_names = NULL;
+    toc->ncurve = 0;
+
+    toc->csgmesh_names = NULL;
+    toc->ncsgmesh = 0;
+
+    toc->csgvar_names = NULL;
+    toc->ncsgvar = 0;
+
+    toc->defvars_names = NULL;
+    toc->ndefvars = 0;
+
+    toc->multimesh_names = NULL;
+    toc->nmultimesh = 0;
+
+    toc->multimeshadj_names = NULL;
+    toc->nmultimeshadj = 0;
+
+    toc->multivar_names = NULL;
+    toc->nmultivar = 0;
+
+    toc->multimat_names = NULL;
+    toc->nmultimat = 0;
+
+    toc->multimatspecies_names = NULL;
+    toc->nmultimatspecies = 0;
+
+    toc->qmesh_names = NULL;
+    toc->nqmesh = 0;
+
+    toc->qvar_names = NULL;
+    toc->nqvar = 0;
+
+    toc->ucdmesh_names = NULL;
+    toc->nucdmesh = 0;
+
+    toc->ucdvar_names = NULL;
+    toc->nucdvar = 0;
+
+    toc->ptmesh_names = NULL;
+    toc->nptmesh = 0;
+
+    toc->ptvar_names = NULL;
+    toc->nptvar = 0;
+
+    toc->var_names = NULL;
+    toc->nvar = 0;
+
+    toc->mat_names = NULL;
+    toc->nmat = 0;
+
+    toc->obj_names = NULL;
+    toc->nobj = 0;
+
+    toc->dir_names = NULL;
+    toc->ndir = 0;
+
+    toc->array_names = NULL;
+    toc->narrays = 0;
+
+    toc->mrgtree_names = NULL;
+    toc->nmrgtrees = 0;
+
+    toc->groupelmap_names = NULL;
+    toc->ngroupelmaps = 0;
+
+    toc->mrgvar_names = NULL;
+    toc->nmrgvars = 0;
+
+    return(toc);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_FreeToc
+ *
+ * Purpose:     Free the table of contents associated with a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Modifications:
+ *    Robb Matzke, Thu Dec 1 10:22:11 PST 1994
+ *    Errors in device drivers might leave the table of
+ *    contents in a not-fully-initialized state.  Therefore,
+ *    this routine always checks for nil pointers before
+ *    dereferencing them.
+ *
+ *    Robb Matzke, Fri Dec 2 13:13:01 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Eric Brugger, Thu Feb  9 14:43:50 PST 1995
+ *    I modified the routine to handle the obj in the table of contents.
+ *
+ *    Sean Ahern, Fri Jun 21 10:56:15 PDT 1996
+ *    Added handling for multimats.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added multi-block species.
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+db_FreeToc(DBfile *dbfile)
+{
+    int            i;
+    DBtoc         *toc = NULL;
+    char          *me = "db_FreeToc";
+
+    if (!dbfile)
+        return db_perror(NULL, E_NOFILE, me);
+    if (!dbfile->pub.toc)
+        return 0;
+
+    toc = dbfile->pub.toc;
+
+    if (toc->ncurve > 0) {
+        if (toc->curve_names) {
+            for (i = 0; i < toc->ncurve; i++) {
+                FREE(toc->curve_names[i]);
+            }
+            FREE(toc->curve_names);
+        }
+    }
+
+    if (toc->nmultimesh > 0) {
+        if (toc->multimesh_names) {
+            for (i = 0; i < toc->nmultimesh; i++) {
+                FREE(toc->multimesh_names[i]);
+            }
+            FREE(toc->multimesh_names);
+        }
+    }
+
+    if (toc->nmultimeshadj > 0) {
+        if (toc->multimeshadj_names) {
+            for (i = 0; i < toc->nmultimeshadj; i++) {
+                FREE(toc->multimeshadj_names[i]);
+            }
+            FREE(toc->multimeshadj_names);
+        }
+    }
+
+    if (toc->nmultivar > 0) {
+        if (toc->multivar_names) {
+            for (i = 0; i < toc->nmultivar; i++) {
+                FREE(toc->multivar_names[i]);
+            }
+            FREE(toc->multivar_names);
+        }
+    }
+
+    if (toc->nmultimat > 0) {
+        if (toc->multimat_names) {
+            for(i=0; i < toc->nmultimat; i++) {
+                FREE(toc->multimat_names[i]);
+            }
+            FREE(toc->multimat_names);
+        }
+    }
+
+    if (toc->nmultimatspecies > 0) {
+        if (toc->multimatspecies_names) {
+            for(i=0; i < toc->nmultimatspecies; i++) {
+                FREE(toc->multimatspecies_names[i]);
+            }
+            FREE(toc->multimatspecies_names);
+        }
+    }
+
+    if (toc->ncsgmesh > 0) {
+        if (toc->csgmesh_names) {
+            for (i = 0; i < toc->ncsgmesh; i++) {
+                FREE(toc->csgmesh_names[i]);
+            }
+            FREE(toc->csgmesh_names);
+        }
+    }
+    if (toc->ncsgvar > 0) {
+        if (toc->csgvar_names) {
+            for (i = 0; i < toc->ncsgvar; i++) {
+                FREE(toc->csgvar_names[i]);
+            }
+            FREE(toc->csgvar_names);
+        }
+    }
+
+    if (toc->ndefvars > 0) {
+        if (toc->defvars_names) {
+            for (i = 0; i < toc->ndefvars; i++) {
+                FREE(toc->defvars_names[i]);
+            }
+            FREE(toc->defvars_names);
+        }
+    }
+
+    if (toc->nqmesh > 0) {
+        if (toc->qmesh_names) {
+            for (i = 0; i < toc->nqmesh; i++) {
+                FREE(toc->qmesh_names[i]);
+            }
+            FREE(toc->qmesh_names);
+        }
+    }
+
+    if (toc->nqvar > 0) {
+        if (toc->qvar_names) {
+            for (i = 0; i < toc->nqvar; i++) {
+                FREE(toc->qvar_names[i]);
+            }
+            FREE(toc->qvar_names);
+        }
+    }
+
+    if (toc->nptmesh > 0) {
+        if (toc->ptmesh_names) {
+            for (i = 0; i < toc->nptmesh; i++) {
+                FREE(toc->ptmesh_names[i]);
+            }
+            FREE(toc->ptmesh_names);
+        }
+    }
+
+    if (toc->nptvar > 0) {
+        if (toc->ptvar_names) {
+            for (i = 0; i < toc->nptvar; i++) {
+                FREE(toc->ptvar_names[i]);
+            }
+            FREE(toc->ptvar_names);
+        }
+    }
+
+    if (toc->nmat > 0) {
+        if (toc->mat_names) {
+            for (i = 0; i < toc->nmat; i++) {
+                FREE(toc->mat_names[i]);
+            }
+            FREE(toc->mat_names);
+        }
+    }
+
+    if (toc->nucdmesh > 0) {
+        if (toc->ucdmesh_names) {
+            for (i = 0; i < toc->nucdmesh; i++) {
+                FREE(toc->ucdmesh_names[i]);
+            }
+            FREE(toc->ucdmesh_names);
+        }
+    }
+
+    if (toc->nucdvar > 0) {
+        if (toc->ucdvar_names) {
+            for (i = 0; i < toc->nucdvar; i++) {
+                FREE(toc->ucdvar_names[i]);
+            }
+            FREE(toc->ucdvar_names);
+        }
+    }
+
+    if (toc->nvar > 0) {
+        if (toc->var_names) {
+            for (i = 0; i < toc->nvar; i++) {
+                FREE(toc->var_names[i]);
+            }
+            FREE(toc->var_names);
+        }
+    }
+
+    if (toc->nobj > 0) {
+        if (toc->obj_names) {
+            for (i = 0; i < toc->nobj; i++) {
+                FREE(toc->obj_names[i]);
+            }
+            FREE(toc->obj_names);
+        }
+    }
+
+    if (toc->ndir > 0) {
+        if (toc->dir_names) {
+            for (i = 0; i < toc->ndir; i++) {
+                FREE(toc->dir_names[i]);
+            }
+            FREE(toc->dir_names);
+        }
+    }
+
+    if (toc->narrays > 0) {
+        if (toc->array_names) {
+            for (i = 0; i < toc->narrays; i++) {
+                FREE(toc->array_names[i]);
+            }
+            FREE(toc->array_names);
+        }
+    }
+
+    if (toc->nmrgtrees > 0) {
+        if (toc->mrgtree_names) {
+            for (i = 0; i < toc->nmrgtrees; i++) {
+                FREE(toc->mrgtree_names[i]);
+            }
+            FREE(toc->mrgtree_names);
+        }
+    }
+
+    if (toc->ngroupelmaps > 0) {
+        if (toc->groupelmap_names) {
+            for (i = 0; i < toc->ngroupelmaps; i++) {
+                FREE(toc->groupelmap_names[i]);
+            }
+            FREE(toc->groupelmap_names);
+        }
+    }
+
+    if (toc->nmrgvars > 0) {
+        if (toc->mrgvar_names) {
+            for (i = 0; i < toc->nmrgvars; i++) {
+                FREE(toc->mrgvar_names[i]);
+            }
+            FREE(toc->mrgvar_names);
+        }
+    }
+
+    FREE(dbfile->pub.toc);
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                          silo_GetMachDataSize
+ *
+ *  Purpose
+ *
+ *      Return the byte length of the given data type ON THE CURRENT
+ *      MACHINE.
+ *
+ *  Notes
+ *
+ *  Modified
+ *    Robb Matzke, Thu Nov 10 12:33:44 EST 1994
+ *    Added error mechanism.  An invalid `datatype' is an error.
+ *
+ *    Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *    Adding support for long long type.
+ *
+ *    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *    Conditionally compile long long support only when its
+ *    different from long.
+ *
+ *    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *    Made long long support UNconditionally compiled.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_GetMachDataSize(int datatype)
+{
+    int            size;
+    char          *me = "db_GetMachDataSize";
+
+    switch (datatype) {
+        case DB_CHAR:
+            size = sizeof(char);
+
+            break;
+        case DB_SHORT:
+            size = sizeof(short);
+
+            break;
+        case DB_INT:
+            size = sizeof(int);
+
+            break;
+        case DB_LONG:
+            size = sizeof(long);
+
+        case DB_LONG_LONG:
+            size = sizeof(long long);
+
+            break;
+        case DB_FLOAT:
+            size = sizeof(float);
+
+            break;
+        case DB_DOUBLE:
+            size = sizeof(double);
+
+            break;
+        default:
+#if 1
+            return db_perror("datatype", E_BADARGS, me);
+#else
+            size = 0;
+            break;
+#endif
+    }
+    return (size);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_GetDatatypeID
+ *
+ *  Purpose
+ *
+ *      Return the SILO integer definition for the provided ascii datatype
+ *      description. That is, convert "float" to SWAT_FLOAT (i.e., 19).
+ *
+ *  Notes
+ *
+ *  Modified
+ *    Robb Matzke, Thu Nov 10 12:35:24 EST 1994
+ *    Added error mechanism.  An invalid `dataname' is an error.
+ *
+ *    Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *    Adding support for long long type.
+ *
+ *    Mark C. Miller, Fri Nov 13 15:32:02 PST 2009
+ *    Changed name of "long long" type to "longlong" as PDB is
+ *    sensitive to spaces in type names.
+ *
+ *    Mark C. Miller, Tue Nov 17 22:30:30 PST 2009
+ *    Changed name of long long datatype to match PDB proper.
+ *
+ *    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *    Conditionally compile long long support only when its
+ *    different from long.
+ *
+ *    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *    Made long long support UNconditionally compiled.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_GetDatatypeID(char *dataname)
+{
+    int            size;
+    char          *me = "db_GetDatatypeID";
+
+    if (STR_BEGINSWITH(dataname, "integer"))
+        size = DB_INT;
+    else if (STR_BEGINSWITH(dataname, "short"))
+        size = DB_SHORT;
+    else if (STR_BEGINSWITH(dataname, "long_long"))
+        size = DB_LONG_LONG;
+    else if (STR_BEGINSWITH(dataname, "long"))
+        size = DB_LONG;
+    else if (STR_BEGINSWITH(dataname, "float"))
+        size = DB_FLOAT;
+    else if (STR_BEGINSWITH(dataname, "double"))
+        size = DB_DOUBLE;
+    else if (STR_BEGINSWITH(dataname, "char"))
+        size = DB_CHAR;
+    else
+        return db_perror("dataname", E_BADARGS, me);
+
+    return (size);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                              DBGetObjtypeTag
+ *
+ *  Purpose
+ *
+ *      Return the tag (integer ID) for the given object type.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Parameters
+ *
+ *      typename         {In}    {Name of object type to inquire about}
+ *
+ *  Notes
+ *
+ *      This function and it's counterpart, DBGetObjtypeName(), must
+ *      stay in sync. Changes to this function must be mirrored in
+ *      the other.
+ *
+ *  Modifications
+ *    Al Leibee,Mon Aug  1 16:16:00 PDT 1994
+ *    Added material species.
+ *
+ *    Robb Matzke, Tue Oct 25 08:57:56 PDT 1994
+ *    Added compound array.
+ *
+ *    Robb Matzke, Wed Nov 9 14:04:23 EST 1994
+ *    Added error mechanism.
+ *
+ *    Robb Matzke, Fri Dec 2 09:58:51 PST 1994
+ *    Added `zonelist' and `facelist' and `edgelist'
+ *
+ *    Eric Brugger, Tue Feb  7 11:05:39 PST 1995
+ *    I modified the routine to return DB_USERDEF if the typename
+ *    is not known.
+ *
+ *    Katherine Price, Thu May 25 10:00:50 PDT 1995
+ *    Added multi-block material.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added multi-block material species.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+DBGetObjtypeTag(char *typename)
+{
+    int            tag;
+    char          *me = "DBGetObjtypeTag";
+
+    if (!typename || !*typename)
+        return db_perror("type name", E_BADARGS, me);
+
+    if (STR_EQUAL(typename, "multiblockmesh") ||
+        STR_EQUAL(typename, "multimesh"))
+        tag = DB_MULTIMESH;
+
+    else if (STR_EQUAL(typename, "multimeshadj"))
+        tag = DB_MULTIMESHADJ;
+
+    else if (STR_EQUAL(typename, "multiblockvar") ||
+             STR_EQUAL(typename, "multivar"))
+        tag = DB_MULTIVAR;
+
+    else if (STR_EQUAL(typename, "multiblockmat") ||
+             STR_EQUAL(typename, "multimat"))
+        tag = DB_MULTIMAT;
+
+    else if (STR_EQUAL(typename, "multimatspecies"))
+        tag = DB_MULTIMATSPECIES;
+
+    else if (STR_EQUAL(typename, "quadmesh-rect"))
+        tag = DB_QUAD_RECT;
+
+    else if (STR_EQUAL(typename, "quadmesh-curv"))
+        tag = DB_QUAD_CURV;
+
+    else if (STR_EQUAL(typename, "csgmesh"))
+        tag = DB_CSGMESH;
+
+    else if (STR_EQUAL(typename, "csgvar"))
+        tag = DB_CSGVAR;
+
+    else if (STR_EQUAL(typename, "defvars"))
+        tag = DB_DEFVARS;
+
+    else if (STR_EQUAL(typename, "quadmesh"))
+        tag = DB_QUADMESH;
+
+    else if (STR_EQUAL(typename, "quadvar"))
+        tag = DB_QUADVAR;
+
+    else if (STR_EQUAL(typename, "ucdmesh"))
+        tag = DB_UCDMESH;
+
+    else if (STR_EQUAL(typename, "ucdvar"))
+        tag = DB_UCDVAR;
+
+    else if (STR_EQUAL(typename, "pointmesh"))
+        tag = DB_POINTMESH;
+
+    else if (STR_EQUAL(typename, "pointvar"))
+        tag = DB_POINTVAR;
+
+    else if (STR_EQUAL(typename, "curve"))
+        tag = DB_CURVE;
+
+    else if (STR_EQUAL(typename, "material"))
+        tag = DB_MATERIAL;
+
+    else if (STR_EQUAL(typename, "matspecies"))
+        tag = DB_MATSPECIES;
+
+    else if (STR_EQUAL(typename, "compoundarray"))
+        tag = DB_ARRAY;
+
+    else if (STR_EQUAL(typename, "facelist"))
+        tag = DB_FACELIST;
+
+    else if (STR_EQUAL(typename, "zonelist"))
+        tag = DB_ZONELIST;
+
+    else if (STR_EQUAL(typename, "polyhedral-zonelist"))
+        tag = DB_PHZONELIST;
+
+    else if (STR_EQUAL(typename, "csgzonelist"))
+        tag = DB_CSGZONELIST;
+
+    else if (STR_EQUAL(typename, "edgelist"))
+        tag = DB_EDGELIST;
+
+    else if (STR_EQUAL(typename, "mrgtree"))
+        tag = DB_MRGTREE;
+
+    else if (STR_EQUAL(typename, "groupelmap"))
+        tag = DB_GROUPELMAP;
+
+    else if (STR_EQUAL(typename, "mrgvar"))
+        tag = DB_MRGVAR;
+
+    else
+        tag = DB_USERDEF;
+
+    return (tag);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                             DBGetObjtypeName
+ *
+ *  Purpose
+ *
+ *      Return the name associated with an object of the given type.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Parameters
+ *
+ *      type         {In}    {Type of object to inquire about}
+ *
+ *  Notes
+ *
+ *      The calling routine should NOT attempt to free the memory
+ *      associated with the returned string.
+ *
+ *  Modifications
+ *    Al Leibee, Tue Jul 26 08:44:01 PDT 1994
+ *    Replaced composition by matspecies.
+ *
+ *    Robb Matzke, Fri Oct 21 15:23:18 EST 1994
+ *    Added DB_ARRAY for Compound Array type.
+ *
+ *    Eric Brugger, Tue Feb  7 11:05:39 PST 1995
+ *    I modified the routine to return "unknown" if the type is
+ *    DB_USERDEF.
+ *
+ *    Katherine Price, Thu May 25 10:00:50 PDT 1995
+ *    Added DB_MULTIMAT for Multi-Block Material type.
+ *     
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added DB_MULTIMATSPECIES for Multi-block Species.
+ *--------------------------------------------------------------------*/
+INTERNAL char *
+DBGetObjtypeName(int type)
+{
+    char          *me = "DBGetObjtypeName";
+
+    switch (type) {
+        case DB_CSGMESH:
+            return ("csgmesh");
+        case DB_CSGVAR:
+            return ("csgvar");
+        case DB_CSGZONELIST:
+            return ("csgzonelist");
+        case DB_DEFVARS:
+            return ("defvars");
+        case DB_QUADMESH:
+            return ("quadmesh");
+        case DB_QUAD_RECT:
+            return ("quadmesh-rect");
+        case DB_QUAD_CURV:
+            return ("quadmesh-curv");
+        case DB_QUADVAR:
+            return ("quadvar");
+        case DB_UCDMESH:
+            return ("ucdmesh");
+        case DB_UCDVAR:
+            return ("ucdvar");
+        case DB_POINTMESH:
+            return ("pointmesh");
+        case DB_POINTVAR:
+            return ("pointvar");
+        case DB_MULTIMESH:
+            return ("multiblockmesh");
+        case DB_MULTIMESHADJ:
+            return ("multimeshadj");
+        case DB_MULTIVAR:
+            return ("multiblockvar");
+        case DB_MULTIMAT:
+            return ("multiblockmat");
+        case DB_MULTIMATSPECIES:
+            return ("multimatspecies");
+        case DB_MATERIAL:
+            return ("material");
+        case DB_MATSPECIES:
+            return ("matspecies");
+        case DB_FACELIST:
+            return ("facelist");
+        case DB_ZONELIST:
+            return ("zonelist");
+        case DB_PHZONELIST:
+            return ("polyhedral-zonelist");
+        case DB_EDGELIST:
+            return ("edgelist");
+        case DB_CURVE:
+            return ("curve");
+        case DB_ARRAY:
+            return ("compoundarray");
+        case DB_MRGTREE:
+            return ("mrgtree");
+        case DB_GROUPELMAP:
+            return ("groupelmap");
+        case DB_MRGVAR:
+            return ("mrgvar");
+        case DB_USERDEF:
+            return ("unknown");
+    }
+
+    db_perror("type-number", E_BADARGS, me);
+    return ("unknown");
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_ListDir2
+ *
+ * Purpose:     Lists the contents of the given directories based on the
+ *              listing options set in the `args' array.  Directory path
+ *              arguments can be either absolute or relative.  The standard
+ *              Unix directory syntax is understood: `..' is shorthand for
+ *              the parent of te current directory and `.' is shorthand
+ *              for the current directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Arguments:
+ *      args          Argument array
+ *      nargs         Number of arguments
+ *      build_list    Sentinel: 1:build list instead of printing
+ *      list          List of varnames matching request
+ *      nlist         Returned length of list
+ *
+ * Programmer:  robb at cloud
+ *              Tue Nov 15 15:07:26 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Feb  9 14:43:50 PST 1995
+ *    I modified the routine to handle the obj in the table of contents.
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added multimatspecies to the toc
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+db_ListDir2(DBfile *_dbfile, char *args[], int nargs, int build_list,
+            char *list[], int *nlist)
+{
+    int            i, k, npaths, nopts;
+    int            ls_mesh, ls_var, ls_dir;
+    int            ls_multimesh, ls_multivar, ls_multimat, ls_curve, ls_mat;
+    int            ls_matspecies, ls_multimatspecies, ls_low, ls_array;
+    char           opts[256], cwd[256], orig_dir[256], *paths[64];
+    DBtoc         *toc = NULL;
+    int            left_margin, col_margin, line_width;
+    char          *me = "db_pdb_ListDir2";
+
+     /*----------------------------------------
+      *  Parse input options and pathnames.
+      *----------------------------------------*/
+
+    npaths = 0;
+    nopts = 0;
+
+    for (i = 0; i < nargs; i++) {
+
+        switch (args[i][0]) {
+            case '-':
+
+                strcpy(&opts[nopts], &args[i][1]);
+                nopts += strlen(args[i]) - 1;
+                break;
+
+            default:
+
+                paths[npaths++] = args[i];
+                break;
+        }
+    }
+
+     /*----------------------------------------
+      *  Set listing options based on input.
+      *----------------------------------------*/
+    if (nopts > 0) {
+        ls_mesh = ls_var = ls_dir = FALSE;
+        ls_curve = ls_mat = ls_matspecies = ls_low = ls_array = FALSE;
+        ls_multimat = ls_multimatspecies = FALSE;
+    }
+    else {
+        /* Default values */
+        ls_mesh = ls_var = ls_dir = ls_multimesh = ls_multivar = TRUE;
+        ls_curve = ls_mat = ls_matspecies = ls_low = ls_array = FALSE;
+        ls_multimat = ls_multimatspecies = FALSE;
+    }
+
+    for (i = 0; i < nopts; i++) {
+
+        switch (opts[i]) {
+            case 'a':
+                ls_curve = TRUE;
+                ls_dir = TRUE;
+                ls_low = TRUE;
+                ls_mat = TRUE;
+                ls_matspecies = TRUE;
+                ls_mesh = TRUE;
+                ls_var = TRUE;
+                ls_multimesh = TRUE;
+                ls_multivar = TRUE;
+                ls_multimat = TRUE;
+                ls_multimatspecies = TRUE;
+                ls_array = TRUE;
+                break;
+            case 'A':
+                ls_array = TRUE;
+                break;
+            case 'c':
+                ls_curve = TRUE;
+                break;
+            case 'd':
+                ls_dir = TRUE;
+                break;
+            case 'm':
+                ls_mesh = TRUE;
+                break;
+            case 'M':
+                ls_multimesh = TRUE;
+                ls_multivar = TRUE;
+                ls_multimat  = TRUE;
+                ls_multimatspecies = TRUE;
+                break;
+            case 'r':
+                ls_mat = TRUE;
+                break;
+            case 's':
+                ls_matspecies = TRUE;
+                break;
+            case 'v':
+                ls_var = TRUE;
+                break;
+            case 'x':
+                ls_low = TRUE;
+                break;
+            default:
+                return db_perror("invalid list option", E_BADARGS, me);
+        }
+    }
+
+     /*----------------------------------------
+      *  List all requested objects/dirs
+      *----------------------------------------*/
+
+    DBGetDir(_dbfile, orig_dir);
+
+    if (npaths <= 0) {
+        npaths = 1;
+        paths[0] = ".";
+    }
+
+    left_margin = 10;
+    col_margin = 5;
+    line_width = 80;
+
+    if (nlist)
+        *nlist = 0;
+
+    for (k = 0; k < npaths; k++) {
+
+        DBGetDir(_dbfile, cwd);
+
+        /* Change to requested directory, if necessary */
+        if (!STR_EQUAL(".", paths[k]) &&
+            !STR_EQUAL(cwd, paths[k]))
+            DBSetDir(_dbfile, paths[k]);
+
+        toc = DBGetToc(_dbfile);
+
+        if (ls_curve && toc->ncurve > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->ncurve; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                               strlen         (toc->curve_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->curve_names[i]);
+                }
+            }
+            else {
+                printf("%7d curves:\n", toc->ncurve);
+                _DBstrprint(stdout, toc->curve_names, toc->ncurve,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_low && toc->nvar > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nvar; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                                 strlen         (toc->var_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->var_names[i]);
+                }
+            }
+            else {
+                printf("%7d miscellaneous vars:\n", toc->nvar);
+                _DBstrprint(stdout, toc->var_names, toc->nvar,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_mat && toc->nmat > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmat; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                                 strlen         (toc->mat_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->mat_names[i]);
+                }
+            }
+            else {
+                printf("%7d material vars:\n", toc->nmat);
+                _DBstrprint(stdout, toc->mat_names, toc->nmat,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_matspecies && toc->nmatspecies > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmatspecies; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                          strlen         (toc->matspecies_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->matspecies_names[i]);
+                }
+            }
+            else {
+                printf("%7d material species vars:\n", toc->nmatspecies);
+                _DBstrprint(stdout, toc->matspecies_names,
+                            toc->nmatspecies,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_array && toc->narrays > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->narrays; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                               strlen         (toc->array_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->array_names[i]);
+                }
+            }
+            else {
+                printf("%7d compound arrays:\n", toc->narrays);
+                _DBstrprint(stdout, toc->array_names, toc->narrays,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_dir && toc->ndir > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->ndir; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                                 strlen         (toc->dir_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->dir_names[i]);
+                }
+            }
+            else {
+                printf("%7d directories:\n", toc->ndir);
+                _DBstrprint(stdout, toc->dir_names, toc->ndir,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_multimesh && toc->nmultimesh > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmultimesh; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                           strlen         (toc->multimesh_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->multimesh_names[i]);
+                }
+            }
+            else {
+                printf("%7d multi-block meshes:\n", toc->nmultimesh);
+                _DBstrprint(stdout, toc->multimesh_names, toc->nmultimesh,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_mesh && toc->nqmesh > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nqmesh; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                               strlen         (toc->qmesh_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->qmesh_names[i]);
+                }
+            }
+            else {
+                printf("%7d quad meshes:\n", toc->nqmesh);
+                _DBstrprint(stdout, toc->qmesh_names, toc->nqmesh,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+        if (ls_mesh && toc->nucdmesh > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nucdmesh; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                             strlen         (toc->ucdmesh_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->ucdmesh_names[i]);
+                }
+            }
+            else {
+                printf("%7d UCD meshes:\n", toc->nucdmesh);
+                _DBstrprint(stdout, toc->ucdmesh_names, toc->nucdmesh,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+        if (ls_mesh && toc->nptmesh > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nptmesh; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                              strlen         (toc->ptmesh_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->ptmesh_names[i]);
+                }
+            }
+            else {
+                printf("%7d Point meshes:\n", toc->nptmesh);
+                _DBstrprint(stdout, toc->ptmesh_names, toc->nptmesh,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_multivar && toc->nmultivar > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmultivar; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                            strlen         (toc->multivar_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->multivar_names[i]);
+                }
+            }
+            else {
+                printf("%7d multi-block vars:\n", toc->nmultivar);
+                _DBstrprint(stdout, toc->multivar_names, toc->nmultivar,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_multimat  && toc->nmultimat > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmultimat; i++) {
+                    list[*nlist] = ALLOC_N (char,
+                       strlen (toc->multimat_names[i]) + 1);
+                    strcpy (list[(*nlist)++], toc->multimat_names[i]);
+                }
+            }
+            else {
+                printf("%7d multi-block materials:\n", toc->nmultimat);
+                _DBstrprint (stdout, toc->multimat_names, toc->nmultimat,
+                             'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_multimatspecies  && toc->nmultimatspecies > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nmultimatspecies; i++) {
+                    list[*nlist] = ALLOC_N (char,
+                       strlen (toc->multimatspecies_names[i]) + 1);
+                    strcpy (list[(*nlist)++], toc->multimatspecies_names[i]);
+                }
+            }
+            else {
+                printf("%7d multi-block material species:\n", toc->nmultimatspecies);
+                _DBstrprint (stdout, toc->multimatspecies_names, 
+                             toc->nmultimatspecies,
+                             'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        if (ls_var && toc->nqvar > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nqvar; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                                strlen         (toc->qvar_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->qvar_names[i]);
+                }
+            }
+            else {
+                printf("%7d quad vars:\n", toc->nqvar);
+                _DBstrprint(stdout, toc->qvar_names, toc->nqvar,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+        if (ls_var && toc->nucdvar > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nucdvar; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                              strlen         (toc->ucdvar_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->ucdvar_names[i]);
+                }
+            }
+            else {
+                printf("%7d UCD vars:\n", toc->nucdvar);
+                _DBstrprint(stdout, toc->ucdvar_names, toc->nucdvar,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+        if (ls_var && toc->nptvar > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nptvar; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                               strlen         (toc->ptvar_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->ptvar_names[i]);
+                }
+            }
+            else {
+                printf("%7d Point vars:\n", toc->nptvar);
+                _DBstrprint(stdout, toc->ptvar_names, toc->nptvar,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+        if (ls_var && toc->nobj > 0) {
+            if (build_list) {
+                for (i = 0; i < toc->nobj; i++) {
+                    list[*nlist] = ALLOC_N(char,
+                                 strlen         (toc->obj_names[i]) + 1);
+
+                    strcpy(list[(*nlist)++], toc->obj_names[i]);
+                }
+            }
+            else {
+                printf("%7d miscellaneous objects:\n", toc->nobj);
+                _DBstrprint(stdout, toc->obj_names, toc->nobj,
+                            'c', left_margin, col_margin, line_width);
+                printf("\n");
+            }
+        }
+
+        /*
+         * Return to original directory, since next path may
+         * be relative to it.
+         */
+        DBSetDir(_dbfile, orig_dir);
+
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    context_switch
+ *
+ * Purpose:     Many of the DB...() functions take an object name as a
+ *              parameter.  The old protocol didn't specify whether the
+ *              name could include a path, so some drivers allow one and
+ *              other don't.  To fix the problem, each of the API functions
+ *              that allow a name will call this routine to change to
+ *              the specified directory and will call context_restore()
+ *              to change back.
+ *
+ * Bugs:        This function doesn't protect calls to the other API
+ *              directory setting/retrieving functions and thus might
+ *              leak memory if one of those calls fail with a non-local
+ *              return.
+ *
+ * Return:      Success:        ptr to the previous context.  This ptr
+ *                              should be passed to context_restore().
+ *
+ *              Failure:        NULL, db_perror called.
+ *
+ * Arguments:
+ *      base         output parameter
+ *
+ * Programmer:  matzke at viper
+ *              Sun Jan 29 11:42:47 PST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+INTERNAL context_t *
+context_switch(DBfile *dbfile, char *name, char **base)
+{
+    char          *me = "context_switch";
+    char           s[256], *b;
+    context_t     *old = ALLOC(context_t);
+
+    /*
+     * Save the old information.  If the name doesn't contain a `/' then
+     * we don't have to do anything.  We will mark this case by storing
+     * NULL as the context name.
+     */
+    *base = name;
+    if (!strchr(name, '/')) {
+        old->dirid = 0;
+        old->name = NULL;
+        return old;
+    }
+    if (DBGetDir(dbfile, s) < 0) {
+        FREE(old);
+        return NULL;
+    }
+    old->dirid = dbfile->pub.dirid;
+    old->name = STRDUP(s);
+
+    /*
+     * Split the name into a path and a base name.  The base name
+     * is the stuff after the last `/'.  If the base name is empty
+     * then we should raise an E_NOTFOUND right away.
+     */
+    b = strrchr(name, '/');
+    if (!b || !b[1]) {
+        FREE(old->name);
+        FREE(old);
+        db_perror(name, E_NOTFOUND, me);
+        return NULL;
+    }
+    *base = b + 1;
+    if (b == name) {
+        /*
+         * This is the root directory.
+         */
+        if (DBSetDir(dbfile, "/") < 0) {
+            FREE(old->name);
+            FREE(old);
+            return NULL;
+        }
+    }
+    else {
+        /*
+         * The path is everything before (not including) the last
+         * `/'.  We would like to just change that slash to a null
+         * terminator temporarily, but the name might be a static
+         * string in a read-only data section, so we have to do it
+         * the long way.  We assume (like the rest of SILO and most
+         * drivers) that the name will not be longer than 255
+         * characters.
+         */
+        strncpy(s, name, b - name);
+        s[b - name] = '\0';
+        if (DBSetDir(dbfile, s) < 0) {
+            FREE(old->name);
+            FREE(old);
+            return NULL;
+        }
+    }
+
+    return old;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    context_restore
+ *
+ * Purpose:     Restore a previously saved context.  If the driver can
+ *              change directories based on a directory ID, we do that.
+ *              Otherwise, we change directories based on the old directory
+ *              name.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, db_perror called.
+ *
+ * Programmer:  matzke at viper
+ *              Sun Jan 29 12:01:21 PST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+context_restore(DBfile *dbfile, context_t *old)
+{
+    if (!dbfile || !old)
+        return 0;
+    if (!old->name) {
+        FREE(old);
+        return 0;
+    }
+
+    if (dbfile->pub.cdid) {
+        DBSetDirID(dbfile, old->dirid);
+    }
+    else {
+        DBSetDir(dbfile, old->name);
+    }
+
+    FREE(old->name);
+    FREE(old);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_get_fileid
+ *
+ * Purpose:     Obtain a file ID number which is unique with respect to
+ *              all other open files.
+ *
+ * Return:      Success:        ID number, [0..DB_NFILES-1]
+ *
+ *              Failure:        -1, too many files are open.
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 28 11:00:04 EST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+PRIVATE int
+db_get_fileid ( int flags )
+{
+    static int     vhand = 0;
+    int            i;
+
+    for (i = 0; i < DB_NFILES; i++) {
+        if (!_db_fstatus[(vhand + i) % DB_NFILES]) {
+            i = (vhand + i) % DB_NFILES;
+            _db_fstatus[i] = flags | DB_ISOPEN;
+            vhand = (i + 1) % DB_NFILES;
+            return i;
+        }
+    }
+    return -1;
+}
+
+/*-------------------------------------------------------------------------
+  Function: bjhash 
+
+  Purpose: Hash a variable length stream of bytes into a 32-bit value.
+
+  Programmer: By Bob Jenkins, 1996.  bob_jenkins at burtleburtle.net.
+
+  You may use this code any way you wish, private, educational, or
+  commercial.  It's free. However, do NOT use for cryptographic purposes.
+
+  See http://burtleburtle.net/bob/hash/evahash.html
+ *-------------------------------------------------------------------------*/
+
+#define bjhash_mix(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); \
+}
+
+static unsigned int bjhash(register const unsigned char *k, register unsigned int length, register unsigned int initval)
+{
+   register unsigned int a,b,c,len;
+
+   len = length;
+   a = b = 0x9e3779b9;
+   c = initval;
+
+   while (len >= 12)
+   {
+      a += (k[0] +((unsigned int)k[1]<<8) +((unsigned int)k[2]<<16) +((unsigned int)k[3]<<24));
+      b += (k[4] +((unsigned int)k[5]<<8) +((unsigned int)k[6]<<16) +((unsigned int)k[7]<<24));
+      c += (k[8] +((unsigned int)k[9]<<8) +((unsigned int)k[10]<<16)+((unsigned int)k[11]<<24));
+      bjhash_mix(a,b,c);
+      k += 12; len -= 12;
+   }
+
+   c += length;
+
+   switch(len)
+   {
+      case 11: c+=((unsigned int)k[10]<<24);
+      case 10: c+=((unsigned int)k[9]<<16);
+      case 9 : c+=((unsigned int)k[8]<<8);
+      case 8 : b+=((unsigned int)k[7]<<24);
+      case 7 : b+=((unsigned int)k[6]<<16);
+      case 6 : b+=((unsigned int)k[5]<<8);
+      case 5 : b+=k[4];
+      case 4 : a+=((unsigned int)k[3]<<24);
+      case 3 : a+=((unsigned int)k[2]<<16);
+      case 2 : a+=((unsigned int)k[1]<<8);
+      case 1 : a+=k[0];
+   }
+
+   bjhash_mix(a,b,c);
+
+   return c;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Functions:   db_register_file, db_unregister_file, db_isregistered_file
+ *
+ * Purpose:     Maintain list of files returned by DBCreate/DBOpen as well
+ *              as closed by DBClose in order to detect possible operation
+ *              on closed files.
+ *
+ * Return:      -1 if file limit exceeded. Otherwise [0..DB_NFILES-1]
+ *              representing position in fixed size list. 
+ *
+ * Programmer:  Mark C. Miller, Wed Jul 23 00:14:00 PDT 2008
+ *
+ * Modifications:
+ *   Mark C. Miller, Wed Feb 25 23:46:44 PST 2009
+ *   Replaced name of file which can be very different but still represent
+ *   the same file stat structure. We wind up using st_dev/st_ino members
+ *   of stat struct to identify a file. In fact, we use a bjhash of those
+ *   members. This is not foolproof. Non posix filesystems can apparently
+ *   result in st_dev/st_ino combinations which are the same but for
+ *   different files.
+ *
+ *   Mark C. Miller, Fri Feb 12 08:20:03 PST 2010
+ *   Replaced conditional compilation with SIZEOF_OFF64T with
+ *   db_silo_stat_struct.
+ *
+ *   Mark C. Miller, Wed May 19 17:07:05 PDT 2010
+ *   Added logic for _WIN32 form of the db_silo_stat_struct.
+ *-------------------------------------------------------------------------*/
+PRIVATE int 
+db_register_file(DBfile *dbfile, const db_silo_stat_t *filestate, int writeable)
+{
+    int i;
+    for (i = 0; i < DB_NFILES; i++)
+    {
+        if (_db_regstatus[i].f == 0)
+        {
+            unsigned int hval = 0;
+#ifndef _WIN32
+            hval = bjhash((unsigned char *) &(filestate->s.st_dev), sizeof(filestate->s.st_dev), hval);
+            hval = bjhash((unsigned char *) &(filestate->s.st_ino), sizeof(filestate->s.st_ino), hval);
+#else
+            hval = bjhash((unsigned char *) &(filestate->fileindexlo), sizeof(filestate->fileindexlo), hval);
+            hval = bjhash((unsigned char *) &(filestate->fileindexhi), sizeof(filestate->fileindexhi), hval);
+#endif
+            _db_regstatus[i].f = dbfile;
+            _db_regstatus[i].n = hval; 
+            _db_regstatus[i].w = writeable;
+            return i;
+        }
+    }
+    return -1;
+}
+
+PRIVATE int 
+db_unregister_file(DBfile *dbfile)
+{
+    int i;
+    for (i = 0; i < DB_NFILES; i++)
+    {
+        if (_db_regstatus[i].f == dbfile)
+        {
+            int j;
+            _db_regstatus[i].f = 0;
+            for (j = i; (_db_regstatus[j+1].f != 0) && (j < DB_NFILES-1); j++)
+            {
+                _db_regstatus[j].f = _db_regstatus[j+1].f;
+                _db_regstatus[j].n = _db_regstatus[j+1].n;
+                _db_regstatus[j].w = _db_regstatus[j+1].w;
+            }
+            _db_regstatus[j].f = 0;
+            return i;
+        }
+    }
+    return -1;
+}
+
+PRIVATE int
+db_isregistered_file(DBfile *dbfile, const db_silo_stat_t *filestate)
+{
+    int i;
+    if (dbfile)
+    {
+        for (i = 0; i < DB_NFILES; i++)
+        {
+            if (_db_regstatus[i].f == dbfile)
+                return i;
+        }
+    }
+    else if (filestate)
+    {
+        unsigned int hval = 0;
+#ifndef _WIN32
+        hval = bjhash((unsigned char *) &(filestate->s.st_dev), sizeof(filestate->s.st_dev), hval);
+        hval = bjhash((unsigned char *) &(filestate->s.st_ino), sizeof(filestate->s.st_ino), hval);
+#else
+        hval = bjhash((unsigned char *) &(filestate->fileindexlo), sizeof(filestate->fileindexlo), hval);
+        hval = bjhash((unsigned char *) &(filestate->fileindexhi), sizeof(filestate->fileindexhi), hval);
+#endif
+        for (i = 0; i < DB_NFILES; i++)
+        {
+            if (_db_regstatus[i].f != 0 &&
+                _db_regstatus[i].n == hval)
+                return i;
+        }
+    }
+    return -1;
+}
+
+PRIVATE int
+db_silo_stat_one_file(const char *name, db_silo_stat_t *statbuf)
+{
+    int retval;
+    errno = 0;
+    memset(&(statbuf->s), 0, sizeof(statbuf->s));
+
+#if SIZEOF_OFF64_T > 4
+    retval = stat64(name, &(statbuf->s));
+#else
+    retval = stat(name, &(statbuf->s));
+#endif /* #if SIZEOF_OFF64_T > 4 */
+
+#ifdef _WIN32
+    if (retval == 0)
+    {
+        /* this logic was copied by and large from HDF5 sec2 VFD */
+        int fd = open(name, O_RDONLY);
+        if (fd != -1)
+        {
+            struct _BY_HANDLE_FILE_INFORMATION fileinfo;
+            GetFileInformationByHandle((HANDLE)_get_osfhandle(fd), &fileinfo);
+            statbuf->fileindexhi = fileinfo.nFileIndexHigh;
+            statbuf->fileindexlo = fileinfo.nFileIndexLow;
+            close(fd);
+            errno = 0;
+            retval = 0;
+        }
+        else
+        {
+            retval = -1;
+            if (errno == 0)
+                errno = ENOENT;
+        }
+    }
+#endif /* #ifdef _WIN32 */
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:   db_silo_stat
+ *
+ * Purpose:    Better stat method for silo taking into account stat/stat64
+ *             as well as issues with filenames used for split vfds.
+ *
+ * Programmer: Mark C. Miller, Fri Feb 12 08:21:52 PST 2010
+ *-------------------------------------------------------------------------*/
+PRIVATE int
+db_silo_stat(const char *name, db_silo_stat_t *statbuf, int opts_set_id)
+{
+    int retval = db_silo_stat_one_file(name, statbuf); 
+
+    if (opts_set_id == -1 ||
+        opts_set_id == DB_FILE_OPTS_H5_DEFAULT_SPLIT ||
+        opts_set_id > DB_FILE_OPTS_LAST)
+    {
+        int i;
+        int imin = opts_set_id == -1 ? 0 : opts_set_id;
+        int imax = opts_set_id == -1 ? MAX_FILE_OPTIONS_SETS: opts_set_id;
+        int tmperrno = errno;
+
+        for (i = imin; i < imax; i++)
+        {
+            db_silo_stat_t tmpstatbuf;
+            static char tmpname[4096];
+            char *meta_ext="", *raw_ext="-raw";
+            void *p; int vfd = -1;
+            const DBoptlist *opts;
+
+
+            if (opts_set_id == -1)
+                opts = SILO_Globals.fileOptionsSets[i];
+            else if (opts_set_id == DB_FILE_OPTS_H5_DEFAULT_SPLIT)
+                opts = 0;
+            else
+                opts = SILO_Globals.fileOptionsSets[i-NUM_DEFAULT_FILE_OPTIONS_SETS];
+
+            /* ignore if options set id does not yield a valid options set */
+            if (opts)
+            {
+                /* ignore if options set unrelated to split vfds */
+                if (p = DBGetOption(opts, DBOPT_H5_VFD))
+                    vfd = *((int*)p);
+                if (vfd != DB_H5VFD_SPLIT)
+                    continue;
+
+                /* ok, get meta/raw filenaming extension conventions */
+                if (p = DBGetOption(opts, DBOPT_H5_META_EXTENSION))
+                    meta_ext = (char *) p;
+                if (p = DBGetOption(opts, DBOPT_H5_RAW_EXTENSION))
+                    raw_ext = (char *) p;
+            }
+
+            /* try the raw file name, first */
+            if (strstr(raw_ext,"%s"))
+                sprintf(tmpname, raw_ext, name);
+            else
+                sprintf(tmpname, "%s%s", name, raw_ext);
+            errno = 0;
+            if (db_silo_stat_one_file(tmpname, &tmpstatbuf) != 0 || errno != 0)
+                continue;
+
+            /* try the meta file last and return its statbuf */
+            if (strstr(meta_ext,"%s"))
+                sprintf(tmpname, meta_ext, name);
+            else
+                sprintf(tmpname, "%s%s", name, meta_ext);
+            memset(&tmpstatbuf, 0, sizeof(tmpstatbuf));
+            if (db_silo_stat_one_file(tmpname, &tmpstatbuf) == 0 && errno == 0)
+            {
+                memcpy(statbuf, &tmpstatbuf, sizeof(tmpstatbuf));
+                return 0;
+            }
+        }
+
+        errno = tmperrno;
+    }
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_filter_install
+ *
+ * Purpose:     Install the database-requested filters, calling the filter
+ *              `open' routine for each named filter and reporting errors
+ *              for filters that can't be found.  Filters are requested
+ *              through the `_filters' character variable which is
+ *              optional.  This variable should contain a list of filter
+ *              names separated by `;' (extra `;' may appear at the beginning
+ *              or end of the string).  The first filter in the list is
+ *              the one that will be installed closest to the device
+ *              driver while the last filter is installed closest to the
+ *              API.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 28 11:58:01 EST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Mar  7 15:26:29 PST 1997
+ *    I modified the routine to copy the filter name string to a scratch
+ *    so array so that a NULL character could be added without overwriting
+ *    the last character in the string.
+ *-------------------------------------------------------------------------*/
+PRIVATE int
+db_filter_install ( DBfile *dbfile )
+{
+    char          *me = "db_filter_install";
+    int            len, i;
+    char          *var, *var2, *s, *filter_name;
+    static char    not_found[128];
+
+    /*
+     * There should be a miscellaneous variable called `_filters' in
+     * the current (root) directory.  If not, then no filters are
+     * requested.
+     */
+    if (!DBInqVarExists(dbfile,"_filters"))
+        return(0);
+
+    /*
+     * Read the `_filters' variable and make sure it is a character
+     * string.
+     */
+    if (DB_CHAR != DBGetVarType(dbfile, "_filters")) {
+        db_perror("`_filters' is not a character variable",
+                  E_NOTFILTER, me);
+        return -1;
+    }
+    len = DBGetVarLength(dbfile, "_filters");
+    if (len <= 0)
+        return 0;               /*no filters requested */
+    if (NULL == (var = DBGetVar(dbfile, "_filters")))
+        return -1;
+
+    /*
+     * Copy the variable and add a terminating NULL character.
+     */
+    var2 = ALLOC_N (char, len+1);
+    strncpy (var2, var, len);
+    var2[len] = '\0';
+
+    /*
+     * Process each filter.  Names are separated from one another
+     * by semicolons which may also appear at the beginning and end
+     * of the string.  Be careful for things like `;;'.
+     */
+    not_found[0] = '\0';
+    s = var2;
+    while ((filter_name = strtok(s, ";\n\r"))) {
+        s = NULL;
+        if (!filter_name[0])
+            continue;
+
+        for (i = 0; i < DB_NFILTERS; i++) {
+            if (_db_filter[i].name &&
+                !strcmp(_db_filter[i].name, filter_name)) {
+                break;
+            }
+        }
+
+        /*
+         * If the filter isn't found, tack the name onto the end
+         * of a list of names that weren't found, being careful
+         * not to overflow that buffer.  Each name should be
+         * separated from the others by a semicolon as in the `_filters'
+         * database variable.
+         */
+        if (i >= DB_NFILTERS) {
+            len = strlen(not_found);
+            if (not_found[0] && len + 1 < sizeof(not_found)) {
+                strcpy(not_found + len, ";");
+                len++;
+            }
+            strncpy(not_found + len, filter_name,
+                    MAX(0, (int)sizeof(not_found) - len - 1));
+            len += MAX(0, (int)sizeof(not_found) - len - 1);
+            not_found[len] = '\0';
+            continue;
+        }
+
+        /*
+         * If the filter has an `open' routine, call it now.
+         */
+        if (_db_filter[i].open) {
+            (void)(_db_filter[i].open) (dbfile, _db_filter[i].name);
+        }
+    }
+
+    FREE (var2);
+
+    /*
+     * If we failed to find some filters, we should notify the user.
+     * Should we return success or failure???  For now, we return
+     * success so that failure to find a filter is a warning at
+     * this level but an error if db_perror calls longjmp().  This
+     * gives the application a little control.
+     */
+    if (not_found[0]) {
+        db_perror(not_found, E_NOTFILTER, me);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBFilterRegistration
+ *
+ * Purpose:     Manipulate the global filter table by adding, changing,
+ *              or removing a filter.  `Name' specifies the filter that
+ *              will be affected.  `Init' and `open' are filter functions
+ *              that will be called when a database is opened.  `Init' is
+ *              called for every database that is opend (just after opening;
+ *              filters called in arbitrary order).  `Open' is called for
+ *              each file which requests that filter.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1, table is full
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 28 11:26:07 EST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBFilterRegistration(const char *name, int(*init)(DBfile*, char*),
+                     int(*open)(DBfile*, char*))
+{
+    int            i, j = -1;
+
+    API_BEGIN("DBFilterRegistration", int, -1) {
+
+        /*
+         * Look for entry already in the table.  If found, simply change
+         * the callbacks.
+         */
+        for (i = 0; i < DB_NFILTERS; i++) {
+            if (_db_filter[i].name && !strcmp(_db_filter[i].name, name)) {
+                break;
+            }
+            if (j < 0 && !_db_filter[i].name)
+                j = i;
+        }
+        if (i < DB_NFILTERS) {
+            if (!init && !open) {
+                FREE(_db_filter[i].name);
+                _db_filter[i].name = NULL;
+            }
+            else {
+                _db_filter[i].init = init;
+                _db_filter[i].open = open;
+            }
+            API_RETURN(0);
+        }
+
+        /*
+         * This is a new filter definition.  Add it to the first free
+         * slot.
+         */
+        if (init || open) {
+            if (j < 0)
+                API_ERROR((char *)name, E_MAXFILTERS);
+            _db_filter[j].name = STRDUP(name);
+            _db_filter[j].init = init;
+            _db_filter[j].open = open;
+        }
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBUninstall
+ *
+ * Purpose:     Uninstalls the top-most filter if any.  This is similar
+ *              to closing the file except the uninstall is not propogated
+ *              down the filter stack.
+ *
+ *              If the `uninstall' callback is null, this routine
+ *              doesn't do anything and then returns success.  This
+ *              allows device drivers to omit the uninstall function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Thu Mar 16 10:29:36 EST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+int
+DBUninstall(DBfile *dbfile)
+{
+    int retval;
+
+    API_BEGIN("DBUninstall", int, -1) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!dbfile->pub.uninstall)
+        {
+            API_RETURN(0);
+        }
+
+        retval = (dbfile->pub.uninstall) (dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetDataReadMask
+ *
+ * Purpose:  Set and return the data read mask
+ *
+ * Programmer:  Sean Ahern, Fri Jan 26 17:28:06 PST 2001
+ *
+ * Description:  This routine sets the data read mask.  It returns the
+ *               previous data read mask.  The data read mask is used to
+ *               tailor how the various driver functions read their data.
+ *               All of them are required to populate the metadata in the
+ *               returned structures.  Ordinarily, they also read all of
+ *               the "real" data.  If they honor the data read flag (see
+ *               DBDataReadFlagHonored()), the user can set, by way of this
+ *               function, the mask of "real" data to read.  This allows
+ *               the user to decide not to read in the zonelist array of a
+ *               UCD mesh, for instance, if he knows that it will not be
+ *               useful to him (i.e. constant connectivity over a
+ *               time-varying dataset.)
+ *
+ * Note: Many of these DBSet/Get routines DO NOT include the standard
+ * API_BEGIN/API_END macros. This is primarily due to the fact that
+ * these calls CANNOT fail. For others, that can fail, we do indeed
+ * use the API_BEGIN/API_END macros as per instructions in
+ * silo_private.h
+ *
+ * Modifications:
+ *--------------------------------------------------------------------*/
+PUBLIC long
+DBSetDataReadMask(long mask)
+{
+    int oldmask = SILO_Globals.dataReadMask;
+    SILO_Globals.dataReadMask = mask;
+    return oldmask;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBGetDataReadMask
+ *
+ * Purpose:  Return the current data read mask
+ *
+ * Programmer:  Sean Ahern, Thu Mar  1 12:02:48 PST 2001
+ *
+ * Description:  This routine returns the current data read mask.
+ *               The data read mask is used to tailor how the various
+ *               driver functions read their data.
+ *
+ * Modifications:
+ *--------------------------------------------------------------------*/
+PUBLIC long
+DBGetDataReadMask(void)
+{
+    return SILO_Globals.dataReadMask;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetAllowOverwrites
+ *
+ * Purpose:  Set and return the allow overwrites flags 
+ *
+ * Programmer:  Mark C. Miller, August 23, 3005 
+ *
+ * Description:  This routine sets the flag that controls whether
+ *               overwrites are allowed.
+ *--------------------------------------------------------------------*/
+PUBLIC int 
+DBSetAllowOverwrites(int allow)
+{
+    int oldAllow = SILO_Globals.allowOverwrites;
+    SILO_Globals.allowOverwrites = allow;
+    return oldAllow;
+}
+
+PUBLIC int 
+DBGetAllowOverwrites()
+{
+    return SILO_Globals.allowOverwrites;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetEnableChecksums
+ *
+ * Purpose:  Set and return the enable checksums flags 
+ *
+ * Programmer:  Mark C. Miller, May 1, 2006 
+ *
+ * Description:  This routine sets the flag that controls whether
+ *               checksums are computed on client data.
+ *--------------------------------------------------------------------*/
+PUBLIC int 
+DBSetEnableChecksums(int enable)
+{
+    int oldEnable = SILO_Globals.enableChecksums;
+    SILO_Globals.enableChecksums = enable;
+    return oldEnable;
+}
+
+PUBLIC int 
+DBGetEnableChecksums()
+{
+    return SILO_Globals.enableChecksums;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetCompression
+ *
+ * Purpose:  Set and return the enable Compression flags 
+ *
+ * Programmer:  Thomas R. Treadway, Wed Feb 28 11:36:34 PST 2007
+ *
+ * Description:  This routine enters the compression method information.
+ *--------------------------------------------------------------------*/
+PUBLIC void 
+DBSetCompression(const char *s)
+{
+    if (s && *s == '\0') {
+        if (SILO_Globals.compressionParams)
+            FREE(SILO_Globals.compressionParams);
+        SILO_Globals.compressionParams = ALLOC_N(char, 12);
+        strcpy(SILO_Globals.compressionParams, "METHOD=GZIP");
+    }   
+    else if (s) {
+        if (SILO_Globals.compressionParams)
+            FREE(SILO_Globals.compressionParams);
+        SILO_Globals.compressionParams=ALLOC_N(char,strlen(s)+1);
+        strcpy(SILO_Globals.compressionParams, s);
+    }
+    else {
+        if (SILO_Globals.compressionParams)
+            FREE(SILO_Globals.compressionParams);
+        SILO_Globals.compressionParams=0;
+    }
+}
+
+PUBLIC char * 
+DBGetCompression()
+{
+    return SILO_Globals.compressionParams;
+}
+
+PUBLIC int
+DBFreeCompressionResources(DBfile *dbfile, const char *meshname)
+{
+    int retval = 0;
+
+    API_BEGIN2("DBFreeCompressionResources", int, -1, api_dummy) {
+
+        if (!dbfile->pub.free_z)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        retval = ((dbfile->pub.free_z) (dbfile, (char *)meshname));
+
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetFriendlyHDF5Names
+ *
+ * Purpose:  Set flag to create friendly HDF5 dataset names 
+ *
+ * Programmer:  Mark C. Miller, Thu Apr 19 15:17:05 PDT 2007 
+ *
+ * Description:  Sets flag for HDF5 driver to control production of
+ * friendly dataset names. Returns value of old setting.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBSetFriendlyHDF5Names(int enable)
+{
+    int oldEnable = SILO_Globals.enableFriendlyHDF5Names;
+    SILO_Globals.enableFriendlyHDF5Names = enable;
+    return oldEnable;
+}
+
+PUBLIC int 
+DBGetFriendlyHDF5Names()
+{
+    return SILO_Globals.enableFriendlyHDF5Names;
+}
+
+#define CHECK_FOR_FRIENDLY(ON,SU)					\
+    ntotal += toc->n ## ON;						\
+    for (i = 0; i < toc->n ## ON; i++)					\
+    {									\
+        char tmp[1024];							\
+        snprintf(tmp, sizeof(tmp), "%s_%s", toc->ON ## _names[i], SU);	\
+        if (DBInqVarExists(f, tmp))					\
+            nfriendly++;						\
+    }
+
+/*----------------------------------------------------------------------
+ * Routine:  db_guess_has_friendly_HDF5_names_r 
+ *
+ * Purpose:  Recursive helper func for DBGuessHasFriendlyHDF5Names 
+ *           names.
+ *
+ * Programmer: Mark C. Miller, Wed Sep  2 15:27:06 PDT 2009
+ *
+ *--------------------------------------------------------------------*/
+PRIVATE int
+db_guess_has_friendly_HDF5_names_r(DBfile *f)
+{
+    int i, ntotal = 0, nfriendly = 0;
+    int retval;
+    DBtoc *toc;
+
+    toc = DBGetToc(f);
+
+    CHECK_FOR_FRIENDLY(multimesh, "meshnames");
+    CHECK_FOR_FRIENDLY(multivar, "varnames");
+    CHECK_FOR_FRIENDLY(multimat, "matnames");
+    CHECK_FOR_FRIENDLY(qmesh, "coord0");
+    CHECK_FOR_FRIENDLY(qvar, "data");
+    CHECK_FOR_FRIENDLY(ucdmesh, "coord0");
+    CHECK_FOR_FRIENDLY(ucdvar, "data");
+    CHECK_FOR_FRIENDLY(ptmesh, "coord0");
+    CHECK_FOR_FRIENDLY(ptvar, "data");
+    CHECK_FOR_FRIENDLY(csgmesh, "_coeffs");
+    CHECK_FOR_FRIENDLY(csgvar, "data");
+    CHECK_FOR_FRIENDLY(mat, "_matlist");
+    CHECK_FOR_FRIENDLY(matspecies, "_speclist");
+    CHECK_FOR_FRIENDLY(curve, "_yvals");
+    CHECK_FOR_FRIENDLY(obj, "_nodelist");
+
+    if (ntotal >= 3) /* arb. min of 3 objects */
+    {
+        if (nfriendly >= ntotal/2)
+            return 1;
+        else
+            return 0;
+    }
+
+    retval = -1;
+    for (i = 0; i < toc->ndir && retval == -1; i++)
+    {
+        DBSetDir(f, toc->dir_names[i]);
+        retval = db_guess_has_friendly_HDF5_names_r(f);
+        DBSetDir(f, "..");
+    }
+
+    return retval;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBGuessHasFriendlyHDF5Names
+ *
+ * Purpose:  Determine if it looks like a given file has HDF5 friendly 
+ *           names.
+ *
+ * Programmer: Mark C. Miller, Wed Sep  2 15:27:06 PDT 2009
+ *
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBGuessHasFriendlyHDF5Names(DBfile *f)
+{
+    char cwd[1024];
+    int retval;
+
+    if (DBGetDriverType(f) != 7 /* DB_HDF5X */)
+        return 0;
+
+    DBGetDir(f, cwd);
+    retval = db_guess_has_friendly_HDF5_names_r(f);
+    DBSetDir(f, cwd);    
+
+    return retval;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetDeprecateWarnings
+ *
+ * Purpose:  Set number of deprecate warnings Silo should print.
+ *           Default is 3. Setting to zero effectively disables.
+ *
+ * Programmer:  Mark C. Miller, Thu Oct 11 16:50:12 PDT 2007
+ *
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBSetDeprecateWarnings(int count)
+{
+    int oldCount = SILO_Globals.maxDeprecateWarnings;
+    SILO_Globals.maxDeprecateWarnings = count;
+    return oldCount;
+}
+
+PUBLIC int
+DBGetDeprecateWarnings()
+{
+    return SILO_Globals.maxDeprecateWarnings;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBSetUnknownDriverPriority
+ *
+ * Purpose:  Set priority order of drivers used by unknown driver. 
+ *
+ * Programmer:  Mark C. Miller, May 1, 2006 
+ *
+ * Description:  This routine sets the flag that controls whether
+ *               checksums are computed on client data.
+ *--------------------------------------------------------------------*/
+PUBLIC int* 
+DBSetUnknownDriverPriorities(const int *priorities)
+{
+    int i = 0;
+    static int oldPriorities[MAX_FILE_OPTIONS_SETS+DB_NFORMATS+1];
+    memcpy(oldPriorities, SILO_Globals.unknownDriverPriorities, sizeof(oldPriorities));
+    while (i < (MAX_FILE_OPTIONS_SETS+DB_NFORMATS+1) && priorities[i] >= 0)
+    {
+        SILO_Globals.unknownDriverPriorities[i] = priorities[i];
+        i++;
+    }
+    if (i < (MAX_FILE_OPTIONS_SETS+DB_NFORMATS+1))
+        SILO_Globals.unknownDriverPriorities[i] = -1;
+    return oldPriorities;
+}
+
+PUBLIC int*
+DBGetUnknownDriverPriorities()
+{
+    static int priorities[MAX_FILE_OPTIONS_SETS+DB_NFORMATS+1];
+    memcpy(priorities, SILO_Globals.unknownDriverPriorities, sizeof(priorities));
+    return priorities;
+}
+
+PUBLIC int
+DBRegisterFileOptionsSet(const DBoptlist *opts)
+{
+    int i;
+
+    API_BEGIN("DBRegisterFileOptionsSet", int, -1) {
+        for (i = 0; i < MAX_FILE_OPTIONS_SETS; i++)
+        {
+            if (SILO_Globals.fileOptionsSets[i] == 0)
+            {
+                SILO_Globals.fileOptionsSets[i] = opts;
+                API_RETURN(i+NUM_DEFAULT_FILE_OPTIONS_SETS);
+            }
+        }
+        API_ERROR("Silo library", E_MAXFILEOPTSETS);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC int
+DBUnregisterFileOptionsSet(int opts_set_id)
+{
+    int _opts_set_id = opts_set_id-NUM_DEFAULT_FILE_OPTIONS_SETS;
+
+    API_BEGIN("DBUnregisterFileOptionsSet", int, -1) {
+        if (SILO_Globals.fileOptionsSets[_opts_set_id] == 0)
+            API_ERROR("opts_set_id", E_BADARGS);
+        SILO_Globals.fileOptionsSets[_opts_set_id] = 0;
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC void
+DBUnregisterAllFileOptionsSets()
+{
+    int i;
+
+    for (i = 0; i < MAX_FILE_OPTIONS_SETS; i++)
+        SILO_Globals.fileOptionsSets[i] = 0;
+} 
+
+const int* db_get_used_file_options_sets_ids()
+{
+    int i,n;
+    static int used_slots[MAX_FILE_OPTIONS_SETS+NUM_DEFAULT_FILE_OPTIONS_SETS+1];
+
+   
+    /* For the default cases, only return those that 'matter' in that
+       they could possibly have an impact on Silo's ability to actually
+       open the file. In addtion, put them in some kind of priority order */
+    n = 0;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_SILO;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_SPLIT;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_DIRECT;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_FAMILY;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_MPIO;
+    used_slots[n++] = DB_FILE_OPTS_H5_DEFAULT_MPIP;
+    for (i = n; i < MAX_FILE_OPTIONS_SETS+NUM_DEFAULT_FILE_OPTIONS_SETS+1; i++)
+        used_slots[i] = -1;
+
+    /* fill in with used options set slots */
+    for (i = 0; i < MAX_FILE_OPTIONS_SETS; i++)
+    {
+        if (SILO_Globals.fileOptionsSets[i]==0)
+            continue;
+        used_slots[n++] = i+NUM_DEFAULT_FILE_OPTIONS_SETS;
+    }
+
+    return used_slots;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBGrabDriver
+ *
+ * Purpose:  Set and return the low level driver file handle
+ *
+ * Programmer:  Thomas R. Treadway, Tue May 29 15:52:19 PDT 2007
+ *
+ * Description:  This routine returns a ponter to the driver-native
+ * file handle.
+ *
+ * Modifications
+ *   Mark C. Miller, Thu Oct 11 15:36:10 PDT 2007
+ *   Record fact file was grabbed by adding var at top-level
+ *--------------------------------------------------------------------*/
+PUBLIC void * 
+DBGrabDriver(DBfile *file)
+{
+    void *rtn = 0;
+    if (file) {
+       if (file->pub.GrabId > (void *) 0) {
+          int grab_val = 1;
+          DBWrite(file, "/_was_grabbed", &grab_val, &grab_val, 1, DB_INT);
+          SILO_Globals.enableGrabDriver = TRUE;
+          rtn = (void *) file->pub.GrabId;
+       }
+    }
+    return rtn;
+}
+/*----------------------------------------------------------------------
+ * Routine:  DBGetDriverType
+ *
+ * Purpose:  Return the drive type 
+ *
+ * Programmer:  Thomas R. Treadway, Thu Jun  7 13:19:48 PDT 2007
+ *
+ * Description:  This routine returns a the driver type
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBGetDriverType(const DBfile *file)
+{
+    if (file) {
+       return file->pub.type;
+    }
+    return DB_UNKNOWN;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBGetDriverTypeFromPath
+ *
+ * Purpose:  Return the drive type 
+ *
+ * Programmer:  Thomas R. Treadway, Tue Jul  3 15:24:58 PDT 2007
+ *
+ * Description:  This routine returns a the driver type
+ *
+ * Modifications:
+ *
+ * Thomas R. Treadway, Thu Jul  5 11:57:03 PDT 2007
+ * DB_HDR5 is conditional
+ *
+ * Mark C. Miller, Mon Nov 19 10:45:05 PST 2007
+ * Removed conditional compilation on HDF5 driver
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBGetDriverTypeFromPath(const char *path)
+{
+   char buf[8];
+   int fd;
+   int nbytes;
+   int flags = O_RDONLY;
+   if ((fd = open(path, flags)) < 0) {
+      printf("cannot open `%s'\n", path);
+      return -1;
+   }
+   if ((nbytes = read(fd, (char *)buf, 8)) == -1) {
+      printf("cannot read `%s'\n", path);
+      return -1;
+   }
+   if (nbytes <= 5) {
+      printf("cannot read `%s' buffer too small\n", path);
+      return -1;
+   }
+   (void) close(fd);
+   if (strstr(buf, "PDB"))
+      return 2; /* can't use DB_PDB here */
+   if (strstr(buf, "HDF"))
+      return 7; /* can't use DB_HDF5X here. */
+   return DB_UNKNOWN;
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBJoinPath
+ *
+ * Purpose:  Given paths with possible relative naming, combine them
+ *           into a single absolute path. 
+ *
+ * Programmer:  Mark C. Miller, July 20, 2008 
+ *--------------------------------------------------------------------*/
+PUBLIC char * 
+DBJoinPath(const char *first, const char *second)
+{
+    API_BEGIN("DBJoinPath", char *, NULL) {
+        API_RETURN(db_join_path(first, second));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  DBUngrabDriver
+ *
+ * Purpose:  Return control of the low level driver
+ *
+ * Programmer:  Thomas R. Treadway, Thu Jun  7 13:19:48 PDT 2007
+ *
+ * Description:  This routine returns a the driver-native type
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBUngrabDriver(DBfile *file, const void *driver_handle)
+{
+    if (file) {
+       SILO_Globals.enableGrabDriver = FALSE;
+       return file->pub.type;
+    }
+    return DB_UNKNOWN;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                 DBMakeObject
+ *
+ *  Purpose
+ *
+ *      Allocate an object of the requested length and initialize it.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 11:41:23 PST 1994
+ *    Added error mechanism
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *--------------------------------------------------------------------*/
+PUBLIC DBobject *
+DBMakeObject(const char *name, int type, int maxcomps)
+{
+    DBobject      *object = NULL;
+
+    API_BEGIN("DBMakeObject", DBobject *, NULL) {
+
+        if (!name || !*name)
+            API_ERROR("object name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("object name", E_INVALIDNAME);
+        if (maxcomps <= 0)
+            API_ERROR("maxcomps", E_BADARGS);
+        if (NULL == (object = ALLOC(DBobject)))
+            API_ERROR(NULL, E_NOMEM);
+
+        object->name = STRDUP(name);
+        object->type = STRDUP(DBGetObjtypeName(type));
+        object->comp_names = ALLOC_N(char *, maxcomps);
+        object->pdb_names = ALLOC_N(char *, maxcomps);
+
+        object->ncomponents = 0;
+        object->maxcomponents = maxcomps;
+
+        if (!object->name || !object->type || !object->comp_names ||
+            !object->pdb_names)
+            API_ERROR(NULL, E_NOMEM);
+
+        API_RETURN(object);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBFreeObject
+ *
+ *  Purpose
+ *
+ *      Release the storage associated with the given object list.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Thu Nov 10 17:28:39 EST 1994
+ *    Added error mechanism.
+ *
+ *    Robb Matzke, Fri Dec 2 13:14:18 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBFreeObject(DBobject *object)
+{
+    int            i;
+
+    API_BEGIN("DBFreeObject", int, -1) {
+
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (object->ncomponents < 0) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        for (i = 0; i < object->ncomponents; i++) {
+            FREE(object->comp_names[i]);
+            FREE(object->pdb_names[i]);
+        }
+
+        FREE(object->comp_names);
+        FREE(object->pdb_names);
+        FREE(object->name);
+        FREE(object->type);
+        FREE(object);
+    }
+    API_END;
+
+    return(0);  /* Always succeeds by the time we get here */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBClearObject
+ *
+ *  Purpose
+ *
+ *      Remove all components from the given object and reset counters.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 07:46:29 PST 1994
+ *    Added error mechanism
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBClearObject(DBobject *object)
+{
+    int            i;
+
+    API_BEGIN("DBClearObject", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (object->ncomponents < 0) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        /* Reset values, but do not free */
+        for (i = 0; i < object->maxcomponents; i++) {
+            object->comp_names[i] = NULL;
+            object->pdb_names[i] = NULL;
+        }
+
+        object->name = NULL;
+        object->type = NULL;
+        object->ncomponents = 0;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            DBAddVarComponent
+ *
+ *  Purpose
+ *
+ *      Add a variable component to the given object structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 07:43:38 PST 1994
+ *    Added error mechanism
+ *
+ *    Robb Matzke, Fri Dec 2 13:14:46 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.  Correct spelling.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddVarComponent(DBobject *object, const char *compname, const char *pdbname)
+{
+    API_BEGIN("DBAddVarComponent", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)compname) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (!pdbname || !*pdbname)
+            API_ERROR("pdb name", E_BADARGS);
+        if (object->ncomponents >= object->maxcomponents) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        if (NULL == (object->comp_names[object->ncomponents] =
+                     STRDUP(compname)) ||
+            NULL == (object->pdb_names[object->ncomponents] =
+                     STRDUP(pdbname))) {
+            FREE(object->comp_names[object->ncomponents]);
+            API_ERROR(NULL, E_NOMEM);
+        }
+
+        object->ncomponents++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            DBAddIntComponent
+ *
+ *  Purpose
+ *
+ *      Add an integer literal component to the given object structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modifications
+ *    Robb Matzke, Tue Nov 8 07:06:11 PST 1994
+ *    Added error mechanism. Returns 0 on success, -1 on failure.
+ *
+ *    Robb Matzke, Fri Dec 2 13:15:06 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddIntComponent(DBobject *object, const char *compname, int ii)
+{
+    char           tmp[256];
+
+    API_BEGIN("DBAddIntComponent", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)compname) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (object->ncomponents >= object->maxcomponents) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        sprintf(tmp, "'<i>%d'", ii);
+
+        if (NULL == (object->comp_names[object->ncomponents] =
+                     STRDUP(compname)) ||
+            NULL == (object->pdb_names[object->ncomponents] =
+                     STRDUP(tmp))) {
+            FREE(object->comp_names[object->ncomponents]);
+            API_ERROR(NULL, E_NOMEM);
+        }
+
+        object->ncomponents++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            DBAddFltComponent
+ *
+ *  Purpose
+ *
+ *      Add a floating point literal component to the given object
+ *      structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified:
+ *    Robb Matzke, Tue Nov 8 07:04:15 PST 1994
+ *    Added error mechanism.  Return -1 on failure, 0 on success.
+ *
+ *    Robb Matzke, Fri Dec 2 13:15:28 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Eric Brugger, Tue Feb  7 09:06:58 PST 1995
+ *    I modified the argument declarations to reflect argument promotions.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddFltComponent(DBobject *object, const char *compname, double ff)
+{
+    char           tmp[256];
+
+    API_BEGIN("DBAddFltComponent", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)compname) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (object->ncomponents >= object->maxcomponents) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        sprintf(tmp, "'<f>%g'", ff);
+
+        if (NULL == (object->comp_names[object->ncomponents] =
+                     STRDUP(compname)) ||
+            NULL == (object->pdb_names[object->ncomponents] =
+                     STRDUP(tmp))) {
+            FREE(object->comp_names[object->ncomponents]);
+            API_ERROR(NULL, E_NOMEM);
+        }
+        object->ncomponents++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            DBAddDblComponent
+ *
+ *  Purpose
+ *
+ *      Add a double precision floating point literal component to 
+ *      the given object structure.
+ *
+ *  Programmer
+ *
+ *      Brad Whitlock, Thu Jan 20 09:43:13 PDT 2000
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified:
+ *
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddDblComponent(DBobject *object, const char *compname, double ff)
+{
+    char           tmp[256];
+
+    API_BEGIN("DBAddDblComponent", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)compname) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (object->ncomponents >= object->maxcomponents) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+
+        sprintf(tmp, "'<d>%.30g'", ff);
+
+        if (NULL == (object->comp_names[object->ncomponents] =
+                     STRDUP(compname)) ||
+            NULL == (object->pdb_names[object->ncomponents] =
+                     STRDUP(tmp))) {
+            FREE(object->comp_names[object->ncomponents]);
+            API_ERROR(NULL, E_NOMEM);
+        }
+        object->ncomponents++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                            DBAddStrComponent
+ *
+ *  Purpose
+ *
+ *      Add a string literal component to the given object structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 07:08:33 PST 1994
+ *    Added error mechanism.  Return 0 on success, -1 on failure.
+ *
+ *    Robb Matzke, Fri Dec 2 13:15:49 PST 1994
+ *    Removed all references to SCORE memory management.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddStrComponent(DBobject *object, const char *compname, const char *ss)
+{
+    char           tmp[256];
+
+    API_BEGIN("DBAddStrComponent", int, -1) {
+        if (!object)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)compname) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (object->ncomponents >= object->maxcomponents) {
+            API_ERROR("object ncomponents", E_BADARGS);
+        }
+        if (!ss)
+            API_ERROR("string literal component", E_BADARGS);
+
+        sprintf(tmp, "'<s>%s'", ss);
+
+        if (NULL == (object->comp_names[object->ncomponents] =
+                     STRDUP(compname)) ||
+            NULL == (object->pdb_names[object->ncomponents] =
+                     STRDUP(tmp))) {
+            FREE(object->comp_names[object->ncomponents]);
+            API_ERROR(NULL, E_NOMEM);
+        }
+        object->ncomponents++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBShowErrors
+ *
+ * Purpose:     Set the method by which errors are displayed.  The
+ *              `level' parameter is one of the following:
+ *
+ *                 DB_ALL       -- Show all errors, beginning with the
+ *                                 routine that first detected the error
+ *                                 and continuing up the call stack to
+ *                                 the application.
+ *
+ *                 DB_ABORT     -- Same as DB_ALL except abort() is called
+ *                                 after the error message is printed.
+ *
+ *                 DB_TOP       -- (default) Only the top-level API functions
+ *                                 issue error messages.
+ *
+ *                 DB_NONE      -- The library does not handle error messages.
+ *                                 The application is responsible for
+ *                                 checking the API return values and
+ *                                 handling the error.
+ *
+ *                 DB_SUSPEND   -- This is used internally to temporarily
+ *                                 suspend the issuance of error messages
+ *                                 by changing the error level to DB_NONE.
+ *
+ *                 DB_RESTORE   -- This is used internally to restore the
+ *                                 previous error level after a DB_SUSPEND.
+ *
+ *              The `func' parameter can point to an application-level
+ *              error handling function that will be passed a string that
+ *              is part of the error message (similar to the argument for
+ *              perror()).  If the function pointer is null, then
+ *              the library will issue error messages to the standard
+ *              error stream.
+ *
+ *              The error text and erring function name can
+ *              be obtained by calling DBErrString() or DBErrFunc().
+ *
+ * Return:      void
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 09:58:43 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Dec 12 14:25:04 EST 1994
+ *    Added DB_SUSPEND and DB_RESUME in order to get
+ *    db_unk_Open to work properly [the Open callback for
+ *    the SILO-Unknown driver].
+ *
+ *    Eric Brugger, Tue Feb  7 09:06:58 PST 1995
+ *    I modified the function declaration and changed the default error
+ *    reporting level to DB_NONE.
+ *
+ *    Eric Brugger, Wed Mar  1 17:07:39 PST 1995
+ *    I shrouded the prototypes for non-ansi compilers.
+ * 
+ *    Hank Childs, Thu Mar  2 13:34:35 PST 2000
+ *    Add check to ensure that nested DBShowErrors to suspend error 
+ *    messages would work correctly.
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC void
+DBShowErrors(int level, void(*func)(char*))
+{
+    static int     old_level = DB_NONE;
+    static int     old_level_drvr = DB_NONE;
+    static int     nested_suspend = 0;
+
+    SILO_Globals._db_err_level_drvr = DB_NONE;
+    if (level == DB_ALL_AND_DRVR)
+    {
+        level = DB_ALL;
+	SILO_Globals._db_err_level_drvr = DB_ALL;
+    }
+
+    switch (level) {
+        case DB_SUSPEND:
+            if (nested_suspend++ == 0)
+            {
+                old_level = SILO_Globals._db_err_level;
+                old_level_drvr = SILO_Globals._db_err_level_drvr;
+            }
+            SILO_Globals._db_err_level = DB_NONE;
+	    SILO_Globals._db_err_level_drvr = DB_NONE;
+            break;
+        case DB_RESUME:
+            if (--nested_suspend == 0)
+            {
+                SILO_Globals._db_err_level = old_level;
+	        SILO_Globals._db_err_level_drvr = old_level_drvr;
+            }
+            break;
+        default:
+            SILO_Globals._db_err_level = level;
+            SILO_Globals._db_err_func = func;
+            break;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBErrString
+ *
+ * Purpose:     Return the error message of the last error.
+ *
+ * Return:      Success:        ptr to static error message
+ *
+ *              Failure:        ptr to static message for db_errno=0
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 21 08:23:48 EST 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+PUBLIC char   *
+DBErrString(void)
+{
+    static char    s[32];
+
+    if (db_errno < 0 || db_errno >= NELMTS(_db_err_list)) {
+        sprintf(s, "Error %d", db_errno);
+        return s;
+    }
+
+    return _db_err_list[db_errno];
+}
+
+PUBLIC int
+DBErrno(void)
+{
+    return db_errno;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBErrFunc
+ *
+ * Purpose:     Return the name (as a static string) of the function
+ *              that raised the last error.  This could be the function
+ *              that detected the error or the top-level API function
+ *              depending on the arguments to DBShowErrors().
+ *
+ * Return:      Success:        ptr to function name
+ *
+ *              Failure:        ptr to empty string
+ *
+ * Programmer:  robb at cloud
+ *              Tue Feb 21 08:25:40 EST 1995
+ *
+ * Modifications:
+ *   Mark C. Miller, Mon Jul 19 08:49:29 PDT 2010
+ *   Changed name to DBerrFuncname as this function returns the NAME of
+ *   the last Silo function that err'd. The previous name, DBErrFunc
+ *   suggested it returned the pointer to the function passed in
+ *   DBShowErrors. I added a new function, DBErrfunc, to return that.
+ * 
+ *-------------------------------------------------------------------------*/
+PUBLIC char   *
+DBErrFunc(void)
+{
+    DEPRECATE_MSG("DBErrFunc",4,8,"DBErrFuncname");
+    return db_errfunc;
+}
+
+PUBLIC char   *
+DBErrFuncname(void)
+{
+    return db_errfunc;
+}
+
+PUBLIC DBErrFunc_t
+DBErrfunc(void)
+{
+    return SILO_Globals._db_err_func;
+}
+
+PUBLIC int
+DBErrlvl(void)
+{
+    return SILO_Globals._db_err_level;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBVersion
+ *
+ * Purpose:     Return the version number of the library as a string.
+ *
+ * Returns:     ptr to version number
+ *
+ * Programmer:  Hank Childs
+ *              Tue Oct 17 14:08:45 PDT 2000
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Oct 24 12:39:31 PDT 2006
+ *   Changed to use SILO_VSTRING
+ *-------------------------------------------------------------------------*/
+PUBLIC char *
+DBVersion(void)
+{
+    static char version[256];
+    strcpy(version, SILO_VSTRING);
+
+    return version;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBVersionGE
+ *
+ * Purpose:     Return whether or not the version of the library is greater
+ *              than or equal to the version specified by Maj, Min, Pat.
+ *              This is a run-time equiv. of the SILO_VERSION_GE macro.
+ *
+ * Returns:     integer indicating if true (1) or false (0) 
+ *
+ * Programmer:  Mark C. Miller, Mon Jan 12 20:59:30 PST 2009
+ *-------------------------------------------------------------------------*/
+PUBLIC int 
+DBVersionGE(int Maj, int Min, int Pat)
+{
+    if (((SILO_VERS_MAJ==Maj) && (SILO_VERS_MIN==Min) && (SILO_VERS_PAT>=Pat)) ||
+         ((SILO_VERS_MAJ==Maj) && (SILO_VERS_MIN>Min)) ||
+         (SILO_VERS_MAJ>Maj))
+        return 1;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBFileVersion
+ *
+ * Purpose:     Return the version number of the library that created the
+ *              given file as a string.
+ *
+ * Returns:     ptr to version number
+ *
+ * Programmer:  Mark C. Miller, Mon Jan 12 20:59:30 PST 2009
+ *-------------------------------------------------------------------------*/
+PUBLIC char *
+DBFileVersion(DBfile *dbfile)
+{
+    static char version[256];
+    if (dbfile->pub.file_lib_version)
+        strcpy(version, dbfile->pub.file_lib_version);
+    else
+        strcpy(version, "unknown; 4.5 or older");
+    return version;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBFileVersionGE
+ *
+ * Purpose:     Return whether or not the given file was created with a 
+ *              version of the library greater than or equal to the
+ *              version specified by Maj, Min, Pat 
+ *
+ * Returns:     1 if file version is greather than or equal to Maj/Min/Pat
+ *              0 if file version is less than Maj/Min/Pat
+ *             -1 if unable to determine.
+ *
+ * Programmer:  Mark C. Miller, Mon Jan 12 20:59:30 PST 2009
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBFileVersionGE(DBfile *dbfile, int Maj, int Min, int Pat)
+{
+    int retval = -1;
+    int fileMaj = -1, fileMin = -1, filePat = -1;
+    char *version = STRDUP(DBFileVersion(dbfile));
+
+    if (strncmp(version, "unknown", 7) == 0)
+    {
+        /* We started maintaining library version information in the file
+           in version 4.5.1. So, if it is 'unknown', we can return something
+           useful ONLY if the version we're comparing against is 4.5.1 or
+           greater. */
+        if ((Maj==4 && Min==5 && Pat>=1) ||
+            (Maj==4 && Min>5) ||
+            (Maj>4))
+            retval = 0;
+    }
+    else
+    {
+        int val;
+        char *token;
+
+        errno = 0;
+        token = strtok(version, ".");
+        val = strtol(token, 0, 10);
+        if (token != 0 && val != 0 && errno == 0)
+        {
+            fileMaj = val;
+            token = strtok(0, ".");
+            if (token)
+                val = strtol(token, 0, 10);
+            if (token != 0 && val != 0 && errno == 0)
+            {
+                fileMin = val;
+                token = strtok(0, ".");
+                if (token)
+                    val = strtol(token, 0, 10);
+                if (token != 0 && val != 0 && errno == 0)
+                    filePat = val;
+            }
+        }
+
+        if (fileMaj != -1 && fileMin != -1 && filePat != -1)
+        {
+            if ((fileMaj==Maj && fileMin==Min && filePat>=Pat) ||
+                (fileMaj==Maj && fileMin>Min) ||
+                (fileMaj>Maj))
+                retval = 1;
+            else
+                retval = 0;
+        }
+        else if (fileMaj != -1 && fileMin != -1)
+        {
+            if ((fileMaj==Maj && fileMin>=Min) ||
+                (fileMaj>Maj))
+                retval = 1;
+            else
+                retval = 0;
+        }
+        else if (fileMaj != -1)
+        {
+            if (fileMaj>=Maj)
+                retval = 1;
+            else
+                retval = 0;
+        }
+    }
+
+    free(version);
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBOpen
+ *
+ * Purpose:     Open a data file.
+ *
+ * Return:      Success:        pointer to new file descriptor
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:25:08 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, Tue Feb 28 10:51:19 EST 1995
+ *    When a file is opened, it is given a unique ID number wrt all other
+ *    open files.  The ID is a small integer [0..DB_NFILES-1].
+ *
+ *    Robb Matzke, Tue Feb 28 11:38:08 EST 1995
+ *    For each registered filter, call the non-null `init' functions for
+ *    every file that is opened.
+ *
+ *    Sean Ahern, Mon Jan  8 17:38:18 PST 1996
+ *    Added the mode parameter.
+ *
+ *    Lisa J. Nafziger, Wed Mar  6 10:20:48 PST 1996
+ *    Added code to check for file existence, to check if it is a
+ *    directory and to check for read permission.  This allows more
+ *    specific error messages to be returned.
+ *
+ *    Lisa J. Nafziger, Tue Mar 12 14:15:06 PST 1996
+ *    Modified code to check file attributes so that stat() rather
+ *    than access() is used.  The former is POSIX compliant.
+ *
+ *    Eric Brugger, Tue Jun 17 10:25:57 PDT 1997
+ *    I modified the routine to only check file validity if the type
+ *    is not an SDX connection.
+ *
+ *    Jeremy Meredith, Fri Jul 23 09:31:14 PDT 1999
+ *    I added error reporting to the result of stat().
+ *
+ *    Jeremy Meredith, Mon Jul 26 10:39:49 PDT 1999
+ *    Made stat() error reporting POSIX.1 compliant.
+ *
+ *    Sean Ahern, Wed Jul  5 15:35:48 PDT 2000
+ *    Renamed the function to DBOpenReal.  Client code now calls a macro
+ *    called DBOpen.
+ *
+ *    Mark C. Miller, Wed Feb  2 07:59:53 PST 2005
+ *    Added printing of error message from stat() with strerror
+ *
+ *    Mark C. Miller, Wed Feb 23 08:51:35 PST 2005
+ *    Added code to reset _db_fstatus slot to 0 if open fails
+ *
+ *    Thomas R. Treadway, Tue Jun 27 13:59:21 PDT 2006
+ *    Added HAVE_STRERROR wrappers
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Added code to register the returned file pointer
+ *
+ *    Mark C. Miller, Mon Jan 12 20:50:41 PST 2009
+ *    Removed DB_SDX conditionally compiled code blocks.
+ *
+ *    Mark C. Miller, Wed Feb 25 23:50:06 PST 2009
+ *    Moved call to db_isregistered_file to AFTER calls to stat the file
+ *    add changed db_isregistered_file to accept stat struct instead of name.
+ *    Changed call to db_register_file to accpet stat struct.
+ *
+ *    Mark C. Miller, Fri Feb 12 08:22:41 PST 2010
+ *    Replaced stat/stat64 calls with db_silo_stat. Replaced conditional
+ *    compilation logic for SIZEOF_OFF64_T with db_silo_stat_struct.
+ *------------------------------------------------------------------------- */
+PUBLIC DBfile *
+DBOpenReal(const char *name, int type, int mode)
+{
+    char           ascii[16];
+    DBfile        *dbfile;
+    int            fileid, i;
+    int            origtype = type;
+    int            opts_set_id;
+    db_silo_stat_t filestate;
+
+    API_BEGIN("DBOpen", DBfile *, NULL) {
+        if (!name)
+            API_ERROR(NULL, E_NOFILE);
+
+        /* deal with extended driver type specifications */
+        db_DriverTypeAndFileOptionsSetId(origtype, &type, &opts_set_id);
+
+        if (type < 0 || type >= DB_NFORMATS) {
+            sprintf(ascii, "%d", type);
+            API_ERROR(ascii, E_BADFTYPE);
+        }
+        if ((mode != DB_READ) && (mode != DB_APPEND))
+        {
+            sprintf(ascii, "%d", mode);
+            API_ERROR(ascii, E_BADARGS);
+        }
+        if (!DBOpenCB[type]) {
+            sprintf(ascii, "%d", type);
+            API_ERROR(ascii, E_NOTIMP);
+        }
+
+        /****************************************************/
+        /* Check to make sure the file exists and has the   */
+        /* correct permissions.                             */
+        /****************************************************/
+        if (db_silo_stat(name, &filestate, type==DB_UNKNOWN?-1:opts_set_id) != 0)
+        {
+            if( errno == ENOENT )
+            {
+                /********************************/
+                /* File doesn't exist.          */
+                /********************************/
+                API_ERROR((char *)name, E_NOFILE);
+            }
+            else
+            {
+                /********************************/
+                /* System level error occured.  */
+                /********************************/
+#if SIZEOF_OFF64_T > 4
+                printf("stat64() failed with error: ");
+#else
+                printf("stat() failed with error: ");
+#endif
+                switch (errno)
+                {
+                  case EACCES:       printf("EACCES\n");       break;
+                  case EBADF:        printf("EBADF\n");        break;
+                  case ENAMETOOLONG: printf("ENAMETOOLONG\n"); break;
+                  case ENOTDIR:      printf("ENOTDIR\n");      break;
+#ifdef EOVERFLOW
+                  case EOVERFLOW:    
+#ifdef HAVE_STRERROR
+                                     printf("EOVERFLOW: \"%s\"\n", 
+                                        strerror(errno));
+#else
+                                     printf("EOVERFLOW: errno=%d\n", errno);
+#endif
+                                     printf("Silo may need to be re-compiled with "
+                                            "Large File Support (LFS)\n");
+                                     break;
+#endif
+                  default:           
+#ifdef HAVE_STRERROR
+                                     printf("\"%s\"\n",
+                                        strerror(errno));
+#else
+                                     printf("errno=%d\n", errno);
+#endif
+                                     break;
+                }
+                API_ERROR((char *)name, E_SYSTEMERR);
+            }
+        }
+
+        /* Check if file is already opened. If so, none can
+           have it opened for write, including this new one */ 
+        i = db_isregistered_file(0, &filestate);
+        if (i != -1)
+        {
+            if (_db_regstatus[i].w != 0 || mode != DB_READ)
+                API_ERROR(name, E_CONCURRENT);
+        }
+
+        if( ( filestate.s.st_mode & S_IFDIR ) != 0 )
+        {
+            /************************************/
+            /* File is actually a directory.    */
+            /************************************/
+            API_ERROR((char *)name, E_FILEISDIR);
+        }
+        if( ( filestate.s.st_mode & S_IREAD ) == 0 )
+        {
+            /****************************************/
+            /* File is missing read permissions.    */
+            /****************************************/
+            API_ERROR((char *)name, E_FILENOREAD);
+        }
+        if (DB_READ!=mode && (filestate.s.st_mode & S_IWUSR) == 0)
+        {
+            /****************************************/
+            /* File is open for write and missing write permission. */
+            /****************************************/
+            API_ERROR((char *)name, E_FILENOWRITE);
+        }
+
+        if ((fileid = db_get_fileid(DB_ISOPEN)) < 0)
+            API_ERROR((char *)name, E_MAXOPEN);
+        if (NULL == (dbfile = (DBOpenCB[type]) ((char *)name, mode, opts_set_id)))
+        {
+            _db_fstatus[fileid] = 0;
+            API_RETURN(NULL);
+        }
+        dbfile->pub.fileid = fileid;
+        db_register_file(dbfile, &filestate, mode!=DB_READ);
+
+        /*
+         * Install filters.  First, all `init' filters, then the
+         * specified filters.
+         */
+        for (i = 0; i < DB_NFILTERS; i++) {
+            if (_db_filter[i].name && _db_filter[i].init) {
+                (void)(_db_filter[i].init) (dbfile, _db_filter[i].name);
+            }
+        }
+        db_filter_install(dbfile);
+        if (DBInqVarExists(dbfile, SILO_VSTRING_NAME))
+            dbfile->pub.file_lib_version = DBGetVar(dbfile, SILO_VSTRING_NAME);
+
+        API_RETURN(dbfile);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBCreateReal
+ *
+ * Purpose:     Create a data file
+ *
+ * Return:      Success:        pointer to file descriptor
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:29:23 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, Tue Feb 28 10:57:06 EST 1995
+ *    A file ID is assigned to the new file.
+ *
+ *    Robb Matzke, 15 May 1996
+ *    Removed the unused `statue' auto variable.
+ *
+ *    Sean Ahern, Wed Jul  5 15:35:48 PDT 2000
+ *    Renamed the function to DBCreateReal.  Client code now calls a macro
+ *    called DBCreate.
+ *
+ *    Mark C. Miller, Wed Feb 23 08:51:35 PST 2005
+ *    Added code to reset _db_fstatus slot to 0 if create fails
+ *
+ *    Mark C. Miller, Wed Apr  5 10:17:31 PDT 2006
+ *    Added code to output silo library version string to the file
+ *
+ *    Mark C. Miller, Mon Nov 19 10:45:05 PST 2007
+ *    Added hdf5 driver warning.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Added code to register the returned file pointer
+ *
+ *    Mark C. Miller, Mon Nov 17 19:04:39 PST 2008
+ *    Added code to check to see if name is a directory.
+ *
+ *    Mark C. Miller, Wed Feb 25 23:52:05 PST 2009
+ *    Moved call to db_isregistered_file to after stat calls. Stat the
+ *    file after its created so we can get information to register it.
+ *
+ *    Mark C. Miller, Fri Feb 12 08:22:41 PST 2010
+ *    Replaced stat/stat64 calls with db_silo_stat. Replaced conditional
+ *    compilation logic for SIZEOF_OFF64_T with db_silo_stat_struct.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBfile *
+DBCreateReal(const char *name, int mode, int target, const char *info, int type)
+{
+    char           ascii[16];
+    DBfile        *dbfile;
+    int            fileid, i, n;
+    int            origtype = type;
+    int            opts_set_id;
+    db_silo_stat_t filestate;
+
+    API_BEGIN("DBCreate", DBfile *, NULL) {
+        if (!name)
+            API_ERROR(NULL, E_NOFILE);
+
+        /* deal with extended driver type specifications */
+        db_DriverTypeAndFileOptionsSetId(origtype, &type, &opts_set_id);
+
+        if (type < 0 || type >= DB_NFORMATS) {
+            sprintf(ascii, "%d", type);
+            API_ERROR(ascii, E_BADFTYPE);
+        }
+
+        if (db_silo_stat(name, &filestate, opts_set_id) == 0)  /* Success - File exists */
+        {
+            if (mode == DB_NOCLOBBER)
+            {
+                API_ERROR((char *)name, E_FEXIST);
+            }
+            if ((filestate.s.st_mode & S_IFDIR) != 0)
+            {
+                API_ERROR((char *)name, E_FILEISDIR);
+            }
+
+            /* Check if file is already opened. If so, none can
+               have it opened for write, including this new one */
+            i = db_isregistered_file(0, &filestate);
+            if (i != -1)
+            {
+                API_ERROR(name, E_CONCURRENT);
+            }
+        }
+
+        if (!DBCreateCB[type]) {
+            sprintf(ascii, "%d", type);
+            if (type == 7)
+            {
+                API_ERROR(ascii, E_NOHDF5);
+            }
+            else
+            {
+                API_ERROR(ascii, E_NOTIMP);
+            }
+        }
+
+        if ((fileid = db_get_fileid(DB_ISOPEN)) < 0)
+            API_ERROR((char *)name, E_MAXOPEN);
+        dbfile = ((DBCreateCB[type]) ((char *)name, mode, target, opts_set_id,
+                                      (char *)info));
+        if (!dbfile)
+        {
+            _db_fstatus[fileid] = 0;
+            API_RETURN(NULL);
+        }
+        dbfile->pub.fileid = fileid;
+        db_silo_stat(name, &filestate, opts_set_id);
+        db_register_file(dbfile, &filestate, 1);
+
+        /*
+         * Install filters.  First all `init' routines, then the specified
+         * `open' routines.
+         */
+        for (i = 0; i < DB_NFILTERS; i++) {
+            if (_db_filter[i].name && _db_filter[i].init) {
+                (void)(_db_filter[i].init) (dbfile, _db_filter[i].name);
+            }
+        }
+        db_filter_install(dbfile);
+
+        /* write silo library version information to the file */
+        n = strlen(SILO_VSTRING)+1;
+        DBWrite(dbfile, SILO_VSTRING_NAME, SILO_VSTRING, &n, 1, DB_CHAR);
+        dbfile->pub.file_lib_version = STRDUP(SILO_VSTRING);
+
+        API_RETURN(dbfile);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBClose
+ *
+ * Purpose:     Close the specified data file and return NULL.
+ *
+ * Return:      Success:        NULL
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:31:41 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Eric Brugger, Mon Feb 27 15:03:01 PST 1995
+ *    I changed the return value to be an integer instead of a pointer
+ *    to a DBfile.
+ *
+ *    Robb Matzke, Tue Feb 28 10:57:57 EST 1995
+ *    The file status slot is cleared so it can be reused.
+ *
+ *    Eric Brugger, Mon Jul 10 07:42:24 PDT 1995
+ *    I moved the reseting of _db_fstatus to before the return statement,
+ *    so that the instruction would get executed.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *    Added code to UNregister the given file pointer.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBClose(DBfile *dbfile)
+{
+    int            id;
+    int            retval;
+
+    API_BEGIN2("DBClose", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (NULL == dbfile->pub.close)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        id = dbfile->pub.fileid;
+        if (id >= 0 && id < DB_NFILES)
+            _db_fstatus[id] = 0;
+
+        if (dbfile->pub.file_lib_version)
+            free(dbfile->pub.file_lib_version);
+        db_unregister_file(dbfile);
+        retval = (dbfile->pub.close) (dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine:  db_inq_file_has_silo_objects_r
+ *
+ * Purpose:  Recursive helper func for DBInqFileHasObjects 
+ *
+ * Programmer: Mark C. Miller, Wed Sep 23 11:34:01 PDT 2009
+ *
+ * Modifications:
+ *   Mark C. Miller, Mon Nov 16 10:28:41 PST 2009
+ *   Fixed dir recursion by copying dir-related toc entries. Removed
+ *   misc. vars from count of silo objects.
+ *--------------------------------------------------------------------*/
+
+PRIVATE int
+db_inq_file_has_silo_objects_r(DBfile *f)
+{
+    int i, ndir, retval = 0;
+    char **dirnames;
+    DBtoc *toc = DBGetToc(f);
+
+    if (!toc)
+        return -1;
+
+    /* save dirnames so we don't loose 'em as we get new tocs */
+    ndir = toc->ndir;
+    dirnames = (char **) malloc(ndir * sizeof(char*));
+    for (i = 0; i < ndir; i++)
+        dirnames[i] = STRDUP(toc->dir_names[i]);
+     
+    /* We exclude dirs and misc. vars because a non-Silo file may
+     * contain them. */
+    retval = toc->ncurve + toc->ncsgmesh + toc->ncsgvar + toc->ndefvars +
+        toc->nmultimesh + toc->nmultimeshadj + toc->nmultivar +
+        toc->nmultimat + toc->nmultimatspecies + toc->nqmesh +
+        toc->nqvar + toc->nucdmesh + toc->nucdvar + toc->nptmesh +
+        toc->nptvar + toc->nmat + toc->nmatspecies +
+        toc->nobj + toc->nmrgtrees + toc->ngroupelmaps +
+        toc->nmrgvars + toc->narrays;
+
+    /* Recurse on directories. */
+    for (i = 0; i < ndir && retval == 0; i++)
+    {
+        DBSetDir(f, dirnames[i]);
+        retval += db_inq_file_has_silo_objects_r(f);
+        DBSetDir(f, "..");
+    }
+
+    /* free the dirnames */
+    for (i = 0; i < ndir; i++)
+        free(dirnames[i]);
+    free(dirnames);
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqFileHasObjects
+ *
+ * Purpose:     See if the file contains any silo objects, excluding
+ *              directories in the search.
+ *
+ * Return:      Success:         >0 ==> yes, the file has silo objects.
+ *                              ==0 ==> no, the file has no silo objects.
+ *
+ *              Failure:        -1 
+ *
+ * Programmer:  Mark C. Miller, Wed Sep 23 09:42:27 PDT 2009
+ *
+ * Modifications:
+ *   Mark C. Miller, Mon Nov 16 10:29:36 PST 2009
+ *   Added logic to test from some well known, tell-tale silo variables.
+ *-------------------------------------------------------------------------*/
+
+PUBLIC int
+DBInqFileHasObjects(DBfile *f)
+{
+    char cwd[4096];
+    int retval;
+
+    if (f == 0)
+        return -1;
+
+    if (DBInqVarExists(f, "_silolibinfo"))
+        return 1;
+    if (DBInqVarExists(f, "_hdf5libinfo"))
+        return 1;
+
+    DBGetDir(f, cwd);
+    retval = db_inq_file_has_silo_objects_r(f);
+    DBSetDir(f, cwd);    
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqFileReal
+ *
+ * Purpose:     Determines if the filename is a Silo file.
+ *
+ * Return:      0  if filename is not a Silo file, 
+ *              >0 if filename is a Silo file,
+ *              <0 if an error occurred.
+ *
+ * Programmer:  Hank Childs
+ *              Tue Feb 29 16:24:01 PST 2000
+ *
+ * Modifications:
+ *    Sean Ahern, Wed Jul  5 15:35:48 PDT 2000
+ *    Renamed the function to DBInqFileReal.  Client code now calls a macro
+ *    called DBInqFile.
+ *
+ *    Mark C. Miller, Wed Sep 23 11:48:19 PDT 2009
+ *    Added logic to confirm that indeed the successfully opened file has
+ *    some silo objects in it.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBInqFileReal(const char *filename)
+{
+    DBfile *dbfile = NULL;
+    int hasobjects = -1;
+
+    API_BEGIN("DBInqFile", int, -1) {
+        if (!filename || ! *filename)
+            API_ERROR("filename", E_BADARGS);
+
+        /* 
+         * Turn the error handling off so user won't see errors, 
+         * won't abort, etc.
+         */
+        DBShowErrors(DB_SUSPEND, NULL);
+
+        /*
+         * Must protect this code so that the error handling can be
+         * restored afterwards.
+         */
+        PROTECT {
+            dbfile = DBOpen(filename, DB_UNKNOWN, DB_READ);
+            if (dbfile)
+                hasobjects = DBInqFileHasObjects(dbfile);
+        } CLEANUP {
+            CANCEL_UNWIND;
+        } END_PROTECT;
+
+        /* 
+         * Turn the error handling back on. 
+         */
+        DBShowErrors(DB_RESUME, NULL);
+
+        if (dbfile != NULL)
+        {
+            DBClose(dbfile);
+            API_RETURN(hasobjects);
+        }
+ 
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPause
+ *
+ * Purpose:     Pause the specified simulation.
+ *
+ * Return:      Success:        0 if the driver succeeded.
+ *
+ *              Failure:        -1 if the driver returned failure.
+ *
+ * Programmer:  brugger at viper
+ *              Wed Jan 25 09:21:18 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Eric Brugger, Fri Mar  3 17:37:25 PST 1995
+ *    I modified the error return value to be -1, instead of NULL.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPause(DBfile *file)
+{
+    int retval;
+
+    API_DEPRECATE("DBPause", int, -1, 4,6,"") {
+        if (!file)
+            API_ERROR(NULL, E_NOFILE);
+        if (NULL == file->pub.pause)
+            API_ERROR(file->pub.name, E_NOTIMP);
+
+        retval = (file->pub.pause) (file);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBContinue
+ *
+ * Purpose:     Continue the specified simulation.
+ *
+ * Return:      Success:        0 if the driver succeeded.
+ *
+ *              Failure:        -1 if the driver returned failure.
+ *
+ * Programmer:  brugger at viper
+ *              Wed Jan 25 09:23:22 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Eric Brugger, Fri Mar  3 17:37:25 PST 1995
+ *    I modified the error return value to be -1, instead of NULL.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBContinue(DBfile *file)
+{
+    int retval;
+
+    API_DEPRECATE("DBContinue", int, -1, 4,6,"") {
+        if (!file)
+            API_ERROR(NULL, E_NOFILE);
+        if (NULL == file->pub.cont)
+            API_ERROR(file->pub.name, E_NOTIMP);
+
+        retval = (file->pub.cont) (file);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                               DBInqVarExists
+ *
+ *  Purpose
+ *
+ *      Determine if the given variable object exists in the SILO file.
+ *      Return non-zero if it does and 0 if it doesn't.
+ *
+ *  Programmer
+ *
+ *      Sean Ahern, Thu Jul 20 11:53:40 PDT 1995
+ *
+ *  Modifications
+ *    Mon Aug 28 11:15:21 PDT 1995
+ *    (ahern) Changed the API_BEGIN to API_BEGIN2.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBInqVarExists(DBfile *dbfile, const char *varname)
+{
+    int retval;
+
+    API_BEGIN2("DBInqVarExists", int, 0, varname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!varname || !*varname)
+            API_ERROR("variable name", E_BADARGS);
+        if (dbfile->pub.exist == NULL)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.exist) (dbfile, (char *)varname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBForceSingle
+ *
+ * Purpose:     If 'status' is non-zero, then any 'datatype'd arrays are
+ *              converted on read from whatever their native datatype is to
+ *              float. A 'datatype'd array is an array that is part of some
+ *              Silo object containing a 'datatype' member which indicates
+ *              the type of data in the array. So, for example, a DBucdvar
+ *              has a 'datatype' member to indicate the type of data in the
+ *              var and mixvar arrays. Such arrays will be converted on read
+ *              if 'status' here is non-zero. However, a DBmaterial object 
+ *              is ALWAYS integer data. There is no 'datatype' member for
+ *              such an object and so its data will NEVER be converted to
+ *              float on read regardless of force single status set here.
+ *
+ *              I believe this function's original intention was to convert
+ *              only double precision arrays to single precision. However,
+ *              the PDB driver was apparently never designed that way and
+ *              the PDB driver's behavior sort of established the defacto
+ *              meaning of force single. So, now, as of Silo version 4.8
+ *              the HDF5 driver obeys it as well. Though, in fact the HDF5
+ *              driver was originally written to support the original
+ *              intention of force single status and it worked in this
+ *              ('buggy') fashion for many years before we started
+ *              encountering real problems with it in VisIt.
+ *
+ * Return:      Success:        0 if all drivers succeeded or did not
+ *                              implement this function.
+ *
+ *              Failure:        -1 if any driver returned failure.
+ *
+ * Programmer:  matzke at viper
+ *              Tue Jan 10 11:01:24 PST 1995
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Mark C. Miller, Fri Jul 16 19:28:23 PDT 2010
+ *    Updated 'Purpose' above to reflect current understanding of the
+ *    meaning of force single.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBForceSingle(int status)
+{
+    int            i;
+
+    API_BEGIN("DBForceSingle", int, -1) {
+        for (i = 0; i < DB_NFORMATS; i++) {
+            if (DBFSingleCB[i]) {
+                if (((DBFSingleCB[i]) (status)) < 0) {
+                    char           dname[32];
+
+                    sprintf(dname, "driver-%d", i);
+                    API_ERROR(dname, E_CALLFAIL);
+                }
+            }
+        }
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBMakeOptlist
+ *
+ *  Purpose
+ *
+ *      Allocate an option list of the requested length and initialize it.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 06:58:04 PST 1994
+ *    Added error mechanism
+ *--------------------------------------------------------------------*/
+PUBLIC DBoptlist *
+DBMakeOptlist(int maxopts)
+{
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("DBMakeOptlist", DBoptlist *, NULL) {
+        if (maxopts <= 0)
+            API_ERROR("maxopts", E_BADARGS);
+        if (NULL == (optlist = ALLOC(DBoptlist)))
+            API_ERROR(NULL, E_NOMEM);
+        if (NULL == (optlist->options = ALLOC_N(int, maxopts))) {
+            API_ERROR(NULL, E_NOMEM);
+        }
+        if (NULL == (optlist->values = ALLOC_N(void *, maxopts))) {
+            API_ERROR(NULL, E_NOMEM);
+        }
+
+        optlist->numopts = 0;
+        optlist->maxopts = maxopts;
+
+        API_RETURN(optlist);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBFreeOptlist
+ *
+ *  Purpose
+ *
+ *      Release the storage associated with the given optlist list.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns 0 on success, -1 on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 07:56:34 PST 1994
+ *    Added error mechanism.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBFreeOptlist(DBoptlist *optlist)
+{
+    API_BEGIN("DBFreeOptlist", int, -1) {
+        if (!optlist || optlist->numopts < 0) {
+            API_ERROR("optlist pointer", E_BADARGS);
+        }
+        FREE(optlist->options);
+        FREE(optlist->values);
+        FREE(optlist);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBClearOptlist
+ *
+ *  Purpose
+ *
+ *      Remove all options from the given optlist and reset counters.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 07:48:52 PST 1994
+ *    Added error mechanism.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBClearOptlist(DBoptlist *optlist)
+{
+    int            i;
+
+    API_BEGIN("DBClearOptlist", int, -1) {
+        if (!optlist || optlist->numopts < 0) {
+            API_ERROR("optlist pointer", E_BADARGS);
+        }
+
+        /* Reset values, but do not free */
+        for (i = 0; i < optlist->maxopts; i++) {
+            optlist->options[i] = 0;
+            optlist->values[i] = (void *)NULL;
+        }
+
+        optlist->numopts = 0;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  DBAddOption
+ *
+ *  Purpose
+ *
+ *      Add an option to the given option list structure.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Returns
+ *
+ *      Returns OKAY on success, OOPS on failure.
+ *
+ *  Modified:
+ *    Robb Matzke, Tue Nov 8 07:00:55 PST 1994
+ *    Added error mechanism.  Returns -1 on failure, 0 on success.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBAddOption(DBoptlist *optlist, int option, void *value)
+{
+    API_BEGIN("DBAddOption", int, -1) {
+        if (!optlist)
+            API_ERROR("optlist pointer", E_BADARGS);
+        if (optlist->numopts >= optlist->maxopts)
+            API_ERROR("optlist nopts", E_BADARGS);
+
+        optlist->options[optlist->numopts] = option;
+        optlist->values[optlist->numopts] = value;
+        optlist->numopts++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBClearOption
+ *
+ *  Purpose
+ *
+ *      Remove a given option from the given optlist and re-order
+ *      the remaining options.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, August 18, 2005 
+ *
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBClearOption(DBoptlist *optlist, int option)
+{
+    int            i, j, foundit=0;
+
+    API_BEGIN("DBClearOption", int, -1) {
+        if (!optlist || optlist->numopts < 0) {
+            API_ERROR("optlist pointer", E_BADARGS);
+        }
+
+        /* Shift values down in list by one entry */
+        for (i = 0; i < optlist->numopts; i++) {
+            if (optlist->options[i] == option) {
+                foundit = 1;
+                for (j = i; j < optlist->numopts-1; j++) {
+                    optlist->options[j] = optlist->options[j+1];
+                    optlist->values[j]  = optlist->values[j+1];
+                }
+                break;
+            }
+        }
+
+        if (foundit) {
+            optlist->numopts--;
+            optlist->options[optlist->numopts] = 0;
+            optlist->values[optlist->numopts]  = 0;
+        }
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBGetOption
+ *
+ *  Purpose
+ *
+ *      Return value set for a given option from the given optlist.
+ *
+ *  Programmer
+ *
+ *      Mark C. Miller, August 18, 2005 
+ *
+ *  Modifications:
+ *
+ *      Mark C. Miller, Wed Jul 14 20:35:50 PDT 2010
+ *      Replaced 'return' with 'API_RETURN'
+ *
+ *      Mark C. Miller, Tue Aug 10 23:49:51 PDT 2010
+ *      Removed API_BEGIN/END stuff so that function can be handed
+ *      a null optlist and it will behave well.
+ *--------------------------------------------------------------------*/
+PUBLIC void * 
+DBGetOption(const DBoptlist *optlist, int option)
+{
+    int            i;
+
+    if (!optlist) return 0;
+
+    /* find the given option in the optlist and return its value */
+    for (i = 0; i < optlist->numopts; i++)
+        if (optlist->options[i] == option)
+            return optlist->values[i];
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetToc
+ *
+ * Purpose:     Return a pointer to table of contents of the file.  Note
+ *              that the pointer is the same as the one in the DBfile
+ *              so it should not be modified and may become invalid after
+ *              calling the next silo routine.
+ *
+ * Return:      Success:        Pointer to the table of contents structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:35:47 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:23:43 PST 1995
+ *    I changed the interface and function of the routine.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBtoc  *
+DBGetToc(DBfile *dbfile)
+{
+    API_BEGIN2("DBGetToc", DBtoc *, NULL, api_dummy) {
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("", E_GRABBED) ; 
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+
+        DBNewToc(dbfile);
+        API_RETURN(dbfile->pub.toc);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqVarType
+ *
+ * Purpose:     Return the DBObjectType for a given object name
+ *
+ * Return:      Success:        the ObjectType for the given object
+ *
+ *              Failure:        DB_INVALID_OBJECT
+ *
+ * Programmer:  Sean Ahern,
+ *              Wed Oct 28 14:46:53 PST 1998
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBObjectType
+DBInqVarType(DBfile *dbfile, const char *varname)
+{
+    DBObjectType retval;
+
+    API_BEGIN2("DBInqVarType", DBObjectType, DB_INVALID_OBJECT, api_dummy) {
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("", E_GRABBED) ; 
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!varname || !*varname)
+            API_ERROR("variable name", E_BADARGS);
+        if (!dbfile->pub.inqvartype)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.inqvartype) (dbfile, (char *)varname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBNewToc
+ *
+ * Purpose:     Used to be called `DBGetToc', this function installs a
+ *              new table of contents in the specified file from that
+ *              file's current working directory.  The old table of contents
+ *              is destroyed.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 10:26:23 EST 1995
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-05-23
+ *              If nothing has changed then this function just returns
+ *              success, leaving the original table of contents in place.
+ *              Any function that potentially changes the table of
+ *              contents should call db_FreeToc() on the file handle.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBNewToc(DBfile *dbfile)
+{
+    int retval;
+
+    API_BEGIN("DBNewToc", int, -1) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("", E_GRABBED) ; 
+        if (!dbfile->pub.newtoc)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        if (dbfile->pub.toc)
+            API_RETURN(0);
+        retval = (dbfile->pub.newtoc) (dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                     DBGetAtt
+ *
+ *  Purpose
+ *
+ *      Allocate space for, and read, the given attribute of the given
+ *      variable.
+ *
+ *  Modified
+ *    Robb Matzke, Mon Nov 14 14:18:56 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Mark C. Miller, Tue Sep  6 10:57:55 PDT 2005
+ *    Deprecated this function
+ *--------------------------------------------------------------------*/
+PUBLIC void   *
+DBGetAtt(DBfile *dbfile, const char *varname, const char *attname)
+{
+    void *retval = NULL;
+
+    API_DEPRECATE2("DBGetAtt", void *, NULL, varname, 4,6,"") {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!varname || !*varname)
+            API_ERROR("variable name", E_BADARGS);
+        if (!attname || !*attname)
+            API_ERROR("attribute name", E_BADARGS);
+        if (!dbfile->pub.g_attr)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_attr) (dbfile, (char *)varname,
+                                       (char *)attname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBGetComponent
+ *
+ *  Purpose
+ *
+ *      Return the requested component value for the given object.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Parameters
+ *
+ *      dbfile           {In}    {Pointer to current file}
+ *      objname          {In}    {Name of object to inquire about}
+ *      compname         {In}    {Name of component to return}
+ *
+ *  Notes
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 08:22:42 PST 1994
+ *    Added error mechanism
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Eric Brugger, Wed Mar 10 16:59:34 PST 1999
+ *    Changed API_BEGIN2 to API_BEGIN so that Silo directory information
+ *    would be processed at the driver level, since the pdb driver
+ *    version of this routine handles silo directory paths as well as
+ *    file system directory paths, which API_BEGIN2 does not.
+ *
+ *    Eric Brugger, Thu Mar 11 12:33:15 PST 1999
+ *    I forgot to remove the fourth argument when I changed API_BEGIN2
+ *    to API_BEGIN.  I did so now.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *--------------------------------------------------------------------*/
+PUBLIC void   *
+DBGetComponent(DBfile *dbfile, const char *objname, const char *compname)
+{
+    void *retval = NULL;
+
+    API_BEGIN2("DBGetComponent", void *, NULL, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetComponent", E_GRABBED) ; 
+        if (!objname || !*objname)
+            API_ERROR("object name", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (!dbfile->pub.g_comp)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_comp) (dbfile, (char *)objname,
+                                       (char *)compname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                           DBGetComponentType
+ *
+ *  Purpose
+ *
+ *      Return the type of a component for the given object.
+ *
+ *  Programmer
+ *
+ *      Brad Whitlock, Thu Jan 20 11:54:54 PDT 2000
+ *
+ *  Parameters
+ *
+ *      dbfile           {In}    {Pointer to current file}
+ *      objname          {In}    {Name of object to inquire about}
+ *      compname         {In}    {Name of component to return}
+ *
+ *  Modified
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *--------------------------------------------------------------------*/
+
+PUBLIC int
+DBGetComponentType(DBfile *dbfile, const char *objname, const char *compname)
+{
+    int retval = DB_NOTYPE;
+
+    API_BEGIN2("DBGetComponentType", int, DB_NOTYPE, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("", E_GRABBED) ; 
+        if (!objname || !*objname)
+            API_ERROR("object name", E_BADARGS);
+        if (!compname || !*compname)
+            API_ERROR("component name", E_BADARGS);
+        if (!dbfile->pub.g_comptyp)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_comptyp) (dbfile, (char *)objname,
+                                          (char *)compname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                     DBGetDir
+ *
+ *  Purpose
+ *
+ *      Get the name of the current directory, return in space provided.
+ *
+ *  Modified
+ *    Robb Matzke, Tue Nov 8 08:48:12 PST 1994
+ *    Added error mechanism
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBGetDir(DBfile *dbfile, char *path)
+{
+    int retval;
+
+    API_BEGIN2("DBGetDir", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetDir", E_GRABBED) ; 
+        if (!path)
+            API_ERROR("path", E_BADARGS);
+        if (!dbfile->pub.g_dir)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_dir) (dbfile, path);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBSetDir
+ *
+ * Purpose:     Sets the current directory within the database.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 13:09:23 EST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:31:17 EST 1994
+ *    Added error mechanism.
+ *
+ *    Robb Matzke, Fri Jan 6 07:34:29 PST 1995
+ *    Checkes for changing to `.' since that is a no-op.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBSetDir(DBfile *dbfile, const char *path)
+{
+    char           tmp[256];
+    int retval;
+
+    API_BEGIN2("DBSetDir", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBSetDir", E_GRABBED) ; 
+        if (!path || !*path)
+            API_ERROR("path", E_BADARGS);
+        if (STR_EQUAL(path, "."))
+        {
+            API_RETURN(0);
+        }
+        if (DBGetDir(dbfile, tmp) < 0)
+            API_ERROR("DBGetDir", E_CALLFAIL);
+        if (STR_EQUAL(tmp, path))
+        {
+            API_RETURN(0);
+        }
+        if (!dbfile->pub.cd)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.cd) (dbfile, (char *)path);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBSetDirID
+ *
+ * Purpose:     Same as DBSetDir() except by ID instead of name.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 13:15:19 EST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:33:11 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBSetDirID(DBfile *dbfile, int dirid)
+{
+    int retval;
+
+    API_BEGIN("DBSetDirID", int, -1) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBSetDirID", E_GRABBED) ; 
+        if (!dbfile->pub.toc) {
+            API_ERROR("missing table of contents", E_BADARGS);
+        }
+        if (!dbfile->pub.cdid)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.cdid) (dbfile, dirid);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBListDir
+ *
+ * Purpose:     Lists the contents of the diven directories based
+ *              on the listing options passed in through argv[].
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:36:05 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:35:29 EST 1994
+ *    Added error mechanism.
+ *
+ *    Robb Matzke, Fri Dec 9 17:11:50 EST 1994
+ *    This no longer invokes a callback.  There is nothing special to
+ *    do here that depends on the device driver.  All we do is format
+ *    the existing table of contents in some nice way.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Mark C. Miller, Tue Sep  6 10:57:55 PDT 2005
+ *    Deprecated this function
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBListDir(DBfile *dbfile, char *argv[], int argc)
+{
+    int retval;
+
+    API_DEPRECATE("DBListDir", int, -1, 4,6,"DBGetToc()") {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBListDir", E_GRABBED) ; 
+        DBNewToc(dbfile);
+        if (!dbfile->pub.toc)
+            API_ERROR("no table of contents", E_INTERNAL);
+        if (argc < 0)
+            API_ERROR("nargs", E_BADARGS);
+        if (!argv && argc)
+            API_ERROR("args", E_BADARGS);
+
+        retval = db_ListDir2(dbfile, argv, argc, FALSE, NULL, NULL);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBFilters
+ *
+ * Purpose:     List the names of filters installed for the specified
+ *              file.  The list is sent to the specified stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 10:51:58 EST 1995
+ *
+ * Modifications:
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBFilters(DBfile *dbfile, FILE *stream)
+{
+    int retval;
+
+    API_BEGIN2("DBFilters", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBFilters", E_GRABBED) ; 
+        if (!stream)
+            stream = stdout;
+        if (!dbfile->pub.module)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.module) (dbfile, stream);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBMkDir
+ *
+ * Purpose:     Creates a new directory in the database.
+ *
+ * Return:      Success:        directory ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:46:21 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:36:44 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBMkDir(DBfile *dbfile, const char *name)
+{
+    int retval;
+
+    API_BEGIN2("DBMkDir", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBMkDir", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("directory name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("directory name", E_INVALIDNAME);
+        if (!dbfile->pub.mkdir)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.mkdir) (dbfile, (char *)name);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    DBCpDir
+ *
+ * Purpose:     Copies a directory tree from one file to another
+ *
+ * Return:      Success:        directory ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller, Wed Aug  6 15:14:33 PDT 2008
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBCpDir(DBfile *dbfile, const char *srcDir,
+        DBfile *dstFile, const char *dstDir)
+{
+    int retval;
+
+    API_BEGIN2("DBCpDir", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!dstFile)
+            API_ERROR(NULL, E_NOFILE);
+        if (db_isregistered_file(dstFile,0)==-1)
+            API_ERROR(NULL, E_NOTREG);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR(NULL, E_GRABBED) ; 
+        if (!srcDir || !*srcDir)
+            API_ERROR("source directory name", E_BADARGS);
+        if (!dstDir || !*dstDir)
+            API_ERROR("destination directory name", E_BADARGS);
+        if (db_VariableNameValid((char *)dstDir) == 0)
+            API_ERROR("destination directory name", E_INVALIDNAME);
+        if (!dbfile->pub.cpdir)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.cpdir) (dbfile, srcDir, dstFile, dstDir);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBChangeObject
+ *
+ * Purpose:     Overwrites an object with a new object.  This is usually
+ *              the same function as called by DBWriteObject but with
+ *              OVER_WRITE as the flag.  However, we keep it as a separate
+ *              callback so existing drivers that don't support overwriting
+ *              don't need to be changed and so that the silo API doesn't
+ *              change by changing the meaning of the `freemem' argument
+ *              to DBWriteObject.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Completely reformatted the code so a human can read it.  Made the error
+ *    messages a little better.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBChangeObject (DBfile *dbfile, DBobject *obj)
+{
+    int             retval;
+
+    API_BEGIN2("DBChangeObject", int, -1, api_dummy)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBChangeObject", E_GRABBED) ; 
+        if (!obj)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!dbfile->pub.c_obj)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        retval = (dbfile->pub.c_obj) (dbfile, obj, OVER_WRITE);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;                     /* BEWARE: If API_RETURN is removed 
+                                        * use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBWriteObject
+ *
+ * Purpose:     Write an object into the data file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:45:14 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:37:54 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 7 Mar 1997
+ *    The freemem value passed to the driver is either FREE_MEM or zero
+ *    so that drivers that overload this function with DBChangeObject
+ *    are guaranteed to be able to tell the difference.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBWriteObject(DBfile *dbfile, DBobject *obj, int freemem)
+{
+    int retval;
+
+    API_BEGIN2("DBWriteObject", int, -1, api_dummy)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBWriteObject", E_GRABBED) ; 
+        if (!obj)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, obj->name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!dbfile->pub.w_obj)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.w_obj) (dbfile, obj, freemem?FREE_MEM:0);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetObject
+ *
+ * Purpose:     Reads an object from a file.
+ *
+ * Return:      Success:        Ptr to the new object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  2 1996
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBobject *
+DBGetObject (DBfile *dbfile, const char *objname)
+{
+    DBobject       *retval = NULL;
+
+    API_BEGIN2("DBGetObject", DBobject *, NULL, api_dummy)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetObject", E_GRABBED) ; 
+        if (!objname)
+            API_ERROR("object name", E_BADARGS);
+        if (!dbfile->pub.g_obj)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        retval = (dbfile->pub.g_obj) (dbfile, (char *)objname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;                     /* BEWARE:  If API_RETURN above is
+                                        * removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBWriteComponent
+ *
+ * Purpose:     Add a variable component to the given object structure, AND
+ *              write out the associated data.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:47:29 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:39:06 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Mar 31 17:16:24 PST 1998
+ *    I added a check for zero-length data arrays.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 23 00:15:15 PDT 2008
+ *    Changed to API_BEGIN2 to help detect attempted ops on closed files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBWriteComponent(DBfile *dbfile, DBobject *obj, const char *comp_name,
+                 const char *prefix, const char *datatype, const void *var, int nd,
+                 long *count)
+{
+    int retval;
+    int nvals, i;
+
+    API_BEGIN2("DBWriteComponent", int, -1, api_dummy) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBWriteComponent", E_GRABBED) ; 
+        if (!obj)
+            API_ERROR("object pointer", E_BADARGS);
+        if (!comp_name || !*comp_name)
+            API_ERROR("component name", E_BADARGS);
+        if (db_VariableNameValid((char *)comp_name) == 0)
+            API_ERROR("component name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, obj->name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!prefix || !*prefix)
+            API_ERROR("prefix", E_BADARGS);
+        if (db_VariableNameValid((char *)prefix) == 0)
+            API_ERROR("prefix", E_INVALIDNAME);
+        if (!datatype || !*datatype)
+            API_ERROR("data type", E_BADARGS);
+        if (!var)
+            API_ERROR("var pointer", E_BADARGS);
+        if (nd <= 0)
+            API_ERROR("nd", E_BADARGS);
+        if (!count && nd)
+            API_ERROR("count", E_BADARGS);
+        for(nvals=1,i=0;i<nd;i++)
+        {
+            nvals *= count[i];
+        }
+        if (nvals == 0) {
+            API_ERROR("Zero-length write attempted", E_BADARGS);
+        }
+        if (obj->ncomponents >= obj->maxcomponents) {
+            API_ERROR("ncomponents", E_BADARGS);
+        }
+        if (!dbfile->pub.w_comp)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.w_comp) (dbfile, obj, (char *)comp_name,
+                                     (char *)prefix, (char *)datatype, var,
+                                     nd, count);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBWrite
+ *
+ * Purpose:     Writes a single variable into the database.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 13:19:49 EST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:42:27 EST 1994
+ *    Added error mecanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Mar 31 17:17:44 PST 1998
+ *    I added a check for zero-length arrays.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Mon Jan 11 17:42:51 PST 2010
+ *    Allow special variable names in the magic /.silo dir for HDF5 files.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBWrite(DBfile *dbfile, const char *vname, void *var, int *dims, int ndims,
+        int datatype)
+{
+    int retval;
+    int nvals, i;
+
+    API_BEGIN2("DBWrite", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBWrite", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("variable name", E_BADARGS);
+        if (strncmp("/.silo/#", vname, 8) != 0 &&
+            db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("variable name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, vname))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!dims && ndims)
+            API_ERROR("dims", E_BADARGS);
+        for(nvals=1,i=0;i<ndims;i++)
+        {
+            nvals *= dims[i];
+        }
+        if (nvals == 0)
+            API_ERROR("Zero length write attempted", E_BADARGS);
+        if (db_FullyDeprecatedConvention(vname))
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        if (!dbfile->pub.write)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.write) (dbfile, (char *)vname, var, dims,
+                                      ndims, datatype);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBWriteSlice
+ *
+ * Purpose:     Similar to DBWrite except only part of the data is
+ *              written.  If VNAME doesn't exist, space is reserved for
+ *              the entire variable based on DIMS; otherwise we check
+ *              that DIMS has the same value as originally.  Then we
+ *              write the specified slice to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May  9, 1996
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Mar 31 17:19:38 PST 1998
+ *    I added a check for zero-length writes.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBWriteSlice (DBfile *dbfile, const char *vname, void *values, int dtype,
+              int offset[], int length[], int stride[], int dims[],
+              int ndims)
+{
+    int retval;
+    int nvals,i;
+
+    API_BEGIN2("DBWriteSlice", int, -1, vname)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBWriteSlice", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("variable name", E_BADARGS);
+        if (db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("variable name", E_INVALIDNAME);
+        if (!values)
+            API_ERROR("values", E_BADARGS);
+        if (!offset)
+            API_ERROR("offset", E_BADARGS);
+        if (!length)
+            API_ERROR("length", E_BADARGS);
+        if (!stride)
+            API_ERROR("stride", E_BADARGS);
+        if (!dims)
+            API_ERROR("dims", E_BADARGS);
+        if (ndims <= 0 || ndims > 3)
+            API_ERROR("ndims", E_BADARGS);
+        for(nvals=1,i=0;i<ndims;i++)
+        {
+            nvals *= length[i];
+        }
+        if (nvals == 0)
+            API_ERROR("Zero-length write attempted", E_BADARGS);
+        if (!dbfile->pub.writeslice)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.writeslice) (dbfile, (char *)vname, values,
+                                           dtype, offset, length, stride,
+                                           dims, ndims);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;     /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBReadAtt
+ *
+ * Purpose:     Reads the given attribute value into the provided space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 12:54:24 EST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Mon Nov 21 21:44:07 EST 1994
+ *    Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Mark C. Miller, Tue Sep  6 10:57:55 PDT 2005
+ *    Deprectated this function
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBReadAtt(DBfile *dbfile, const char *vname, const char *aname, void *results)
+{
+    int retval;
+
+    API_DEPRECATE2("DBReadAtt", int, -1, vname, 4,6,"") {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBReadAtt", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("variable name", E_BADARGS);
+        if (!aname || !*aname)
+            API_ERROR("attribute name", E_BADARGS);
+        if (!results)
+            API_ERROR("results pointer", E_BADARGS);
+        if (!dbfile->pub.r_att)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.r_att) (dbfile, (char *)vname, (char *)aname,
+                                      results);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetCompoundarray
+ *
+ * Purpose:     Read a compound array object from the file.
+ *
+ * Return:      Success:        pointer to fresh compound array obj.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:50:29 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBcompoundarray *
+DBGetCompoundarray(DBfile *dbfile, const char *name)
+{
+    DBcompoundarray *retval = NULL;
+
+    API_BEGIN2("DBGetCompoundarray", DBcompoundarray *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetCompoundarray", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("array name", E_BADARGS);
+        if (NULL == dbfile->pub.g_ca)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_ca) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetCurve
+ *
+ * Purpose:     Read a curve object from the file.
+ *
+ * Return:      Success:        pointer to fresh curve obj
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 16, 1996
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBcurve *
+DBGetCurve (DBfile *dbfile, const char *name)
+{
+    DBcurve *retval = NULL;
+
+    API_BEGIN2("DBGetCurve", DBcurve *, NULL, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetCurve", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("curve name", E_BADARGS);
+        if (NULL == dbfile->pub.g_cu)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_cu) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetDefvars
+ *
+ * Purpose:     Read a defvars object from the file.
+ *
+ * Return:      Success:        pointer to fresh defvars obj
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 8, 2005 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBdefvars *
+DBGetDefvars (DBfile *dbfile, const char *name)
+{
+    DBdefvars *retval = NULL;
+
+    API_BEGIN2("DBGetDefvars", DBdefvars *, NULL, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetDefvars", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("defvars name", E_BADARGS);
+        if (NULL == dbfile->pub.g_defv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_defv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMaterial
+ *
+ * Purpose:     Allocates a DBmaterial data structure, reads material data
+ *              from the database, and returns a pointer to that struct.
+ *
+ * Return:      Success:        pointer to a new DBmaterial structure
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:32:17 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmaterial *
+DBGetMaterial(DBfile *dbfile, const char *name)
+{
+    DBmaterial *retval = NULL;
+
+    API_BEGIN2("DBGetMaterial", DBmaterial *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMaterial", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("material name", E_BADARGS);
+        if (!dbfile->pub.g_ma)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_ma) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                             DBGetMatspecies
+ *
+ *  Purpose
+ *
+ *      Read a matspecies-data structure from the given database.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Parameters
+ *
+ *      DBGetMatspecies {Out}    {Pointer to matspecies structure}
+ *      dbfile           {In}    {Pointer to current file}
+ *      name             {In}    {Name of matspecies-data to read}
+ *
+ *  Notes
+ *
+ *  Modifications
+ *    Al Leibee, Tue Jul 26 08:44:01 PDT 1994
+ *    Replaced composition by species.
+ *
+ *    Robb Matzke, Tue Nov 29 13:21:27 PST 1994
+ *    Modified for device independence.  Added error mechanism.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *--------------------------------------------------------------------*/
+PUBLIC DBmatspecies *
+DBGetMatspecies(DBfile *dbfile, const char *name)
+{
+    DBmatspecies *retval = NULL;
+
+    API_BEGIN2("DBGetMatspecies", DBmatspecies *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMatspecies", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("material species name", E_BADARGS);
+        if (!dbfile->pub.g_ms)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_ms) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMultimesh
+ *
+ * Purpose:     Allocates a DBmultimesh data structure, reads a multi-block
+ *              mesh from the database, and returns a pointer to the
+ *              new structure.
+ *
+ * Return:      Success:        pointer to the new DBmultimesh
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:35:38 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmultimesh *
+DBGetMultimesh(DBfile *dbfile, const char *name)
+{
+    DBmultimesh * retval = NULL;
+
+    API_BEGIN2("DBGetMultimesh", DBmultimesh *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMultimesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimesh name", E_BADARGS);
+        if (!dbfile->pub.g_mm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mm) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMultimeshadj
+ *
+ * Purpose:     Allocates a DBmultimeshdj data structure, reads a
+ *              multi-block mesh adjacency object from the database, and
+ *              returns a pointer to the new structure.
+ *
+ * Return:      Success:        pointer to the new DBmultimeshadj
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 24, 2005 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmultimeshadj *
+DBGetMultimeshadj(DBfile *dbfile, const char *name, int nmesh,
+   const int *block_map)
+{
+    DBmultimeshadj * retval = NULL;
+
+    API_BEGIN2("DBGetMultimeshadj", DBmultimeshadj *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMultimeshadj", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimesh name", E_BADARGS);
+        if (!dbfile->pub.g_mmadj)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mmadj) (dbfile, (char *)name, nmesh,
+                                        block_map);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMultivar
+ *
+ * Purpose:     Allocates a DBmultivar data structure, reads a multi-block
+ *              variable from the database, and returns a pointer to the
+ *              new structure.
+ *
+ * Return:      Success:        pointer to the new DBmultivar
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at cloud
+ *              Tue Feb 21 11:27:46 EST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmultivar *
+DBGetMultivar(DBfile *dbfile, const char *name)
+{
+    DBmultivar * retval = NULL;
+
+    API_BEGIN2("DBGetMultivar", DBmultivar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMultivar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multivar name", E_BADARGS);
+        if (!dbfile->pub.g_mv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMultimat
+ *
+ * Purpose:     Allocates a DBmultimat data structure, reads a multi-
+ *              material from the database, and returns a pointer to the
+ *              new structure.
+ *
+ * Return:      Success:        pointer to the new DBmultimat
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at cloud
+ *              Tue Feb 21 11:27:46 EST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmultimat *
+DBGetMultimat(DBfile *dbfile, const char *name)
+{
+    DBmultimat * retval = NULL;
+
+    API_BEGIN2("DBGetMultimat", DBmultimat *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMultimat", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimat name", E_BADARGS);
+        if (!dbfile->pub.g_mt)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mt) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetMultimatspecies
+ *
+ * Purpose:     Allocates a DBmultimatspecies data structure, reads a
+ *              multi-material-species from the database, and returns
+ *              a pointer to the new structure.
+ *
+ * Return:      Success:        pointer to the new DBmultimatspecies
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Jeremy S. Meredith  
+ *              Sept 17 1998
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmultimatspecies *
+DBGetMultimatspecies(DBfile *dbfile, const char *name)
+{
+    DBmultimatspecies * retval = NULL;
+
+    API_BEGIN2("DBGetMultimatspecies", DBmultimatspecies *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMultimatspecies", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimatspecies name", E_BADARGS);
+        if (!dbfile->pub.g_mms)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mms) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetPointmesh
+ *
+ * Purpose:     Allocates a DBpointmesh data structure and reads a point
+ *              mesh from the database.
+ *
+ * Return:      Success:        pointer to the new DBpointmesh struct.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:37:55 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBpointmesh *
+DBGetPointmesh(DBfile *dbfile, const char *name)
+{
+    DBpointmesh * retval = NULL;
+
+    API_BEGIN2("DBGetPointmesh", DBpointmesh *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetPointmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("pointmesh name", E_BADARGS);
+        if (!dbfile->pub.g_pm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_pm) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetPointvar
+ *
+ * Purpose:     Allocates a DBmeshvar data structure and reads a variable
+ *              associated with a point mesh from the database.
+ *
+ * Return:      Success:        pointer to the new DBmeshvar struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:41:21 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBmeshvar *
+DBGetPointvar(DBfile *dbfile, const char *name)
+{
+    DBmeshvar * retval = NULL;
+
+    API_BEGIN2("DBGetPointvar", DBmeshvar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetPointvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("pointvar name", E_BADARGS);
+        if (!dbfile->pub.g_pv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_pv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetQuadmesh
+ *
+ * Purpose:     Allocates a DBquadmesh data structure and reads
+ *              a quadrilateral mesh from the databas.
+ *
+ * Return:      Success:        pointer to the new DBquadmesh struct.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:44:26 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ * 
+ *    Hank Childs, Fri Feb 25 09:48:40 PST 2000
+ *    Initialized start_index and size_index.
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBquadmesh *
+DBGetQuadmesh(DBfile *dbfile, const char *name)
+{
+    DBquadmesh    *qm = NULL;
+    int            i;
+
+    API_BEGIN2("DBGetQuadmesh", DBquadmesh *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetQuadmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("quadmesh name", E_BADARGS);
+        if (!dbfile->pub.g_qm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        qm = (dbfile->pub.g_qm) (dbfile, (char *)name);
+        if (!qm)
+        {
+            API_RETURN(NULL);
+        }
+
+        /*
+         * Put in default axis labels if none supplied.
+         */
+        switch (qm->ndims) {
+            case 3:
+                if (qm->labels[2] == NULL) {
+                    qm->labels[2] = ALLOC_N(char, 7);
+
+                    strcpy(qm->labels[2], "Z Axis");
+                }
+                /* Fall through */
+            case 2:
+                if (qm->labels[1] == NULL) {
+                    qm->labels[1] = ALLOC_N(char, 7);
+
+                    strcpy(qm->labels[1], "Y Axis");
+                }
+                /* Fall through */
+            case 1:
+                if (qm->labels[0] == NULL) {
+                    qm->labels[0] = ALLOC_N(char, 7);
+
+                    strcpy(qm->labels[0], "X Axis");
+                }
+                break;
+        }
+
+        for (i = 0 ; i < 3 ; i++)
+        {
+            qm->start_index[i] = 0;
+            qm->size_index[i]  = qm->dims[i];
+        }
+
+        API_RETURN(qm);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetQuadvar
+ *
+ * Purpose:     Allocates a DBquadvar data structure and reads a variable
+ *              associated with a quadrilateral mesh from the database.
+ *
+ * Return:      Success:        Pointer to the new DBquadvar struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:46:57 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBquadvar *
+DBGetQuadvar(DBfile *dbfile, const char *name)
+{
+    DBquadvar * retval = NULL;
+
+    API_BEGIN2("DBGetQuadvar", DBquadvar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetQuadvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("quadvar name", E_BADARGS);
+        if (!dbfile->pub.g_qv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_qv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetQuadvar1
+ *
+ * Purpose:     Read a scalar quadmesh variable (inverse of DBPutQuadVar1).
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  mcabee at viper
+ *              Sun Jan 7, 1995
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetQuadvar1 (DBfile *dbfile, const char *varname, DB_DTPTR1 var, int *dims,
+               int *ndims, DB_DTPTR1 mixvar, int *mixlen, int *datatype,
+               int *centering)
+{
+    char           tmpstr[64];
+    int            nbytes, i;
+    DBquadvar     *qv = NULL;
+
+    API_DEPRECATE2 ("DBGetQuadvar1", int, -1, varname, 4,6,"DBGetQuadvar()") {
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetQuadvar1", E_GRABBED) ; 
+        if (NULL == (qv = DBGetQuadvar (dbfile, varname)))
+            API_ERROR ("DBGetQuadvar1", E_CALLFAIL);
+
+        /*
+         * Copy the quad var into the supplied space. Assign
+         * the misc. attributes.
+         */
+        nbytes = qv->nels * db_GetMachDataSize (qv->datatype);
+        memcpy (var, qv->vals[0], nbytes);
+
+        *ndims     =  qv->ndims;
+        *centering =  (qv->align[0] == 0.0) ? DB_NODECENT : DB_ZONECENT;
+        *datatype  =  qv->datatype;
+        *mixlen    =  qv->mixlen;
+
+        for (i = 0; i < qv->ndims; i++)
+            dims[i] = qv->dims[i];
+
+        /*
+         * If there was mixed data, copy that too.
+         * Assume name of mixed component is 'varname_mix'.
+         */
+        if ((int *)mixvar != NULL) {
+            strcpy (tmpstr, varname);
+            strcat (tmpstr, "_mix");
+
+            *mixlen = DBGetVarLength (dbfile, tmpstr);
+            DBReadVar (dbfile, tmpstr, mixvar);
+        }
+
+        DBFreeQuadvar (qv);
+
+        API_RETURN (0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBAnnotateUcdmesh
+ *
+ * Purpose:     Walks a DBucdmesh data structure and adds shapetype
+ *              info based on ndims and shapesize (spatial dimensions
+ *              and node count).
+ *
+ * Return:      1:        One or more zones/shapes were annotated.
+ *
+ *              0:        No annotation was performed.
+ *
+ *              -1:       Annotation could not be performed (an
+ *                        error condition such as exhaustion of
+ *                        dynamic memory occurred).
+ *
+ * Programmer:  reus at viper
+ *              Tue Oct  8 09:40:36 PDT 1996
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBAnnotateUcdmesh(DBucdmesh *m)
+{
+   if (m != NULL)
+   {
+      DBzonelist *z;
+
+      if ((z=m->zones) != NULL)
+         if (z->shapetype == NULL)
+         {
+            int N;
+
+            N = z->nshapes;
+            if ((z->shapetype=(int *)malloc(N*sizeof(int))) != NULL)
+            {
+               int *numberOfNodes;
+
+               if ((numberOfNodes=z->shapesize) != NULL)
+               {
+                  int i;
+
+                  switch (z->ndims)
+                  {
+                    case 1: for (i=0; i<N; ++i)
+                               z->shapetype[i] = DB_ZONETYPE_BEAM;
+                            break;
+                    case 2: for (i=0; i<N; ++i)
+                               switch (numberOfNodes[i])
+                               {
+                                 case 3:  z->shapetype[i] = DB_ZONETYPE_TRIANGLE;
+                                          break;
+                                 case 4:  z->shapetype[i] = DB_ZONETYPE_QUAD;
+                                          break;
+                                 default: z->shapetype[i] = DB_ZONETYPE_POLYGON;
+                                          break;
+                               }
+                            break;
+                    case 3: for (i=0; i<N; ++i)
+                               switch (numberOfNodes[i])
+                               {
+                                 case 4:  z->shapetype[i] = DB_ZONETYPE_TET;
+                                          break;
+                                 case 5:  z->shapetype[i] = DB_ZONETYPE_PYRAMID;
+                                          break;
+                                 case 6:  z->shapetype[i] = DB_ZONETYPE_PRISM;
+                                          break;
+                                 case 8:  z->shapetype[i] = DB_ZONETYPE_HEX;
+                                          break;
+                                 default: z->shapetype[i] = DB_ZONETYPE_POLYHEDRON;
+                                          break;
+                               }
+                            break;
+                  }
+                  return 1;
+               }
+               else
+                  return 0;
+            }
+            else
+               return -1;
+         }
+         else
+            return 0;
+      else
+         return 0;
+   }
+   else
+      return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetUcdmesh
+ *
+ * Purpose:     Allocates a DBucdmesh data structure and reads a UCD mesh
+ *              from the data file.
+ *
+ * Return:      Success:        Pointer to the new DBucdmesh struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 09:57:59 PST 1994
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBucdmesh *
+DBGetUcdmesh(DBfile *dbfile, const char *name)
+{
+    DBucdmesh     *um = NULL;
+
+    API_BEGIN2("DBGetUcdmesh", DBucdmesh *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetUcdmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("UCDmesh name", E_BADARGS);
+        if (!dbfile->pub.g_um)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        um = ((dbfile->pub.g_um) (dbfile, (char *)name));
+        if (!um)
+        {
+            API_RETURN(NULL);
+        }
+
+        /*
+         * Put in default axis labels if none supplied.
+         */
+        switch (um->ndims) {
+            case 3:
+                if (um->labels[2] == NULL) {
+                    um->labels[2] = ALLOC_N(char, 7);
+
+                    if (!um->labels[2])
+                        API_ERROR(NULL, E_NOMEM);
+                    strcpy(um->labels[2], "Z Axis");
+                }
+                /*fall through */
+            case 2:
+                if (um->labels[1] == NULL) {
+                    um->labels[1] = ALLOC_N(char, 7);
+
+                    if (!um->labels[1])
+                        API_ERROR(NULL, E_NOMEM);
+                    strcpy(um->labels[1], "Y Axis");
+                }
+                /*fall through */
+            case 1:
+                if (um->labels[0] == NULL) {
+                    um->labels[0] = ALLOC_N(char, 7);
+
+                    if (!um->labels[0])
+                        API_ERROR(NULL, E_NOMEM);
+                    strcpy(um->labels[0], "X Axis");
+                }
+        }
+        if (DBAnnotateUcdmesh(um) < 0)
+           API_ERROR(NULL, E_NOMEM);
+
+        API_RETURN(um);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetUcdvar
+ *
+ * Purpose:     Allocates a DBucdvar structure and reads a variable associated
+ *              with a UCD mesh from the database.
+ *
+ * Return:      Success:        Pointer to the new DBucdvar struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:04:35 PST 1994
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBucdvar *
+DBGetUcdvar(DBfile *dbfile, const char *name)
+{
+    DBucdvar * retval = NULL;
+
+    API_BEGIN2("DBGetUcdvar", DBucdvar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetUcdvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("UCDvar name", E_BADARGS);
+        if (!dbfile->pub.g_uv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_uv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetFacelist
+ *
+ * Purpose:     Allocate and read a DBfacelist structure.
+ *
+ * Return:      Success:        ptr to new DBfacelist
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Wed Dec 14 13:50:44 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBfacelist *
+DBGetFacelist(DBfile *dbfile, const char *name)
+{
+    DBfacelist * retval = NULL;
+
+    API_BEGIN2("DBGetFacelist", DBfacelist *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetFacelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("facelist name", E_BADARGS);
+        if (!dbfile->pub.g_fl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_fl) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetZonelist
+ *
+ * Purpose:     Allocate and read a DBzonelist structure.
+ *
+ * Return:      Success:        ptr to new DBzonelist.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Wed Dec 14 13:59:51 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBzonelist *
+DBGetZonelist(DBfile *dbfile, const char *name)
+{
+    DBzonelist * retval = NULL;
+
+    API_BEGIN2("DBGetZonelist", DBzonelist *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (!dbfile->pub.g_zl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_zl) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetPHZonelist
+ *
+ * Purpose:     Allocate and read a DBphzonelist structure.
+ *
+ * Return:      Success:        ptr to new DBphzonelist.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              July 28, 2004 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBphzonelist *
+DBGetPHZonelist(DBfile *dbfile, const char *name)
+{
+    DBphzonelist * retval = NULL;
+
+    API_BEGIN2("DBGetPHZonelist", DBphzonelist *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetPHZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (!dbfile->pub.g_phzl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_phzl) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetVar
+ *
+ * Purpose:     Allocate space for a variable and read the variable from the
+ *              database.
+ *
+ * Return:      Success:        Pointer to the variable value.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:11:29 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC void   *
+DBGetVar(DBfile *dbfile, const char *name)
+{
+    void   * retval = NULL;
+
+    API_BEGIN2("DBGetVar", void *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetVar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!dbfile->pub.g_var)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_var) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBReadVar
+ *
+ * Purpose:     Same as DBGetVar() except the user supplies the result
+ *              memory instead of the function allocating it on the heap.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 13:00:07 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBReadVar(DBfile *dbfile, const char *name, void *result)
+{
+    int retval;
+
+    API_BEGIN2("DBReadVar", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBReadVar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!result)
+            API_ERROR("result pointer", E_BADARGS);
+        if (!dbfile->pub.r_var)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.r_var) (dbfile, (char *)name, result);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBReadVar1
+ *
+ * Purpose:     Reads one element form a variable into te provided space.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 13:03:16 EST 1994
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBReadVar1(DBfile *dbfile, const char *vname, int offset, void *result)
+{
+    int retval;
+
+    API_BEGIN2("DBReadVar1", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBReadVar1", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("variable name", E_BADARGS);
+        if (!result)
+            API_ERROR("result pointer", E_BADARGS);
+        if (!dbfile->pub.r_var1)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.r_var1) (dbfile, (char *)vname, offset, result);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBReadVarSlice
+ *
+ * Purpose:     Same as DBReadVarSlice() except the user can read a only
+ *              a slice of the variable.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  brugger at sgibird
+ *              Thu Feb 16 08:25:47 PST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBReadVarSlice(DBfile *dbfile, const char *name, int *offset, int *length,
+               int *stride, int ndims, void *result)
+{
+    int retval;
+
+    API_BEGIN2("DBReadVarSlice", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBReadVarSlice", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!offset)
+            API_ERROR("offset", E_BADARGS);
+        if (!length)
+            API_ERROR("length", E_BADARGS);
+        if (!stride)
+            API_ERROR("stride", E_BADARGS);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!result)
+            API_ERROR("result pointer", E_BADARGS);
+        if (!dbfile->pub.r_varslice)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.r_varslice) (dbfile, (char *)name, offset,
+                                           length, stride, ndims, result);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetVarByteLength
+ *
+ * Purpose:     Returns the length of the requested variable, in bytes.
+ *
+ * Return:      Success:        length of variable in bytes.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:18:35 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetVarByteLength(DBfile *dbfile, const char *name)
+{
+    int retval;
+
+    API_BEGIN2("DBGetVarByteLength", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetVarByteLength", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!dbfile->pub.g_varbl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_varbl) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetVarLength
+ *
+ * Purpose:     Returns the number of elements in the given variable.
+ *
+ * Return:      Success:        number of elements
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:23:20 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetVarLength(DBfile *dbfile, const char *name)
+{
+    int retval;
+
+    API_BEGIN2("DBGetVarLength", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetVarLength", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!dbfile->pub.g_varlen)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_varlen) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetVarDims
+ *
+ * Purpose:     Returns information about the dimensions of a variable.
+ *              The user passes a buffer to hold the dimension sizes
+ *              and indicates the size of that buffer.
+ *
+ * Return:      Success:        The number of dimensions not exceeding
+ *                              MAXDIMS.  The dimension sizes are returned
+ *                              through DIMS.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  6 1997
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Reformatted the code so that a human can read it.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetVarDims(DBfile *dbfile, const char *name, int maxdims, int *dims)
+{
+    int             retval = -1;
+
+    API_BEGIN2("DBGetVarDims", int, -1, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetVarDims", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (maxdims <= 0)
+            API_ERROR("max dims", E_BADARGS);
+        if (!dims)
+            API_ERROR("dimension buffer pointer", E_BADARGS);
+        if (!dbfile->pub.g_vardims)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_vardims) (dbfile, (char *)name, maxdims, dims);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;                     /* BEWARE: If API_RETURN above is
+                                        * removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetVarType
+ *
+ * Purpose:     Returns the data type of a variable.
+ *
+ * Return:      Success:        type, such as DB_INT, DB_FLOAT, etc.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Thu Dec 22 08:54:20 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetVarType(DBfile *dbfile, const char *name)
+{
+    int retval;
+
+    API_BEGIN2("DBGetVarType", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetVarType", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("variable name", E_BADARGS);
+        if (!dbfile->pub.g_vartype)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_vartype) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqMeshname
+ *
+ * Purpose:     Returns the name of a mesh associated with a mesh
+ *              variable.
+ *
+ * Return:      Success:        0, name returned via `mname'
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:27:15 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBInqMeshname(DBfile *dbfile, const char *vname, const char *mname)
+{
+    int retval;
+
+    API_BEGIN2("DBInqMeshname", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBInqMeshname", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("variable name", E_BADARGS);
+        if (!mname)
+            API_ERROR("mesh name pointer", E_BADARGS);
+        if (!dbfile->pub.i_meshname)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.i_meshname) (dbfile, (char *)vname,
+                                           (char *)mname);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqMeshtype
+ *
+ * Purpose:     Returns the mesh type for the specified mesh.
+ *
+ * Return:      Success:        mesh type constant
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:31:56 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBInqMeshtype(DBfile *dbfile, const char *name)
+{
+    int retval;
+
+    API_BEGIN2("DBInqMeshtype", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBInqMeshtype", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mesh name", E_BADARGS);
+        if (!dbfile->pub.i_meshtype)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.i_meshtype) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutCompoundarray
+ *
+ * Purpose:     Write compoundarray information to a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Mon Nov  7 10:54:46 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutCompoundarray(DBfile *dbfile, const char *name, char **elemnames,
+                   int *elemlengths, int nelems, void *values, int nvalues,
+                   int datatype, DBoptlist *opts)
+{
+    int retval;
+
+    API_BEGIN2("DBPutCompoundarray", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutCompoundarray", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("array name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("array name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!elemnames)
+            API_ERROR("element names", E_BADARGS);
+        if (nelems <= 0)
+            API_ERROR("number of elements", E_BADARGS);
+        if (!values)
+            API_ERROR("values pointer", E_BADARGS);
+        if (nvalues < 0)
+            API_ERROR("number of values", E_BADARGS);
+        if (NULL == dbfile->pub.p_ca)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_ca) (dbfile, (char *)name, elemnames,
+                                     elemlengths, nelems, values, nvalues,
+                                     datatype, opts);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutCurve
+ *
+ * Purpose:     Writes curve information to a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 15, 1996
+ *
+ * Modifications:
+ *    Robb Matzke, 16 May 1996
+ *    Don't check for existence of XVALS and YVALS since the OPTS can
+ *    specify a PDB variable name which has already been added to the
+ *    file and which contains the necessary x or y values.  However,
+ *    the driver should check.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutCurve (DBfile *dbfile, const char *name, void *xvals, void *yvals,
+            int datatype, int npts, DBoptlist *opts)
+{
+    int retval;
+
+    API_BEGIN2("DBPutCurve", int, -1, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutCurve", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("curve name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("curve name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (npts <= 0)
+            API_ERROR("number of values", E_BADARGS);
+        if (NULL == dbfile->pub.p_cu)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_cu) (dbfile, (char *)name, xvals, yvals,
+                                     datatype, npts, opts);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutDefvars
+ *
+ * Purpose:     Writes a Defvars object to a file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 8, 2005
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutDefvars (DBfile *dbfile, const char *name, int ndefs,
+              char *names[], const int *types, char *defns[],
+              DBoptlist *opts[])
+{
+    int retval;
+
+    API_BEGIN2("DBPutDefvars", int, -1, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutDefvars", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("defvars name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("defvars name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (ndefs < 0)
+            API_ERROR("ndefs", E_BADARGS);
+        if (!names)
+            API_ERROR("names", E_BADARGS);
+        if (!types)
+            API_ERROR("types", E_BADARGS);
+        if (!defns)
+            API_ERROR("defns", E_BADARGS);
+        if (NULL == dbfile->pub.p_defv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_defv) (dbfile, (char *)name, ndefs, names,
+                                       types, defns, opts);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutFacelist
+ *
+ * Purpose:     Writes a facelist object into the open database file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:52:25 PST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Thu Dec 1 10:34:09 PST 1994
+ *    The `zoneno' parameter is optional even if
+ *    the number of faces is zero.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutFacelist(DBfile *dbfile, const char *name, int nfaces, int ndims,
+              int nodelist[], int lnodelist, int origin, int zoneno[],
+              int shapesize[], int shapecnt[], int nshapes, int types[],
+              int typelist[], int ntypes)
+{
+    int retval;
+
+    API_BEGIN2("DBPutFacelist", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutFacelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("facelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("facelist name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nfaces < 0)
+            API_ERROR("nfaces", E_BADARGS);
+        if (ndims < 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (lnodelist < 0)
+            API_ERROR("lnodelist", E_BADARGS);
+        if (!nodelist && lnodelist)
+            API_ERROR("nodelist", E_BADARGS);
+        if (origin != 0 && origin != 1)
+            API_ERROR("origin", E_BADARGS);
+        if (nshapes < 0)
+            API_ERROR("nshapes", E_BADARGS);
+        if (!shapesize && nshapes)
+            API_ERROR("shapesize", E_BADARGS);
+        if (!shapecnt && nshapes)
+            API_ERROR("shapecnt", E_BADARGS);
+        if (ntypes < 0)
+            API_ERROR("ntypes", E_BADARGS);
+        if (!dbfile->pub.p_fl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_fl) (dbfile, (char *)name, nfaces, ndims,
+                                     nodelist, lnodelist, origin, zoneno,
+                                     shapesize, shapecnt, nshapes, types,
+                                     typelist, ntypes);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMaterial
+ *
+ * Purpose:     Writes a material data object into the current open
+ *              database.  The minimum required information for a material
+ *              data object is supplied via the standard arguments to the
+ *              function.  The `optlist' argument must be used for
+ *              supplying any information not requested through the
+ *              standard arguments.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:05:23 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Sean Ahern, Thu Jun  8 12:08:05 PDT 2000
+ *    Removed an unnecessary check on mix_zone.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMaterial(DBfile *dbfile, const char *name, const char *meshname, int nmat,
+              int matnos[], int matlist[], int dims[], int ndims,
+              int mix_next[], int mix_mat[], int mix_zone[], DB_DTPTR1 mix_vf,
+              int mixlen, int datatype, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMaterial", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMaterial", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("material name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("material name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!meshname || !*meshname)
+            API_ERROR("mesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)meshname) == 0)
+            API_ERROR("mesh name", E_INVALIDNAME);
+        if (nmat < 0)
+            API_ERROR("nmat", E_BADARGS);
+        if (!matnos && nmat)
+            API_ERROR("matnos", E_BADARGS);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!dims)
+            API_ERROR("dims", E_BADARGS);
+        if (!matlist)
+            API_ERROR("matlist", E_BADARGS);
+        if (mixlen < 0)
+            API_ERROR("mixlen", E_BADARGS);
+        if (!mix_next && mixlen)
+            API_ERROR("mix_next", E_BADARGS);
+        if (!mix_mat && mixlen)
+            API_ERROR("mix_mat", E_BADARGS);
+        if (!mix_vf && mixlen)
+            API_ERROR("mix_vf", E_BADARGS);
+        if (!dbfile->pub.p_ma)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_ma) (dbfile, (char *)name, (char *)meshname,
+                                     nmat, matnos, matlist, dims, ndims,
+                                     mix_next, mix_mat, mix_zone, mix_vf,
+                                     mixlen, datatype, optlist);
+        /* Zero out the _ma._matnames pointer so we can't accidentially use it
+         * again. Likewise for matcolors. */
+        _ma._matnames = NULL;
+        _ma._matcolors = NULL;
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                DBPutMatspecies
+ *
+ *  Purpose
+ *
+ *      Write a material species object into the open file.
+ *
+ *  Programmer
+ *
+ *      Al Leibee, B-DSAD
+ *
+ *  Notes
+ *
+ *      One zonal array ('speclist') is used which contains either:
+ *      1) an index into the 'species_mf' array of the species mass fractions
+ *         of a clean zone's material.
+ *
+ *                                  OR
+ *      2) an index into the 'mix_speclist' array which contains an index
+ *         into the 'species_mf' of the species mass fractions of a mixed
+ *         zone's materials.
+ *
+ *  Modified
+ *    Robb Matzke, Mon Nov 28 15:19:50 EST 1994
+ *    Added device independence stuff.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *--------------------------------------------------------------------*/
+PUBLIC int
+DBPutMatspecies(DBfile *dbfile, const char *name, const char *matname,
+                int nmat, int nmatspec[], int speclist[], int dims[],
+                int ndims, int nspecies_mf, DB_DTPTR1 species_mf,
+                int mix_speclist[], int mixlen, int datatype,
+                DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMatspecies", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMatspecies", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("matspecies name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("matspecies name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!matname || !*matname)
+            API_ERROR("material name", E_BADARGS);
+        if (db_VariableNameValid((char *)matname) == 0)
+            API_ERROR("material name", E_INVALIDNAME);
+        if (nmat < 0)
+            API_ERROR("nmat", E_BADARGS);
+        if (!nmatspec)
+            API_ERROR("nmatspec", E_BADARGS);
+        if (!speclist)
+            API_ERROR("speclist", E_BADARGS);
+        if (ndims <= 0 || ndims > 3)
+            API_ERROR("ndims", E_BADARGS);
+        if (!dims)
+            API_ERROR("dims", E_BADARGS);
+        if (nspecies_mf < 0)
+            API_ERROR("nspecies_mf", E_BADARGS);
+        if (!species_mf && nspecies_mf)
+            API_ERROR("species_mf", E_BADARGS);
+        if (mixlen < 0)
+            API_ERROR("mixlen", E_BADARGS);
+        if (!mix_speclist && mixlen)
+            API_ERROR("mix_speclist", E_BADARGS);
+        if (!dbfile->pub.p_ms)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_ms) (dbfile, (char *)name, (char *)matname,
+                                     nmat, nmatspec, speclist, dims, ndims,
+                                     nspecies_mf, species_mf, mix_speclist,
+                                     mixlen, datatype, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMultimesh
+ *
+ * Purpose:     Writes a multi-bloc kmesh object into the open database.
+ *              It accepts as input descriptions of the various sub-meshes
+ *              (blocks) which are part of this mesh.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:17:57 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:36:23 PDT 2010
+ *    Added support for nameschemes on multi-block objects. This meant
+ *    adjusting sanity checks for args as some can be null now.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMultimesh(DBfile *dbfile, const char *name, int nmesh,
+               char **meshnames, int meshtypes[], DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMultimesh", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMultimesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("multimesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nmesh < 0)
+            API_ERROR("nmesh", E_BADARGS);
+        if (!meshnames && nmesh && (!optlist || 
+             !DBGetOption(optlist, DBOPT_MB_FILE_NS) ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_NS)))
+            API_ERROR("mesh names", E_BADARGS);
+        if (!meshtypes && nmesh && (!optlist ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_TYPE)))
+            API_ERROR("mesh types", E_BADARGS);
+        if (!dbfile->pub.p_mm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mm) (dbfile, (char *)name, nmesh, meshnames,
+                                     meshtypes, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMultimeshadj
+ *
+ * Purpose:     Writes a multi-mesh adjacency object into the
+ *              open database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller, August 23, 2005 
+ *
+ * Notes:       This function is designed to support repeated calls where
+ *              Different parts of the same object are written at different
+ *              times.
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMultimeshadj(DBfile *dbfile, const char *name, int nmesh,
+                  const int *meshtypes, const int *nneighbors,
+                  const int *neighbors, const int *back,
+                  const int *lnodelists, int *nodelists[],
+                  const int *lzonelists, int *zonelists[],
+                  DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMultimeshadj", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMultimeshadj", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimeshadj name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("multimeshadj name", E_INVALIDNAME);
+        if (nmesh < 0)
+            API_ERROR("nmesh", E_BADARGS);
+        if (!meshtypes && nmesh)
+            API_ERROR("mesh types", E_BADARGS);
+        if (!nneighbors && nmesh)
+            API_ERROR("nneighbors", E_BADARGS);
+        if (!neighbors && nmesh)
+            API_ERROR("neighbors", E_BADARGS);
+        if (lnodelists == NULL && nodelists != NULL)
+            API_ERROR("non-NULL nodelists", E_BADARGS);
+        if (lzonelists == NULL && zonelists != NULL)
+            API_ERROR("non-NULL zonelists", E_BADARGS);
+        if (!dbfile->pub.p_mmadj)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mmadj) (dbfile, (char *)name, nmesh, meshtypes,
+                                        nneighbors, neighbors, back,
+                                        lnodelists, nodelists, lzonelists, zonelists,
+                                        optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMultivar
+ *
+ * Purpose:     Writes a multi-block variable object to the database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:26:30 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:36:23 PDT 2010
+ *    Added support for nameschemes on multi-block objects. This meant
+ *    adjusting sanity checks for args as some can be null now.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMultivar(DBfile *dbfile, const char *name, int nvar,
+              char *varnames[], int vartypes[], DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMultivar", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMultivar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multivar name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("multivar name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nvar < 0)
+            API_ERROR("nvar", E_BADARGS);
+        if (!varnames && nvar && (!optlist ||
+             !DBGetOption(optlist, DBOPT_MB_FILE_NS) ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_NS)))
+            API_ERROR("varnames", E_BADARGS);
+        if (!vartypes && nvar && (!optlist ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_TYPE)))
+            API_ERROR("vartypes", E_BADARGS);
+        if (!dbfile->pub.p_mv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mv) (dbfile, (char *)name, nvar, varnames,
+                                     vartypes, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMultimat
+ *
+ * Purpose:     Writes a multi-material object to the database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Feb 21 12:35:10 EST 1995
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:36:23 PDT 2010
+ *    Added support for nameschemes on multi-block objects. This meant
+ *    adjusting sanity checks for args as some can be null now.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMultimat(DBfile *dbfile, const char *name, int nmats,
+              char *matnames[], DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMultimat", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMultimat", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimat name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("multimat name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nmats < 0)
+            API_ERROR("nmats", E_BADARGS);
+        if (!matnames && nmats && (!optlist ||
+             !DBGetOption(optlist, DBOPT_MB_FILE_NS) ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_NS)))
+            API_ERROR("material-names", E_BADARGS);
+        if (!dbfile->pub.p_mt)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mt) (dbfile, (char *)name, nmats, matnames,
+                                     optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutMultimatspecies
+ *
+ * Purpose:     Writes a multi-material object to the database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Jeremy S. Meredith
+ *              Sept 17 1998
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:36:23 PDT 2010
+ *    Added support for nameschemes on multi-block objects. This meant
+ *    adjusting sanity checks for args as some can be null now.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutMultimatspecies(DBfile *dbfile, const char *name, int nspec,
+                     char *specnames[], DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMultimatspecies", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMultimatspecies", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("multimatspecies name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("multimatspecies name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nspec < 0)
+            API_ERROR("nspec", E_BADARGS);
+        if (!specnames && nspec && (!optlist ||
+             !DBGetOption(optlist, DBOPT_MB_FILE_NS) ||
+             !DBGetOption(optlist, DBOPT_MB_BLOCK_NS)))
+            API_ERROR("species-names", E_BADARGS);
+        if (!dbfile->pub.p_mms)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mms) (dbfile, (char *)name, nspec, specnames,
+                                      optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutPoinmesh
+ *
+ * Purpose:     Accepts pointers to the coordinate arrays and writes the
+ *              mesh into the database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:32:43 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutPointmesh(DBfile *dbfile, const char *name, int ndims, DB_DTPTR2 coords,
+               int nels, int datatype, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutPointmesh", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutPointmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("pointmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("pointmesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (ndims <= 0 || ndims > 3)
+            API_ERROR("ndims", E_BADARGS);
+        if (!coords && ndims)
+            API_ERROR("coords", E_BADARGS);
+        if (nels <= 0)
+            API_ERROR("nels", E_BADARGS);
+        if (!dbfile->pub.p_pm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_pm) (dbfile, (char *)name, ndims, coords, nels,
+                                     datatype, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutPointvar
+ *
+ * Purpose:     Accepts pointers to the value arrays and writes the
+ *              variables into a point-variable object in the database.
+ *
+ * Return:      Success:        object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:38:22 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutPointvar(DBfile *dbfile, const char *vname, const char *mname, int nvars,
+              DB_DTPTR2 vars, int nels, int datatype, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutPointvar", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutPointvar", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("pointvar name", E_BADARGS);
+        if (db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("pointvar name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, vname))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!mname || !*mname)
+            API_ERROR("pointmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)mname) == 0)
+            API_ERROR("pointmesh name", E_INVALIDNAME);
+        if (nvars <= 0)
+            API_ERROR("nvars", E_BADARGS);
+        if (!vars && nvars)
+            API_ERROR("vars", E_BADARGS);
+        if (nels <= 0)
+            API_ERROR("nels", E_BADARGS);
+        if (!dbfile->pub.p_pv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_pv) (dbfile, (char *)vname, (char *)mname,
+                                     nvars, vars, nels, datatype, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutPointvar1
+ *
+ * Purpose:     Same as DBPutPointvar except only one variable at a time.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:46:01 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutPointvar1(DBfile *dbfile, const char *vname, const char *mname,
+               DB_DTPTR1 var, int nels, int datatype, DBoptlist *optlist)
+{
+    DB_DTPTR *vars[1];
+    int retval;
+
+    API_BEGIN2("DBPutPointvar1", int, -1, vname)
+    {
+        vars[0] = var;
+        retval = DBPutPointvar(dbfile, (char *)vname, (char *)mname, 1, vars,
+                               nels, datatype, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutQuadmesh
+ *
+ * Purpose:     Accepts pointers to the coordinate arrays and writes the
+ *              mesh into a quad-mesh object in the database.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:50:40 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Mon Nov  2 17:51:55 PST 1998
+ *    Removed the requirement for a non-NULL coordnames parameter.
+ *
+ *    Sean Ahern, Wed Mar 17 10:12:39 PST 1999
+ *    Added a check for the coordtype.  It must be DB_COLLINEAR or
+ *    DB_NONCOLLINEAR.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutQuadmesh(DBfile *dbfile, const char *name, char *coordnames[],
+              DB_DTPTR2 coords, int dims[], int ndims, int datatype,
+              int coordtype, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutQuadmesh", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutQuadmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("quadmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("quadmesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!dims && ndims)
+            API_ERROR("dims", E_BADARGS);
+        if ((datatype != DB_FLOAT) && (datatype != DB_DOUBLE))
+            API_ERROR("datatype must be DB_FLOAT or DB_DOUBLE", E_BADARGS);
+        if ((coordtype != DB_COLLINEAR) && (coordtype != DB_NONCOLLINEAR))
+            API_ERROR("coordtype must be DB_COLLINEAR or DB_NONCOLLINEAR", E_BADARGS);
+        if (!dbfile->pub.p_qm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_qm) (dbfile, (char *)name, coordnames, coords,
+                                     dims, ndims, datatype, coordtype,
+                                     optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutQuadvar
+ *
+ * Purpose:     Writes a variable associated with a quad mesh into a
+ *              database. Variables will be either node-centered or zone-
+ *              centered.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 12:57:08 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Nov 11 09:19:20 PST 2009
+ *    Added check for valid centering.
+ *
+ *    Mark C. Miller, Thu Feb  4 11:29:35 PST 2010
+ *    Removed upper bound restriction for nvars.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutQuadvar(DBfile *dbfile, const char *vname, const char *mname, int nvars,
+             char *varnames[], DB_DTPTR2 vars, int dims[], int ndims,
+             DB_DTPTR2 mixvars, int mixlen, int datatype, int centering,
+             DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutQuadvar", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutQuadvar", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("quadvar name", E_BADARGS);
+        if (db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("quadvar name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, vname))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!mname || !*mname)
+            API_ERROR("quadmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)mname) == 0)
+            API_ERROR("quadmesh name", E_INVALIDNAME);
+        if (nvars < 1)
+            API_ERROR("nvars", E_BADARGS);
+        if (!varnames && nvars)
+            API_ERROR("varname", E_BADARGS);
+        if (!vars && nvars)
+            API_ERROR("vars", E_BADARGS);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!dims && ndims)
+            API_ERROR("dims", E_BADARGS);
+        if (mixlen < 0)
+            API_ERROR("mixlen", E_BADARGS);
+        if (!mixvars && mixlen)
+            API_ERROR("mixvars", E_BADARGS);
+        if (centering != DB_NODECENT && centering != DB_ZONECENT &&
+            centering != DB_FACECENT && centering != DB_BNDCENT &&
+            centering != DB_EDGECENT && centering != DB_BLOCKCENT)
+            API_ERROR("centering", E_BADARGS);
+        if (!dbfile->pub.p_qv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_qv) (dbfile, (char *)vname, (char *)mname,
+                                     nvars, varnames, vars, dims, ndims,
+                                     mixvars, mixlen, datatype, centering,
+                                     optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutQuadvar1
+ *
+ * Purpose:     Same as DBPutQuadvar except for scalar variables.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 13:07:45 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutQuadvar1(DBfile *dbfile, const char *vname, const char *mname, DB_DTPTR1 var,
+              int dims[], int ndims, DB_DTPTR1 mixvar, int mixlen, int datatype,
+              int centering, DBoptlist *optlist)
+{
+    char          *varnames[1];
+    DB_DTPTR *vars[1], *mixvars[1];
+    int retval;
+
+    API_BEGIN2("DBPutQuadvar1", int, -1, vname) {
+        varnames[0] = (char *)vname;
+        vars[0] = var;
+        mixvars[0] = mixvar;
+
+        retval = DBPutQuadvar(dbfile, (char *)vname, (char *)mname, 1,
+                              varnames, vars, dims, ndims, mixvars, mixlen,
+                              datatype, centering, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutUcdmesh
+ *
+ * Purpose:     Accepts pointers to the coordinate arrays and writes
+ *              the mesh into a UCD-mesh object in the database.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 13:13:46 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Mon Nov  2 17:51:55 PST 1998
+ *    Removed the requirement for a non-NULL coordnames parameter.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutUcdmesh(DBfile *dbfile, const char *name, int ndims,
+             char *coordnames[], DB_DTPTR2 coords, int nnodes,
+             int nzones, const char *zonel_name, const char *facel_name,
+             int datatype, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutUcdmesh", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutUcdmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("UCDmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("UCDmesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (ndims <= 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (!coords && ndims)
+            API_ERROR("coords", E_BADARGS);
+        if (nnodes < 0)
+            API_ERROR("nnodes", E_BADARGS);
+        if (nzones < 0)
+            API_ERROR("nzones", E_BADARGS);
+        if (!dbfile->pub.p_um)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_um) (dbfile, (char *)name, ndims, coordnames,
+                                     coords, nnodes, nzones,
+                                     (char *)zonel_name, (char *)facel_name,
+                                     datatype, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutUcdsubmesh
+ *
+ * Purpose:     Accepts names of parent mesh with coordinate arrays and writes
+ *              the mesh into a UCD-mesh object in the database.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  reus at ferret
+ *              Wed Dec  9 15:17:00 PST 1998
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutUcdsubmesh(DBfile *dbfile, const char *name, const char *parentmesh,
+                int nzones, const char *zonel_name, const char *facel_name,
+                DBoptlist *optlist)
+{
+    int retval;
+
+    API_DEPRECATE2("DBPutUcdsubmesh", int, -1, name, 4, 6, "MRG Trees") {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutUcdsubmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("mesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!parentmesh || !*parentmesh)
+            API_ERROR("parent mesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)parentmesh) == 0)
+            API_ERROR("parent mesh name", E_INVALIDNAME);
+        if (nzones < 0)
+            API_ERROR("nzones", E_BADARGS);
+        if (!dbfile->pub.p_sm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_sm) (dbfile, (char *)name, (char *)parentmesh,
+                                     nzones, (char *)zonel_name,
+                                     (char *)facel_name, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutUcdvar
+ *
+ * Purpose:     Writes a variable associated with a UCD mesh into the
+ *              database.  Note that variables will be either node-centered
+ *              or zone-centered.  A UCD-var object contains the variable
+ *              values, plus the object ID of the associated UCD mesh.  Other
+ *              information can also be included.  This function is useful
+ *              for writing vector and tensor fields, wereas the companion
+ *              function, DBPutUcdvar1(), is appropriate for writing
+ *              scalar fields.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 12:02:56 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *
+ *    Mark C. Miller, Wed Nov 11 09:19:20 PST 2009
+ *    Added check for valid centering.
+ *
+ *    Mark C. Miller, Thu Feb  4 11:28:55 PST 2010
+ *    Removed upper bound restriction on nvars.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutUcdvar(DBfile *dbfile, const char *vname, const char *mname, int nvars,
+            char *varnames[], DB_DTPTR2 vars, int nels, DB_DTPTR2 mixvars,
+            int mixlen, int datatype, int centering, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutUcdvar", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutUcdvar", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("UCDvar name", E_BADARGS);
+        if (db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("UCDvar name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, vname))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!mname || !*mname)
+            API_ERROR("UCDmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)mname) == 0)
+            API_ERROR("UCDmesh name", E_INVALIDNAME);
+        if (nvars < 1)
+            API_ERROR("nvars", E_BADARGS);
+        if (!varnames && nvars)
+            API_ERROR("varnames", E_BADARGS);
+        if (!vars && nvars)
+            API_ERROR("vars", E_BADARGS);
+        if (nels <= 0)
+            API_ERROR("nels", E_BADARGS);
+        if (mixlen < 0)
+            API_ERROR("mixlen", E_BADARGS);
+        if (centering != DB_NODECENT && centering != DB_ZONECENT &&
+            centering != DB_FACECENT && centering != DB_BNDCENT &&
+            centering != DB_EDGECENT && centering != DB_BLOCKCENT)
+            API_ERROR("centering", E_BADARGS);
+        if (!dbfile->pub.p_uv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_uv) (dbfile, (char *)vname, (char *)mname,
+                                     nvars, varnames, vars, nels, mixvars,
+                                     mixlen, datatype, centering, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutUcdvar1
+ *
+ * Purpose:     Same as DBPutUcdvar() except for scalar variables.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 12:14:28 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutUcdvar1(DBfile *dbfile, const char *vname, const char *mname, DB_DTPTR1 var,
+             int nels, DB_DTPTR1 mixvar, int mixlen, int datatype, int centering,
+             DBoptlist *optlist)
+{
+    DB_DTPTR *vars[1], *mixvars[1];
+    char          *varnames[1];
+    int            retval;
+
+    API_BEGIN2("DBPutUcdvar1", int, -1, vname)
+    {
+        varnames[0] = (char *)vname;
+        vars[0] = var;
+        mixvars[0] = mixvar;
+        retval = DBPutUcdvar(dbfile, (char *)vname, (char *)mname, 1, varnames,
+                             vars, nels, mixvars, mixlen, datatype, centering,
+                             optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutZonelist
+ *
+ * Purpose:     Writes a zonelist object into the open database.  The name
+ *              assigned to this object can in turn be used as the
+ *              `zonel_name' parameter to the DBPutUcdmesh() function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov  9 12:20:22 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutZonelist(DBfile *dbfile, const char *name, int nzones, int ndims,
+              int nodelist[], int lnodelist, int origin, int shapesize[],
+              int shapecnt[], int nshapes)
+{
+    int retval;
+
+    API_DEPRECATE2("DBPutZonelist", int, -1, name, 4, 6, "DBPutZonelist2()") {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("zonelist name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nzones < 0)
+            API_ERROR("nzones", E_BADARGS);
+        if (ndims < 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (lnodelist <= 0)
+            API_ERROR("lnodelist", E_BADARGS);
+        if (!nodelist && lnodelist)
+            API_ERROR("nodelist", E_BADARGS);
+        if (0 != origin && 1 != origin)
+            API_ERROR("origin", E_BADARGS);
+        if (nshapes < 0)
+            API_ERROR("nshapes", E_BADARGS);
+        if (!shapesize && nshapes)
+            API_ERROR("shape size", E_BADARGS);
+        if (!shapecnt && nshapes)
+            API_ERROR("shape count", E_BADARGS);
+        if (!dbfile->pub.p_zl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_zl) (dbfile, (char *)name, nzones, ndims,
+                                     nodelist, lnodelist, origin, shapesize,
+                                     shapecnt, nshapes);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutZonelist2
+ *
+ * Purpose:     Writes a zonelist object into the open database.  The name
+ *              assigned to this object can in turn be used as the
+ *              `zonel_name' parameter to the DBPutUcdmesh() function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  brugger at kickit
+ *              Tue Mar 30 10:41:12 PST 1999
+ *
+ * Modifications:
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added an option list to the arguments and to the call to p_zl2().
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *
+ *    Robb Matzke, 2000-05-23
+ *    The old table of contents is discarded if the directory changes.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutZonelist2(DBfile *dbfile, const char *name, int nzones, int ndims,
+               int *nodelist, int lnodelist, int origin, int lo_offset,
+               int hi_offset, int *shapetype, int *shapesize, int *shapecnt,
+               int nshapes, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutZonelist2", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutZonelist2", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("zonelist name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nzones < 0)
+            API_ERROR("nzones", E_BADARGS);
+        if (ndims < 0)
+            API_ERROR("ndims", E_BADARGS);
+        if (lnodelist <= 0)
+            API_ERROR("lnodelist", E_BADARGS);
+        if (!nodelist && lnodelist)
+            API_ERROR("nodelist", E_BADARGS);
+        if (0 != origin && 1 != origin)
+            API_ERROR("origin", E_BADARGS);
+        if (lo_offset < 0)
+            API_ERROR("lo_offset", E_BADARGS);
+        if (hi_offset < 0)
+            API_ERROR("hi_offset", E_BADARGS);
+        if (nshapes < 0)
+            API_ERROR("nshapes", E_BADARGS);
+        if (!shapetype && nshapes)
+            API_ERROR("shape type", E_BADARGS);
+        if (!shapesize && nshapes)
+            API_ERROR("shape size", E_BADARGS);
+        if (!shapecnt && nshapes)
+            API_ERROR("shape count", E_BADARGS);
+        if (!dbfile->pub.p_zl2)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_zl2) (dbfile, (char *)name, nzones, ndims,
+                                      nodelist, lnodelist, origin, lo_offset,
+                                      hi_offset, shapetype, shapesize,
+                                      shapecnt, nshapes, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutPHZonelist 
+ *
+ * Purpose:     Writes a polyhedral zonelist object into the open database.
+ *              The name assigned to this object can in turn be used as the
+ *              parameter to a DBOPT_PHZONELIST option in the optlist passed to
+ *              the DBPutUcdmesh() function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller
+ *              Tuesday, July 26, 2004 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutPHZonelist(DBfile *dbfile, const char *name,
+    int nfaces, int *nodecnt, int lnodelist, int *nodelist,
+    const char *extface, int nzones, int *facecnt, int lfacelist,
+    int *facelist, int origin, int lo_offset, int hi_offset,
+    DBoptlist *optlist) 
+{
+    int retval;
+
+    API_BEGIN2("DBPutPHZonelist", int, -1, name) {
+
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutPHZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("zonelist name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+
+        if (nfaces <= 0)
+            API_ERROR("nfaces", E_BADARGS);
+        if (!nodecnt && nfaces)
+            API_ERROR("nodecnt", E_BADARGS);
+        if (lnodelist <= 0)
+            API_ERROR("lnodelist", E_BADARGS);
+        if (!nodelist && lnodelist)
+            API_ERROR("nodelist", E_BADARGS);
+
+
+        if (0 != origin && 1 != origin)
+            API_ERROR("origin", E_BADARGS);
+        if (nzones>0 && ((lo_offset < 0) || (lo_offset >= nzones)))
+            API_ERROR("lo_offset", E_BADARGS);
+        if (nzones>0 && ((hi_offset < 0) || (hi_offset >= nzones)))
+            API_ERROR("hi_offset", E_BADARGS);
+        if (lo_offset > hi_offset)
+            API_ERROR("hi_offset", E_BADARGS);
+
+        if (!dbfile->pub.p_phzl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_phzl) (dbfile, (char *)name, nfaces, nodecnt,
+                                       lnodelist, nodelist, (char *)extface,
+                                       nzones, facecnt, lfacelist, facelist,
+                                       origin, lo_offset, hi_offset,
+                                       optlist);
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutCsgmesh
+ *
+ * Purpose:     Writes a CSG (Constructive Solid Geometry) mesh object to
+ *              a silo database.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller
+ *              Wed Jul 27 14:22:03 PDT 2005 
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutCsgmesh(DBfile *dbfile, const char *name, int ndims,
+             int nbounds,
+             const int *typeflags, const int *bndids/*optional*/,
+             const void *coeffs, int lcoeffs, int datatype,
+             const double *extents, const char *zonel_name, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutCsgmesh", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutCsgmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("CSGmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("CSGmesh name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!(ndims == 2 || ndims == 3))
+            API_ERROR("ndims must be either 2 or 3", E_BADARGS);
+        if (nbounds < 0)
+            API_ERROR("nbounds", E_BADARGS);
+        if (!typeflags)
+            API_ERROR("type flags", E_BADARGS);
+        if (!coeffs)
+            API_ERROR("coefficients", E_BADARGS);
+        if (lcoeffs <= 0)
+            API_ERROR("lcoeffs", E_BADARGS);
+        if (!extents)
+            API_ERROR("extents", E_BADARGS);
+        if (!zonel_name || !*zonel_name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)zonel_name) == 0)
+            API_ERROR("zonelist name", E_INVALIDNAME);
+        if (!dbfile->pub.p_csgm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_csgm) (dbfile, (char *)name, ndims,
+                                     nbounds, typeflags, bndids, coeffs,
+                                     lcoeffs, datatype, extents, zonel_name,
+                                     optlist);
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetCsgmesh
+ *
+ * Purpose:     Allocates a DBcsgmesh data structure and reads a CSG mesh
+ *              from the data file.
+ *
+ * Return:      Success:        Pointer to the new DBcsgmesh struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wed Jul 27 14:22:03 PDT 2005 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBcsgmesh *
+DBGetCsgmesh(DBfile *dbfile, const char *name)
+{
+    DBcsgmesh     *csgm = NULL;
+
+    API_BEGIN2("DBGetCsgmesh", DBcsgmesh *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetCsgmesh", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("CSGmesh name", E_BADARGS);
+        if (!dbfile->pub.g_csgm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        csgm = ((dbfile->pub.g_csgm) (dbfile, name));
+        if (!csgm)
+        {
+            API_RETURN(NULL);
+        }
+        API_RETURN(csgm);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutCSGZonelist
+ *
+ * Purpose:     Writes a CSG zonelist object into the open database.
+ *              The name assigned to this object can in turn be used as the
+ *              `zonel_name' parameter to the DBPutCsgmesh() function.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wed Jul 27 14:22:03 PDT 2005
+ *-------------------------------------------------------------------------*/
+
+PUBLIC int
+DBPutCSGZonelist(DBfile *dbfile, const char *name, int nregs,
+                 const int *typeflags,
+                 const int *leftids, const int *rightids,
+                 const void *xforms, int lxforms, int datatype,
+                 int nzones, const int *zonelist, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutCSGZonelist", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutCSGZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("zonelist name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("zonelist name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nregs <= 0)
+            API_ERROR("nregs", E_BADARGS);
+        if (!typeflags)
+            API_ERROR("typeflags", E_BADARGS);
+        if (!leftids)
+            API_ERROR("leftids", E_BADARGS);
+        if (!rightids)
+            API_ERROR("rightids", E_BADARGS);
+        if ((xforms && lxforms <= 0) || (!xforms && lxforms > 0))
+            API_ERROR("xforms and lxforms", E_BADARGS);
+        if (nzones <= 0)
+            API_ERROR("nzones", E_BADARGS);
+        if (!zonelist)
+            API_ERROR("zonelist", E_BADARGS);
+        if (!dbfile->pub.p_csgzl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_csgzl) (dbfile, (char *)name, nregs,
+                                        typeflags, leftids, rightids,
+                                        xforms, lxforms, datatype, 
+                                        nzones, zonelist, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetCSGZonelist
+ *
+ * Purpose:     Allocate and read a DBcsgzonelist structure.
+ *
+ * Return:      Success:        ptr to new DBcsgzonelist.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wed Jul 27 14:22:03 PDT 2005
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC DBcsgzonelist*
+DBGetCSGZonelist(DBfile *dbfile, const char *name)
+{
+    DBcsgzonelist * retval = NULL;
+
+    API_BEGIN2("DBGetCSGZonelist", DBcsgzonelist *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetCSGZonelist", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("CSG zonelist name", E_BADARGS);
+        if (!dbfile->pub.g_csgzl)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_csgzl) (dbfile, name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPutCsgvar
+ *
+ * Purpose:     Writes a variable associated with a CSG mesh into the
+ *              database.  Note that variables will be either
+ *              boundary-centered or zone-centered. A CSG-var object
+ *              contains the variable values, plus the object ID of the
+ *              associated CSG mesh.  Other information can also be included.
+ *
+ * Return:      Success:        Object ID
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wed Jul 27 14:22:03 PDT 2005 
+ *
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBPutCsgvar(DBfile *dbfile, const char *vname, const char *meshname,
+            int nvars, char *varnames[], void *vars[],
+            int nvals, int datatype, int centering, DBoptlist *optlist)
+{
+    int retval;
+
+    API_BEGIN2("DBPutCsgvar", int, -1, vname) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutCsgvar", E_GRABBED) ; 
+        if (!vname || !*vname)
+            API_ERROR("CSGvar name", E_BADARGS);
+        if (db_VariableNameValid((char *)vname) == 0)
+            API_ERROR("CSGvar name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, vname))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (!meshname || !*meshname)
+            API_ERROR("CSGmesh name", E_BADARGS);
+        if (db_VariableNameValid((char *)meshname) == 0)
+            API_ERROR("CSGmesh name", E_INVALIDNAME);
+        if (nvars < 1 || nvars > 9)
+            API_ERROR("nvars", E_BADARGS);
+        if (!varnames && nvars)
+            API_ERROR("varnames", E_BADARGS);
+        if (!vars && nvars)
+            API_ERROR("vars", E_BADARGS);
+        if (nvals <= 0)
+            API_ERROR("nvals", E_BADARGS);
+        if (!(centering == DB_ZONECENT || centering == DB_BNDCENT)) 
+            API_ERROR("centering", E_BADARGS);
+        if (!dbfile->pub.p_csgv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+
+        retval = (dbfile->pub.p_csgv) (dbfile, vname, meshname,
+                                     nvars, varnames, vars, nvals,
+                                     datatype, centering, optlist);
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetCsgvar
+ *
+ * Purpose:     Allocates a DBcsgvar structure and reads a variable associated
+ *              with a CSG mesh from the database.
+ *
+ * Return:      Success:        Pointer to the new DBucdvar struct
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  matzke at viper
+ *              Tue Nov  8 11:04:35 PST 1994
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *-------------------------------------------------------------------------*/
+PUBLIC DBcsgvar *
+DBGetCsgvar(DBfile *dbfile, const char *name)
+{
+    DBcsgvar * retval = NULL;
+
+    API_BEGIN2("DBGetCsgvar", DBcsgvar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetCsgvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("CSGvar name", E_BADARGS);
+        if (!dbfile->pub.g_csgv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_csgv) (dbfile, name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  _DBstrprint
+ *
+ *  Purpose
+ *
+ *      This function prints an array of strings in either column- or
+ *      row-major order.
+ *
+ *  Programmer
+ *
+ *      Jeff Long
+ *  Arguments:
+ *      fp             File pointer for output of printing
+ *      strs           Array of character strings to print
+ *      nstrs          Number of character strings in 'strs'
+ *      order          Printing order: 'c' for by-column, 'r' for by-row
+ *      left_margin    Width of left margin (in chars)
+ *      col_margin     Width of empty spaces between columns (in chars)
+ *      line_width     Width of entire output line.
+ *
+ * Modified
+ *    Robb Matzke, Wed Jan 11 06:41:23 PST 1995
+ *    Changed name from strprint since that conflicted with MeshTV.
+ *
+ *    Eric Brugger, Tue Feb  7 09:06:58 PST 1995
+ *    I modified the argument declaration to reflect argument promotions.
+ *---------------------------------------------------------------------*/
+INTERNAL int
+_DBstrprint(FILE *fp, char *strs[], int nstrs, int order, int left_margin,
+            int col_margin, int line_width)
+{
+    char         **sorted_strs = NULL;
+    int            i, j, index;
+    int            maxwidth;
+    int            nrows, ncols;
+    double         dtmp;
+    char          *me = "_DBstrprint";
+
+    if (nstrs <= 0)
+        return db_perror("nstrs", E_BADARGS, me);
+    if (left_margin < 0 || left_margin > line_width) {
+        return db_perror("left margin", E_BADARGS, me);
+    }
+
+     /*----------------------------------------
+      *  Sort strings into alphabetical order.
+      *---------------------------------------*/
+    sorted_strs = ALLOC_N(char *, nstrs);
+    for (i = 0; i < nstrs; i++)
+        sorted_strs[i] = strs[i];
+
+    _DBsort_list(sorted_strs, nstrs);
+
+     /*----------------------------------------
+      *  Find maximum string width.
+      *---------------------------------------*/
+    maxwidth = strlen(sorted_strs[0]);
+
+    for (i = 1; i < nstrs; i++) {
+        maxwidth = MAX(maxwidth, strlen(sorted_strs[i]));
+    }
+
+     /*----------------------------------------
+      *  Determine number of columns and rows.
+      *---------------------------------------*/
+    ncols = (line_width - left_margin) / (maxwidth + col_margin);
+    if (ncols <= 0) {
+        FREE(sorted_strs);
+        return (OOPS);
+    }
+
+    dtmp = (double)nstrs / (double)ncols;
+    nrows = (int)ceil(dtmp);
+    if (nrows <= 0) {
+        FREE(sorted_strs);
+        return -1;
+    }
+
+     /*----------------------------------------
+      *  Print strings in requested order.
+      *---------------------------------------*/
+
+    if (order == 'c') {
+        /*------------------------------
+         *  Print by column
+         *-----------------------------*/
+
+        for (i = 0; i < nrows; i++) {
+            index = i;
+
+            fprintf(fp, "%*s", left_margin, " ");
+
+            for (j = 0; j < ncols; j++) {
+
+                fprintf(fp, "%-*s%*s", maxwidth, sorted_strs[index],
+                        col_margin, " ");
+
+                index += nrows;
+                if (index >= nstrs)
+                    break;
+            }
+            fprintf(fp, "\n");
+        }
+
+    }
+    else {
+        /*------------------------------
+         *  Print by row
+         *-----------------------------*/
+
+        for (i = 0; i < nrows; i++) {
+            index = i * ncols;
+
+            fprintf(fp, "%*s", left_margin, " ");
+
+            for (j = 0; j < ncols; j++) {
+
+                fprintf(fp, "%-*s%*s", maxwidth, sorted_strs[index],
+                        col_margin, " ");
+
+                index++;
+                if (index >= nstrs)
+                    break;
+            }
+            fprintf(fp, "\n");
+        }
+
+    }
+
+    FREE(sorted_strs);
+    return 0;
+}
+
+static int
+qsort_strcmp(const void *str1, const void *str2)
+{
+   return(strcmp(*((const char **)str1), *((const char **)str2)));
+}
+
+/*----------------------------------------------------------------------
+ *  Function                                                _DBsort_list
+ *
+ *  Purpose
+ *
+ *      Sort a list of character strings. Algorithm taken from
+ *      _SX_sort_lists() -- courtesy of Stewart Brown.
+ *
+ * Modified
+ *    Robb Matzke, Wed Jan 11 06:39:16 PST 1995
+ *    Changed name from sort_list because it conflicts with MeshTV.
+ *
+ *    Sean Ahern, Fri Mar  2 09:45:05 PST 2001
+ *    Changed this sort to a qsort, as suggested by Dan Schikore.
+ *---------------------------------------------------------------------*/
+INTERNAL void
+_DBsort_list(char **ss, int n)
+{
+    qsort(ss, n, sizeof(char *), qsort_strcmp);
+}
+
+/*---------------------------------------------------------------------------
+ * arrminmax - Return the min and max value of the given float array.
+ *
+ * Modified
+ *    Robb Matzke, Wed Jan 11 06:43:08 PST 1995
+ *    Changed name from arrminmax since that conflicted with MeshTV.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *---------------------------------------------------------------------------*/
+INTERNAL int
+_DBarrminmax(float arr[], int len, float *arr_min, float *arr_max)
+{
+    int             i;
+    char           *me = "_DBarrminmax";
+
+    if (!arr)
+        return db_perror("arr pointer", E_BADARGS, me);
+    if (len <= 0)
+        return db_perror("len", E_BADARGS, me);
+
+    *arr_min = arr[0];
+    *arr_max = arr[0];
+
+    for (i = 1; i < len; i++)
+    {
+        *arr_min = MIN(*arr_min, arr[i]);
+        *arr_max = MAX(*arr_max, arr[i]);
+    }
+
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * iarrminmax - Return the min and max value of the given int array.
+ *
+ * Modified:
+ *    Robb Matzke, Wed Jan 11 06:43:42 PST 1995
+ *    Changed name from iarrminmax since that conflicted with MeshTV.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *---------------------------------------------------------------------------*/
+INTERNAL int
+_DBiarrminmax(int arr[], int len, int *arr_min, int *arr_max)
+{
+    int             i;
+    char           *me = "_DBiarrminmax";
+
+    if (!arr)
+        return db_perror("arr pointer", E_BADARGS, me);
+    if (len <= 0)
+        return db_perror("len", E_BADARGS, me);
+
+    *arr_min = arr[0];
+    *arr_max = arr[0];
+
+    for (i = 1; i < len; i++)
+    {
+        *arr_min = MIN(*arr_min, arr[i]);
+        *arr_max = MAX(*arr_max, arr[i]);
+    }
+
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * darrminmax - Return the min and max value of the given double array.
+ *
+ * Modified:
+ *    Robb Matzke, Wed Jan 11 06:44:16 PST 1995
+ *    Changed name from darrminmax since that conflicted with MeshTV.
+ *
+ *    Sean Ahern, Tue Sep 28 11:00:13 PDT 1999
+ *    Made the error messages a little better.
+ *---------------------------------------------------------------------------*/
+INTERNAL int
+_DBdarrminmax(double arr[], int len, double *arr_min, double *arr_max)
+{
+    int             i;
+    char           *me = "_DBdarrminmax";
+
+    if (!arr)
+        return db_perror("arr pointer", E_BADARGS, me);
+    if (len <= 0)
+        return db_perror("len", E_BADARGS, me);
+
+    *arr_min = arr[0];
+    *arr_max = arr[0];
+
+    for (i = 1; i < len; i++)
+    {
+        *arr_min = MIN(*arr_min, arr[i]);
+        *arr_max = MAX(*arr_max, arr[i]);
+    }
+
+    return 0;
+}
+
+/***********************************************************************
+ *
+ * Purpose: Return the min and max values of a subset of the given
+ *          array.
+ *
+ * Programmer: Eric S. Brugger
+ * Date:       May 26, 1995
+ *
+ * Input arguments:
+ *    arr      : The array to evaluate.
+ *    datatype : The data type of the array.
+ *    nx       : The x dimension of the array.
+ *    ny       : The y dimension of the array.
+ *    nz       : The z dimension of the array.
+ *    ixmin    : The 0 origin min index in the x direction.
+ *    ixmax    : The 0 origin max index in the x direction.
+ *    iymin    : The 0 origin min index in the y direction.
+ *    iymax    : The 0 origin max index in the y direction.
+ *    izmin    : The 0 origin min index in the z direction.
+ *    izmax    : The 0 origin max index in the z direction.
+ *
+ * Output arguments:
+ *    amin     : The minimum value in the array.
+ *    amax     : The maximum value in the array.
+ *
+ * Input/Output arguments:
+ *
+ * Notes:
+ *
+ * Modifications:
+ *    Eric Brugger, Tue May 30 17:03:51 PDT 1995
+ *    I changed the initial calculation of the index to use ixmin,
+ *    iymin, and izmin instead of i, j, k which were not initialized.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    I changed to prototype form, moved location within file.
+ *
+ *    Eric Brugger, Thu Sep 23 15:05:18 PDT 1999
+ *    I removed the unused argument nz.
+ ***********************************************************************/
+
+INTERNAL int
+_DBSubsetMinMax3(float arr[], int datatype, float *amin, float *amax , int nx,
+                 int ny, int ixmin, int ixmax, int iymin , int iymax,
+                 int izmin, int izmax)
+{
+    int             i, j, k, index, nxy;
+    float           tmin, tmax;
+    double          dtmin, dtmax;
+    double         *darr, *damin, *damax;
+
+    switch (datatype)
+    {
+    case DB_FLOAT:
+
+        nxy = nx * ny;
+
+        index = INDEX3(ixmin, iymin, izmin, nx, nxy);
+        tmin = arr[index];
+        tmax = arr[index];
+
+        for (k = izmin; k <= izmax; k++)
+        {
+            for (j = iymin; j <= iymax; j++)
+            {
+                for (i = ixmin; i <= ixmax; i++)
+                {
+                    index = INDEX3(i, j, k, nx, nxy);
+                    tmin = MIN(tmin, arr[index]);
+                    tmax = MAX(tmax, arr[index]);
+                }
+            }
+        }
+
+        *amin = tmin;
+        *amax = tmax;
+        break;
+
+    case DB_DOUBLE:
+
+        darr = (double *)arr;
+
+        nxy = nx * ny;
+
+        index = INDEX3(ixmin, iymin, izmin, nx, nxy);
+        dtmin = darr[index];
+        dtmax = darr[index];
+
+        for (k = izmin; k <= izmax; k++)
+        {
+            for (j = iymin; j <= iymax; j++)
+            {
+                for (i = ixmin; i <= ixmax; i++)
+                {
+                    index = INDEX3(i, j, k, nx, nxy);
+                    dtmin = MIN(dtmin, darr[index]);
+                    dtmax = MAX(dtmax, darr[index]);
+                }
+            }
+        }
+
+        damin = (double *)amin;
+        damax = (double *)amax;
+        *damin = dtmin;
+        *damax = dtmax;
+        break;
+
+    default:
+        break;
+    }
+
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               CSGM_CalcExtents
+ *
+ * Purpose
+ *
+ *      Return the extents of the given csg mesh.
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int
+CSGM_CalcExtents(int datatype, int ndims, int nbounds,
+               const int *typeflags, const void *coeffs,
+               double *min_extents, double *max_extents)
+{
+    min_extents[0] = -DBL_MAX;
+    min_extents[1] = -DBL_MAX;
+    min_extents[2] = -DBL_MAX;
+    max_extents[0] = DBL_MAX;
+    max_extents[1] = DBL_MAX;
+    max_extents[2] = DBL_MAX;
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                               _DBQMCalcExtents
+ *
+ *  Purpose
+ *
+ *      Return the extents of the given quad mesh.
+ *
+ *      Works for 1D, 2D and 3D meshes, collinear or non-collinear.
+ *
+ *  Modification History
+ *    Jeff Long, 11/16/92
+ *    Modified handling of double precision coords so that extents
+ *    are returned as floats.
+ *
+ *    Robb Matzke, Wed Jan 11 06:34:09 PST 1995
+ *    Changed name from QM_CalcExtents because it conflicts with MeshTV.
+ *
+ *    Eric Brugger, Wed Feb 15 08:12:43 PST 1995
+ *    I removed the error message that precision had been lost.
+ *    Their is no loss of precision because all the casts from
+ *    double to float were done on pointers.  Casting of a pointer
+ *    just makes the compiler happy and has no impact on the value
+ *    pointed to.
+ *
+ *    Sean Ahern, Mon Oct 19 18:17:10 PDT 1998
+ *    Added the ability to have the extents returned either as float or
+ *    double.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+_DBQMCalcExtents(DB_DTPTR2 _coord_arrays, int datatype, int *min_index,
+                 int *max_index, int *dims, int ndims, int coordtype,
+                 void *min_extents, void *max_extents)
+{
+    float         *x = NULL, *y = NULL, *z = NULL;
+    double        *dx = NULL, *dy = NULL, *dz = NULL;
+    double        *dmin_extents = NULL, *dmax_extents = NULL;
+    float         *fmin_extents = NULL, *fmax_extents = NULL;
+    int            i;
+    char          *me = "_DBQMCalcExtents";
+    DB_DTPTR**    coord_arrays = (DB_DTPTR**) _coord_arrays;
+
+    if (datatype == DB_FLOAT)
+    {
+        fmin_extents = (float*)min_extents;
+        fmax_extents = (float*)max_extents;
+
+        /* Initialize extent arrays */
+        for (i = 0; i < ndims; i++) {
+            fmin_extents[i] = 0.;
+            fmax_extents[i] = 0.;
+        }
+    } else if (datatype == DB_DOUBLE)
+    {
+        dmin_extents = (double*)min_extents;
+        dmax_extents = (double*)max_extents;
+
+        /* Initialize extent arrays */
+        for (i = 0; i < ndims; i++) {
+            dmin_extents[i] = 0.;
+            dmax_extents[i] = 0.;
+        }
+    }
+
+    /* Read default coordinate variables. */
+    switch (ndims) {
+        case 3:
+            z = coord_arrays[2];
+            /* Fall through */
+        case 2:
+            y = coord_arrays[1];
+            /* Fall through */
+        case 1:
+            x = coord_arrays[0];
+            break;
+        default:
+            break;
+    }
+
+    if (datatype == DB_DOUBLE) {
+        dx = (double *)x;
+        dy = (double *)y;
+        dz = (double *)z;
+    }
+
+    /* Get mesh coordinate extents. */
+    switch (coordtype) {
+
+        case DB_COLLINEAR:
+
+            switch (ndims) {
+                case 3:
+                    if (datatype == DB_DOUBLE) {
+                        dmin_extents[2] = dz[min_index[2]];
+                        dmax_extents[2] = dz[max_index[2]];
+                    }
+                    else {
+                        fmin_extents[2] = z[min_index[2]];
+                        fmax_extents[2] = z[max_index[2]];
+                    }
+                case 2:
+                    if (datatype == DB_DOUBLE) {
+                        dmin_extents[1] = dy[min_index[1]];
+                        dmax_extents[1] = dy[max_index[1]];
+                    }
+                    else {
+                        fmin_extents[1] = y[min_index[1]];
+                        fmax_extents[1] = y[max_index[1]];
+                    }
+                case 1:
+                    if (datatype == DB_DOUBLE) {
+                        dmin_extents[0] = dx[min_index[0]];
+                        dmax_extents[0] = dx[max_index[0]];
+                    }
+                    else {
+                        fmin_extents[0] = x[min_index[0]];
+                        fmax_extents[0] = x[max_index[0]];
+                    }
+                    break;
+            }
+            break;
+
+        case DB_NONCOLLINEAR:
+
+            switch (ndims) {
+                case 3:
+                    if (datatype == DB_DOUBLE) {
+                        _DBSubsetMinMax3((float *)dx, datatype,
+                                         (float *)(&dmin_extents[0]),
+                                         (float *)(&dmax_extents[0]),
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                        _DBSubsetMinMax3((float *)dy, datatype,
+                                         (float *)(&dmin_extents[1]),
+                                         (float *)(&dmax_extents[1]),
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                        _DBSubsetMinMax3((float *)dz, datatype,
+                                         (float *)(&dmin_extents[2]),
+                                         (float *)(&dmax_extents[2]),
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                    }
+                    else {
+                        _DBSubsetMinMax3(x, datatype,
+                                         &fmin_extents[0], &fmax_extents[0],
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                        _DBSubsetMinMax3(y, datatype,
+                                         &fmin_extents[1], &fmax_extents[1],
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                        _DBSubsetMinMax3(z, datatype,
+                                         &fmin_extents[2], &fmax_extents[2],
+                                         dims[0], dims[1],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1],
+                                         min_index[2], max_index[2]);
+                    }
+                    break;
+                case 2:
+                    if (datatype == DB_DOUBLE) {
+                        _DBSubsetMinMax2((float *)dx, datatype,
+                                         (float *)(&dmin_extents[0]),
+                                         (float *)(&dmax_extents[0]),
+                                         dims[0],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1]);
+                        _DBSubsetMinMax2((float *)dy, datatype,
+                                         (float *)(&dmin_extents[1]),
+                                         (float *)(&dmax_extents[1]),
+                                         dims[0],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1]);
+                    }
+                    else {
+
+                        _DBSubsetMinMax2(x, datatype,
+                                         &fmin_extents[0], &fmax_extents[0],
+                                         dims[0],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1]);
+
+                        _DBSubsetMinMax2(y, datatype,
+                                         &fmin_extents[1], &fmax_extents[1],
+                                         dims[0],
+                                         min_index[0], max_index[0],
+                                         min_index[1], max_index[1]);
+                    }
+                    break;
+                case 1:
+                    return db_perror("1-d noncollinear", E_NOTIMP, me);
+            }
+            break;
+
+        default:
+            return db_perror("default case", E_INTERNAL, me);
+    }
+
+    return 0;
+}
+
+/*--------------------------------------------------------------------------
+ *  Routine                                                  _DBSubsetMinMax2
+ *
+ *  Purpose
+ *
+ *      Return the min and max values of a subset of the given array.
+ *
+ *  Paramters
+ *
+ *      arr       =|  The array to evaluate
+ *      datatype  =|  The type of data pointed to by 'arr'. (float or double)
+ *      amin,amax  |= Returned min,max values
+ *      nx,ny     =|  The dimensions of 'arr'
+ *      ixmin...  =|  The actual 0-origin indeces to use for subselection
+ *
+ * Modified
+ *    Robb Matzke, Wed Jan 11 06:46:23 PST 1995
+ *    Changed name from SubsetMinMax2 since that conflicted with MeshTV.
+ *
+ *    Eric Brugger, Thu Mar 14 16:22:08 PST 1996
+ *    I corrected a bug in the calculation of the minimum, where it
+ *    got the initial minimum value by indexing into the coordinate
+ *    arrays as 1d arrays instead of a 2d arrays.
+ *
+ *    Eric Brugger, Thu Sep 23 15:05:18 PDT 1999
+ *    I removed the unused argument ny.
+ *--------------------------------------------------------------------------*/
+INTERNAL int
+_DBSubsetMinMax2(DB_DTPTR1 arr, int datatype, float *amin, float *amax, int nx,
+                 int ixmin, int ixmax, int iymin, int iymax)
+{
+    int            k, j, index;
+    float          tmin, tmax;
+    double         dtmin, dtmax;
+    double        *darr = NULL, *damin = NULL, *damax = NULL;
+    float         *farr = NULL;
+
+    switch (datatype) {
+        case DB_FLOAT:
+
+            farr = (float *)arr;
+
+            index = INDEX (ixmin, iymin, nx);
+            tmin = farr[index];
+            tmax = farr[index];
+
+            for (j = iymin; j <= iymax; j++) {
+                for (k = ixmin; k <= ixmax; k++) {
+                    index = INDEX (k, j, nx);
+                    tmin = MIN (tmin, farr[index]);
+                    tmax = MAX (tmax, farr[index]);
+                }
+            }
+            *amin = tmin;
+            *amax = tmax;
+            break;
+
+        case DB_DOUBLE:
+
+            darr = (double *)arr;
+
+            index = INDEX (ixmin, iymin, nx);
+            dtmin = darr[index];
+            dtmax = darr[index];
+
+            for (j = iymin; j <= iymax; j++) {
+                for (k = ixmin; k <= ixmax; k++) {
+                    index = INDEX (k, j, nx);
+                    dtmin = MIN (dtmin, darr[index]);
+                    dtmax = MAX (dtmax, darr[index]);
+                }
+            }
+
+            damin = (double *)amin;
+            damax = (double *)amax;
+            *damin = dtmin;
+            *damax = dtmax;
+            break;
+
+        default:
+            break;
+    }
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               UM_CalcExtents
+ *
+ * Purpose
+ *
+ *      Return the extents of the given ucd mesh.
+ *
+ * Modifications:
+ *      Sean Ahern, Wed Oct 21 10:55:21 PDT 1998
+ *      Changed the function so that the min_extents and max_extents are 
+ *      passed in as void* variables.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+UM_CalcExtents(DB_DTPTR2 coord_arrays, int datatype, int ndims, int nnodes,
+               void *min_extents, void *max_extents)
+{
+    int            i, j;
+    double       **dcoord_arrays = NULL;
+    double        *dmin_extents = NULL, *dmax_extents = NULL;
+    float         *fmin_extents = NULL, *fmax_extents = NULL;
+    float        **fcoord_arrays = NULL;
+
+    if (datatype == DB_DOUBLE) {
+
+        dmin_extents = (double *)min_extents;
+        dmax_extents = (double *)max_extents;
+        dcoord_arrays = (double **)coord_arrays;
+
+        /* Initialize extent arrays */
+        for (i = 0; i < ndims; i++) {
+            dmin_extents[i] = dcoord_arrays[i][0];
+            dmax_extents[i] = dcoord_arrays[i][0];
+        }
+
+        for (i = 0; i < ndims; i++) {
+            for (j = 0; j < nnodes; j++) {
+                dmin_extents[i] = MIN(dmin_extents[i], dcoord_arrays[i][j]);
+                dmax_extents[i] = MAX(dmax_extents[i], dcoord_arrays[i][j]);
+            }
+        }
+
+    }
+    else {
+        fmin_extents = (float *)min_extents;
+        fmax_extents = (float *)max_extents;
+        fcoord_arrays = (float **)coord_arrays;
+
+        /* Initialize extent arrays */
+        for (i = 0; i < ndims; i++) {
+            fmin_extents[i] = fcoord_arrays[i][0];
+            fmax_extents[i] = fcoord_arrays[i][0];
+        }
+
+        for (i = 0; i < ndims; i++) {
+            for (j = 0; j < nnodes; j++) {
+                fmin_extents[i] = MIN(fmin_extents[i], fcoord_arrays[i][j]);
+                fmax_extents[i] = MAX(fmax_extents[i], fcoord_arrays[i][j]);
+            }
+        }
+
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_ProcessOptlist
+ *
+ * Purpose:     Process the options list for an object and initializes the
+ *              object's global data.  Each object type has its own global data
+ *              so that `cycle' for one type of object is different from
+ *              `cycle' for another type of object.  This results form trying
+ *              to stay compatible with the previous version, where each
+ *              object had its own source file with global variables
+ *              declared `static'.
+ *
+ *              Some objects share the same global data.  They are:
+ *                      DB_MULTIMESH    and DB_MULTIVAR (_mm)
+ *                      DB_POINTMESH    and DB_POINTVAR (_pm)
+ *                      DB_QUADMESH     and DB_QUADVAR  (_qm)
+ *                      DB_UCDMESH      and DB_UCDVAR   (_um)
+ *
+ *
+ * Return:      Success:        0, no options or all options processed.
+ *
+ *              Failure:        >0, number of unrecognized options.
+ *                              -1, bad objtype
+ *
+ * Programmer:  matzke at viper
+ *              Wed Dec 14 13:36:04 PST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 12 18:36:56 PST 1996
+ *    I added the case for DB_MULTIMESH.
+ *
+ *    Robb Matzke, 18 Jun 1997
+ *    Added DB_ASCII_LABEL for DB_QUADMESH and DB_QUADVAR.
+ *
+ *    Eric Brugger, Wed Oct 15 15:37:22 PDT 1997
+ *    I added DBOPT_HI_OFFSET and DBOPT_LO_OFFSET to DB_UCDVAR.
+ *
+ *    Eric Brugger, Thu Oct 16 10:31:26 PDT 1997
+ *    I added DBOPT_MATNOS and DBOPT_NMATNOS to DB_MULTIMAT (which
+ *    is covered by the DB_MULTIMESH case).
+ *
+ *    Jeremy Meredith, Sept 18 1998
+ *    Added options DBOPT_MATNAME, DBOPT_NMAT, and DBOPT_NMATSPEC
+ *    to DB_MULTIMATSPECIES (covered by DB_MULTIMESH case).
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added DBOPT_GROUPNUM to the point, quad, and ucd meshes.
+ *    Added DBOPT_BASEINDEX to the quad mesh; set it from the origin if needed.
+ *    Added DBOPT_NODENUM to the ucd mesh.
+ *    Added a DB_ZONELIST type.
+ *    Added DBOPT_ZONENUM to the ucd zonelist.
+ *    Added DBOPT_BLOCKORIGIN, _GROUPORIGIN, and _NGROUPS to the multimesh.
+ *
+ *    Jeremy Meredith, Wed Jul  7 12:15:31 PDT 1999
+ *    I removed the DBOPT_ORIGIN from the species object.
+ *
+ *    Sean Ahern, Tue Feb  5 10:22:25 PST 2002
+ *    Added names for materials.
+ *
+ *    Brad Whitlock, Wed Jan 18 15:36:55 PST 2006
+ *    Added ascii_labels for ucdvars.
+ *
+ *    Thomas R. Treadway, Wed Jun 28 10:31:45 PDT 2006
+ *    Added topo_dim to ucdmesh.
+ *
+ *    Thomas R. Treadway, Thu Jul  6 17:05:24 PDT 2006
+ *    Added reference to curve options.
+ *
+ *    Thomas R. Treadway, Thu Jul 20 11:06:27 PDT 2006
+ *    Added lgroupings, groupings, and groupnames to multimesh options.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added DBOPT_MATCOLORS, DBOPT_MATNAMES options to multimesh
+ *
+ *    Thomas R. Treadway, Tue Aug 15 14:05:59 PDT 2006
+ *    Added DBOPT_ALLOWMAT0
+ *
+ *    Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *    Added names and colors for species.
+ *
+ *    Mark C. Miller, Wed Sep 23 11:49:34 PDT 2009
+ *    Added DBOPT_LLONGNZNUM for long long global node/zone numbers
+ *    to pointmeshes, ucdmeshes, zonelists.
+ *
+ *    Mark C. Miller, Thu Nov  5 16:14:12 PST 2009
+ *    Added conserved/extensive options to all var objects.
+ *
+ *    Mark C. Miller, Fri Nov 13 15:33:02 PST 2009
+ *    Add DBOPT_LLONGNZNUM to polyhedral zonelist object.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:36:23 PDT 2010
+ *    Added support for nameschemes options on multi-block objects.
+ *-------------------------------------------------------------------------*/
+INTERNAL int
+db_ProcessOptlist(int objtype, DBoptlist *optlist)
+{
+    int             i, j, *ip = NULL, unused = 0;
+    char           *me = "db_ProcessOptlist";
+
+    if (!optlist || optlist->numopts < 0)
+        return 0;
+
+    for (i = 0; i < optlist->numopts; i++)
+    {
+        if (optlist->options[i] >= DBOPT_FIRST &&
+            optlist->options[i] <= DBOPT_LAST)
+            continue;
+        return db_perror(NULL, E_BADOPTCLASS, me);
+    }
+
+    switch (objtype)
+    {
+        case DB_CSGMESH:
+        case DB_CSGVAR:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_TIME:
+                        _csgm._time = DEREF(float, optlist->values[i]);
+                        _csgm._time_set = TRUE;
+                        break;
+
+                    case DBOPT_DTIME:
+                        _csgm._dtime = DEREF(double, optlist->values[i]);
+                        _csgm._dtime_set = TRUE;
+                        break;
+
+                    case DBOPT_CYCLE:
+                        _csgm._cycle = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_LABEL:
+                        _csgm._label = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XLABEL:
+                        _csgm._labels[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YLABEL:
+                        _csgm._labels[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZLABEL:
+                        _csgm._labels[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_UNITS:
+                        _csgm._unit = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XUNITS:
+                        _csgm._units[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YUNITS:
+                        _csgm._units[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZUNITS:
+                        _csgm._units[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_USESPECMF:
+                        _csgm._use_specmf = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_GROUPNUM:
+                        DEPRECATE_MSG("DBOPT_GROUPNUM",4,6,"MRG Trees")
+                        _csgm._group_no = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ORIGIN:
+                        _csgm._origin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_BNDNAMES:
+                        _csgm._bndnames = optlist->values[i];
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _csgm._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MRGTREE_NAME:
+                        _csgm._mrgtree_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_REGION_PNAMES:
+                        _csgm._region_pnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_TV_CONNECTIVITY:
+                        _csgm._tv_connectivity = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_DISJOINT_MODE:
+                        _csgm._disjoint_mode = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_CONSERVED:
+                        _csgm._conserved = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENSIVE:
+                        _csgm._extensive = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_MATERIAL:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_MAJORORDER:
+                        _ma._majororder = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ORIGIN:
+                        _ma._origin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MATNAMES:
+                        _ma._matnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_MATCOLORS:
+                        _ma._matcolors = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_ALLOWMAT0:
+                        _ma._allowmat0 = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _ma._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_MATSPECIES:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_MAJORORDER:
+                        _ms._majororder = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _ms._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_SPECNAMES:
+                        _ms._specnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_SPECCOLORS:
+                        _ms._speccolors = (char **) optlist->values[i];
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_POINTMESH:
+        case DB_POINTVAR:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_TIME:
+                        _pm._time = DEREF(float, optlist->values[i]);
+                        _pm._time_set = 1;
+                        break;
+
+                    case DBOPT_DTIME:
+                        _pm._dtime = DEREF(double, optlist->values[i]);
+                        _pm._dtime_set = 1;
+                        break;
+
+                    case DBOPT_CYCLE:
+                        _pm._cycle = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_NSPACE:
+                        _pm._nspace = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ORIGIN:
+                        _pm._origin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HI_OFFSET:
+                        _pm._hi_offset = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_LO_OFFSET:
+                        _pm._lo_offset = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_LABEL:
+                        _pm._label = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XLABEL:
+                        _pm._labels[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YLABEL:
+                        _pm._labels[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZLABEL:
+                        _pm._labels[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_UNITS:
+                        _pm._unit = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XUNITS:
+                        _pm._units[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YUNITS:
+                        _pm._units[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZUNITS:
+                        _pm._units[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_GROUPNUM:
+                        DEPRECATE_MSG("DBOPT_GROUPNUM",4,6,"MRG Trees")
+                        _pm._group_no = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _pm._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ASCII_LABEL:
+                        _pm._ascii_labels = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_NODENUM:
+                        _pm._gnodeno = (int*)optlist->values[i];
+                        break;
+
+                    case DBOPT_MRGTREE_NAME:
+                        _pm._mrgtree_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_REGION_PNAMES:
+                        _pm._region_pnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_LLONGNZNUM:
+                        _pm._llong_gnodeno = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_CONSERVED:
+                        _pm._conserved = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENSIVE:
+                        _pm._extensive = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_QUADMESH:
+        case DB_QUADVAR:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_TIME:
+                        _qm._time = DEREF(float, optlist->values[i]);
+                        _qm._time_set = TRUE;
+                        break;
+
+                    case DBOPT_DTIME:
+                        _qm._dtime = DEREF(double, optlist->values[i]);
+                        _qm._dtime_set = TRUE;
+                        break;
+
+                    case DBOPT_CYCLE:
+                        _qm._cycle = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_COORDSYS:
+                        _qm._coordsys = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_FACETYPE:
+                        _qm._facetype = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MAJORORDER:
+                        _qm._majororder = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_NSPACE:
+                        _qm._nspace = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ORIGIN:
+                        _qm._origin = DEREF(int, optlist->values[i]);
+                        if (! _qm._baseindex_set)
+                        {
+                            for (j = 0; j < _qm._ndims; j++)
+                                _qm._baseindex[j] = _qm._origin;
+                        }
+                        break;
+
+                    case DBOPT_PLANAR:
+                        _qm._planar = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HI_OFFSET:
+                        ip = (int *)optlist->values[i];
+                        for (j = 0; j < _qm._ndims; j++)
+                            _qm._hi_offset[j] = ip[j];
+                        break;
+
+                    case DBOPT_LO_OFFSET:
+                        ip = (int *)optlist->values[i];
+                        for (j = 0; j < _qm._ndims; j++)
+                            _qm._lo_offset[j] = ip[j];
+                        break;
+
+                    case DBOPT_LABEL:
+                        _qm._label = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XLABEL:
+                        _qm._labels[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YLABEL:
+                        _qm._labels[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZLABEL:
+                        _qm._labels[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_UNITS:
+                        _qm._unit = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XUNITS:
+                        _qm._units[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YUNITS:
+                        _qm._units[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZUNITS:
+                        _qm._units[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_USESPECMF:
+                        _qm._use_specmf = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ASCII_LABEL:
+                        _qm._ascii_labels = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_GROUPNUM:
+                        DEPRECATE_MSG("DBOPT_GROUPNUM",4,6,"MRG Trees")
+                        _qm._group_no = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_BASEINDEX:
+                        ip = (int *)optlist->values[i];
+                        for (j = 0; j < _qm._ndims; j++)
+                            _qm._baseindex[j] = ip[j];
+                        _qm._baseindex_set = TRUE;
+                        break;                        
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _qm._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MRGTREE_NAME:
+                        _qm._mrgtree_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_REGION_PNAMES:
+                        _qm._region_pnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_CONSERVED:
+                        _qm._conserved = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENSIVE:
+                        _qm._extensive = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_UCDMESH:
+        case DB_UCDVAR:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_TIME:
+                        _um._time = DEREF(float, optlist->values[i]);
+                        _um._time_set = TRUE;
+                        break;
+
+                    case DBOPT_DTIME:
+                        _um._dtime = DEREF(double, optlist->values[i]);
+                        _um._dtime_set = TRUE;
+                        break;
+
+                    case DBOPT_CYCLE:
+                        _um._cycle = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_COORDSYS:
+                        _um._coordsys = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_TOPO_DIM:
+                        /* The value of '_topo_dim' member is designed such
+                           that a value of zero (which can be a valid topological
+                           dimension specified by a caller) represents the
+                           NOT SET value. So, we always add 1 to whatever the
+                           caller gives us. */
+                        _um._topo_dim = DEREF(int, optlist->values[i])+1;
+                        break;
+
+                    case DBOPT_FACETYPE:
+                        _um._facetype = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ORIGIN:
+                        _um._origin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_PLANAR:
+                        _um._planar = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_LABEL:
+                        _um._label = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XLABEL:
+                        _um._labels[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YLABEL:
+                        _um._labels[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZLABEL:
+                        _um._labels[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_UNITS:
+                        _um._unit = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XUNITS:
+                        _um._units[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YUNITS:
+                        _um._units[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_ZUNITS:
+                        _um._units[2] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_USESPECMF:
+                        _um._use_specmf = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_ASCII_LABEL:
+                        _um._ascii_labels = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_HI_OFFSET:
+                        _um._hi_offset = DEREF(int, optlist->values[i]);
+                        _um._hi_offset_set = TRUE;
+                        break;
+
+                    case DBOPT_LO_OFFSET:
+                        _um._lo_offset = DEREF(int, optlist->values[i]);
+                        _um._lo_offset_set = TRUE;
+                        break;
+
+                    case DBOPT_GROUPNUM:
+                        DEPRECATE_MSG("DBOPT_GROUPNUM",4,6,"MRG Trees")
+                        _um._group_no = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_NODENUM:
+                        _um._gnodeno = (int*)optlist->values[i];
+                        break;
+
+                    case DBOPT_PHZONELIST:
+                        _um._phzl_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _um._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MRGTREE_NAME:
+                        _um._mrgtree_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_REGION_PNAMES:
+                        _um._region_pnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_TV_CONNECTIVITY:
+                        _um._tv_connectivity = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_DISJOINT_MODE:
+                        _um._disjoint_mode = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_LLONGNZNUM:
+                        _um._llong_gnodeno = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_CONSERVED:
+                        _um._conserved = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENSIVE:
+                        _um._extensive = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_ZONELIST:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_ZONENUM:
+                        _uzl._gzoneno = (int*)optlist->values[i];
+                        break;
+
+                    case DBOPT_LLONGNZNUM:
+                        _uzl._llong_gzoneno = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_PHZONELIST:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_ZONENUM:
+                        _phzl._gzoneno = (int*)optlist->values[i];
+                        break;
+
+                    case DBOPT_LLONGNZNUM:
+                        _phzl._llong_gzoneno = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_CSGZONELIST:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_REGNAMES:
+                        _csgzl._regnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_ZONENAMES:
+                        _csgzl._zonenames = (char **) optlist->values[i];
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_MULTIMESH:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_TIME:
+                        _mm._time = DEREF(float, optlist->values[i]);
+                        _mm._time_set = TRUE;
+                        break;
+
+                    case DBOPT_DTIME:
+                        _mm._dtime = DEREF(double, optlist->values[i]);
+                        _mm._dtime_set = TRUE;
+                        break;
+
+                    case DBOPT_CYCLE:
+                        _mm._cycle = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MATNOS:
+                        _mm._matnos = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_NMATNOS:
+                        _mm._nmatnos = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MATNAME:
+                        _mm._matname = (char *) optlist->values[i];
+                        break;
+
+                    case DBOPT_NMAT:
+                        _mm._nmat = DEREF(int,optlist->values[i]);
+                        break;
+
+                    case DBOPT_NMATSPEC:
+                        _mm._nmatspec = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_BLOCKORIGIN:
+                        _mm._blockorigin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_GROUPORIGIN:
+                        DEPRECATE_MSG("DBOPT_GROUPORIGIN",4,6,"MRG Trees")
+                        _mm._grouporigin = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_NGROUPS:
+                        DEPRECATE_MSG("DBOPT_NGROUPS",4,6,"MRG Trees")
+                        _mm._ngroups = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENTS_SIZE:
+                        _mm._extentssize = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENTS:
+                        _mm._extents = (double *) optlist->values[i];
+                        break;
+
+                    case DBOPT_ZONECOUNTS:
+                        _mm._zonecounts = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MIXLENS:
+                        _mm._mixlens = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MATCOUNTS:
+                        _mm._matcounts = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MATLISTS:
+                        _mm._matlists = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_HAS_EXTERNAL_ZONES:
+                        _mm._has_external_zones = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _mm._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_GROUPINGS_SIZE:
+                        DEPRECATE_MSG("DBOPT_GROUPINGS_SIZE",4,6,"MRG Trees")
+                        _mm._lgroupings = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_GROUPINGS:
+                        DEPRECATE_MSG("DBOPT_GROUPINGS",4,6,"MRG Trees")
+                        _mm._groupings = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_GROUPINGNAMES:
+                        DEPRECATE_MSG("DBOPT_GROUPINGNAMES",4,6,"MRG Trees")
+                        _mm._groupnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_MATCOLORS:
+                        _mm._matcolors = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_MATNAMES:
+                        _mm._matnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_ALLOWMAT0:
+                        _mm._allowmat0 = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MRGTREE_NAME:
+                        _mm._mrgtree_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_REGION_PNAMES:
+                        _mm._region_pnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_MMESH_NAME:
+                        _mm._mmesh_name = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_TENSOR_RANK:
+                        _mm._tensor_rank = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_TV_CONNECTIVITY:
+                        _mm._tv_connectivity = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_DISJOINT_MODE:
+                        _mm._disjoint_mode = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_TOPO_DIM:
+                        /* The value of '_topo_dim' member is designed such
+                           that a value of zero (which can be a valid topological
+                           dimension specified by a caller) represents the
+                           NOT SET value. So, we always add 1 to whatever the
+                           caller gives us. */
+                        _mm._topo_dim = DEREF(int, optlist->values[i])+1;
+                        break;
+
+                    case DBOPT_SPECNAMES:
+                        _mm._specnames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_SPECCOLORS:
+                        _mm._speccolors = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_CONSERVED:
+                        _mm._conserved = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_EXTENSIVE:
+                        _mm._extensive = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MB_FILE_NS:
+                        _mm._file_ns = (char *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MB_BLOCK_NS:
+                        _mm._block_ns = (char *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MB_BLOCK_TYPE:
+                        _mm._block_type = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_MB_EMPTY_LIST:
+                        _mm._empty_list = (int *) optlist->values[i];
+                        break;
+
+                    case DBOPT_MB_EMPTY_COUNT:
+                        _mm._empty_cnt = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_CURVE:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_LABEL:
+                        _cu._label = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XLABEL:
+                        _cu._labels[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YLABEL:
+                        _cu._labels[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XUNITS:
+                        _cu._units[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YUNITS:
+                        _cu._units[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_XVARNAME:
+                        _cu._varname[0] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_YVARNAME:
+                        _cu._varname[1] = (char *)optlist->values[i];
+                        break;
+
+                    case DBOPT_HIDE_FROM_GUI:
+                        _cu._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    case DBOPT_REFERENCE:
+                        _cu._reference = (char *)optlist->values[i];
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_DEFVARS:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_HIDE_FROM_GUI:
+                        _dv._guihide = DEREF(int, optlist->values[i]);
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        case DB_MRGTREE:
+            for (i = 0; i < optlist->numopts; i++)
+            {
+                switch (optlist->options[i])
+                {
+                    case DBOPT_MRGV_ONAMES:
+                        _mrgt._mrgvar_onames = (char **) optlist->values[i];
+                        break;
+
+                    case DBOPT_MRGV_RNAMES:
+                        _mrgt._mrgvar_rnames = (char **) optlist->values[i];
+                        break;
+
+                    default:
+                        unused++;
+                        break;
+                }
+            }
+            break;
+
+        default:
+            return db_perror(NULL, E_NOTIMP, me);
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBInqCompoundarray
+ *
+ * Purpose:     Inquire compound array attributes
+ *
+ * Return:      Success:        OKAY
+ *
+ *              Failure:        OOPS
+ *
+ * Arguments:
+ *      dbfile         ptr to data file
+ *      array_name     array name
+ *
+ *                Output args
+ *      elemnames      simple array names
+ *      elemlengths    simple array sizes
+ *      nelems         number of simple arrys
+ *      nvalues        number of values
+ *      datatype       value data type
+ *
+ * Programmer:  matzke at viper
+ *              Tue Oct 25 13:58:53 PDT 1994
+ *
+ * Modifications:
+ *    matzke at viper, Mon Oct 31 13:39:10 PST 1994
+ *    No longer calls DBGetCompoundarray.
+ *
+ *    Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *    I replaced API_END with API_END_NOPOP.
+ *
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBInqCompoundarray(DBfile *dbfile, const char *array_name,
+                   char **elemnames[], int **elemlengths, int *nelems,
+                   int *nvalues, int *datatype)
+
+{
+    DBcompoundarray *ca = NULL;
+
+    API_BEGIN2("DBInqCompoundarray", int, -1, array_name) {
+        if (!array_name || !*array_name)
+            API_ERROR("array name", E_BADARGS);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBInqCompoundarray", E_GRABBED) ; 
+        if (elemnames)
+            *elemnames = NULL;
+        if (elemlengths)
+            *elemlengths = NULL;
+        if (nelems)
+            *nelems = 0;
+        if (nvalues)
+            *nvalues = 0;
+        if (datatype)
+            *datatype = 0;
+
+        if (!dbfile->pub.g_ca)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        ca = DBGetCompoundarray(dbfile, (char *)array_name);
+        if (!ca)
+            API_ERROR("DBGetCompoundarray", E_CALLFAIL);
+
+        if (elemnames) {
+            *elemnames = ca->elemnames;
+            ca->elemnames = NULL;  /*so we don't free it... */
+        }
+        if (elemlengths) {
+            *elemlengths = ca->elemlengths;
+            ca->elemlengths = NULL;
+        }
+        if (nelems)
+            *nelems = ca->nelems;
+        if (nvalues)
+            *nvalues = ca->nvalues;
+        if (datatype)
+            *datatype = ca->datatype;
+
+        DBFreeCompoundarray(ca);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGetComponentNames
+ *
+ * Purpose:     Returns the component names for the specified object.
+ *              Each component name also has a variable name under which
+ *              the component value is stored in the data file.  The
+ *              COMP_NAMES and FILE_NAMES output arguments will point to
+ *              an array of pointers to names.  Each name as well as the
+ *              two arrays will be allocated with `malloc'.
+ *
+ * Return:      Success:        Number of components found for the
+ *                              specified object.
+ *
+ *              Failure:        zero.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.mdn.com
+ *              May 20, 1996
+ *
+ * Modifications:
+ *    Sean Ahern, Tue Sep 28 10:48:06 PDT 1999
+ *    Added a check for variable name validity.
+ *
+ *    Mark C. Miller, Tue Sep  6 10:57:55 PDT 2005
+ *    Deprecated this function
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBGetComponentNames(DBfile *dbfile, const char *objname,
+                    char ***comp_names, char ***file_names)
+{
+    int retval;
+
+    API_DEPRECATE2("DBGetComponentNames", int, -1, objname, 4,6,"")
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (!dbfile->pub.g_compnames)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+        if (!objname || !*objname)
+            API_ERROR("object name", E_BADARGS);
+
+        retval = (dbfile->pub.g_compnames) (dbfile, (char *)objname,
+                                            comp_names, file_names);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* If API_RETURN above is removed, use API_END instead */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                             db_SplitShapelist
+ *
+ * Purpose
+ *
+ *    Split the shapecnts in the zone list so that an entry in the
+ *    shapecnt array will either refer to all real zones or all ghost
+ *    zones.
+ *
+ * Programmer
+ *
+ *    Eric Brugger, January 22, 1999
+ *
+ * Notes
+ *
+ * Modifications
+ *    Eric Brugger, Wed Mar 31 11:36:42 PST 1999
+ *    Modify the routine to handle polyhedra.  This turned out to be
+ *    a significant rewrite of the routine.
+ *
+ *    Eric Brugger, Tue Apr 20 09:24:51 PDT 1999
+ *    Correct a bug where the nshapes field was always zero when the
+ *    shapetype field was NULL.
+ *
+ *    Jeremy Meredith, Fri Aug 13 13:53:57 PDT 1999
+ *    Corrected a bug where nshapes was still not incremented enough if
+ *    shapetype was NULL.  This was causing ghost zones to disappear.
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_SplitShapelist (DBucdmesh *um)
+{
+    int       *shapecnt=NULL, *shapesize=NULL, *shapetype=NULL, nshapes;
+    int       *zonelist=NULL, nzones;
+    int        min_index, max_index;
+    int       *shapecnt2=NULL, *shapesize2=NULL, *shapetype2=NULL, nshapes2;
+    int        i, iz, izl, deltaiz;
+    int        isplit, splits[3];
+
+    shapecnt  = um->zones->shapecnt;
+    shapesize = um->zones->shapesize;
+    shapetype = um->zones->shapetype;
+    nshapes   = um->zones->nshapes;
+    zonelist  = um->zones->nodelist;
+    min_index = um->zones->min_index;
+    max_index = um->zones->max_index;
+    nzones    = um->zones->nzones;
+
+    nshapes2   = 0;
+    shapecnt2  = ALLOC_N (int, nshapes+2);
+    shapesize2 = ALLOC_N (int, nshapes+2);
+    if (shapetype != NULL)
+    {
+        shapetype2 = ALLOC_N (int, nshapes+2);
+    }
+
+    if (min_index > 0)
+    {
+        splits[0] = min_index;
+        splits[1] = max_index + 1;
+        splits[2] = nzones;
+    }
+    else
+    {
+        splits[0] = max_index + 1;
+        splits[1] = nzones;
+    }
+
+    isplit = 0;
+    i = 0;
+    iz = 0;
+    izl = 0;
+    while (iz < nzones)
+    {
+        if (splits[isplit] - iz >= shapecnt[i])
+        {
+            shapecnt2 [nshapes2]   = shapecnt[i];
+            shapesize2[nshapes2]   = shapesize[i];
+            if (shapetype != NULL)
+            {
+                shapetype2[nshapes2] = shapetype[i];
+            }
+            nshapes2++;
+            isplit += (splits[isplit] - iz == shapecnt[i]) ? 1 : 0;
+            iz += shapecnt[i];
+            if (shapetype != NULL && shapetype[i] == DB_ZONETYPE_POLYHEDRON)
+            {
+                izl += shapesize[i];
+            }
+            else
+            {
+                izl += shapesize[i] * shapecnt[i];
+            }
+            i++;
+        }
+        else
+        {
+            deltaiz = splits[isplit] - iz;
+            shapecnt2[nshapes2] = deltaiz;
+            if (shapetype != NULL && shapetype[i] == DB_ZONETYPE_POLYHEDRON)
+            {
+                int       j, k;
+                int       izlInit, nFaces;
+
+                izlInit = izl;
+                for (j = 0; j < deltaiz; j++)
+                {
+                    nFaces = zonelist[izl++];
+                    for (k = 0; k < nFaces; k++)
+                    {
+                        izl += zonelist[izl] + 1;
+                    }
+                }
+                shapesize2[nshapes2] = izl - izlInit;
+                shapesize[i] -= izl - izlInit;
+            }
+            else
+            {
+                izl += shapesize[i] * deltaiz;
+                shapesize2[nshapes2] = shapesize[i];
+            }
+            if (shapetype != NULL)
+            {
+                shapetype2[nshapes2] = shapetype[i];
+            }
+            nshapes2++;
+            shapecnt[i] -= deltaiz;
+            isplit++;
+            iz += deltaiz;
+        }
+    }
+
+    FREE (shapecnt);
+    FREE (shapesize);
+    FREE (shapetype);
+    um->zones->shapecnt  = shapecnt2;
+    um->zones->shapesize = shapesize2;
+    um->zones->shapetype = shapetype2;
+    um->zones->nshapes   = nshapes2;
+
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                   db_ResetGlobalData_Csgmesh
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *    Mark C. Miller, Wed Aug  3 14:39:03 PDT 2005
+ *
+ *  Modifications:
+ *    Mark C. Miller, Mon Jan 12 16:29:19 PST 2009
+ *    Removed explicit setting of data members already handled
+ *    correctly by memset to zero.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_Csgmesh () {
+
+   memset(&_csgm, 0, sizeof(_csgm));
+   _csgm._use_specmf = DB_OFF;
+   _csgm._group_no = -1;
+
+   return 0;
+}
+/*----------------------------------------------------------------------
+ *  Routine                                 db_ResetGlobalData_PointMesh
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *      It is assumed that _ndims has a valid value before this
+ *      function is invoked. (It is assigned to _nspace.)
+ *
+ *  Modifications
+ *
+ *      Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *      Added _dtime.
+ *
+ *      Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *      Init group_no to -1.
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *
+ *    Mark C. Miller, Mon Jan 12 16:29:19 PST 2009
+ *    Removed explicit setting of data members already handled
+ *    correctly by memset to zero.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_PointMesh (int ndims) {
+
+   memset(&_pm, 0, sizeof(_pm));
+   _pm._ndims = ndims;
+   _pm._nspace = ndims;
+   _pm._group_no = -1;
+   return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                  db_ResetGlobalData_QuadMesh
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *      It is assumed that _ndims has a valid value before this
+ *      function is invoked. (It is assigned to _nspace.)
+ *
+ *  Modifications
+ *
+ *     Al Leibee, Wed Aug  3 16:57:38 PDT 1994
+ *     Added _use_specmf.
+ *
+ *     Al Leibee, Sun Apr 17 07:54:25 PDT 1994
+ *     Added dtime.
+ *
+ *     Robb Matzke, 18 Jun 1997
+ *     Initialize ascii_labels field to FALSE.
+ *
+ *     Eric Brugger, Mon Oct  6 15:11:26 PDT 1997
+ *     I modified the routine to initialize lo_offset and hi_offset.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Init group_no to -1.  Init baseindex and baseindex_set.
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *
+ *    Mark C. Miller, Mon Jan 12 16:29:19 PST 2009
+ *    Removed explicit setting of data members already handled
+ *    correctly by memset to zero.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_QuadMesh (int ndims) {
+
+   FREE(_qm._meshname);
+   memset(&_qm, 0, sizeof(_qm));
+
+   _qm._coordsys = DB_OTHER;
+   _qm._facetype = DB_RECTILINEAR;
+   _qm._ndims = ndims;
+   _qm._nspace = ndims;
+   _qm._planar = DB_AREA;
+   _qm._use_specmf = DB_OFF;
+   _qm._group_no = -1;
+
+   return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    db_ResetGlobalData_Curve
+ *
+ * Purpose:     Reset global data to default values.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 16, 1996
+ *
+ * Modifications:
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *-------------------------------------------------------------------------*/
+INTERNAL void
+db_ResetGlobalData_Curve (void) {
+
+   memset (&_cu, 0, sizeof(_cu)) ;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                   db_ResetGlobalData_Ucdmesh
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *      Jeffery W. Long, NSSD-B
+ *
+ *  Notes
+ *
+ *      It is assumed that _ndims has a valid value before this
+ *      function is invoked. (It is assigned to _nspace.)
+ *
+ *  Modifications
+ *     Al Leibee, Wed Aug  3 16:57:38 PDT 1994
+ *     Added _use_specmf.
+ *
+ *     Al Leibee, Mon Apr 18 07:45:58 PDT 1994
+ *     Added _dtime.
+ *
+ *     Eric Brugger, Wed Oct 15 14:45:47 PDT 1997
+ *     Added _hi_offset and _lo_offset.
+ *
+ *     Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *     Init group_no to -1.
+ *
+ *     Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *     Moved from silo_pdb.c to public place where any driver can call
+ *
+ *     Brad Whitlock, Wed Jan 18 15:38:39 PST 2006
+ *     Added _ascii_labels.
+ *
+ *     Thomas R. Treadway, Wed Jun 28 10:31:45 PDT 2006
+ *     Added _topo_dim..
+ *
+ *     Mark C. Miller, Tue Jan  6 22:12:43 PST 2009
+ *     Made default value for topo_dim to be NOT SET (-1).
+ *
+ *     Mark C. Miller, Mon Jan 12 16:26:08 PST 2009
+ *     Replaced 'topo_dim' with 'tdim_plus1', removed it from being
+ *     explicitly set. Likewise, removed explicit setting of other
+ *     entries that are already correctly handled by memset to zero.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_Ucdmesh (int ndims, int nnodes, int nzones) {
+
+   memset(&_um, 0, sizeof(_um));
+   _um._coordsys = DB_OTHER;
+   _um._facetype = DB_RECTILINEAR;
+   _um._ndims = ndims;
+   _um._nnodes = nnodes;
+   _um._nzones = nzones;
+   _um._planar = DB_OTHER;
+   _um._use_specmf = DB_OFF;
+   _um._group_no = -1;
+
+   return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                               db_ResetGlobalData_Ucdzonelist
+ *
+ *  Purpose
+ *
+ *      Reset global data to default values. For internal use only.
+ *
+ *  Programmer
+ *
+ *      Jeremy Meredith, May 21 1999
+ *
+ *  Notes
+ *
+ *  Modifications
+ *
+ *      Hank Childs, Thu Jan  6 16:10:03 PST 2000
+ *      Added void to function signature to avoid compiler warning.
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_Ucdzonelist (void) {
+
+   memset(&_uzl, 0, sizeof(_uzl));
+
+   return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                  db_ResetGlobalData_MultiMesh
+ *
+ * Purpose
+ *
+ *    Reset global data to default values. For internal use only.
+ *
+ * Programmer
+ *
+ *    Eric Brugger, January 12, 1996
+ *
+ * Notes
+ *
+ * Modifications
+ *    Eric Brugger, Thu Oct 16 10:40:00 PDT 1997
+ *    I added the options DBOPT_MATNOS and DBOPT_NMATNOS.
+ *
+ *    Jeremy Meredith Sept 18 1998
+ *    Added options DBOPT_MATNAME, DBOPT_NMAT, and DBOPT_NMATSPEC.
+ *
+ *    Jeremy Meredith, Fri May 21 10:04:25 PDT 1999
+ *    Added _blockorigin, _grouporigin, and _ngroups.
+ *
+ *    Mark C. Miller, Mon Jun 21 18:06:36 PDT 2004
+ *    Moved from silo_pdb.c to public place where any driver can call
+ *
+ *    Thomas R. Treadway, Thu Jul 20 11:06:27 PDT 2006
+ *    Added _lgroupings, _groupings, and _groupnames.
+ *
+ *    Mark C. Miller, Mon Jan 12 16:28:18 PST 2009
+ *    Removed explicit setting of members already correctly handled
+ *    by memset to zero.
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_MultiMesh (void) {
+   memset(&_mm, 0, sizeof(_mm));
+   _mm._nmatnos = -1;
+   _mm._nmat = -1;
+   _mm._blockorigin = 1;
+   _mm._grouporigin = 1;
+   return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                  db_ResetGlobalData_Defvars
+ *
+ * Purpose
+ *
+ *    Reset global data to default values. For internal use only.
+ *
+ * Programmer:
+ *
+ *    Mark C. Miller, March 22, 2006
+ *--------------------------------------------------------------------*/
+INTERNAL int
+db_ResetGlobalData_Defvars (void) {
+   memset(&_dv, 0, sizeof(_dv));
+   return 0;
+}
+
+INTERNAL int
+db_ResetGlobalData_Mrgtree (void) {
+   memset(&_mrgt, 0, sizeof(_mrgt));
+   return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                  db_FullName2BaseName
+ *
+ * Purpose
+ *
+ *    Given a the full path name of an object in the db, return
+ *    the object's basename.
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, June 22, 2004 
+ *
+ * Modifications:
+ *    Mark C. Miller, Thu Sep  7 10:50:55 PDT 2006
+ *    Made it just use Jim Reus' new basename routine.
+ *--------------------------------------------------------------------*/
+INTERNAL char *
+db_FullName2BaseName(const char *path)
+{
+   return db_basename(path);
+}
+
+/*----------------------------------------------------------------------
+ * Purpose
+ *
+ *    catenate an array of strings into a single, semicolon seperated
+ *    string list
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, July 20, 2005 
+ *
+ * Modifications:
+ *    Mark C. Miller, Wed Oct  3 21:51:42 PDT 2007
+ *    Made it handle null string as no chars output and empty string
+ *    ("") as '\n' output so during readback, we can construct either
+ *    null ptrs or emtpy strings correctly.
+ *    Made it handle a variable length list where n is unspecified.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:38:46 PDT 2010
+ *    Made this function public, replacing 'db_' with 'DB' in name.
+ *--------------------------------------------------------------------*/
+PUBLIC void 
+DBStringArrayToStringList(char **strArray, int n,
+                           char **strList, int *m)
+{
+    int i, len;
+    char *s = NULL;
+
+    /* if n is unspecified, determine it by counting forward until
+       we get a null pointer */
+    if (n < 0)
+    {
+        n = 0;
+        while (strArray[n] != 0)
+            n++;
+    }
+
+    /*
+     * Create a string which is a semi-colon separated list of strings
+     */
+     for (i=len=0; i<n; i++)
+     {
+         if (strArray[i])
+             len += strlen(strArray[i])+1;
+         else
+             len += 2;
+     }
+     s = malloc(len+1);
+     for (i=len=0; i<n; i++) {
+         if (i) s[len++] = ';';
+         if (strArray[i])
+         {
+             strcpy(s+len, strArray[i]);
+             len += strlen(strArray[i]);
+         }
+         else
+         {
+             s[len++] = '\n';
+         }
+     }
+     len++; /*count last null*/
+
+     *strList = s;
+     *m = len;
+}
+
+/*----------------------------------------------------------------------
+ * Purpose
+ *
+ *    Decompose a single, semicolon seperated string list into an array
+ *    of strings
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, July 20, 2005 
+ *
+ * Modfications:
+ *
+ *    Mark C. Miller, Fri Jul 14 23:39:32 PDT 2006
+ *    Fixed problem with empty strings in the input list being skipped
+ *
+ *    Mark C. Miller, Wed Oct  3 21:54:35 PDT 2007
+ *    Made it return empty or null strings depending on input
+ *    Made it handle a variable length list where n is unspecified
+ *
+ *    Mark C. Miller, Mon Nov  9 12:10:47 PST 2009
+ *    Added logic to handle swapping of slash character between 
+ *    windows/linux. Note that swapping of slash character only 
+ *    makes sense in certain context and only when it appears in
+ *    a string BEFORE a colon character. We try to minimize the
+ *    amount of work we do looking for a colon character by
+ *    remembering where we find it in the last substring.
+ *
+ *    Mark C. Miller, Thu Dec 17 17:09:27 PST 2009
+ *    Fixed UMR on strLen when n>=0.
+ *
+ *    Mark C. Miller, Wed Jul 14 20:38:46 PDT 2010
+ *    Made this function public, replacing 'db_' with 'DB' in name.
+ *    Merged fixes from 4.7.3 patches to fix problems with swaping
+ *    the slash character.
+ *
+ *    Mark C. Miller, Wed Jun 30 16:01:17 PDT 2010
+ *    Made logic for handling slash swap more sane. Now, swapping is
+ *    performed AFTER the list of strings has been broken out into
+ *    separate arrays.
+ *--------------------------------------------------------------------*/
+PUBLIC char **
+DBStringListToStringArray(char *strList, int n, int handleSlashSwap,
+    int skipFirstSemicolon)
+{
+    int i, l, add1 = 0, strLen;
+    char **retval;
+    int *colonAt = 0;
+    int needToSlashSwap = 0;
+
+    /* if n is unspecified (<0), compute it by counting semicolons */
+    if (n < 0)
+    {
+        add1 = 1;
+        n = 1;
+        i = (skipFirstSemicolon&&strList[0]==';')?1:0;
+        while (strList[i] != '\0')
+        {
+            if (strList[i] == ';')
+                n++;
+            i++;
+        }
+        strLen = i;
+    }
+
+    retval = (char**) calloc(n+add1, sizeof(char*));
+    if (handleSlashSwap)
+        colonAt = (int *) calloc(n, sizeof(int));
+    for (i=0, l=(skipFirstSemicolon&&strList[0]==';')?1:0; i<n; i++)
+    {
+        if (strList[l] == ';')
+        {
+            retval[i] = STRDUP(""); 
+            l += 1;
+        }
+        else if (strList[l] == '\n')
+        {
+            retval[i] = 0; 
+            l += 2;
+        }
+        else
+        {
+            int lstart = l;
+            while (strList[l] != ';' && strList[l] != '\0')
+            {
+                /* Since we're already marching through characters looking
+                   for a ';', if we're supposed to swap slash characters too,
+                   keep track of colons also. We keep track of the LAST ':'
+                   we see in colonAt[i]. */
+                if (handleSlashSwap)
+                {
+#if !defined(_WIN32) /* linux case */
+                    if (strList[l] == '\\')
+#else                /* windows case */
+                    if (strList[l] == '/')
+#endif
+                        needToSlashSwap = 1;
+                    if (strList[l] == ':')
+                        colonAt[i] = l-lstart;
+                }
+                l++;
+            }
+            strList[l] = '\0';
+            retval[i] = STRDUP(&strList[lstart]);
+            l++;
+        }
+    }
+    if (add1) retval[i] = 0;
+
+    /* Ok, now swap slash characters if requested and needed */
+    if (handleSlashSwap)
+    {
+        if (needToSlashSwap)
+        {
+            for (i=0; i < n; i++)
+            {
+                for (l = 0; l < colonAt[i]; l++)
+                {
+#if !defined(_WIN32) /* linux case */
+                    if (retval[i][l] == '\\') retval[i][l] = '/';
+#else                /* windows case */
+                    if (retval[i][l] == '/') retval[i][l] = '\\';
+#endif
+                }
+            }
+        }
+        free(colonAt);
+    }
+
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBSortObjectsByOffset
+ *
+ * Purpose:     Determines the offset within the Silo file of each object
+ *              in the list of objects passed in and returns an array
+ *              and returns an integer array indicating their ordering. 
+ *
+ * Return:      Success:        Non-zero. 
+ *              Failure:        zero.
+ *
+ * Programmer:  Mark C. Miller, Thu Jul 15 06:40:27 PDT 2010
+ *-------------------------------------------------------------------------*/
+PUBLIC int
+DBSortObjectsByOffset(DBfile *dbfile, int nobjs, 
+    const char *const *const names, int *ordering)
+{
+    int retval;
+
+    API_BEGIN2("DBSortObjectsByOffset", int, -1, api_dummy);
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (nobjs <= 0)
+            API_ERROR("nobjs", E_BADARGS);
+        if (!names)
+            API_ERROR("names", E_BADARGS);
+        if (!ordering)
+            API_ERROR("ordering", E_BADARGS);
+        if (!dbfile->pub.sort_obo)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.sort_obo) (dbfile, nobjs, names, ordering); 
+
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* If API_RETURN above is removed, use API_END instead */
+}
+
+/*----------------------------------------------------------------------
+ * Purpose
+ *
+ *    Flatten an array of variable lenght arrays of ints into a single
+ *    array of ints.
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, Wed Oct 10 11:49:36 PDT 2007
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL void 
+db_IntArrayToIntList(int **intArrays, int nArrays,
+const int *const lenArrays, int **intList, int *m)
+{
+    int i,j,n;
+    int *list = 0;
+
+    if (nArrays <= 0 || intArrays == 0 || lenArrays == 0 ||
+        intList == 0 || m == 0)
+    {
+        *intList = 0;
+        *m = 0;
+        return;
+    }
+
+    for (i=n=0; i < nArrays; i++)
+        n += lenArrays[i];
+
+    if (n == 0)
+    {
+        *intList = 0;
+        *m = 0;
+        return;
+    }
+
+    list = (int *) malloc(n * sizeof(int));
+
+    for (i=n=0; i < nArrays; i++)
+    {
+        for (j = 0; j < lenArrays[i]; j++)
+            list[n++] = intArrays[i][j];
+    }
+
+    *intList = list;
+    *m = n;
+}
+
+/*----------------------------------------------------------------------
+ * Purpose
+ *
+ *    Unflatten a a single array of ints and lengths into a an array
+ *    of arrays of the specified lengths.
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, Wed Oct 10 11:49:36 PDT 2007
+ *
+ *--------------------------------------------------------------------*/
+INTERNAL int**
+db_IntListToIntArray(const int *const intList, int nArrays,
+    const int *const lenArrays)
+{
+    int i,j,n;
+    int **retval = 0;
+
+    if (nArrays <= 0 || intList == 0 || lenArrays == 0)
+        return 0;
+
+    retval = (int**) malloc(nArrays * sizeof(int*));
+    for (i=n=0; i < nArrays; i++)
+    {
+        retval[i] = (int *) malloc(lenArrays[i] * sizeof(int));
+        for (j = 0; j < lenArrays[i]; j++)
+            retval[i][j] = intList[n++];
+    }
+
+    return retval;
+}
+
+/*----------------------------------------------------------------------
+ * Purpose
+ *
+ *    Break an extend driver id into type and subtype 
+ *
+ * Programmer
+ *
+ *    Mark C. Miller, July 31, 2006 
+ *
+ * Modifications:
+ *  Mark C. Miller, Mon Aug 21 23:14:29 PDT 2006
+ *  Made code that references DB_HDF5 conditionally compiled
+ *
+ *  Mark C. Miller, Thu Feb 11 09:51:28 PST 2010
+ *  Changed logic for how subtype is handled.
+ *
+ *  Mark C. Miller, Thu Feb 25 19:00:09 PST 2010
+ *  Versions of silo 4.7.2 and earlier used a bit of a brain dead way
+ *  to specify alternative HDF5 vfds by manipulating the high order
+ *  bits in the integer 'type' arg to DBCreate/DBOpen. For example, the
+ *  default HDF5 driver was '7' while HDF5 w/STDIO vfd was '0x200'. This
+ *  was inflexible and unable to handle the large variety of options
+ *  available in HDF5.
+ *
+ *  Versions of silo newer than 4.7.2 use a global array of options
+ *  sets registered and stored in the SILO_Globals structure. So,
+ *  a particular set of HDF5 vfd options is identified by a single
+ *  integer indexing into this global list of options. It is this integer
+ *  index that is shifted left by 11 bits to make space for the primary
+ *  Silo driver id (e.g. DB_PDB or DB_HDF5) and obsoleted HDF5 vfd
+ *  specifications and then OR'd into the integer 'type' arg in the
+ *  DBCreate/DBOpen calls to specify HDF5 vfd options.
+ *
+ *  In the initial implementation of this new approach using a global
+ *  array of options sets, we allowed for a total of 32 (5 bits)
+ *  options sets plus another 10 default options sets for convenience.
+ *  But, we don't actually store the 10 default options set and use
+ *  only the integer identifer between 0 and 9 to identify them.
+ *  So, the identifier for a given options set ranges from 0...41
+ *  requiring a total of 6 bits. Those 6 bits are 0x1F800.
+ *--------------------------------------------------------------------*/
+INTERNAL void 
+db_DriverTypeAndFileOptionsSetId(int driver, int *type, int *_opts_set_id)
+{
+    int theType = driver&0xF; 
+    int opts_set_id = 0;
+
+    if (driver > DB_NFORMATS)
+    {
+        opts_set_id = (driver&0x1F800)>>11;
+#ifdef DB_HDF5X
+        if (theType == DB_HDF5X)
+        {
+            int obsolete_subType = driver&0x700;
+            switch (obsolete_subType)
+            {
+                case DB_HDF5_SEC2_OBSOLETE:
+                    opts_set_id = DB_FILE_OPTS_H5_DEFAULT_SEC2;
+                    break;
+                case DB_HDF5_STDIO_OBSOLETE:
+                    opts_set_id = DB_FILE_OPTS_H5_DEFAULT_STDIO;
+                    break;
+                case DB_HDF5_CORE_OBSOLETE:
+                    opts_set_id = DB_FILE_OPTS_H5_DEFAULT_CORE;
+                    break;
+                case DB_HDF5_MPIO_OBSOLETE:
+                    opts_set_id = DB_FILE_OPTS_H5_DEFAULT_MPIO;
+                    break;
+                case DB_HDF5_MPIOP_OBSOLETE:
+                    opts_set_id = DB_FILE_OPTS_H5_DEFAULT_MPIP;
+                    break;
+                default:
+                    break;
+            }
+        }
+#endif
+    }
+
+    if (type) *type = theType;
+    if (_opts_set_id) *_opts_set_id = opts_set_id;
+}
+
+/*
+ *
+ * The following data structures and functions for manipulating
+ * character strings representing pathnames was originally written
+ * by James F. Reus as part of the DSL Library. It was extracted from
+ * DSL and adapted, slightly, for use in the Silo library by Mark C. Miller
+ *
+ * BEGIN CODE FROM JIM REUS' DSL {
+ *
+ */
+
+char *db_absoluteOf_path (const char *cwg,
+                          const char *pathname)
+{  char *result;
+
+   if (0 < strlen(pathname))
+   {  if (db_isAbsolute_path(pathname))
+          result = STRDUP(pathname);
+      else
+          result = db_join_path(cwg,pathname);
+   }
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function returns a string representing the basename part
+|                of the given pathname (stripping off the parent path).  Note
+|                that special cases arise...
+|
+|                    pathname == 0            Return value is 0.
+|                    pathname == "/"            Return value is "/".
+|                    pathname == "/base"        Return value is "base".
+|                    pathname == "base"         Return value is "base".
+|                    pathname == "path/base"    Return value is "base".
+|
+|   Return:      A pointer to a NULL-terminated string is returned when this
+|                function is successful.  Note that this string is constructed
+|                from allocated dynamic memory, it is up to the caller to
+|                release this string when it is no longer needed.  A 0
+|                pointer is returned on error.
+|
++-----------------------------------------------------------------------------*/
+
+char *db_basename ( const char *pathname )
+{  char *result;
+
+   result = 0;
+   {  if (0 < strlen(pathname))
+      {  if (pathname && (strcmp(pathname,"/") == 0))
+            result = STRDUP("/");
+         else
+         {  int i;
+
+            for (i=(int)strlen(pathname)-1; 0<=i; --i)
+               if (pathname[i] == '/')
+               {  result = STRDUP(&(pathname[i+1]));
+                  goto theExit;
+               }
+            result = STRDUP(pathname);
+         }
+      }
+   }
+theExit:
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function is used to release all storage associated
+|                with the given pathname component list.  Such a pathname
+|                component list is typically derived from a NULL-terminated
+|                string using the db_split_path() function.
+|
+|   Return:      A 0 pointer is always returned.
+|
++-----------------------------------------------------------------------------*/
+
+db_Pathname *db_cleanup_path ( db_Pathname *p )
+{  
+   {  if (p != 0)
+      {  while (p->firstComponent != 0)
+         {  db_PathnameComponent *c;
+
+            c                                  = p->firstComponent;
+            p->firstComponent                  = c->nextComponent;
+            if (c->nextComponent == 0)
+               p->lastComponent                = 0;
+            else
+               c->nextComponent->prevComponent = 0;
+            if (c->name != 0)
+            {  free(c->name);
+               c->name                         = 0;
+            }
+            c->prevComponent                   = 0;
+            c->nextComponent                   = 0;
+            free(c);
+         }
+         free(p);
+         p = 0;
+      }
+   }
+   return p;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function returns a string representing the dirname part
+|                of the given pathname (stripping off the parent path).  Note
+|                that special cases arise...
+|
+|                    pathname == 0            Return value is 0.
+|                    pathname == "/"            Return value is "".
+|                    pathname == "/base"        Return value is "/".
+|                    pathname == "base"         Return value is ".".
+|                    pathname == "path/base"    Return value is "path".
+|
+|   Return:      A pointer to a NULL-terminated string is returned when this
+|                function is successful.  Note that this string is constructed
+|                from allocated dynamic memory, it is up to the caller to
+|                release this string when it is no longer needed.  A 0
+|                pointer is returned on error.
+|
++-----------------------------------------------------------------------------*/
+
+char *db_dirname ( const char *pathname )
+{  char *result;
+
+   result = 0;
+   {  if (0 < strlen(pathname))
+      {  if (pathname && (strcmp(pathname,"/") == 0))
+            result = STRDUP("");
+         else
+         {  int  i;
+            char tmp[32767];
+
+            strcpy(tmp,pathname);
+            for (i=(int)strlen(tmp)-1; 0<=i; --i)
+               if (tmp[i] == '/')
+               {  if (i == 0)
+                     tmp[1] = '\0';
+                  else
+                     tmp[i] = '\0';
+                  result = STRDUP(tmp);
+                  goto theExit;
+               }
+            result = STRDUP(".");
+         }
+      }
+   }
+theExit:
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function is used to determine if the given pathname
+|                is an absolute pathname.  Note that this is really just a
+|                test for a leading '/'.
+|
+|   Return:      A value of TRUE is returned when the function is
+|                successful, otherwise a value of FALSE is returned.
+|
++-----------------------------------------------------------------------------*/
+
+int db_isAbsolute_path ( const char *pathname )
+{  int result;
+
+   result = FALSE;
+   if (0 < strlen(pathname))
+      if (pathname[0] == '/')
+         result = TRUE;
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function is used to determine if the given pathname is an
+|                relative pathname.  Note that this is really just a test for a
+|                leading '/'.
+|
+|   Return:      A value of TRUE is returned when the function is
+|                successful, otherwise a value of FALSE is returned.
++-----------------------------------------------------------------------------*/
+
+int db_isRelative_path ( const char *pathname )
+{  int result;
+
+   result = FALSE;
+   if (0 < strlen(pathname))
+      if (pathname[0] != '/')
+         result = TRUE;
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function joins the two given pathname components to form
+|                a new pathname.  The result is normalized to deal properly
+|                with absolute pathnames, `.' and `..' components.  For
+|                example: joining "abc/def" and "../xyz/123" would result
+|                in "abc/xyz/123".  Note that joining "abc/123" and "/xyz"
+|                will yield "/xyz" since the second part is an absolute
+|                path. Note that the first operand, a, is treated as the
+|                "root" for any '.' or '..' in operand b.
+|
+|   Return:      A pointer to a NULL-terminated string is returned when this
+|                function is successful.  Note that this string is constructed
+|                from allocated dynamic memory, it is up to the caller to
+|                release this string when it is no longer needed.  A 0
+|                pointer is returned on error.
+|
+|   Modifications:
+|
+|     Mark C. Miller, Wed Oct 18 08:41:33 PDT 2006
+|     Fixed bug where result was set at top of function but then uninitialized
+|     tmp was tested at end causing result to be set to zero
++-----------------------------------------------------------------------------*/
+
+char *db_join_path ( const char *a,
+                     const char *b )
+{  char       *result;
+   char *tmp;
+
+   if (strlen(b) == 0)
+      return db_normalize_path(a);
+   else if (strlen(a) == 0)
+      return db_normalize_path(b);
+   else if (db_isAbsolute_path(b))
+      return db_normalize_path(b);
+   else
+   {  db_Pathname *Pa;
+
+      tmp = 0;
+      if ((Pa=db_split_path(a)) != 0)
+      {  db_Pathname *Pb;
+
+         if ((Pb=db_split_path(b)) != 0)
+         {  db_Pathname *t;
+
+            if ((t=(db_Pathname *)malloc(sizeof(db_Pathname))) != 0)
+            {  db_PathnameComponent *c;
+               int          ok;
+
+               t->firstComponent = 0;
+               t->lastComponent  = 0;
+               ok                = TRUE;
+               c                 = Pa->firstComponent;
+               while (c != 0)
+               {  db_PathnameComponent *k;
+
+                  if ((k=(db_PathnameComponent *)malloc(sizeof(db_PathnameComponent))) != 0)
+                  {  if (c->name != 0)
+                        k->name                         = STRDUP(c->name);
+                     else
+                        k->name                         = 0;
+                     k->prevComponent                   = t->lastComponent;
+                     k->nextComponent                   = 0;
+                     if (t->lastComponent == 0)
+                        t->firstComponent               = k;
+                     else
+                        t->lastComponent->nextComponent = k;
+                     t->lastComponent                   = k;
+                  }
+                  else
+                  {  ok = FALSE;
+                     break;
+                  }
+                  c = c->nextComponent;
+               }
+               if (ok)
+               {  c = Pb->firstComponent;
+                  while (c != 0)
+                  {  db_PathnameComponent *k;
+
+                     if ((k=(db_PathnameComponent *)malloc(sizeof(db_PathnameComponent))) != 0)
+                     {  if (c->name != 0)
+                           k->name                         = STRDUP(c->name);
+                        else
+                           k->name                         = 0;
+                        k->prevComponent                   = t->lastComponent;
+                        k->nextComponent                   = 0;
+                        if (t->lastComponent == 0)
+                           t->firstComponent               = k;
+                        else
+                           t->lastComponent->nextComponent = k;
+                        t->lastComponent                   = k;
+                     }
+                     else
+                     {  ok = FALSE;
+                        break;
+                     }
+                     c = c->nextComponent;
+                  }
+                  if (ok)
+                     tmp = db_unsplit_path(t);
+               }
+               t = db_cleanup_path(t);
+            }
+            Pb = db_cleanup_path(Pb);
+         }
+         Pa = db_cleanup_path(Pa);
+      }
+   }
+   if (tmp != 0)
+   {
+      result = db_normalize_path(tmp);
+      free(tmp);
+   }
+   else
+      result = 0;
+   return result;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function is used to normalize the given pathname, dealing
+|                with dots, double-dots and such.
+|
+|                This function resolves:
+|
+|                    - double slashes (such as abc//123)
+|                    - trailing slashes (such as abc/)
+|                    - embedded single dots (such as abc/./123) except for
+|                      some leading dots.
+|                    - name-double dot sets (such as abc/../123)
+|
+|   Return:      A pointer to a NULL-terminated string is returned when this
+|                function is successful.  Note that this string is constructed
+|                from allocated dynamic memory, it is up to the caller to
+|                release this string when it is no longer needed.  A 0
+|                pointer is returned on error.
+|
++-----------------------------------------------------------------------------*/
+
+char *db_normalize_path ( const char *pathname )
+{  char *result;
+
+   result = 0;
+   if (0 < strlen(pathname))
+   {  db_Pathname *p;
+
+        /*--------------------------------------
+        |
+        |   Break into separate components...
+        |
+        +-------------------------------------*/
+
+      if ((p=(db_split_path(pathname))) != 0)
+      {  db_PathnameComponent *c;
+
+        /*--------------------------------------
+        |
+        |   Eliminate . components
+        |
+        +-------------------------------------*/
+
+         c = p->firstComponent;
+         while (c != 0)
+         {  if (c != p->firstComponent)
+            {  if (c->name && (strcmp(c->name,".") == 0))
+               {  db_PathnameComponent *cc;
+
+                  cc                                 = c->nextComponent;
+                  if (c->prevComponent == 0)
+                     p->firstComponent               = c->nextComponent;
+                  else
+                     c->prevComponent->nextComponent = c->nextComponent;
+                  if (c->nextComponent == 0)
+                     p->lastComponent                = c->prevComponent;
+                  else
+                     c->nextComponent->prevComponent = c->prevComponent;
+                  free(c->name);
+                  c->name                            = 0;
+                  c->prevComponent                   = 0;
+                  c->nextComponent                   = 0;
+                  free(c);
+                  c                                  = cc;
+               }
+               else
+                  c = c->nextComponent;
+            }
+            else
+               c = c->nextComponent;
+         }
+
+        /*--------------------------------------
+        |
+        |   Eliminate .. components, note
+        |   that this process is a little
+        |   tougher then the . case, this
+        |   is due to things like ../../a/b
+        |
+        +-------------------------------------*/
+
+tryAgain:c = p->firstComponent;
+         while (c != 0)
+         {  if (c->name && (strcmp(c->name,"..") == 0))
+            {  db_PathnameComponent *k;
+
+               if ((k=c->prevComponent) != 0)
+               {  if (k->name != 0 && strcmp(k->name,"..") != 0)
+                  {
+                     if (k->prevComponent == 0)
+                        p->firstComponent                   = k->nextComponent;
+                     else
+                        k->prevComponent->nextComponent     = k->nextComponent;
+                     if (k->nextComponent == 0)
+                        p->lastComponent                    = k->prevComponent;
+                     else
+                        k->nextComponent->prevComponent     = k->prevComponent;
+                     if (k->name != 0)
+                        free(k->name);
+                     k->name                                = 0;
+                     k->prevComponent                       = 0;
+                     k->nextComponent                       = 0;
+                     free(k);
+                     k                                      = 0;
+                     if (c->prevComponent == 0)
+                        p->firstComponent                   = c->nextComponent;
+                     else
+                        c->prevComponent->nextComponent     = c->nextComponent;
+                     if (c->nextComponent == 0)
+                        p->lastComponent                    = c->prevComponent;
+                     else
+                        c->nextComponent->prevComponent     = c->prevComponent;
+                     if (c->name != 0)
+                        free(c->name);
+                     c->name                                = 0;
+                     c->prevComponent                       = 0;
+                     c->nextComponent                       = 0;
+                     free(c);
+                     c                                      = 0;
+                     goto tryAgain;
+                  }
+               }
+            }
+            c = c->nextComponent;
+         }
+
+        /*--------------------------------------
+        |
+        |   Rejoin components into a string...
+        |
+        +-------------------------------------*/
+
+         result = db_unsplit_path(p);
+         p      = db_cleanup_path(p);
+      }
+   }
+   return result;
+}
+
+static db_Pathname *makePathname ( void )
+{  db_Pathname *p;
+
+   if ((p=(db_Pathname *)malloc(sizeof(db_Pathname))) != 0)
+   {  p->firstComponent = 0;
+      p->lastComponent  = 0;
+   }
+   return p;
+}
+
+static db_Pathname *appendComponent ( db_Pathname *p, char *s )
+{  if (p == 0)
+      p = makePathname();
+   if (p != 0)
+   {  db_PathnameComponent *c;
+
+      if ((c=(db_PathnameComponent *)malloc(sizeof(db_PathnameComponent))) != 0)
+      {  c->name                            = STRDUP(s);
+         c->prevComponent                   = p->lastComponent;
+         c->nextComponent                   = 0;
+         if (p->lastComponent == 0)
+            p->firstComponent               = c;
+         else
+            p->lastComponent->nextComponent = c;
+         p->lastComponent                   = c;
+      }
+   }
+   return p;
+}
+
+/*-------------------------------------------------------------------------- - -
+|
+|   Description: This function splits a given pathname into its components.
+|                The split is generally made at the embedded slashes (/),
+|                forming a linked list of pathname components.  For example
+|                the pathname "abc/def/123/xyz" has four components: "abc",
+|                "def", "123", and "xyz".  Note that the list of components
+|                returned by this function is formed using allocated dynamic
+|                memory and should be released using the db_cleanup_path()
+|                function when it is no longer needed.  This function is
+|                intended for internal use only.
+|
+|   Return:      A pointer to the first component of a list of pathname
+|                components is returned when this function succeeds, otherwise
+|                a 0 pointer is returned.
+|
++-----------------------------------------------------------------------------*/
+
+db_Pathname *db_split_path ( const char *pathname )
+{  db_Pathname *result;
+
+   result = 0;
+   if (0 < strlen(pathname))
+   {  if ((result=makePathname()) != 0)
+      {  int  L;
+         int  state;
+         char tmp[32767];
+
+         L      = 0;
+         tmp[L] = '\0';
+         state  = 0;
+         for (;;)
+         {  char c;
+
+            c = *pathname;
+            switch (state)
+            { case 0: switch (c)
+                      { case '\0': goto done;
+                        case '/':  result        = appendComponent(result,0);
+                                   state         = 1;
+                                   break;
+                        default:   L             = 0;
+                                   tmp[L]        = c;
+                                   L            += 1;
+                                   tmp[L]        = '\0';
+                                   state         = 2;
+                                   break;
+                      }
+                      break;
+              case 1: switch (c)
+                      { case '\0': goto done;
+                        case '/':  state         = 1;
+                                   break;
+                        default:   L             = 0;
+                                   tmp[L]        = c;
+                                   L            += 1;
+                                   tmp[L]        = '\0';
+                                   state         = 2;
+                                   break;
+                      }
+                      break;
+              case 2: switch (c)
+                      { case '\0': result        = appendComponent(result,tmp);
+                                   goto done;
+                        case '/':  result        = appendComponent(result,tmp);
+                                   state         = 1;
+                                   break;
+                        default:   tmp[L]        = c;
+                                   L            += 1;
+                                   tmp[L]        = '\0';
+                                   state         = 2;
+                                   break;
+                      }
+                      break;
+            }
+            pathname += 1;
+         }
+done:    ;
+      }
+   }
+   return result;
+}
+
+/*------------------------------------------------------------------------------
+|
+|   Description: This function forms a pathname string from a linked set of
+|                pathname components.  Note that this function is intended for
+|                internal use only.
+|
++-----------------------------------------------------------------------------*/
+
+char *db_unsplit_path ( const db_Pathname *p )
+{  char *result;
+
+   result = 0;
+   if (p != 0)
+   {  db_PathnameComponent *c;
+      int          first;
+      int          slashed;
+      static char  tmp[4096];
+
+      first   = TRUE;
+      slashed = FALSE;
+      c       = p->firstComponent;
+      while (c != 0)
+      {
+         if ((c->name == 0) || (strlen(c->name) == 0))
+         {  strcpy(tmp,"/");
+            slashed = TRUE;
+         }
+         else
+         {  if ((!slashed) && (!first))
+            {  strcat(tmp,"/");
+               slashed = TRUE;
+            }
+            strcat(tmp,c->name);
+            slashed = FALSE;
+         }
+         first = FALSE;
+         c     = c->nextComponent;
+      }
+      result = STRDUP(tmp);
+   }
+   return result;
+}
+
+/*
+ * END CODE FROM JIM REUS' DSL }
+ */
+
+static void
+DBFreeMrgnode(DBmrgtnode *tnode, int walk_order, void *data)
+{
+    if (tnode == 0)
+        return;
+    FREE(tnode->name);
+    if (tnode->narray > 0)
+    {
+        if (strchr(tnode->names[0], '%') == 0)
+        {
+            int i;
+            for (i = 0; i < tnode->narray; i++)
+                FREE(tnode->names[i]);
+            FREE(tnode->names);
+        }
+        else
+        {
+            FREE(tnode->names[0]);
+            FREE(tnode->names);
+        }
+    }
+    FREE(tnode->maps_name);
+    FREE(tnode->seg_ids);
+    FREE(tnode->seg_lens);
+    FREE(tnode->seg_types);
+    FREE(tnode->children);
+    FREE(tnode);
+}
+
+void DBFreeMrgtree(DBmrgtree *tree)
+{
+    if (tree == 0)
+        return;
+    DBWalkMrgtree(tree, DBFreeMrgnode, 0, DB_POSTORDER);
+    FREE(tree->name);
+    FREE(tree->src_mesh_name);
+    if (tree->mrgvar_onames)
+    {
+        int i = 0;
+        while (tree->mrgvar_onames[i] != 0)
+        {
+            FREE(tree->mrgvar_onames[i]);
+            i++;
+        }
+        FREE(tree->mrgvar_onames);
+    }
+    if (tree->mrgvar_rnames)
+    {
+        int i = 0;
+        while (tree->mrgvar_rnames[i] != 0)
+        {
+            FREE(tree->mrgvar_rnames[i]);
+            i++;
+        }
+        FREE(tree->mrgvar_rnames);
+    }
+    FREE(tree);
+}
+
+void DBPrintMrgtree(DBmrgtnode *tnode, int walk_order, void *data)
+{
+    FILE *f = (FILE *) data;
+    int level = -1;
+    DBmrgtnode *tmp = tnode;
+
+    /* walk to top to determine level of indentation */
+    while (tmp != 0)
+    {
+        tmp = tmp->parent;
+        level++;
+    }
+    level *= 3;
+
+    if (f == 0)
+        f = stdout;
+
+    /* print this node using special '*' field width specifier */
+    fprintf(f, "%*s name = \"%s\" {\n", level, "", tnode->name);
+    fprintf(f, "%*s     walk_order = %d\n", level, "", tnode->walk_order);
+    fprintf(f, "%*s         parent = \"%s\"\n", level, "", tnode->parent?tnode->parent->name:"");
+    fprintf(f, "%*s         narray = %d\n", level, "", tnode->narray);
+    if (tnode->narray > 0)
+    {
+        if (strchr(tnode->names[0], '%') == 0)
+        {
+            int j;
+            fprintf(f, "%*s          names = ...\n", level, "");
+            for (j = 0; j < tnode->narray; j++)
+                fprintf(f, "%*s                  \"%s\"\n", level, "", tnode->names[j]);
+        }
+        else
+        {
+            fprintf(f, "%*s          names = \"%s\"\n", level, "", tnode->names[0]);
+        }
+    }
+    fprintf(f, "%*s type_info_bits = %d\n", level, "", tnode->type_info_bits);
+    fprintf(f, "%*s   max_children = %d\n", level, "", tnode->max_children);
+    fprintf(f, "%*s      maps_name = \"%s\"\n", level, "", tnode->maps_name?tnode->maps_name:"");
+    fprintf(f, "%*s          nsegs = %d\n", level, "", tnode->nsegs);
+    if (tnode->nsegs > 0)
+    {
+        int j;
+        fprintf(f, "%*s       segments =     ids   |   lens   |   types\n", level, "");
+        for (j = 0; j < tnode->nsegs*(tnode->narray?tnode->narray:1); j++)
+            fprintf(f, "%*s                  %.10d|%.10d|%.10d\n", level, "",
+                tnode->seg_ids[j], tnode->seg_lens[j], tnode->seg_types[j]);
+
+    }
+    fprintf(f, "%*s   num_children = %d\n", level, "", tnode->num_children);
+    if (tnode->num_children > 0)
+    {
+        int j;
+        for (j = 0; j < tnode->num_children && tnode->children[j] != 0; j++)
+            fprintf(f, "%*s              \"%s\"\n", level, "", tnode->children[j]->name);
+    }
+    fprintf(f, "%*s} \"%s\"\n", level, "", tnode->name);
+}
+
+void
+DBLinearizeMrgtree(DBmrgtnode *tnode, int walk_order, void *data)
+{
+    DBmrgtnode **ltree = (DBmrgtnode **) data;
+    ltree[walk_order] = tnode;
+    tnode->walk_order = walk_order;
+}
+
+static void
+DBWalkMrgtree_r(DBmrgtnode *node, int *walk_order, DBmrgwalkcb wcb, void *wdata,
+    int traversal_flags)
+{
+    if (node == 0)
+        return;
+
+    /* if we're at a terminal node, issue the callback */
+    if (node->children == 0)
+    {
+       wcb(node, *walk_order, wdata);
+       (*walk_order)++;
+    }
+    else
+    {
+        int i;
+
+        /* issue callback first if in pre-order mode */
+        if (traversal_flags & DB_PREORDER)
+        {
+            wcb(node, *walk_order, wdata);
+            (*walk_order)++;
+        }
+
+        /* recurse on all the children */
+        for (i = 0; i < node->num_children && node->children[i] != 0; i++)
+            DBWalkMrgtree_r(node->children[i], walk_order, wcb, wdata,
+                traversal_flags);
+
+        /* issue callback last if in post-order mode */
+        if (traversal_flags & DB_POSTORDER)
+        {
+            wcb(node, *walk_order, wdata);
+            (*walk_order)++;
+        }
+    }
+}
+
+void
+DBWalkMrgtree(DBmrgtree *tree, DBmrgwalkcb cb, void *wdata, int traversal_flags)
+{
+    int walk_order = 0;
+    DBmrgtnode *start = tree->root;
+
+    if (cb == 0)
+        return;
+
+    if (traversal_flags & DB_FROMCWR)
+        start = tree->cwr;
+
+    DBWalkMrgtree_r(start, &walk_order, cb, wdata, traversal_flags);
+}
+
+PUBLIC DBmrgtree *
+DBMakeMrgtree(int source_mesh_type, int type_info_bits,
+    int max_root_descendents, DBoptlist *opts)
+{
+    DBmrgtree *tree = NULL;
+    DBmrgtnode *root = NULL;
+
+    API_BEGIN("DBMakeMrgtree", DBmrgtree *, NULL) {
+        if (!(source_mesh_type == DB_MULTIMESH ||
+              source_mesh_type == DB_QUADMESH ||
+              source_mesh_type == DB_UCDMESH ||
+              source_mesh_type == DB_POINTMESH ||
+              source_mesh_type == DB_CSGMESH ||
+              source_mesh_type == DB_CURVE))
+            API_ERROR("source_mesh_type", E_BADARGS);
+        if (type_info_bits != 0)
+            API_ERROR("type_info_bits", E_BADARGS);
+        if (max_root_descendents <= 0)
+            API_ERROR("max_root_descendents", E_BADARGS);
+        if (NULL == (tree = ALLOC(DBmrgtree)))
+            API_ERROR(NULL, E_NOMEM);
+        memset(tree, 0, sizeof(DBmrgtree));
+        if (NULL == (root = ALLOC(DBmrgtnode)))
+            API_ERROR(NULL, E_NOMEM);
+        memset(root, 0, sizeof(DBmrgtnode));
+        if (NULL == (root->children = ALLOC_N(DBmrgtnode*, max_root_descendents))) {
+            API_ERROR(NULL, E_NOMEM);
+        }
+
+        /* fill in the tree header */
+        tree->type_info_bits = type_info_bits;
+        tree->src_mesh_type = source_mesh_type;
+        tree->src_mesh_name = 0;
+        tree->name = 0;
+
+        /* update internal node info */
+        root->walk_order = -1;
+        root->parent = 0;
+
+        /* update client data data */
+        root->name = STRDUP("whole");
+        root->narray = 0;
+        root->names = 0;
+        root->type_info_bits = 0;
+        root->num_children = 0;
+        root->max_children = max_root_descendents;
+        root->maps_name = 0;
+        root->nsegs = 0;
+        root->seg_ids = 0;
+        root->seg_lens = 0;
+        root->seg_types = 0;
+
+        /* add the new tnode to the tree */
+        tree->root = root;
+        tree->cwr = root;
+        tree->num_nodes = 1;
+
+        API_RETURN(tree);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC int
+DBAddRegion(DBmrgtree *tree, const char *region_name,
+    int type_info_bits, int max_descendents, 
+    const char *maps_name, int nsegs, int *seg_ids,
+    int *seg_lens, int *seg_types, DBoptlist *opts)
+{
+    DBmrgtnode *tnode = NULL;
+
+    API_BEGIN("DBAddRegion", int, -1) {
+
+        if (!tree)
+            API_ERROR("tree pointer", E_BADARGS);
+        if (!region_name || !*region_name)
+            API_ERROR("region_name", E_BADARGS);
+        if (type_info_bits != 0)
+            API_ERROR("type_info_bits", E_BADARGS);
+        if (max_descendents < 0)
+            API_ERROR("max_descendents", E_BADARGS);
+        if (tree->cwr->num_children >= tree->cwr->max_children) {
+            API_ERROR("exceeded max_descendents", E_BADARGS);
+        }
+        if (NULL == (tnode = ALLOC(DBmrgtnode)))
+            API_ERROR(NULL, E_NOMEM);
+        memset(tnode, 0, sizeof(DBmrgtnode));
+        if (NULL == (tnode->children = ALLOC_N(DBmrgtnode*, max_descendents)) &&
+            max_descendents) {
+            API_ERROR(NULL, E_NOMEM);
+        }
+        if (nsegs > 0)
+        {
+            if (seg_ids == 0)
+                API_ERROR("seg_ids", E_BADARGS);
+            if (seg_lens == 0)
+                API_ERROR("seg_lens", E_BADARGS);
+            if (seg_types == 0)
+                API_ERROR("seg_types", E_BADARGS);
+        }
+
+        /* update internal node info */
+        tnode->walk_order = -1;
+        tnode->parent = tree->cwr;
+
+        /* update client data data */
+        tnode->name = STRDUP(region_name); 
+        tnode->narray = 0;
+        tnode->names = 0;
+        tnode->type_info_bits = type_info_bits;
+        tnode->num_children = 0;
+        tnode->max_children = max_descendents;
+        tnode->maps_name = STRDUP(maps_name);
+        tnode->nsegs = nsegs;
+        if (nsegs > 0)
+        {
+            int i;
+
+            if (NULL == (tnode->seg_ids = ALLOC_N(int, nsegs))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            if (NULL == (tnode->seg_lens = ALLOC_N(int, nsegs))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            if (NULL == (tnode->seg_types = ALLOC_N(int, nsegs))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+
+            for (i = 0; i < nsegs; i++)
+            {
+                tnode->seg_ids[i] = seg_ids[i];
+                tnode->seg_lens[i] = seg_lens[i]; 
+                tnode->seg_types[i] = seg_types[i];
+            }
+        }
+        else
+        {
+            tnode->seg_ids = 0;
+            tnode->seg_lens = 0;
+            tnode->seg_types = 0;
+        }
+
+
+        /* add the new tnode to the tree */
+        tree->cwr->children[tree->cwr->num_children] = tnode;
+        tree->cwr->num_children++;
+        tree->num_nodes++;
+
+    }
+    API_END;
+
+    return(tree->cwr->num_children-1);
+}
+
+PUBLIC int
+DBAddRegionArray(DBmrgtree *tree, int nregns,
+    char **regn_names, int type_info_bits,
+    const char *maps_name, int nsegs, int *seg_ids,
+    int *seg_lens, int *seg_types, DBoptlist *opts)
+{
+    DBmrgtnode *tnode = NULL;
+    int i;
+
+    API_BEGIN("DBAddRegionArray", int, -1) {
+
+        if (!tree)
+            API_ERROR("tree pointer", E_BADARGS);
+        if (nregns <= 0)
+            API_ERROR("nregns", E_BADARGS);
+        if (tree->cwr->num_children + nregns > tree->cwr->max_children) {
+            API_ERROR("exceeded max_descendents", E_BADARGS);
+        }
+        if (NULL == (tnode = ALLOC(DBmrgtnode)))
+            API_ERROR(NULL, E_NOMEM);
+        memset(tnode, 0, sizeof(DBmrgtnode));
+        if (nsegs > 0)
+        {
+            if (seg_ids == 0)
+                API_ERROR("seg_ids", E_BADARGS);
+            if (seg_lens == 0)
+                API_ERROR("seg_lens", E_BADARGS);
+            if (seg_types == 0)
+                API_ERROR("seg_types", E_BADARGS);
+        }
+
+        /* update internal node info */
+        tnode->walk_order = -1;
+        tnode->parent = tree->cwr;
+
+        /* update client data data */
+        tnode->name = 0;
+        tnode->narray = nregns;
+        if (strchr(regn_names[0], '%') != 0)
+        {
+            if (NULL == (tnode->names = ALLOC_N(char*, 1))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            tnode->names[0] = STRDUP(regn_names[0]);
+        }
+        else
+        {
+            if (NULL == (tnode->names = ALLOC_N(char*, nregns))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            for (i = 0; i < nregns; i++)
+                tnode->names[i] = STRDUP(regn_names[i]);
+        }
+        tnode->type_info_bits = type_info_bits;
+        tnode->num_children = 0;
+        tnode->max_children = 0;
+        tnode->children = 0;
+        tnode->maps_name = STRDUP(maps_name);
+        tnode->nsegs = nsegs;
+        if (nsegs > 0)
+        {
+
+            if (NULL == (tnode->seg_ids = ALLOC_N(int, nsegs*nregns))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            if (NULL == (tnode->seg_lens = ALLOC_N(int, nsegs*nregns))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+            if (NULL == (tnode->seg_types = ALLOC_N(int, nsegs*nregns))) {
+                API_ERROR(NULL, E_NOMEM);
+            }
+
+            for (i = 0; i < nsegs*nregns; i++)
+            {
+                tnode->seg_ids[i] = seg_ids[i];
+                tnode->seg_lens[i] = seg_lens[i]; 
+                tnode->seg_types[i] = seg_types[i];
+            }
+        }
+        else
+        {
+            tnode->seg_ids = 0;
+            tnode->seg_lens = 0;
+            tnode->seg_types = 0;
+        }
+
+        /* add the new tnode to the tree */
+        tree->cwr->children[tree->cwr->num_children] = tnode;
+        tree->cwr->num_children++;
+        tree->num_nodes++;
+
+    }
+    API_END;
+
+    return(tree->cwr->num_children-1);
+}
+
+PUBLIC int
+DBSetCwr(DBmrgtree *tree, const char *path)
+{
+    int retval = -1;
+
+    API_BEGIN("DBSetCwr", int, -1)
+    {
+        if (tree == 0)
+            API_ERROR("tree", E_BADARGS);
+        if (!path || !*path)
+            API_ERROR("path", E_BADARGS);
+        if (path[0] == '.' && path[1] == '.')
+        {
+            DBmrgtnode *tnode = tree->cwr;
+            if (tnode != tree->root)
+            {
+                tree->cwr = tnode->parent;
+                retval = 1;
+            }
+        }
+        else
+        {
+            DBmrgtnode *tnode = tree->cwr;
+            int i = 0;
+            while (i < tnode->num_children)
+            {
+                if (strcmp(tnode->children[i]->name, path) == 0)
+                {
+                    tree->cwr = tnode->children[i];
+                    break;
+                }
+                i++;
+            }
+            if (i < tnode->num_children)
+                retval = i;
+        }
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC const char *
+DBGetCwr(DBmrgtree *tree)
+{
+    const char *retval = NULL;
+
+    API_BEGIN("DBGetCwr", const char *, NULL)
+    {
+        if (tree == 0)
+            API_ERROR("tree", E_BADARGS);
+
+        retval = tree->cwr->name; 
+        API_RETURN(retval);
+    }
+    API_END_NOPOP;  /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC int
+DBPutMrgtree(DBfile *dbfile, const char *name, const char *mesh_name,
+    DBmrgtree *tree, DBoptlist *opts)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMrgtree", int, -1, name)
+    {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMrgtree", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mrgtree name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("mrgtree name", E_INVALIDNAME);
+        if (!mesh_name || !*mesh_name)
+            API_ERROR("mesh_name", E_BADARGS);
+        if (db_VariableNameValid((char *)mesh_name) == 0)
+            API_ERROR("mesh_name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (NULL == dbfile->pub.p_mrgt)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mrgt) (dbfile, (char *)name, (char *)mesh_name,
+                                       tree, opts); 
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /* BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC DBmrgtree *
+DBGetMrgtree(DBfile *dbfile, const char *name)
+{
+    DBmrgtree *retval = NULL;
+
+    API_BEGIN2("DBGetMrgtree", DBmrgtree *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMrgtree", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mrgtree name", E_BADARGS);
+        if (!dbfile->pub.g_mrgt)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mrgt) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC int
+DBPutGroupelmap(DBfile *dbfile, const char *name,
+    int num_segments, int *groupel_types, int *segment_lengths,
+    int *segment_ids, int **segment_data, void **segment_fracs,
+    int fracs_data_type, DBoptlist *opts)
+{
+    int retval;
+
+    API_BEGIN2("DBGroupelmap", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutGroupelmap", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("groupel map name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("groupel map name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (num_segments < 0)
+            API_ERROR("num_segments", E_BADARGS);
+        if (!groupel_types)
+            API_ERROR("groupel_types", E_BADARGS);
+        if (!segment_lengths)
+            API_ERROR("segment_lengths", E_BADARGS);
+        if (!segment_data)
+            API_ERROR("segment_data", E_BADARGS);
+        if (!dbfile->pub.p_grplm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_grplm) (dbfile, (char *)name,
+            num_segments, groupel_types, segment_lengths, segment_ids,
+            segment_data, segment_fracs, fracs_data_type, opts);
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC DBgroupelmap *
+DBGetGroupelmap(DBfile *dbfile, const char *name)
+{
+    DBgroupelmap *retval = NULL;
+
+    API_BEGIN2("DBGetGroupelmap", DBgroupelmap *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetGroupelmap", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("groupel map name", E_BADARGS);
+        if (!dbfile->pub.g_grplm)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_grplm) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC int
+DBPutMrgvar(DBfile *dbfile, const char *name, const char *mrgt_name,
+    int ncomps, char **compnames, int nregns, char **reg_pnames,
+    int datatype, void **data, DBoptlist *opts)
+{
+    int retval;
+
+    API_BEGIN2("DBPutMrgvar", int, -1, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBPutMrgvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mrgvar name", E_BADARGS);
+        if (db_VariableNameValid((char *)name) == 0)
+            API_ERROR("mrgvar name", E_INVALIDNAME);
+        if (!mrgt_name || !*mrgt_name)
+            API_ERROR("mrgt_name", E_BADARGS);
+        if (db_VariableNameValid((char *)mrgt_name) == 0)
+            API_ERROR("mrgt_name", E_INVALIDNAME);
+        if (!SILO_Globals.allowOverwrites && DBInqVarExists(dbfile, name))
+            API_ERROR("overwrite not allowed", E_NOOVERWRITE);
+        if (nregns < 0)
+            API_ERROR("nregns", E_BADARGS);
+        if (ncomps < 0)
+            API_ERROR("ncomps", E_BADARGS);
+        if (!reg_pnames)
+            API_ERROR("reg_pnames", E_BADARGS);
+        if (!data)
+            API_ERROR("data", E_BADARGS);
+        if (!dbfile->pub.p_mrgv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.p_mrgv) (dbfile, name, mrgt_name, ncomps,
+            compnames, nregns, reg_pnames, datatype, data, opts);
+
+        db_FreeToc(dbfile);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+PUBLIC DBmrgvar *
+DBGetMrgvar(DBfile *dbfile, const char *name)
+{
+    DBmrgvar *retval = NULL;
+
+    API_BEGIN2("DBGetMrgvar", DBmrgvar *, NULL, name) {
+        if (!dbfile)
+            API_ERROR(NULL, E_NOFILE);
+        if (SILO_Globals.enableGrabDriver == TRUE)
+            API_ERROR("DBGetMrgvar", E_GRABBED) ; 
+        if (!name || !*name)
+            API_ERROR("mrgvar name", E_BADARGS);
+        if (!dbfile->pub.g_mrgv)
+            API_ERROR(dbfile->pub.name, E_NOTIMP);
+
+        retval = (dbfile->pub.g_mrgv) (dbfile, (char *)name);
+        API_RETURN(retval);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+/**********************************************************************
+ *
+ * Purpose: Provide a strdup command which correctly handles
+ *          a NULL string.
+ *
+ * Programmer: Sean Ahern
+ * Date: April 1999
+ *
+ * Input arguments:                                               
+ *    s             The string to copy.
+ *  
+ * Global variables:
+ *    None
+ *      
+ * Local variables:
+ *    retval        The new string, with memory allocated.
+ *      
+ * Assumptions and Comments:
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Tue Jul 27 12:44:57 PDT 1999
+ *    Modified the function so it returns the string.
+ *  
+ *    Jeremy Meredith, Tue Aug 31 13:41:29 PDT 1999
+ *    Made it handle 0-length strings correctly.
+ *  
+ *       Thomas R. Treadway, Wed Nov 28 15:25:53 PST 2007
+ *       Moved from src/swat/sw_string.c
+ *
+ ***********************************************************************/
+char *  
+safe_strdup(const char *s)
+{
+    char *retval = NULL;
+    
+    if (!s) 
+        return NULL;
+            
+    retval = (char*)malloc(sizeof(char)*(strlen(s)+1));
+    strcpy(retval,s);
+    retval[strlen(s)] = '\0';
+        
+    return(retval);
+}
diff --git a/src/silo/silo.h.in b/src/silo/silo.h.in
new file mode 100644
index 0000000..59f3a05
--- /dev/null
+++ b/src/silo/silo.h.in
@@ -0,0 +1,2087 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * SILO Public header file.
+ *
+ * This header file defines public constants and public prototypes.
+ * Before including this file, the application should define
+ * which file formats will be used.
+ *
+ * WARNING: The `#define' statements in this file are used when
+ *      generating the Fortran include file `silo.inc'.  Any
+ *     such symbol that should not be an integer parameter
+ *     in the Fortran include file should have the text 
+ *     `NO_FORTRAN_DEFINE' on the same line.  #define statements
+ *     that define macros (or any value not beginning with
+ *     one of [a-zA-Z0-9_]) are ignored.
+ */
+#ifndef SILO_H
+#define SILO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Set the base type for datatype'd pointers (that is pointers whose
+   ultimate type is deteremined by an additional 'int datatype' function
+   argument or struct member) as float (legacy) and void (modern). The
+   DB_DTPTR is the base type. The '1' and '2' variants are for singley
+   subscripted and doubley subscripted arrays, respectively. If the
+   definitions of DB_DTPTR below reference 'float', then this silo.h
+   header file was configured with --enable-legacy-datatyped-pointers
+   and it represents the legacy (float) pointers that the silo
+   library has always had since its original writing. If, instead,
+   you see 'void' (the default configuration), then this silo.h header
+   file is using the modern (void) pointers. In that case, note also
+   that because C compiler's often do not handle correctly nor
+   distinguish between a void* and a void**, both the singley and
+   doubley subscripted variants will have only a single star. Rest
+   assured they are still treated as doubley subscripted in the
+   implementation. */
+#define DB_DTPTR  @SILO_DTYPPTR@  /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR1 @SILO_DTYPPTR1@ /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR2 @SILO_DTYPPTR2@ /* NO_FORTRAN_DEFINE */
+
+/* Permit client to explicitly require the legacy mode
+   for datatyped pointers */
+#ifdef DB_USE_LEGACY_DTPTR
+#ifdef DB_USE_MODERN_DTPTR
+#error cannot specify BOTH legacy and modern datatyped pointers 
+#endif
+#undef DB_DTPTR  /* NO_FORTRAN_DEFINE */
+#undef DB_DTPTR1 /* NO_FORTRAN_DEFINE */
+#undef DB_DTPTR2 /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR  float   /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR1 float*  /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR2 float** /* NO_FORTRAN_DEFINE */
+#endif
+
+/* Permit client to explicitly require the modern mode
+   for datatyped pointers */
+#ifdef DB_USE_MODERN_DTPTR
+#undef DB_DTPTR  /* NO_FORTRAN_DEFINE */
+#undef DB_DTPTR1 /* NO_FORTRAN_DEFINE */
+#undef DB_DTPTR2 /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR  void  /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR1 void* /* NO_FORTRAN_DEFINE */
+#define DB_DTPTR2 void* /* NO_FORTRAN_DEFINE */
+#endif
+
+#include <stdio.h>
+
+#ifndef FALSE
+#define FALSE   0
+#endif
+#ifndef TRUE
+#define TRUE    1
+#endif
+
+/* In the definitions for different parts of the version number, below,
+   we use leading '0x0' to deal with possible blank minor and/or patch
+   version number but still allow base-10, numeric comparison in the GE
+   macro. */
+
+/* Major release number of silo library. */
+#define SILO_VERS_MAJ @SILO_VERS_MAJ@
+
+/* Minor release number of silo library. Can be empty. */
+#define SILO_VERS_MIN 0x0 at SILO_VERS_MIN@
+
+/* Patch release number of silo library.  Can be empty. */
+#define SILO_VERS_PAT 0x0 at SILO_VERS_PAT@
+
+/* Pre-release release number of silo library.  Can be empty. */
+#define SILO_VERS_PRE @SILO_VERS_PRE@
+
+/* The symbol Silo uses to enforce link-time
+   header/object version compatibility */
+#define SILO_VERS_TAG @SILO_VERS_TAG@
+
+/* Useful macro for comparing Silo versions (and DB_ alias) */
+#define SILO_VERSION_GE(Maj,Min,Pat)  \
+        (((SILO_VERS_MAJ==Maj) && (SILO_VERS_MIN==0x0 ## Min) && (SILO_VERS_PAT>=0x0 ## Pat)) || \
+         ((SILO_VERS_MAJ==Maj) && (SILO_VERS_MIN>0x0 ## Min)) || \
+         (SILO_VERS_MAJ>Maj))
+#define DB_VERSION_GE(Maj,Min,Pat) SILO_VERSION_GE(Maj,Min,Pat)
+
+/*-------------------------------------------------------------------------
+ * Drivers.  This is a list of every driver that a user could use.  Not all of
+ * them are necessarily compiled into the library.  However, users are free
+ * to try without getting compilation errors.  They are listed here so that
+ * silo.h doesn't have to be generated every time the library is recompiled.
+ *--------------------------------------------------------------------------*/
+#define DB_NETCDF 0
+#define DB_PDB 2 /* PDB Lite */
+#define DB_TAURUS 3
+#define DB_UNKNOWN 5
+#define DB_DEBUG 6
+#define DB_HDF5X 7
+#define DB_PDBP 1 /* PDB Proper */
+
+/* DO NOT USE. Obsoleted ways of specifying different HDF5 vfds */
+#define DB_HDF5_SEC2_OBSOLETE 0x100
+#define DB_HDF5_STDIO_OBSOLETE 0x200
+#define DB_HDF5_CORE_OBSOLETE 0x300
+#define DB_HDF5_MPIO_OBSOLETE 0x400
+#define DB_HDF5_MPIOP_OBSOLETE 0x500
+
+/* symbols for various HDF5 vfds */
+#define DB_H5VFD_DEFAULT 0
+#define DB_H5VFD_SEC2    1
+#define DB_H5VFD_STDIO   2
+#define DB_H5VFD_CORE    3
+#define DB_H5VFD_LOG     4
+#define DB_H5VFD_SPLIT   5
+#define DB_H5VFD_DIRECT  6
+#define DB_H5VFD_FAMILY  7
+#define DB_H5VFD_MPIO    8
+#define DB_H5VFD_MPIP    9
+#define DB_H5VFD_SILO    10
+
+/* Macro for defining various HDF5 vfds as 'type' arg in create/open.
+   The 11 bit shift is to avoid possible collision with older versions
+   of Silo header file where VFDs where specified in bits 8-11. Their
+   obsoleted values are listed above. */ 
+#define DB_HDF5_OPTS(OptsId) (DB_HDF5X|((OptsId&0x3F)<<11))
+
+/* Monikers for default file options sets */
+/* We just make the default options sets the same as the vfd is */
+#define DB_FILE_OPTS_H5_DEFAULT_DEFAULT DB_H5VFD_DEFAULT 
+#define DB_FILE_OPTS_H5_DEFAULT_SEC2    DB_H5VFD_SEC2 
+#define DB_FILE_OPTS_H5_DEFAULT_STDIO   DB_H5VFD_STDIO 
+#define DB_FILE_OPTS_H5_DEFAULT_CORE    DB_H5VFD_CORE 
+#define DB_FILE_OPTS_H5_DEFAULT_LOG     DB_H5VFD_LOG 
+#define DB_FILE_OPTS_H5_DEFAULT_SPLIT   DB_H5VFD_SPLIT 
+#define DB_FILE_OPTS_H5_DEFAULT_DIRECT  DB_H5VFD_DIRECT 
+#define DB_FILE_OPTS_H5_DEFAULT_FAMILY  DB_H5VFD_FAMILY 
+#define DB_FILE_OPTS_H5_DEFAULT_MPIO    DB_H5VFD_MPIO
+#define DB_FILE_OPTS_H5_DEFAULT_MPIP    DB_H5VFD_MPIP
+#define DB_FILE_OPTS_H5_DEFAULT_SILO    DB_H5VFD_SILO 
+#define DB_FILE_OPTS_LAST DB_FILE_OPTS_H5_DEFAULT_SILO
+
+/* Various default HDF5 driver options. Users can define their own
+   sets of options using DBRegisterFileOptionsSets(). */
+#define DB_HDF5 DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_DEFAULT)
+#define DB_HDF5_SEC2 DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_SEC2)
+#define DB_HDF5_STDIO DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_STDIO)
+#define DB_HDF5_CORE DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_CORE)
+#define DB_HDF5_LOG DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_LOG)
+#define DB_HDF5_SPLIT DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_SPLIT)
+#define DB_HDF5_DIRECT DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_DIRECT)
+#define DB_HDF5_FAMILY DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_FAMILY)
+#define DB_HDF5_MPIO DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_MPIO)
+#define DB_HDF5_MPIOP DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_MPIP)
+#define DB_HDF5_MPIP DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_MPIP)
+#define DB_HDF5_SILO DB_HDF5_OPTS(DB_FILE_OPTS_H5_DEFAULT_SILO)
+
+/*-------------------------------------------------------------------------
+ * Other library-wide constants.
+ *-------------------------------------------------------------------------*/
+#define DB_NFILES       256         /*Max simultaneously open files */
+#define DB_NFILTERS     32          /*Number of filters defined */
+
+/*-------------------------------------------------------------------------
+ * Constants.  All of these constants are always defined in the application.
+ * Each group of constants defined here are small integers used as an index
+ * into an array.  Many of the groups have a total count of items in the
+ * group that will be used for array allocation and error checking--don't
+ * forget to increment the value when adding a new item to a constant group.
+ *-------------------------------------------------------------------------
+ */
+
+/* The following identifiers are for use with the DBDataReadMask() call.  They
+ * specify what portions of the data beyond the metadata is allocated
+ * and read.  Note that since these values are only necessary when reading
+ * and since the Fortran interface is primarily a write interface, it is not
+ * necessary for these symbols to appear in the silo.inc file. However, the
+ * reason they DO NOT APPEAR there inspite of the fact that DO NOT HAVE the
+ * 'NO_FORTRAN_DEFINE' text appearing on each line is that the mkinc script
+ * requires an underscore in the symbol name for it to appear in silo.inc. */
+#define DBAll                0xffffffff
+#define DBNone               0x00000000
+#define DBCalc               0x00000001
+#define DBMatMatnos          0x00000002
+#define DBMatMatlist         0x00000004
+#define DBMatMixList         0x00000008
+#define DBCurveArrays        0x00000010
+#define DBPMCoords           0x00000020
+#define DBPVData             0x00000040
+#define DBQMCoords           0x00000080
+#define DBQVData             0x00000100
+#define DBUMCoords           0x00000200
+#define DBUMFacelist         0x00000400
+#define DBUMZonelist         0x00000800
+#define DBUVData             0x00001000
+#define DBFacelistInfo       0x00002000
+#define DBZonelistInfo       0x00004000
+#define DBMatMatnames        0x00008000
+#define DBUMGlobNodeNo       0x00010000
+#define DBZonelistGlobZoneNo 0x00020000
+#define DBMatMatcolors       0x00040000
+#define DBCSGMBoundaryInfo   0x00080000
+#define DBCSGMZonelist       0x00100000
+#define DBCSGMBoundaryNames  0x00200000
+#define DBCSGVData           0x00400000
+#define DBCSGZonelistZoneNames 0x00800000
+#define DBCSGZonelistRegNames  0x01000000
+#define DBMMADJNodelists     0x02000000
+#define DBMMADJZonelists     0x04000000
+#define DBPMGlobNodeNo       0x08000000
+
+/* Macros used for exporting symbols on Win32 systems. */
+#ifndef SILO_API
+#ifdef _WIN32
+/* Make Silo a DLL by default. */
+#ifdef SILO_STATIC_LIBRARY
+#define SILO_API
+#else
+#ifdef SILO_EXPORTS
+#define SILO_API __declspec(dllexport)
+#else
+#define SILO_API __declspec(dllimport)
+#endif
+#endif
+#else
+#define SILO_API
+#endif
+#endif
+
+/* Definitions for COORD_TYPE */
+/* Placed before DBObjectType enum because the
+   DB_QUAD_CURV and DB_QUAD_RECT symbols are
+   sometimes used as DBObjectType */
+
+#define  DB_COLLINEAR           130
+#define  DB_NONCOLLINEAR        131
+#define  DB_QUAD_RECT           DB_COLLINEAR
+#define  DB_QUAD_CURV           DB_NONCOLLINEAR
+
+/* Objects that can be stored in a data file */
+typedef enum {
+    DB_INVALID_OBJECT= -1,       /*causes enum to be signed, do not remove,
+                                   space before minus sign necessary for lint*/
+    DB_QUADRECT = DB_QUAD_RECT,
+    DB_QUADCURV = DB_QUAD_CURV,
+    DB_QUADMESH=500,
+    DB_QUADVAR=501,
+    DB_UCDMESH=510,
+    DB_UCDVAR=511,
+    DB_MULTIMESH=520,
+    DB_MULTIVAR=521,
+    DB_MULTIMAT=522,
+    DB_MULTIMATSPECIES=523,
+    DB_MULTIBLOCKMESH=DB_MULTIMESH,
+    DB_MULTIBLOCKVAR=DB_MULTIVAR,
+    DB_MULTIMESHADJ=524,
+    DB_MATERIAL=530,
+    DB_MATSPECIES=531,
+    DB_FACELIST=550,
+    DB_ZONELIST=551,
+    DB_EDGELIST=552,
+    DB_PHZONELIST=553,
+    DB_CSGZONELIST=554,
+    DB_CSGMESH=555,
+    DB_CSGVAR=556,
+    DB_CURVE=560,
+    DB_DEFVARS=565,
+    DB_POINTMESH=570,
+    DB_POINTVAR=571,
+    DB_ARRAY=580,
+    DB_DIR=600,
+    DB_VARIABLE=610,
+    DB_MRGTREE=611,
+    DB_GROUPELMAP=612,
+    DB_MRGVAR=613,
+    DB_USERDEF=700
+} DBObjectType;
+
+/* Data types */
+typedef enum {
+    DB_INT=16,
+    DB_SHORT=17,
+    DB_LONG=18,
+    DB_FLOAT=19,
+    DB_DOUBLE=20,
+    DB_CHAR=21,
+    DB_LONG_LONG=22,
+    DB_NOTYPE=25           /*unknown type */
+} DBdatatype;
+
+/* Flags for DBCreate */
+#define         DB_CLOBBER      0
+#define         DB_NOCLOBBER    1
+
+/* Flags for DBOpen */
+#define         DB_READ         1
+#define         DB_APPEND       2
+
+/* Target machine for DBCreate */
+#define         DB_LOCAL        0
+#define         DB_SUN3         10
+#define         DB_SUN4         11
+#define         DB_SGI          12
+#define         DB_RS6000       13
+#define         DB_CRAY         14
+#define         DB_INTEL        15
+
+/* Options */
+#define DBOPT_FIRST             260
+#define DBOPT_ALIGN             260
+#define DBOPT_COORDSYS          262
+#define DBOPT_CYCLE             263
+#define DBOPT_FACETYPE          264
+#define DBOPT_HI_OFFSET         265
+#define DBOPT_LO_OFFSET         266
+#define DBOPT_LABEL             267
+#define DBOPT_XLABEL            268
+#define DBOPT_YLABEL            269
+#define DBOPT_ZLABEL            270
+#define DBOPT_MAJORORDER        271
+#define DBOPT_NSPACE            272
+#define DBOPT_ORIGIN            273
+#define DBOPT_PLANAR            274
+#define DBOPT_TIME              275
+#define DBOPT_UNITS             276
+#define DBOPT_XUNITS            277
+#define DBOPT_YUNITS            278
+#define DBOPT_ZUNITS            279
+#define DBOPT_DTIME             280
+#define DBOPT_USESPECMF         281
+#define DBOPT_XVARNAME          282
+#define DBOPT_YVARNAME          283
+#define DBOPT_ZVARNAME          284
+#define DBOPT_ASCII_LABEL       285
+#define DBOPT_MATNOS            286
+#define DBOPT_NMATNOS           287
+#define DBOPT_MATNAME           288
+#define DBOPT_NMAT              289
+#define DBOPT_NMATSPEC          290
+#define DBOPT_BASEINDEX         291 /* quad meshes for node and zone */
+#define DBOPT_ZONENUM           292 /* ucd meshes for zone */
+#define DBOPT_NODENUM           293 /* ucd/point meshes for node */
+#define DBOPT_BLOCKORIGIN       294
+#define DBOPT_GROUPNUM          295
+#define DBOPT_GROUPORIGIN       296
+#define DBOPT_NGROUPS           297
+#define DBOPT_MATNAMES          298
+#define DBOPT_EXTENTS_SIZE      299
+#define DBOPT_EXTENTS           300
+#define DBOPT_MATCOUNTS         301
+#define DBOPT_MATLISTS          302
+#define DBOPT_MIXLENS           303
+#define DBOPT_ZONECOUNTS        304
+#define DBOPT_HAS_EXTERNAL_ZONES 305
+#define DBOPT_PHZONELIST        306
+#define DBOPT_MATCOLORS         307
+#define DBOPT_BNDNAMES          308
+#define DBOPT_REGNAMES          309
+#define DBOPT_ZONENAMES         310
+#define DBOPT_HIDE_FROM_GUI     311
+#define DBOPT_TOPO_DIM          312 /* TOPOlogical DIMension */
+#define DBOPT_REFERENCE         313 /* reference object */
+#define DBOPT_GROUPINGS_SIZE    314 /* size of grouping array */
+#define DBOPT_GROUPINGS         315 /* groupings array */
+#define DBOPT_GROUPINGNAMES     316 /* array of size determined by 
+                                       number of groups of names of groups. */
+#define DBOPT_ALLOWMAT0         317 /* Turn off material numer "0" warnings*/
+#define DBOPT_MRGTREE_NAME      318
+#define DBOPT_REGION_PNAMES     319
+#define DBOPT_TENSOR_RANK       320
+#define DBOPT_MMESH_NAME        321
+#define DBOPT_TV_CONNECTIVITY   322
+#define DBOPT_DISJOINT_MODE     323
+#define DBOPT_MRGV_ONAMES       324
+#define DBOPT_MRGV_RNAMES       325
+#define DBOPT_SPECNAMES         326
+#define DBOPT_SPECCOLORS        327
+#define DBOPT_LLONGNZNUM        328
+#define DBOPT_CONSERVED         329
+#define DBOPT_EXTENSIVE         330
+#define DBOPT_MB_FILE_NS        331
+#define DBOPT_MB_BLOCK_NS       332
+#define DBOPT_MB_BLOCK_TYPE     333
+#define DBOPT_MB_EMPTY_LIST     334
+#define DBOPT_MB_EMPTY_COUNT    335
+#define DBOPT_LAST              499 
+
+/* Options relating to virtual file drivers */
+#define DBOPT_H5_FIRST              500
+#define DBOPT_H5_VFD                500
+#define DBOPT_H5_RAW_FILE_OPTS      501
+#define DBOPT_H5_RAW_EXTENSION      502
+#define DBOPT_H5_META_FILE_OPTS     503
+#define DBOPT_H5_META_EXTENSION     504
+#define DBOPT_H5_CORE_ALLOC_INC     505
+#define DBOPT_H5_CORE_NO_BACK_STORE 506
+#define DBOPT_H5_META_BLOCK_SIZE    507
+#define DBOPT_H5_SMALL_RAW_SIZE     508
+#define DBOPT_H5_ALIGN_MIN          509
+#define DBOPT_H5_ALIGN_VAL          510
+#define DBOPT_H5_DIRECT_MEM_ALIGN   511
+#define DBOPT_H5_DIRECT_BLOCK_SIZE  512
+#define DBOPT_H5_DIRECT_BUF_SIZE    513
+#define DBOPT_H5_LOG_NAME           514
+#define DBOPT_H5_LOG_BUF_SIZE       515
+#define DBOPT_H5_MPIO_COMM          516
+#define DBOPT_H5_MPIO_INFO          517
+#define DBOPT_H5_MPIP_NO_GPFS_HINTS 518
+#define DBOPT_H5_SIEVE_BUF_SIZE     519
+#define DBOPT_H5_CACHE_NELMTS       520
+#define DBOPT_H5_CACHE_NBYTES       521
+#define DBOPT_H5_CACHE_POLICY       522
+#define DBOPT_H5_FAM_SIZE           523
+#define DBOPT_H5_FAM_FILE_OPTS      524
+#define DBOPT_H5_USER_DRIVER_ID     525
+#define DBOPT_H5_USER_DRIVER_INFO   526
+#define DBOPT_H5_SILO_BLOCK_SIZE    527
+#define DBOPT_H5_SILO_BLOCK_COUNT   528
+#define DBOPT_H5_SILO_LOG_STATS     529
+#define DBOPT_H5_SILO_USE_DIRECT    530
+#define DBOPT_H5_LAST               599
+
+/* Error trapping method */
+#define         DB_TOP          0 /*default--API traps  */
+#define         DB_NONE         1 /*no errors trapped  */
+#define         DB_ALL          2 /*all levels trap (traceback) */
+#define         DB_ABORT        3 /*abort() is called  */
+#define         DB_SUSPEND      4 /*suspend error reporting temporarily */
+#define         DB_RESUME       5 /*resume normal error reporting */
+#define         DB_ALL_AND_DRVR 6 /*DB_ALL + driver error reporting */
+
+/* Errors */
+#define     E_NOERROR   0       /*No error   */
+#define     E_BADFTYPE  1       /*Bad file type   */
+#define     E_NOTIMP    2       /*Callback not implemented */
+#define     E_NOFILE    3       /*No data file specified    */
+#define     E_INTERNAL  5       /*Internal error        */
+#define     E_NOMEM     6       /*Not enough memory     */
+#define     E_BADARGS   7       /*Bad argument to function  */
+#define     E_CALLFAIL  8       /*Low-level function failure    */
+#define     E_NOTFOUND  9       /*Object not found      */
+#define     E_TAURSTATE 10      /*Taurus: database state error  */
+#define     E_MSERVER   11      /*SDX: too many connections */
+#define     E_PROTO     12      /*SDX: protocol error       */
+#define     E_NOTDIR    13      /*Not a directory       */
+#define     E_MAXOPEN   14      /*Too many open files  */
+#define     E_NOTFILTER 15      /*Filter(s) not found  */
+#define     E_MAXFILTERS    16  /*Too many filters  */
+#define     E_FEXIST    17      /*File already exists  */
+#define     E_FILEISDIR 18      /*File is actually a directory */
+#define     E_FILENOREAD    19  /*File lacks read permission. */
+#define     E_SYSTEMERR 20      /*System level error occured. */
+#define     E_FILENOWRITE 21    /*File lacks write permission. */
+#define     E_INVALIDNAME 22    /* Variable name is invalid */
+#define     E_NOOVERWRITE 23    /*Overwrite not permitted */
+#define     E_CHECKSUM  24      /*Checksum failed */
+#define     E_COMPRESSION  25   /*Compression failed */
+#define     E_GRABBED   26      /*Low level driver enabled */
+#define     E_NOTREG    27      /*The dbfile pointer is not resitered. */
+#define     E_CONCURRENT 28     /*File is opened multiply and not all read-only. */
+#define     E_DRVRCANTOPEN 29   /*Driver cannot open the file. */
+#define     E_BADOPTCLASS 30    /*Optlist contains options for wrong class */
+#define     E_NOTENABLEDINBUILD 31 /*feature not enabled in this build */
+#define     E_MAXFILEOPTSETS 32    /*Too many file options sets */
+#define     E_NOHDF5 33         /*HDF5 driver not available */
+#define     E_NERRORS   50
+
+/* Definitions for MAJOR_ORDER */
+#define  DB_ROWMAJOR            0
+#define  DB_COLMAJOR            1
+
+/* Definitions for CENTERING */
+#define  DB_NOTCENT             0
+#define  DB_NODECENT            110
+#define  DB_ZONECENT            111
+#define  DB_FACECENT            112
+#define  DB_BNDCENT             113 /* for CSG meshes only */
+#define  DB_EDGECENT            114
+#define  DB_BLOCKCENT           115 /* for 'block-centered' data on multimeshs */
+
+/* Definitions for COORD_SYSTEM */
+#define  DB_CARTESIAN           120
+#define  DB_CYLINDRICAL         121
+#define  DB_SPHERICAL           122
+#define  DB_NUMERICAL           123
+#define  DB_OTHER               124
+
+/* Definitions for ZONE FACE_TYPE */
+#define  DB_RECTILINEAR         100
+#define  DB_CURVILINEAR         101
+
+/* Definitions for PLANAR */
+#define  DB_AREA                140
+#define  DB_VOLUME              141
+
+/* Definitions for flag values */
+#define DB_ON                    1000
+#define DB_OFF                  -1000
+
+/* Definitions for disjoint flag */
+#define DB_ABUTTING              142
+#define DB_FLOATING              143
+
+/* Definitions for derived variable types */
+#define DB_VARTYPE_SCALAR               200
+#define DB_VARTYPE_VECTOR               201
+#define DB_VARTYPE_TENSOR               202
+#define DB_VARTYPE_SYMTENSOR            203
+#define DB_VARTYPE_ARRAY                204
+#define DB_VARTYPE_MATERIAL             205
+#define DB_VARTYPE_SPECIES              206
+#define DB_VARTYPE_LABEL                207
+
+/* Definitions for CSG boundary types 
+   Designed so low-order 16 bits are unused.
+
+   The last few characters of the symbol are intended
+   to indicate the representational form of the surface type
+
+   G = generalized form  (n values, depends on surface type)
+   P = point (3 values, x,y,z in 3D, 2 values in 2D x,y)
+   N = normal (3 values, Nx,Ny,Nz in 3D, 2 values in 2D Nx,Ny)
+   R = radius (1 value)
+   A = angle (1 value in degrees)
+   L = length (1 value)
+   X = x-intercept (1 value)
+   Y = y-intercept (1 value)
+   Z = z-intercept (1 value)
+   K = arbitrary integer
+   F = planar face defined by point-normal pair (6 values)
+   */
+#define DBCSG_QUADRIC_G         0x01000000
+#define DBCSG_SPHERE_PR         0x02010000
+#define DBCSG_ELLIPSOID_PRRR    0x02020000
+#define DBCSG_PLANE_G           0x03000000
+#define DBCSG_PLANE_X           0x03010000
+#define DBCSG_PLANE_Y           0x03020000
+#define DBCSG_PLANE_Z           0x03030000
+#define DBCSG_PLANE_PN          0x03040000
+#define DBCSG_PLANE_PPP         0x03050000
+#define DBCSG_CYLINDER_PNLR     0x04000000
+#define DBCSG_CYLINDER_PPR      0x04010000
+#define DBCSG_BOX_XYZXYZ        0x05000000
+#define DBCSG_CONE_PNLA         0x06000000
+#define DBCSG_CONE_PPA          0x06010000
+#define DBCSG_POLYHEDRON_KF     0x07000000
+#define DBCSG_HEX_6F            0x07010000
+#define DBCSG_TET_4F            0x07020000
+#define DBCSG_PYRAMID_5F        0x07030000
+#define DBCSG_PRISM_5F          0x07040000
+
+/* Definitions for 2D CSG boundary types */
+#define DBCSG_QUADRATIC_G       0x08000000
+#define DBCSG_CIRCLE_PR         0x09000000
+#define DBCSG_ELLIPSE_PRR       0x09010000
+#define DBCSG_LINE_G            0x0A000000
+#define DBCSG_LINE_X            0x0A010000
+#define DBCSG_LINE_Y            0x0A020000
+#define DBCSG_LINE_PN           0x0A030000
+#define DBCSG_LINE_PP           0x0A040000
+#define DBCSG_BOX_XYXY          0x0B000000
+#define DBCSG_ANGLE_PNLA        0x0C000000
+#define DBCSG_ANGLE_PPA         0x0C010000
+#define DBCSG_POLYGON_KP        0x0D000000
+#define DBCSG_TRI_3P            0x0D010000
+#define DBCSG_QUAD_4P           0x0D020000
+
+/* Definitions for CSG Region operators */
+#define DBCSG_INNER             0x7F000000
+#define DBCSG_OUTER             0x7F010000
+#define DBCSG_ON                0x7F020000
+#define DBCSG_UNION             0x7F030000
+#define DBCSG_INTERSECT         0x7F040000
+#define DBCSG_DIFF              0x7F050000
+#define DBCSG_COMPLIMENT        0x7F060000
+#define DBCSG_XFORM             0x7F070000
+#define DBCSG_SWEEP             0x7F080000
+
+/* definitions for MRG Tree traversal flags */
+#define DB_PREORDER             0x00000001
+#define DB_POSTORDER            0x00000002
+#define DB_FROMCWR              0x00000004
+
+/* Miscellaneous constants */
+#define     DB_F77NULL  (-99)   /*Fortran NULL pointer      */
+#define     DB_F77NULLSTRING  "NULLSTRING"  /* FORTRAN STRING */
+
+/*-------------------------------------------------------------------------
+ * Index selection macros
+ *-------------------------------------------------------------------------
+ */
+#define I4D(s,i,j,k,l) (l)*s[3]+(k)*s[2]+(j)*s[1]+(i)*s[0]
+#define I3D(s,i,j,k)   (k)*s[2]+(j)*s[1]+(i)*s[0]
+#define I2D(s,i,j)     (j)*s[1]+(i)*s[0]
+
+/*-------------------------------------------------------------------------
+ * Structures (just the public parts).
+ *-------------------------------------------------------------------------
+ */
+
+/*
+ * Database table of contents for the current directory only.
+ */
+typedef struct DBtoc_ {
+
+    char         **curve_names;
+    int            ncurve;
+
+    char         **multimesh_names;
+    int            nmultimesh;
+
+    char         **multimeshadj_names;
+    int            nmultimeshadj;
+
+    char         **multivar_names;
+    int            nmultivar;
+
+    char         **multimat_names;
+    int            nmultimat;
+
+    char         **multimatspecies_names;
+    int            nmultimatspecies;
+
+    char         **csgmesh_names;
+    int            ncsgmesh;
+
+    char         **csgvar_names;
+    int            ncsgvar;
+
+    char         **defvars_names;
+    int            ndefvars;
+
+    char         **qmesh_names;
+    int            nqmesh;
+
+    char         **qvar_names;
+    int            nqvar;
+
+    char         **ucdmesh_names;
+    int            nucdmesh;
+
+    char         **ucdvar_names;
+    int            nucdvar;
+
+    char         **ptmesh_names;
+    int            nptmesh;
+
+    char         **ptvar_names;
+    int            nptvar;
+
+    char         **mat_names;
+    int            nmat;
+
+    char         **matspecies_names;
+    int            nmatspecies;
+
+    char         **var_names;
+    int            nvar;
+
+    char         **obj_names;
+    int            nobj;
+
+    char         **dir_names;
+    int            ndir;
+
+    char         **array_names;
+    int            narrays;
+
+    char         **mrgtree_names;
+    int            nmrgtrees;
+
+    char         **groupelmap_names;
+    int            ngroupelmaps;
+
+    char         **mrgvar_names;
+    int            nmrgvars;
+
+} DBtoc;
+
+/*----------------------------------------------------------------------------
+ * Database Curve Object
+ *--------------------------------------------------------------------------
+ */
+typedef struct DBcurve_ {
+/*----------- X vs. Y (Curve) Data -----------*/
+    int            id;          /* Identifier for this object */
+    int            datatype;    /* Datatype for x and y (float, double) */
+    int            origin;      /* '0' or '1' */
+    char          *title;       /* Title for curve */
+    char          *xvarname;    /* Name of domain (x) variable */
+    char          *yvarname;    /* Name of range  (y) variable */
+    char          *xlabel;      /* Label for x-axis */
+    char          *ylabel;      /* Label for y-axis */
+    char          *xunits;      /* Units for domain */
+    char          *yunits;      /* Units for range  */
+    DB_DTPTR      *x;           /* Domain values for curve */
+    DB_DTPTR      *y;           /* Range  values for curve */
+    int            npts;        /* Number of points in curve */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char          *reference;   /* Label to reference object */
+} DBcurve;
+
+typedef struct DBdefvars_ {
+    int            ndefs;       /* number of definitions */
+    char         **names;       /* [ndefs] derived variable names */
+    int           *types;       /* [ndefs] derived variable types */
+    char         **defns;       /* [ndefs] derived variable definitions */
+    int        *guihides;       /* [ndefs] flags to hide from
+                                   post-processor's GUI */
+} DBdefvars;
+
+typedef struct DBpointmesh_ {
+/*----------- Point Mesh -----------*/
+    int            id;          /* Identifier for this object */
+    int            block_no;    /* Block number for this mesh */
+    int            group_no;    /* Block group number for this mesh */
+    char          *name;        /* Name associated with this mesh */
+    int            cycle;       /* Problem cycle number */
+    char          *units[3];    /* Units for each axis */
+    char          *labels[3];   /* Labels for each axis */
+    char          *title;       /* Title for curve */
+
+    DB_DTPTR      *coords[3];   /* Coordinate values */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+   /*
+    * The following two fields really only contain 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetPointmesh() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    float          min_extents[6];  /* Min mesh extents [ndims] */
+    float          max_extents[6];  /* Max mesh extents [ndims] */
+
+    int            datatype;    /* Datatype for coords (float, double) */
+    int            ndims;       /* Number of computational dimensions */
+    int            nels;        /* Number of elements in mesh */
+    int            origin;      /* '0' or '1' */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    void          *gnodeno;     /* global node ids */
+    char          *mrgtree_name; /* optional name of assoc. mrgtree object */
+    int            gnznodtype;  /* datatype for global node/zone ids */
+} DBpointmesh;
+
+/*----------------------------------------------------------------------------
+ * Multi-Block Mesh Object
+ *--------------------------------------------------------------------------
+ */
+typedef struct DBmultimesh_ {
+/*----------- Multi-Block Mesh -----------*/
+    int            id;          /* Identifier for this object */
+    int            nblocks;     /* Number of blocks in mesh */
+    int            ngroups;     /* Number of block groups in mesh */
+    int           *meshids;     /* Array of mesh-ids which comprise mesh */
+    char         **meshnames;   /* Array of mesh-names for meshids */
+    int           *meshtypes;   /* Array of mesh-type indicators [nblocks] */
+    int           *dirids;      /* Array of directory ID's which contain blk */
+    int            blockorigin; /* Origin (0 or 1) of block numbers */
+    int            grouporigin; /* Origin (0 or 1) of group numbers */
+    int            extentssize; /* size of each extent tuple */
+    double        *extents;     /* min/max extents of coords of each block */
+    int           *zonecounts;  /* array of zone counts for each block */
+    int           *has_external_zones;  /* external flags for each block */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    int            lgroupings;  /* size of groupings array */
+    int            *groupings;  /* Array of mesh-ids, group-ids, and counts */
+    char          **groupnames; /* Array of group-names for groupings  */
+    char          *mrgtree_name;/* optional name of assoc. mrgtree object */
+    int            tv_connectivity;
+    int            disjoint_mode;
+    int            topo_dim;    /* Topological dimension; max of all blocks. */ 
+    char          *file_ns;     /* namescheme for files (in lieu of meshnames) */
+    char          *block_ns;    /* namescheme for block objects (in lieu of meshnames) */
+    int            block_type;  /* constant block type for all blocks (in lieu of meshtypes) */
+    int           *empty_list;  /* list of empty block #'s (option for namescheme) */
+    int            empty_cnt;   /* size of empty list */
+} DBmultimesh;
+
+/*----------------------------------------------------------------------------
+ * Multi-Block Mesh Adjacency Object
+ *--------------------------------------------------------------------------
+ */
+typedef struct DBmultimeshadj_ {
+/*----------- Multi-Block Mesh Adjacency -----------*/
+    int            nblocks;     /* Number of blocks in mesh */
+    int            blockorigin; /* Origin (0 or 1) of block numbers */
+    int           *meshtypes;   /* Array of mesh-type indicators [nblocks] */
+    int           *nneighbors;  /* Array [nblocks] neighbor counts */
+
+    int           lneighbors;
+    int           *neighbors;   /* Array [lneighbors] neighbor block numbers */
+    int           *back;        /* Array [lneighbors] neighbor block back */
+
+    int            totlnodelists;
+    int           *lnodelists;  /* Array [lneighbors] of node counts shared */
+    int          **nodelists;   /* Array [lneighbors] nodelists shared */
+
+    int            totlzonelists;
+    int           *lzonelists;  /* Array [lneighbors] of zone counts adjacent */
+    int          **zonelists;   /* Array [lneighbors] zonelists adjacent */
+} DBmultimeshadj;
+
+/*----------------------------------------------------------------------------
+ * Multi-Block Variable Object
+ *--------------------------------------------------------------------------
+ */
+typedef struct DBmultivar_ {
+/*----------- Multi-Block Variable -----------*/
+    int            id;          /* Identifier for this object  */
+    int            nvars;       /* Number of variables   */
+    int            ngroups;     /* Number of block groups in mesh */
+    char         **varnames;    /* Variable names   */
+    int           *vartypes;    /* variable types   */
+    int            blockorigin; /* Origin (0 or 1) of block numbers */
+    int            grouporigin; /* Origin (0 or 1) of group numbers */
+    int            extentssize; /* size of each extent tuple */
+    double        *extents;     /* min/max extents of each block */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **region_pnames;
+    char          *mmesh_name;
+    int            tensor_rank;    /* DB_VARTYPE_XXX */
+    int            conserved;   /* indicates if the variable should be conserved
+                                   under various operations such as interp. */
+    int            extensive;   /* indicates if the variable reprsents an extensiv
+                                   physical property (as opposed to intensive) */
+    char          *file_ns;     /* namescheme for files (in lieu of meshnames) */
+    char          *block_ns;    /* namescheme for block objects (in lieu of meshnames) */
+    int            block_type;  /* constant block type for all blocks (in lieu of meshtypes) */
+    int           *empty_list;  /* list of empty block #'s (option for namescheme) */
+    int            empty_cnt;   /* size of empty list */
+} DBmultivar;
+
+/*-------------------------------------------------------------------------
+ * Multi-material
+ *-------------------------------------------------------------------------
+ */
+typedef struct DBmultimat_ {
+    int            id;          /* Identifier for this object  */
+    int            nmats;       /* Number of materials   */
+    int            ngroups;     /* Number of block groups in mesh */
+    char         **matnames;    /* names of constiuent DBmaterial objects */
+    int            blockorigin; /* Origin (0 or 1) of block numbers */
+    int            grouporigin; /* Origin (0 or 1) of group numbers */
+    int           *mixlens;     /* array of mixlen values in each mat */
+    int           *matcounts;   /* counts of unique materials in each block */
+    int           *matlists;    /* list of materials in each block */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    int            nmatnos;     /* global number of materials over all pieces */
+    int           *matnos;      /* global list of material numbers */
+    char         **matcolors;   /* optional colors for materials */
+    char         **material_names; /* optional names of the materials */
+    int            allowmat0;   /* Flag to allow material "0" */
+    char          *mmesh_name;
+    char          *file_ns;     /* namescheme for files (in lieu of meshnames) */
+    char          *block_ns;    /* namescheme for block objects (in lieu of meshnames) */
+    int           *empty_list;  /* list of empty block #'s (option for namescheme) */
+    int            empty_cnt;   /* size of empty list */
+} DBmultimat;
+
+/*-------------------------------------------------------------------------
+ * Multi-species
+ *-------------------------------------------------------------------------
+ */
+typedef struct DBmultimatspecies_ {
+    int            id;          /* Identifier for this object  */
+    int            nspec;       /* Number of species   */
+    int            ngroups;     /* Number of block groups in mesh */
+    char         **specnames;   /* Species object names   */    
+    int            blockorigin; /* Origin (0 or 1) of block numbers */
+    int            grouporigin; /* Origin (0 or 1) of group numbers */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    int            nmat;        /* equiv. to nmatnos of a DBmultimat */
+    int           *nmatspec;    /* equiv. to matnos of a DBmultimat */
+    char         **species_names; /* optional names of the species */
+    char         **speccolors;  /* optional colors for species */
+    char          *file_ns;     /* namescheme for files (in lieu of meshnames) */
+    char          *block_ns;    /* namescheme for block objects (in lieu of meshnames) */
+    int           *empty_list;  /* list of empty block #'s (option for namescheme) */
+    int            empty_cnt;   /* size of empty list */
+} DBmultimatspecies;
+
+/*----------------------------------------------------------------------
+ *  Definitions for the FaceList, ZoneList, and EdgeList structures
+ *  used for describing UCD meshes.
+ *----------------------------------------------------------------------
+ */
+
+#define DB_ZONETYPE_BEAM        10
+
+#define DB_ZONETYPE_POLYGON     20
+#define DB_ZONETYPE_TRIANGLE    23
+#define DB_ZONETYPE_QUAD        24
+
+#define DB_ZONETYPE_POLYHEDRON  30
+#define DB_ZONETYPE_TET         34
+#define DB_ZONETYPE_PYRAMID     35
+#define DB_ZONETYPE_PRISM       36
+#define DB_ZONETYPE_HEX         38
+
+typedef struct DBzonelist_ {
+    int            ndims;       /* Number of dimensions (2,3) */
+    int            nzones;      /* Number of zones in list */
+    int            nshapes;     /* Number of zone shapes */
+    int           *shapecnt;    /* [nshapes] occurences of each shape */
+    int           *shapesize;   /* [nshapes] Number of nodes per shape */
+    int           *shapetype;   /* [nshapes] Type of shape */
+    int           *nodelist;    /* Sequent lst of nodes which comprise zones */
+    int            lnodelist;   /* Number of nodes in nodelist */
+    int            origin;      /* '0' or '1' */
+    int            min_index;   /* Index of first real zone */
+    int            max_index;   /* Index of last real zone */
+
+/*--------- Optional zone attributes ---------*/
+    int           *zoneno;      /* [nzones] zone number of each zone */
+    void          *gzoneno;     /* [nzones] global zone number of each zone */
+    int            gnznodtype;  /* datatype for global node/zone ids */
+} DBzonelist;
+
+typedef struct DBphzonelist_ {
+    int            nfaces;      /* Number of faces in facelist (aka "facetable") */
+    int           *nodecnt;     /* Count of nodes in each face */
+    int            lnodelist;   /* Length of nodelist used to construct faces */
+    int           *nodelist;    /* List of nodes used in all faces */
+    char          *extface;     /* boolean flag indicating if a face is external */
+    int            nzones;      /* Number of zones in this zonelist */
+    int           *facecnt;     /* Count of faces in each zone */
+    int            lfacelist;   /* Length of facelist used to construct zones */
+    int           *facelist;    /* List of faces used in all zones */
+    int            origin;      /* '0' or '1' */
+    int            lo_offset;   /* Index of first non-ghost zone */
+    int            hi_offset;   /* Index of last non-ghost zone */
+
+/*--------- Optional zone attributes ---------*/
+    int           *zoneno;      /* [nzones] zone number of each zone */
+    void          *gzoneno;     /* [nzones] global zone number of each zone */
+    int            gnznodtype;  /* datatype for global node/zone ids */
+} DBphzonelist;
+
+typedef struct DBfacelist_ {
+/*----------- Required components ------------*/
+    int            ndims;       /* Number of dimensions (2,3) */
+    int            nfaces;      /* Number of faces in list */
+    int            origin;      /* '0' or '1' */
+    int           *nodelist;    /* Sequent list of nodes comprise faces */
+    int            lnodelist;   /* Number of nodes in nodelist */
+
+/*----------- 3D components ------------------*/
+    int            nshapes;     /* Number of face shapes */
+    int           *shapecnt;    /* [nshapes] Num of occurences of each shape */
+    int           *shapesize;   /* [nshapes] Number of nodes per shape */
+
+/*----------- Optional type component---------*/
+    int            ntypes;      /* Number of face types */
+    int           *typelist;    /* [ntypes] Type ID for each type */
+    int           *types;       /* [nfaces] Type info for each face */
+
+/*--------- Optional node attributes ---------*/
+    int           *nodeno;      /* [lnodelist] node number of each node */
+
+/*----------- Optional zone-reference component---------*/
+    int           *zoneno;      /* [nfaces] Zone number for each face */
+} DBfacelist;
+
+typedef struct DBedgelist_ {
+    int            ndims;       /* Number of dimensions (2,3) */
+    int            nedges;      /* Number of edges */
+    int           *edge_beg;    /* [nedges] */
+    int           *edge_end;    /* [nedges] */
+    int            origin;      /* '0' or '1' */
+} DBedgelist;
+
+typedef struct DBquadmesh_ {
+/*----------- Quad Mesh -----------*/
+    int            id;          /* Identifier for this object */
+    int            block_no;    /* Block number for this mesh */
+    int            group_no;    /* Block group number for this mesh */
+    char          *name;        /* Name associated with mesh */
+    int            cycle;       /* Problem cycle number */
+    int            coord_sys;   /* Cartesian, cylindrical, spherical */
+    int            major_order; /* 1 indicates row-major for multi-d arrays */
+    int            stride[3];   /* Offsets to adjacent elements  */
+    int            coordtype;   /* Coord array type: collinear,
+                                 * non-collinear */
+    int            facetype;    /* Zone face type: rect, curv */
+    int            planar;      /* Sentinel: zones represent area or volume? */
+
+    DB_DTPTR      *coords[3];   /* Mesh node coordinate ptrs [ndims] */
+    int            datatype;    /* Type of coordinate arrays (double,float) */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+   /*
+    * The following two fields really only contain 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetQuadmesh() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    float          min_extents[6];  /* Min mesh extents [ndims] */
+    float          max_extents[6];  /* Max mesh extents [ndims] */
+
+    char          *labels[3];   /* Label associated with each dimension */
+    char          *units[3];    /* Units for variable, e.g, 'mm/ms' */
+    int            ndims;       /* Number of computational dimensions */
+    int            nspace;      /* Number of physical dimensions */
+    int            nnodes;      /* Total number of nodes */
+
+    int            dims[3];     /* Number of nodes per dimension */
+    int            origin;      /* '0' or '1' */
+    int            min_index[3];   /* Index in each dimension of 1st
+                                    * non-phoney */
+    int            max_index[3];   /* Index in each dimension of last
+                                    * non-phoney */
+    int            base_index[3];  /* Lowest real i,j,k value for this block */
+    int            start_index[3]; /* i,j,k values corresponding to original
+                                    * mesh */
+    int            size_index[3];  /* Number of nodes per dimension for 
+                                    * original mesh */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char          *mrgtree_name; /* optional name of assoc. mrgtree object */
+} DBquadmesh;
+
+typedef struct DBucdmesh_ {
+/*----------- Unstructured Cell Data (UCD) Mesh -----------*/
+    int            id;          /* Identifier for this object */
+    int            block_no;    /* Block number for this mesh */
+    int            group_no;    /* Block group number for this mesh */
+    char          *name;        /* Name associated with mesh */
+    int            cycle;       /* Problem cycle number */
+    int            coord_sys;   /* Coordinate system */
+    int            topo_dim;    /* Topological dimension. */ 
+    char          *units[3];    /* Units for variable, e.g, 'mm/ms' */
+    char          *labels[3];   /* Label associated with each dimension */
+
+    DB_DTPTR      *coords[3];   /* Mesh node coordinates */
+    int            datatype;    /* Type of coordinate arrays (double,float) */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+   /*
+    * The following two fields really only contain 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetUcdmesh() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    float          min_extents[6];  /* Min mesh extents [ndims] */
+    float          max_extents[6];  /* Max mesh extents [ndims] */
+
+    int            ndims;       /* Number of computational dimensions */
+    int            nnodes;      /* Total number of nodes */
+    int            origin;      /* '0' or '1' */
+
+    DBfacelist    *faces;       /* Data structure describing mesh faces */
+    DBzonelist    *zones;       /* Data structure describing mesh zones */
+    DBedgelist    *edges;       /* Data struct describing mesh edges
+                                 * (option) */
+
+/*--------- Optional node attributes ---------*/
+    void          *gnodeno;     /* [nnodes] global node number of each node */
+
+/*--------- Optional zone attributes ---------*/
+    int           *nodeno;      /* [nnodes] node number of each node */
+
+/*--------- Optional polyhedral zonelist ---------*/
+    DBphzonelist  *phzones;     /* Data structure describing mesh zones */
+
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char          *mrgtree_name; /* optional name of assoc. mrgtree object */
+    int            tv_connectivity;
+    int            disjoint_mode;
+    int            gnznodtype;  /* datatype for global node/zone ids */
+} DBucdmesh;
+
+/*----------------------------------------------------------------------------
+ * Database Mesh-Variable Object
+ *---------------------------------------------------------------------------
+ */
+typedef struct DBquadvar_ {
+/*----------- Quad Variable -----------*/
+    int            id;          /* Identifier for this object */
+    char          *name;        /* Name of variable */
+    char          *units;       /* Units for variable, e.g, 'mm/ms' */
+    char          *label;       /* Label (perhaps for editing purposes) */
+    int            cycle;       /* Problem cycle number */
+    int            meshid;      /* Identifier for associated mesh (Deprecated Sep2005) */
+
+    DB_DTPTR     **vals;        /* Array of pointers to data arrays */
+    int            datatype;    /* Type of data pointed to by 'val' */
+    int            nels;        /* Number of elements in each array */
+    int            nvals;       /* Number of arrays pointed to by 'vals' */
+    int            ndims;       /* Rank of variable */
+    int            dims[3];     /* Number of elements in each dimension */
+
+    int            major_order; /* 1 indicates row-major for multi-d arrays */
+    int            stride[3];   /* Offsets to adjacent elements  */
+    int            min_index[3];  /* Index in each dimension of 1st
+                                   * non-phoney */
+    int            max_index[3];  /* Index in each dimension of last
+                                   * non-phoney */
+    int            origin;      /* '0' or '1' */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+   /*
+    * The following field really only contains 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetQuadvar() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    float          align[6];    /* Centering and alignment per dimension */
+
+    DB_DTPTR     **mixvals;     /* nvals ptrs to data arrays for mixed zones */
+    int            mixlen;      /* Num of elmts in each mixed zone data
+                                 * array */
+
+    int            use_specmf;  /* Flag indicating whether to apply species
+                                 * mass fractions to the variable. */
+
+    int            ascii_labels;/* Treat variable values as ASCII values
+                                   by rounding to the nearest integer in
+                                   the range [0, 255] */
+    char          *meshname;    /* Name of associated mesh */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **region_pnames;
+    int            conserved;   /* indicates if the variable should be conserved
+                                   under various operations such as interp. */
+    int            extensive;   /* indicates if the variable reprsents an extensiv
+                                   physical property (as opposed to intensive) */
+    int            centering;   /* explicit centering knowledge; should agree
+                                   with alignment. */
+} DBquadvar;
+
+typedef struct DBucdvar_ {
+/*----------- Unstructured Cell Data (UCD) Variable -----------*/
+    int            id;          /* Identifier for this object */
+    char          *name;        /* Name of variable */
+    int            cycle;       /* Problem cycle number */
+    char          *units;       /* Units for variable, e.g, 'mm/ms' */
+    char          *label;       /* Label (perhaps for editing purposes) */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+    int            meshid;      /* Identifier for associated mesh (Deprecated Sep2005) */
+
+    DB_DTPTR     **vals;        /* Array of pointers to data arrays */
+    int            datatype;    /* Type of data pointed to by 'vals' */
+    int            nels;        /* Number of elements in each array */
+    int            nvals;       /* Number of arrays pointed to by 'vals' */
+    int            ndims;       /* Rank of variable */
+    int            origin;      /* '0' or '1' */
+
+    int            centering;   /* Centering within mesh (nodal or zonal) */
+    DB_DTPTR     **mixvals;     /* nvals ptrs to data arrays for mixed zones */
+    int            mixlen;      /* Num of elmts in each mixed zone data
+                                 * array */
+
+    int            use_specmf;  /* Flag indicating whether to apply species
+                                 * mass fractions to the variable. */
+    int            ascii_labels;/* Treat variable values as ASCII values
+                                   by rounding to the nearest integer in
+                                   the range [0, 255] */
+    char          *meshname;    /* Name of associated mesh */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **region_pnames;
+    int            conserved;   /* indicates if the variable should be conserved
+                                   under various operations such as interp. */
+    int            extensive;   /* indicates if the variable reprsents an extensiv
+                                   physical property (as opposed to intensive) */
+} DBucdvar;
+
+typedef struct DBmeshvar_ {
+/*----------- Generic Mesh-Data Variable -----------*/
+    int            id;          /* Identifier for this object */
+    char          *name;        /* Name of variable */
+    char          *units;       /* Units for variable, e.g, 'mm/ms' */
+    char          *label;       /* Label (perhaps for editing purposes) */
+    int            cycle;       /* Problem cycle number */
+    int            meshid;      /* Identifier for associated mesh (Deprecated Sep2005) */
+
+    DB_DTPTR     **vals;        /* Array of pointers to data arrays */
+    int            datatype;    /* Type of data pointed to by 'val' */
+    int            nels;        /* Number of elements in each array */
+    int            nvals;       /* Number of arrays pointed to by 'vals' */
+    int            nspace;      /* Spatial rank of variable */
+    int            ndims;       /* Rank of 'vals' array(s) (computatnl rank) */
+
+    int            origin;      /* '0' or '1' */
+    int            centering;   /* Centering within mesh (nodal,zonal,other) */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+   /*
+    * The following field really only contains 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetPointvar() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    float          align[6];    /* Alignmnt per dimension if
+                                 * centering==other */
+
+    /* Stuff for multi-dimensional arrays (ndims > 1) */
+    int            dims[3];     /* Number of elements in each dimension */
+    int            major_order; /* 1 indicates row-major for multi-d arrays */
+    int            stride[3];   /* Offsets to adjacent elements  */
+   /*
+    * The following two fields really only contain 3 elements.  However, silo
+    * contains a bug in PJ_ReadVariable() as called by DBGetUcdmesh() which
+    * can cause three doubles to be stored there instead of three floats.
+    */
+    int            min_index[6];  /* Index in each dimension of 1st
+                                   * non-phoney */
+    int            max_index[6];  /* Index in each dimension of last
+                                    non-phoney */
+
+    int            ascii_labels;/* Treat variable values as ASCII values
+                                   by rounding to the nearest integer in
+                                   the range [0, 255] */
+    char          *meshname;      /* Name of associated mesh */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **region_pnames;
+    int            conserved;   /* indicates if the variable should be conserved
+                                   under various operations such as interp. */
+    int            extensive;   /* indicates if the variable reprsents an extensiv
+                                   physical property (as opposed to intensive) */
+} DBmeshvar;
+
+typedef struct DBmaterial_ {
+/*----------- Material Information -----------*/
+    int            id;          /* Identifier */
+    char          *name;        /* Name of this material information block */
+    int            ndims;       /* Rank of 'matlist' variable */
+    int            origin;      /* '0' or '1' */
+    int            dims[3];     /* Number of elements in each dimension */
+    int            major_order; /* 1 indicates row-major for multi-d arrays */
+    int            stride[3];   /* Offsets to adjacent elements in matlist */
+
+    int            nmat;        /* Number of materials */
+    int           *matnos;      /* Array [nmat] of valid material numbers */
+    char         **matnames;    /* Array of material names   */
+    int           *matlist;     /* Array[nzone] w/ mat. number or mix index */
+    int            mixlen;      /* Length of mixed data arrays (mix_xxx) */
+    int            datatype;    /* Type of volume-fractions (double,float) */
+    DB_DTPTR      *mix_vf;      /* Array [mixlen] of volume fractions */
+    int           *mix_next;    /* Array [mixlen] of mixed data indeces */
+    int           *mix_mat;     /* Array [mixlen] of material numbers */
+    int           *mix_zone;    /* Array [mixlen] of back pointers to mesh */
+
+    char         **matcolors;   /* Array of material colors */
+    char          *meshname;    /* Name of associated mesh */
+    int            allowmat0;   /* Flag to allow material "0" */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+} DBmaterial;
+
+typedef struct DBmatspecies_ {
+/*----------- Species Information -----------*/
+    int            id;          /* Identifier */
+    char          *name;        /* Name of this matspecies information block */
+    char          *matname;     /* Name of material object with which the
+                                 * material species object is associated. */
+    int            nmat;        /* Number of materials */
+    int           *nmatspec;    /* Array of lngth nmat of the num of material
+                                 * species associated with each material. */
+    int            ndims;       /* Rank of 'speclist' variable */
+    int            dims[3];     /* Number of elements in each dimension of the
+                                 * 'speclist' variable. */
+    int            major_order; /* 1 indicates row-major for multi-d arrays */
+    int            stride[3];   /* Offsts to adjacent elmts in 'speclist'  */
+
+    int            nspecies_mf; /* Total number of species mass fractions. */
+    DB_DTPTR      *species_mf;  /* Array of length nspecies_mf of mass
+                                 * frations of the material species. */
+    int           *speclist;    /* Zone array of dimensions described by ndims
+                                 * and dims.  Each element of the array is an
+                                 * index into one of the species mass fraction
+                                 * arrays.  A positive value is the index in
+                                 * the species_mf array of the mass fractions
+                                 * of the clean zone's material species:
+                                 * species_mf[speclist[i]] is the mass fraction
+                                 * of the first species of material matlist[i]
+                                 * in zone i. A negative value means that the
+                                 * zone is a mixed zone and that the array
+                                 * mix_speclist contains the index to the
+                                 * species mas fractions: -speclist[i] is the
+                                 * index in the 'mix_speclist' array for zone
+                                 * i. */
+    int            mixlen;      /* Length of 'mix_speclist' array. */
+    int           *mix_speclist;  /* Array of lgth mixlen of 1-orig indices
+                                   * into the 'species_mf' array.
+                                   * species_mf[mix_speclist[j]] is the index
+                                   * in array species_mf' of the first of the
+                                   * mass fractions for material
+                                   * mix_mat[j]. */
+
+    int            datatype;    /* Datatype of mass fraction data. */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **specnames;   /* Array of species names; length is sum of nmatspec   */
+    char         **speccolors;  /* Array of species colors; length is sum of nmatspec */
+} DBmatspecies;
+
+typedef struct DBcsgzonelist_ {
+/*----------- CSG Zonelist -----------*/
+    int            nregs;       /* Number of regions in regionlist */
+    int            origin;      /* '0' or '1' */
+
+    int           *typeflags;   /* [nregs] type info about each region */
+    int           *leftids;     /* [nregs] left operand region refs */
+    int           *rightids;    /* [nregs] right operand region refs */
+    void          *xform;       /* [lxforms] transformation coefficients */
+    int            lxform;      /* length of xforms array */
+    int            datatype;    /* type of data in xforms array */
+
+    int            nzones;      /* number of zones */
+    int           *zonelist;    /* [nzones] region ids (complete regions) */
+    int            min_index;   /* Index of first real zone */
+    int            max_index;   /* Index of last real zone */
+
+/*--------- Optional zone attributes ---------*/
+    char         **regnames;   /* [nregs] names of each region */
+    char         **zonenames;  /* [nzones] names of each zone */
+} DBcsgzonelist;
+
+typedef struct DBcsgmesh_ {
+/*----------- CSG Mesh -----------*/
+    int            block_no;    /* Block number for this mesh */
+    int            group_no;    /* Block group number for this mesh */
+    char          *name;        /* Name associated with mesh */
+    int            cycle;       /* Problem cycle number */
+    char          *units[3];    /* Units for variable, e.g, 'mm/ms' */
+    char          *labels[3];   /* Label associated with each dimension */
+
+    int            nbounds;     /* Total number of boundaries */
+    int           *typeflags;   /* nbounds boundary type info flags */
+    int           *bndids;      /* optional, nbounds explicit ids */
+
+    void          *coeffs;      /* coefficients in the representation of
+                                   each boundary */
+    int            lcoeffs;     /* length of coeffs array */
+    int           *coeffidx;    /* array of nbounds offsets into coeffs
+                                   for each boundary's coefficients */
+    int            datatype;    /* data type of coeffs data */
+
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+    double         min_extents[3];  /* Min mesh extents [ndims] */
+    double         max_extents[3];  /* Max mesh extents [ndims] */
+
+    int            ndims;       /* Number of spatial & topological dimensions */
+    int            origin;      /* '0' or '1' */
+
+    DBcsgzonelist *zones;       /* Data structure describing mesh zones */
+
+/*--------- Optional boundary attributes ---------*/
+    char         **bndnames;     /* [nbounds] boundary names */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char          *mrgtree_name; /* optional name of assoc. mrgtree object */
+    int            tv_connectivity;
+    int            disjoint_mode;
+} DBcsgmesh;
+
+typedef struct DBcsgvar_ {
+/*----------- CSG Variable -----------*/
+    char          *name;        /* Name of variable */
+    int            cycle;       /* Problem cycle number */
+    char          *units;       /* Units for variable, e.g, 'mm/ms' */
+    char          *label;       /* Label (perhaps for editing purposes) */
+    float          time;        /* Problem time */
+    double         dtime;       /* Problem time, double data type */
+
+    void         **vals;        /* Array of pointers to data arrays */
+    int            datatype;    /* Type of data pointed to by 'vals' */
+    int            nels;        /* Number of elements in each array */
+    int            nvals;       /* Number of arrays pointed to by 'vals' */
+
+    int            centering;   /* Centering within mesh (nodal or zonal) */
+
+    int            use_specmf;  /* Flag indicating whether to apply species
+                                 * mass fractions to the variable. */
+    int            ascii_labels;/* Treat variable values as ASCII values
+                                   by rounding to the nearest integer in
+                                   the range [0, 255] */
+    char          *meshname;    /* Name of associated mesh */
+    int            guihide;     /* Flag to hide from post-processor's GUI */
+    char         **region_pnames;
+    int            conserved;   /* indicates if the variable should be conserved
+                                   under various operations such as interp. */
+    int            extensive;   /* indicates if the variable reprsents an extensiv
+                                   physical property (as opposed to intensive) */
+} DBcsgvar;
+
+/*-------------------------------------------------------------------------
+ * A compound array is an array whose elements are simple arrays. A simple
+ * array is an array whose elements are all of the same primitive data
+ * type: float, double, integer, long...  All of the simple arrays of
+ * a compound array have elements of the same data type.
+ *-------------------------------------------------------------------------
+ */
+typedef struct DBcompoundarray_ {
+    int            id;          /*identifier of the compound array */
+    char          *name;        /*name of te compound array  */
+    char         **elemnames;   /*names of the simple array elements */
+    int           *elemlengths; /*lengths of the simple arrays  */
+    int            nelems;      /*number of simple arrays  */
+    void          *values;      /*simple array values   */
+    int            nvalues;     /*sum reduction of `elemlengths' vector */
+    int            datatype;    /*simple array element data type */
+} DBcompoundarray;
+
+typedef struct DBoptlist_ {
+
+    int           *options;     /* Vector of option identifiers */
+    void         **values;      /* Vector of pointers to option values */
+    int            numopts;     /* Number of options defined */
+    int            maxopts;     /* Total length of option/value arrays */
+
+} DBoptlist;
+
+typedef struct DBobject_ {
+
+    char          *name;
+    char          *type;        /* Type of group/object */
+    char         **comp_names;  /* Array of component names */
+    char         **pdb_names;   /* Array of internal (PDB) variable names */
+    int            ncomponents; /* Number of components */
+    int            maxcomponents;  /* Max number of components */
+
+} DBobject;
+
+typedef struct _DBmrgtnode {
+    char *name;
+    int  narray;
+    char **names;
+    int type_info_bits;
+    int max_children;
+    char *maps_name;
+    int nsegs;
+    int *seg_ids;
+    int *seg_lens;
+    int *seg_types;
+    int num_children;
+    struct _DBmrgtnode **children;
+
+    /* internal stuff to support updates, i/o, etc. */
+    int walk_order;
+    struct _DBmrgtnode  *parent;
+} DBmrgtnode;
+
+typedef void (*DBmrgwalkcb)(DBmrgtnode *tnode, int nat_node_num, void *data);
+
+typedef struct _DBmrgtree {
+    char *name;
+    char *src_mesh_name;
+    int src_mesh_type;
+    int type_info_bits;
+    int num_nodes;
+    DBmrgtnode *root;
+    DBmrgtnode *cwr;
+
+    char **mrgvar_onames;
+    char **mrgvar_rnames;
+} DBmrgtree;
+
+typedef struct _DBmrgvar {
+    char *name;
+    char *mrgt_name;
+    int ncomps;
+    char **compnames;
+    int nregns;
+    char **reg_pnames;
+    int datatype;
+    void **data;
+} DBmrgvar ;
+
+typedef struct _DBgroupelmap {
+    char *name;
+    int num_segments;
+    int *groupel_types;
+    int *segment_lengths;
+    int *segment_ids;
+    int **segment_data;
+    void **segment_fracs;
+    int fracs_data_type;
+} DBgroupelmap;
+
+#if !defined(DB_MAX_EXPSTRS) /* NO_FORTRAN_DEFINE */
+#define DB_MAX_EXPSTRS 8 /* NO_FORTRAN_DEFINE */
+#endif
+
+typedef struct _DBnamescheme
+{
+    char *fmt;              /* orig. format string */
+    const char **fmtptrs;   /* ptrs into first (printf) part of fmt for each conversion spec. */
+    int fmtlen;             /* len of first part of fmt */
+    int ncspecs;            /* # of conversion specs in first part of fmt */
+    char delim;             /* delimiter char used for parts of fmt */
+    int nembed;             /* number of last embedded string encountered */
+    char *embedstrs[DB_MAX_EXPSTRS]; /* ptrs to copies of embedded strings */
+    int narrefs;            /* number of array refs in conversion specs */
+    char **arrnames;        /* array names used by array refs */
+    const int **arrvals;    /* pointer to actual array data assoc. with each name */
+    char **exprstrs;        /* expressions to be evaluated for each conv. spec. */
+} DBnamescheme;
+
+typedef struct DBfile *___DUMMY_TYPE;  /* Satisfy ANSI scope rules */
+
+/*
+ * All file formats are now anonymous except for the public properties
+ * and public methods.
+ */
+typedef struct DBfile_pub {
+
+    /* Public Properties */
+    char          *name;        /*name of file    */
+    int            type;        /*file type    */
+    DBtoc         *toc;         /*table of contents   */
+    int            dirid;       /*directory ID    */
+    int            fileid;      /*unique file id [0,DB_NFILES-1] */
+    int            pathok;      /*driver handles paths in names */
+    int            Grab;        /*drive has access to low-level interface */
+    void          *GrabId;      /*pointer to low-level driver descriptor */
+    char          *file_lib_version; /* version of lib file was created with */
+
+    /* Public Methods */
+    int            (*close)(struct DBfile *);
+    int            (*exist)(struct DBfile *, char *);
+    int            (*pause)(struct DBfile *);
+    int            (*cont)(struct DBfile *);
+    int            (*newtoc)(struct DBfile *);
+    DBObjectType   (*inqvartype)(struct DBfile *, char*);
+    int            (*uninstall)(struct DBfile *);
+    DBobject      *(*g_obj)(struct DBfile *, char *);
+    int            (*c_obj)(struct DBfile *, DBobject *, int);
+    int            (*w_obj)(struct DBfile *, DBobject *, int);
+    void          *(*g_comp)(struct DBfile *, char *, char *);
+    int            (*g_comptyp)(struct DBfile *, char *, char *);
+    int            (*w_comp)(struct DBfile *, DBobject *, char *, char *,
+                             char *, const void *, int, long *);
+    int            (*write) (struct DBfile *, char *, void *, int *, int, int);
+    int            (*writeslice)(struct DBfile *, char *, void *, int,
+                                 int[], int[], int[], int[], int);
+    void          *(*g_attr)(struct DBfile *, char *, char *);
+    int            (*g_dir)(struct DBfile *, char *);
+    int            (*mkdir)(struct DBfile *, char *);
+    int            (*cd)(struct DBfile *, char *);
+    int            (*cdid)(struct DBfile *, int);
+    int            (*r_att)(struct DBfile *, char *, char *, void *);
+    int            (*r_var)(struct DBfile *, char *, void *);
+    int            (*r_var1)(struct DBfile *, char *, int, void *);
+    int            (*module)(struct DBfile *, FILE *);
+    int            (*r_varslice)(struct DBfile *, char *, int *, int *, int *,
+                                 int, void *);
+    int            (*g_compnames)(struct DBfile *, char *, char ***, char ***);
+    DBcompoundarray *(*g_ca)(struct DBfile *, char *);
+    DBcurve       *(*g_cu)(struct DBfile *, char *);
+    DBdefvars     *(*g_defv)(struct DBfile *, const char *);
+    DBmaterial    *(*g_ma)(struct DBfile *, char *);
+    DBmatspecies  *(*g_ms)(struct DBfile *, char *);
+    DBmultimesh   *(*g_mm)(struct DBfile *, char *);
+    DBmultivar    *(*g_mv)(struct DBfile *, char *);
+    DBmultimat    *(*g_mt)(struct DBfile *, char *);
+    DBmultimatspecies *(*g_mms)(struct DBfile *, char *);
+    DBpointmesh   *(*g_pm)(struct DBfile *, char *);
+    DBmeshvar     *(*g_pv)(struct DBfile *, char *);
+    DBquadmesh    *(*g_qm)(struct DBfile *, char *);
+    DBquadvar     *(*g_qv)(struct DBfile *, char *);
+    DBucdmesh     *(*g_um)(struct DBfile *, char *);
+    DBucdvar      *(*g_uv)(struct DBfile *, char *);
+    DBfacelist    *(*g_fl)(struct DBfile *, char *);
+    DBzonelist    *(*g_zl)(struct DBfile *, char *);
+    void          *(*g_var)(struct DBfile *, char *);
+    int            (*g_varbl)(struct DBfile *, char *);  /*byte length */
+    int            (*g_varlen)(struct DBfile *, char *);  /*nelems */
+    int            (*g_vardims)(struct DBfile*, char*, int, int*); /*dims*/
+    int            (*g_vartype)(struct DBfile *, char *);
+    int            (*i_meshname)(struct DBfile *, char *, char *);
+    int            (*i_meshtype)(struct DBfile *, char *);
+    int            (*p_ca)(struct DBfile *, char *, char **, int *, int,
+                           void *, int, int, DBoptlist *);
+    int            (*p_cu)(struct DBfile *, char *, void *, void *, int, int,
+                           DBoptlist *);
+    int            (*p_defv)(struct DBfile *, const char *, int, 
+                           char **, const int *, char **,
+                           DBoptlist **);
+    int            (*p_fl)(struct DBfile *, char *, int, int, int *, int, int,
+                           int *, int *, int *, int, int *, int *, int);
+    int            (*p_ma)(struct DBfile *, char *, char *, int, int *, int *,
+                           int *, int, int *, int *, int *, DB_DTPTR1, int, int,
+                           DBoptlist *);
+    int            (*p_ms)(struct DBfile *, char *, char *, int, int *, int *,
+                           int *, int, int, DB_DTPTR1, int *, int, int,
+                           DBoptlist *);
+    int            (*p_mm)(struct DBfile *, char *, int, char **, int *,
+                           DBoptlist *);
+    int            (*p_mv)(struct DBfile *, char *, int, char **, int *,
+                           DBoptlist *);
+    int            (*p_mt)(struct DBfile *, char *, int, char **, DBoptlist *);
+    int            (*p_mms)(struct DBfile *, char *, int, char **, DBoptlist *);
+    int            (*p_pm)(struct DBfile *, char *, int, DB_DTPTR2, int, int,
+                           DBoptlist *);
+    int            (*p_pv)(struct DBfile *, char *, char *, int, DB_DTPTR2, int,
+                           int, DBoptlist *);
+    int            (*p_qm)(struct DBfile *, char *, char **, DB_DTPTR2, int *,
+                           int, int, int, DBoptlist *);
+    int            (*p_qv)(struct DBfile *, char *, char *, int, char **,
+                           DB_DTPTR2, int *, int, DB_DTPTR2, int, int, int,
+                           DBoptlist *);
+    int            (*p_um)(struct DBfile *, char *, int, char **, DB_DTPTR2,
+                           int, int, char *, char *, int, DBoptlist *);
+    int            (*p_sm)(struct DBfile *, char *, char *,
+                           int, char *, char *, DBoptlist *);
+    int            (*p_uv)(struct DBfile *, char *, char *, int, char **,
+                           DB_DTPTR2, int, DB_DTPTR2, int, int, int,
+                           DBoptlist *);
+    int            (*p_zl)(struct DBfile *, char *, int, int, int *, int, int,
+                           int *, int *, int);
+    int            (*p_zl2)(struct DBfile *, char *, int, int, int *, int, int,
+                            int, int, int *, int *, int *, int, DBoptlist *);
+    /* MCM-27Jul04: We added these to the end to avert potential
+       link-time compatibility issues with older versions of the
+       library. Some user's of Silo circumvent its version check
+       which would ordinarily keep different versions from being
+       mixed by defining an appropriate global symbol. */
+    DBphzonelist  *(*g_phzl)(struct DBfile *, char *);
+    int            (*p_phzl)(struct DBfile *, char *,
+                             int, int *, int, int *, char *,
+                             int, int *, int, int *,
+                             int, int, int,
+                             DBoptlist *);
+    int            (*p_csgzl)(struct DBfile *, const char *, int, const int *,
+                              const int *, const int *, const void *, int, int,
+                              int, const int *, DBoptlist *);
+    DBcsgzonelist *(*g_csgzl)(struct DBfile *, const char *);
+    int            (*p_csgm)(struct DBfile *, const char *, int, int,
+                             const int *, const int *,
+                             const void *, int, int, const double *,
+                             const char *, DBoptlist *);
+    DBcsgmesh     *(*g_csgm)(struct DBfile *, const char *);
+    int            (*p_csgv)(struct DBfile *, const char *, const char *, int,
+                             char **, void **, int, int, int,
+                             DBoptlist *);
+    DBcsgvar      *(*g_csgv)(struct DBfile *, const char *);
+    DBmultimeshadj *(*g_mmadj)(struct DBfile *, const char *, int, const int *);
+    int            (*p_mmadj)(struct DBfile *, const char *, int, const int *,
+                              const int *, const int *, const int *, const int *,
+                              int **, const int *, int **,
+                              DBoptlist *optlist);
+    int            (*p_mrgt)(struct DBfile *dbfile, const char *name, const char *mesh_name,
+                             DBmrgtree *tree, DBoptlist *opts);
+    DBmrgtree     *(*g_mrgt)(struct DBfile *, const char *name);
+    int            (*p_grplm)(struct DBfile *dbfile, const char *map_name,
+                             int num_segments, int *groupel_types,
+			     int *segment_lengths, int *segment_ids,
+			     int **segment_data, void **segment_fracs,
+                             int fracs_data_type, DBoptlist *opts);
+    DBgroupelmap  *(*g_grplm)(struct DBfile *dbfile, const char *name);
+    int            (*p_mrgv)(struct DBfile *dbfile, const char *name,
+                             const char *mrgt_name,
+                             int ncomps, char **compnames,
+                             int nregns, char **reg_pnames,
+                             int datatype, void **data, DBoptlist *opts);
+    DBmrgvar      *(*g_mrgv)(struct DBfile *dbfile, const char *name);
+    int            (*free_z)(struct DBfile *, const char *);
+    int            (*cpdir)(struct DBfile *, const char *,
+                            struct DBfile *, const char *);
+
+    int          (*sort_obo)(struct DBfile *dbfile, int nobjs,
+                             const char *const *const obj_names, int *ranks);
+} DBfile_pub;
+
+typedef struct DBfile {
+    DBfile_pub     pub;
+    /*private part follows per device driver */
+} DBfile;
+
+typedef void (*DBErrFunc_t)(char*);
+
+
+/* The first prototypes here are the functions by which client code first
+ * gets into Silo.  They are separated out because they do a version number
+ * check for us.  Client code doesn't actually use these functions.
+ * Instead, it uses macros like DBOpen, DBCreate, etc.
+ *
+ * If any functions are added that provide first-call access to Silo, they
+ * should be set up as macro/function pairs, just as these are.  The way to
+ * determine if a function is a "first-call" function is to ask whether
+ * there are any Silo calls that must happen before it.  If there are not,
+ * then the function is a "first-call" function and should have this
+ * macro/function pair.  */
+
+SILO_API extern DBfile  *DBOpenReal(const char *, int, int);
+SILO_API extern DBfile  *DBCreateReal(const char *, int, int, const char *, int);
+SILO_API extern int      DBInqFileReal(const char *);
+
+#define SILO_VSTRING_NAME "_silolibinfo"
+#define SILO_VSTRING PACKAGE_VERSION
+SILO_API extern int SILO_VERS_TAG;
+#define CheckVersion SILO_VERS_TAG = 1
+
+#define DBOpen(name, target, mode) \
+    (CheckVersion, DBOpenReal(name, target, mode))
+
+#define DBCreate(name, mode, target, info, type) \
+    (CheckVersion, DBCreateReal(name, mode, target, info, type))
+
+#define DBInqFile(name) \
+    (CheckVersion, DBInqFileReal(name))
+
+/* Prototypes for regular API functions. */
+SILO_API extern DBcompoundarray *DBAllocCompoundarray(void);
+SILO_API extern DBcurve *DBAllocCurve(void);
+SILO_API extern DBdefvars *DBAllocDefvars(int);
+SILO_API extern DBmultimesh *DBAllocMultimesh(int);
+SILO_API extern DBmultimeshadj *DBAllocMultimeshadj(int);
+SILO_API extern DBmultivar *DBAllocMultivar(int);
+SILO_API extern DBmultimat *DBAllocMultimat(int);
+SILO_API extern DBmultimatspecies *DBAllocMultimatspecies(int);
+SILO_API extern DBcsgmesh *DBAllocCsgmesh(void);
+SILO_API extern DBquadmesh *DBAllocQuadmesh(void);
+SILO_API extern DBpointmesh *DBAllocPointmesh(void);
+SILO_API extern DBmeshvar *DBAllocMeshvar(void);
+SILO_API extern DBucdmesh *DBAllocUcdmesh(void);
+SILO_API extern DBcsgvar *DBAllocCsgvar(void);
+SILO_API extern DBquadvar *DBAllocQuadvar(void);
+SILO_API extern DBucdvar *DBAllocUcdvar(void);
+SILO_API extern DBzonelist *DBAllocZonelist(void);
+SILO_API extern DBphzonelist *DBAllocPHZonelist(void);
+SILO_API extern DBcsgzonelist *DBAllocCSGZonelist(void);
+SILO_API extern DBedgelist *DBAllocEdgelist(void);
+SILO_API extern DBfacelist *DBAllocFacelist(void);
+SILO_API extern DBmaterial *DBAllocMaterial(void);
+SILO_API extern DBmatspecies *DBAllocMatspecies(void);
+SILO_API extern DBnamescheme *DBAllocNamescheme(void);
+SILO_API extern DBgroupelmap *DBAllocGroupelmap(int, DBdatatype);
+
+SILO_API extern void     DBFreeMatspecies(DBmatspecies *);
+SILO_API extern void     DBFreeMaterial(DBmaterial *);
+SILO_API extern void     DBFreeFacelist(DBfacelist *);
+SILO_API extern void     DBFreeEdgelist(DBedgelist *);
+SILO_API extern void     DBFreeZonelist(DBzonelist *);
+SILO_API extern void     DBFreePHZonelist(DBphzonelist *);
+SILO_API extern void     DBFreeCSGZonelist(DBcsgzonelist *);
+SILO_API extern void     DBResetUcdvar(DBucdvar *);
+SILO_API extern void     DBFreeUcdvar(DBucdvar *);
+SILO_API extern void     DBResetQuadvar(DBquadvar *);
+SILO_API extern void     DBFreeCsgvar(DBcsgvar *);
+SILO_API extern void     DBFreeQuadvar(DBquadvar *);
+SILO_API extern void     DBFreeUcdmesh(DBucdmesh *);
+SILO_API extern void     DBFreeMeshvar(DBmeshvar *);
+SILO_API extern void     DBFreePointmesh(DBpointmesh *);
+SILO_API extern void     DBFreeQuadmesh(DBquadmesh *);
+SILO_API extern void     DBFreeCsgmesh(DBcsgmesh *);
+SILO_API extern void     DBFreeDefvars(DBdefvars*);
+SILO_API extern void     DBFreeMultimesh(DBmultimesh *);
+SILO_API extern void     DBFreeMultimeshadj(DBmultimeshadj *);
+SILO_API extern void     DBFreeMultivar(DBmultivar *);
+SILO_API extern void     DBFreeMultimat(DBmultimat *);
+SILO_API extern void     DBFreeMultimatspecies(DBmultimatspecies *);
+SILO_API extern void     DBFreeCompoundarray(DBcompoundarray *);
+SILO_API extern void     DBFreeCurve(DBcurve *);
+SILO_API extern void     DBFreeNamescheme(DBnamescheme *);
+
+SILO_API extern long     DBSetDataReadMask(long);
+SILO_API extern long     DBGetDataReadMask(void);
+SILO_API extern int      DBSetAllowOverwrites(int allow);
+SILO_API extern int      DBGetAllowOverwrites(void);
+SILO_API extern int      DBSetEnableChecksums(int enable);
+SILO_API extern int      DBGetEnableChecksums(void);
+SILO_API extern void     DBSetCompression(const char *);
+SILO_API extern char    *DBGetCompression(void);
+SILO_API extern int      DBSetFriendlyHDF5Names(int enable);
+SILO_API extern int      DBGetFriendlyHDF5Names(void);
+SILO_API extern int      DBGuessHasFriendlyHDF5Names(DBfile *f);
+SILO_API extern int      DBSetDeprecateWarnings(int max);
+SILO_API extern int      DBGetDeprecateWarnings();
+SILO_API extern int     *DBSetUnknownDriverPriorities(const int *);
+SILO_API extern int     *DBGetUnknownDriverPriorities();
+SILO_API extern int      DBRegisterFileOptionsSet(const DBoptlist *opts);
+SILO_API extern int      DBUnregisterFileOptionsSet(int opts_set_id);
+SILO_API extern void     DBUnregisterAllFileOptionsSets();
+SILO_API extern void    *DBGrabDriver(DBfile *);
+SILO_API extern int      DBUngrabDriver(DBfile *, const void *);
+SILO_API extern int      DBGetDriverType(const DBfile *);
+SILO_API extern int      DBGetDriverTypeFromPath(const char *);
+SILO_API extern char    *DBJoinPath(const char *, const char *);
+SILO_API extern char    *DBVersion(void);
+SILO_API extern int      DBVersionGE(int Maj, int Min, int Pat);
+SILO_API extern char    *DBFileVersion(DBfile *dbfile);
+SILO_API extern int      DBFileVersionGE(DBfile *dbfile, int Maj, int Min, int Pat);
+SILO_API extern void     DBShowErrors(int, DBErrFunc_t);
+SILO_API extern char    *DBErrString(void);
+SILO_API extern char    *DBErrFunc(void);
+SILO_API extern char    *DBErrFuncname(void);
+SILO_API extern DBErrFunc_t DBErrfunc(void);
+SILO_API extern int      DBErrno(void);
+SILO_API extern int      DBErrlvl(void);
+SILO_API extern int      DBClose(DBfile *);
+SILO_API extern int      DBPause(DBfile *);
+SILO_API extern int      DBContinue(DBfile *);
+SILO_API extern int      DBInqVarExists(DBfile *, const char *);
+SILO_API extern int      DBForceSingle(int);
+SILO_API extern int      DBUninstall(DBfile *);
+SILO_API extern DBoptlist *DBMakeOptlist(int);
+SILO_API extern int      DBClearOptlist(DBoptlist *);
+SILO_API extern int      DBFreeOptlist(DBoptlist *);
+SILO_API extern int      DBAddOption(DBoptlist *, int, void *);
+SILO_API extern void    *DBGetOption(const DBoptlist *, int);
+SILO_API extern int      DBClearOption(DBoptlist *, int);
+SILO_API extern DBtoc   *DBGetToc(DBfile *);
+SILO_API extern int      DBNewToc(DBfile *);
+SILO_API extern int      DBSortObjectsByOffset(DBfile *, int nobjs,
+                             const char *const *const obj_names, int *ranks);
+SILO_API extern int      DBFilters(DBfile *, FILE *);
+SILO_API extern int      DBFilterRegistration(const char *, int (*init) (DBfile *, char *),
+                                     int (*open) (DBfile *, char *));
+SILO_API extern void    *DBGetAtt(DBfile *, const char *, const char *);
+SILO_API extern DBobject *DBGetObject(DBfile *, const char *);
+SILO_API extern int      DBChangeObject(DBfile *, DBobject *);
+SILO_API extern int      DBWriteObject(DBfile *, DBobject *, int);
+SILO_API extern void    *DBGetComponent(DBfile *, const char *, const char *);
+SILO_API extern int      DBGetComponentType(DBfile *, const char *, const char *);
+SILO_API extern int      DBWriteComponent(DBfile *, DBobject *, const char *, const char *, const char *,
+                                 const void *, int, long *);
+SILO_API extern int      DBWrite(DBfile *, const char *, void *, int *, int, int);
+SILO_API extern int      DBWriteSlice(DBfile *, const char *, void *, int, int[], int[],
+                             int[], int[], int);
+SILO_API extern DBfacelist *DBCalcExternalFacelist(int *, int, int, int *, int *, int,
+                                          int *, int);
+SILO_API extern DBfacelist *DBCalcExternalFacelist2(int *, int, int, int, int, int *,
+                                           int *, int *, int, int *, int);
+SILO_API extern int      DBGetDir(DBfile *, char *);
+SILO_API extern int      DBSetDir(DBfile *, const char *);
+SILO_API extern int      DBSetDirID(DBfile *, int);
+SILO_API extern int      DBListDir(DBfile *, char **, int);
+SILO_API extern int      DBMkDir(DBfile *, const char *);
+SILO_API extern int      DBCpDir(DBfile *dbfile, const char *srcDir,
+                             DBfile *dstFile, const char *dstDir);
+
+#define DBMkdir DBMkDir
+SILO_API extern int      DBReadAtt(DBfile *, const char *, const char *, void *);
+SILO_API extern int      DBRead(DBfile *, const char *, void *);
+SILO_API extern int      DBReadVar(DBfile *, const char *, void *);
+SILO_API extern int      DBReadVar1(DBfile *, const char *, int, void *);
+SILO_API extern int      DBReadVarSlice(DBfile *, const char *, int *, int *, int *, int,
+                               void *);
+SILO_API extern DBobject *DBMakeObject(const char *, int, int);
+SILO_API extern int      DBFreeObject(DBobject *);
+SILO_API extern int      DBClearObject(DBobject *);
+SILO_API extern int      DBAddVarComponent(DBobject *, const char *, const char *);
+SILO_API extern int      DBAddIntComponent(DBobject *, const char *, int);
+SILO_API extern int      DBAddFltComponent(DBobject *, const char *, double);
+SILO_API extern int      DBAddDblComponent(DBobject *, const char *, double);
+SILO_API extern int      DBAddStrComponent(DBobject *, const char *, const char *);
+SILO_API extern int      DBGetComponentNames(DBfile *, const char *, char ***, char ***);
+
+SILO_API extern DBcompoundarray *DBGetCompoundarray(DBfile *, const char *);
+SILO_API extern DBcurve *DBGetCurve(DBfile *, const char *);
+SILO_API extern DBdefvars *DBGetDefvars(DBfile *, const char *);
+SILO_API extern DBmaterial *DBGetMaterial(DBfile *, const char *);
+SILO_API extern DBmatspecies *DBGetMatspecies(DBfile *, const char *);
+SILO_API extern DBmultimesh *DBGetMultimesh(DBfile *, const char *);
+SILO_API extern DBmultimeshadj *DBGetMultimeshadj(DBfile *, const char *,
+                                                  int, const int *);
+SILO_API extern DBmultivar *DBGetMultivar(DBfile *, const char *);
+SILO_API extern DBmultimat *DBGetMultimat(DBfile *, const char *);
+SILO_API extern DBmultimatspecies *DBGetMultimatspecies(DBfile *, const char *);
+SILO_API extern DBpointmesh *DBGetPointmesh(DBfile *, const char *);
+SILO_API extern DBmeshvar *DBGetPointvar(DBfile *, const char *);
+SILO_API extern DBquadmesh *DBGetQuadmesh(DBfile *, const char *);
+SILO_API extern DBquadvar *DBGetQuadvar(DBfile *, const char *);
+SILO_API extern int      DBGetQuadvar1(DBfile *, const char *, DB_DTPTR1, int *, int *,
+                              DB_DTPTR1, int *, int *, int *);
+SILO_API extern int      DBAnnotateUcdmesh(DBucdmesh *);
+SILO_API extern DBucdmesh *DBGetUcdmesh(DBfile *, const char *);
+SILO_API extern DBucdvar *DBGetUcdvar(DBfile *, const char *);
+SILO_API extern DBcsgmesh *DBGetCsgmesh(DBfile *, const char *);
+SILO_API extern DBcsgvar *DBGetCsgvar(DBfile *, const char *);
+SILO_API extern DBcsgzonelist *DBGetCSGZonelist(DBfile *, const char *);
+SILO_API extern DBfacelist *DBGetFacelist(DBfile *, const char *);
+SILO_API extern DBzonelist *DBGetZonelist(DBfile *, const char *);
+SILO_API extern DBphzonelist *DBGetPHZonelist(DBfile *, const char *);
+SILO_API extern void    *DBGetVar(DBfile *, const char *);
+SILO_API extern int      DBGetVarByteLength(DBfile *, const char *);
+SILO_API extern int      DBGetVarLength(DBfile *, const char *);
+SILO_API extern int      DBGetVarDims(DBfile *, const char *, int, int *);
+SILO_API extern int      DBGetVarType(DBfile *, const char *);
+SILO_API extern int      DBInqFileHasObjects(DBfile *);
+SILO_API extern int      DBInqMeshname(DBfile *, const char *, const char *);
+SILO_API extern int      DBInqMeshtype(DBfile *, const char *);
+SILO_API extern int      DBInqCompoundarray(DBfile *, const char *, char ***,
+                                   int **, int *, int *, int *);
+SILO_API extern DBObjectType DBInqVarType(DBfile *, const char *);
+
+SILO_API extern int      DBPutCompoundarray(DBfile *, const char *, char **, int *, int,
+                                   void *, int, int, DBoptlist *);
+SILO_API extern int      DBPutCurve(DBfile *, const char *, void *, void *, int, int,
+                           DBoptlist *);
+SILO_API extern int      DBPutDefvars (DBfile *, const char *, int, char **, 
+                            const int *, char **, DBoptlist **);
+SILO_API extern int      DBPutFacelist(DBfile *, const char *, int, int, int *, int, int,
+                            int *, int *, int *, int, int *, int *, int);
+SILO_API extern int      DBPutMaterial(DBfile *, const char *, const char *, int, int *, int *,
+                           int *, int, int *, int *, int *, DB_DTPTR1, int,
+                              int, DBoptlist *);
+SILO_API extern int      DBPutMatspecies(struct DBfile *, const char *, const char *, int, int *,
+                                int *, int *, int, int, DB_DTPTR1, int *, int, int,
+                                DBoptlist *);
+SILO_API extern int      DBPutMultimesh(DBfile *, const char *, int, char **, int *,
+                               DBoptlist *);
+SILO_API extern int      DBPutMultimeshadj(DBfile *, const char *, int, const int *,
+                               const int *, const int *, const int *, const int *,
+                               int **, const int *, int **, DBoptlist *optlist);
+SILO_API extern int      DBPutMultivar(DBfile *, const char *, int, char **, int *,
+                              DBoptlist *);
+SILO_API extern int      DBPutMultimat(DBfile *, const char *, int, char **, DBoptlist *);
+SILO_API extern int      DBPutMultimatspecies(DBfile *, const char *, int, char **,
+                                     DBoptlist *);
+SILO_API extern int      DBPutPointmesh(DBfile *, const char *, int, DB_DTPTR2, int, int,
+                               DBoptlist *);
+SILO_API extern int      DBPutPointvar(DBfile *, const char *, const char *, int, DB_DTPTR2, int,
+                              int, DBoptlist *);
+SILO_API extern int      DBPutPointvar1(DBfile *, const char *, const char *, DB_DTPTR1, int, int,
+                               DBoptlist *);
+SILO_API extern int      DBPutQuadmesh(DBfile *, const char *, char **, DB_DTPTR2, int *, int,
+                              int, int, DBoptlist *);
+SILO_API extern int      DBPutQuadvar(DBfile *, const char *, const char *, int, char **, DB_DTPTR2,
+                             int *, int, DB_DTPTR2, int, int, int, DBoptlist *);
+SILO_API extern int      DBPutQuadvar1(DBfile *, const char *, const char *, DB_DTPTR1, int *, int,
+                              DB_DTPTR1, int, int, int, DBoptlist *);
+SILO_API extern int      DBPutUcdmesh(DBfile *, const char *, int, char **, DB_DTPTR2, int,
+                             int, const char *, const char *, int, DBoptlist *);
+SILO_API extern int      DBPutUcdsubmesh(DBfile *, const char *, const char *, int,
+                             const char *, const char *, DBoptlist *);
+SILO_API extern int      DBPutUcdvar(DBfile *, const char *, const char *, int, char **, DB_DTPTR2,
+                            int, DB_DTPTR2, int, int, int, DBoptlist *);
+SILO_API extern int      DBPutUcdvar1(DBfile *, const char *, const char *, DB_DTPTR1, int, DB_DTPTR1,
+                             int, int, int, DBoptlist *);
+SILO_API extern int      DBPutZonelist(DBfile *, const char *, int, int, int *, int, int,
+                              int *, int *, int);
+SILO_API extern int      DBPutZonelist2(DBfile *, const char *, int, int, int *, int, int,
+                               int, int, int *, int *, int *, int, DBoptlist*);
+SILO_API extern int      DBPutPHZonelist(DBfile *, const char *, int, int *, int, int *, const char *,
+                                                           int, int *, int, int *,
+                                                           int, int, int, DBoptlist *);
+SILO_API extern int      DBPutCsgmesh(DBfile *, const char *, int, int, const int *, const int *,
+                                      const void *, int, int, const double *, const char *,
+                                      DBoptlist *);
+SILO_API extern int      DBPutCSGZonelist(DBfile *, const char *, int, const int *,
+                                          const int *, const int *, const void *, int, int,
+                                          int, const int *, DBoptlist *);
+SILO_API extern int      DBPutCsgvar(DBfile *, const char *, const char *, int, char **,
+                                     void **, int, int, int, DBoptlist *);
+
+SILO_API extern void DBFreeMrgtree(DBmrgtree *tree);
+SILO_API extern void DBPrintMrgtree(DBmrgtnode *tnode, int walk_order, void *data);
+SILO_API extern void DBLinearizeMrgtree(DBmrgtnode *tnode, int walk_order, void *data);
+SILO_API extern void DBWalkMrgtree(DBmrgtree *tree, DBmrgwalkcb cb, void *wdata,
+                         int traversal_order);
+
+SILO_API extern DBmrgtree *DBMakeMrgtree(int source_mesh_type, int mrgtree_info,
+                               int max_root_descendents, DBoptlist *opts);
+SILO_API extern int      DBAddRegion(DBmrgtree *tree, const char *region_name,
+                             int type_info_bits, int max_descendents,
+                             const char *maps_name, int nsegs, int *seg_ids,
+                             int *seg_sizes, int *seg_types, DBoptlist *opts);
+
+SILO_API extern int      DBAddRegionArray(DBmrgtree *tree, int nregn,
+                             char **regn_names, int type_info_bits,
+                             const char *maps_name, int nsegs, int *seg_ids,
+                             int *seg_sizes, int *seg_types, DBoptlist *opts);
+
+SILO_API extern int      DBSetCwr(DBmrgtree *tree, const char *path);
+SILO_API extern const char *DBGetCwr(DBmrgtree *tree);
+
+SILO_API extern int      DBPutMrgtree(DBfile *dbfile, const char *mrg_tree_name,
+                             const char *mesh_name, DBmrgtree *tree, DBoptlist *opts);
+SILO_API extern DBmrgtree *DBGetMrgtree(DBfile *dbfile, const char *mrg_tree_name);
+
+SILO_API extern int      DBPutMrgvar(DBfile *dbfile, const char *name,
+                             const char *mrgt_name,
+			     int ncomps, char **compnames,
+			     int nregns, char **reg_pnames,
+                             int datatype, void **data, DBoptlist *opts);
+SILO_API extern DBmrgvar *DBGetMrgvar(DBfile *dbfile, const char *name);
+SILO_API extern void DBFreeMrgvar(DBmrgvar *mrgv);
+
+SILO_API extern int      DBPutGroupelmap(DBfile *dbfile, const char *map_name,
+                             int num_segments, int *groupel_types, int *segment_lengths,
+                             int *segment_ids, int **segment_data, void **segment_fracs,
+                             int fracs_data_type, DBoptlist *opts);
+SILO_API extern DBgroupelmap *DBGetGroupelmap(DBfile *dbfile, const char *name);
+SILO_API extern void DBFreeGroupelmap(DBgroupelmap *map);
+
+SILO_API extern void *   DBFortranAccessPointer(int value);
+SILO_API extern int      DBFortranAllocPointer(void *pointer);
+SILO_API extern void     DBFortranRemovePointer(int value);
+
+SILO_API extern int      DBVariableNameValid(const char *s);
+SILO_API extern char *safe_strdup(const char *s);
+
+SILO_API extern int      DBFreeCompressionResources(DBfile *dbfile, const char *meshname);
+
+SILO_API extern DBnamescheme *DBMakeNamescheme(const char *fmt, ...);
+SILO_API const char *DBGetName(DBnamescheme *ns, int natnum);
+
+SILO_API extern void DBStringArrayToStringList(char **strArray, int n,
+                         char **strList, int *m);
+SILO_API char ** DBStringListToStringArray(char *strList, int n, int handleSlashSwap,
+                     int skipFirstSemicolon);
+
+/*-------------------------------------------------------------------------
+ * Public global variables.
+ *-------------------------------------------------------------------------
+ */
+SILO_API extern int     DBDebugAPI;      /*file desc for debug messages, or zero */
+SILO_API extern int     db_errno;        /*error number of last error */
+SILO_API extern char    db_errfunc[];    /*name of erring function */
+
+#ifndef DB_MAIN
+SILO_API extern DBfile *(*DBOpenCB[])(const char *, int, int);
+SILO_API extern DBfile *(*DBCreateCB[])(const char *, int, int, int, const char *);
+SILO_API extern int     (*DBFSingleCB[])(int);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#undef NO_FORTRAN_DEFINE
+#endif /* !SILO_H */
diff --git a/src/silo/silo.inc b/src/silo/silo.inc
new file mode 100644
index 0000000..51a16ab
--- /dev/null
+++ b/src/silo/silo.inc
@@ -0,0 +1,495 @@
+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccc -*- fortran -*-
+!
+!     SILO include file for Fortan applications.
+!
+! Programmer:   miller86 Wed Sep 15 10:10:08 PDT 2010
+!
+! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+!    This file is generated automatically from C header files in the
+!    SILO distribution.  Do not make changes to this file manually,
+!    as those changes will disappear.
+! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+!
+! This file was generated by the following commands...
+!       mv silo.inc silo.inc~
+!       cat silo.h silo_f.h | mkinc > silo.inc
+!
+!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+
+
+!...Functions.
+      external dbaddcaopt, dbaddccmp, dbaddcopt, dbadddopt, dbaddicmp
+      external dbaddiopt, dbaddrcmp, dbaddregion, dbaddregiona
+      external dbaddropt, dbcalcfl, dbclose, dbcreate, dberrno, dbfgetca
+      external dbfreemrgtree, dbfreeobject, dbfreeoptlist, dbget2dstrlen
+      external dbgetca, dbgetcksums, dbgetcompress, dbgetcurve
+      external dbgetdepwarn, dbgethdfnms, dbgetovrwrt, dbgetqv1, dbinqca
+      external dbinqfile, dbinqlen, dbmkdir, dbmkmrgtree, dbmkobject
+      external dbmkoptlist, dbmkptr, dbopen, dbpmrgv, dbputca, dbputcsgm
+      external dbputcsgv, dbputcsgzl, dbputcurve, dbputdefvars, dbputfl
+      external dbputgrplmap, dbputmat, dbputmmat, dbputmmesh
+      external dbputmrgtree, dbputmsp, dbputmvar, dbputpm, dbputpv1
+      external dbputqm, dbputqv, dbputqv1, dbputum, dbputuv1, dbputzl
+      external dbputzl2, dbrdvar, dbrdvarslice, dbregfopts, dbrmptr
+      external dbset2dstrlen, dbsetcksums, dbsetcompress, dbsetcwr
+      external dbsetdepwarn, dbsetdir, dbsetdirid, dbsethdfnms
+      external dbsetovrwrt, dbshowerrors, dbunregafopts, dbunregfopts
+      external dbwrite, dbwriteslice, dbwrtfl
+
+      integer  dbaddcaopt, dbaddccmp, dbaddcopt, dbadddopt, dbaddicmp
+      integer  dbaddiopt, dbaddrcmp, dbaddregion, dbaddregiona
+      integer  dbaddropt, dbcalcfl, dbclose, dbcreate, dberrno, dbfgetca
+      integer  dbfreemrgtree, dbfreeobject, dbfreeoptlist, dbget2dstrlen
+      integer  dbgetca, dbgetcksums, dbgetcompress, dbgetcurve
+      integer  dbgetdepwarn, dbgethdfnms, dbgetovrwrt, dbgetqv1, dbinqca
+      integer  dbinqfile, dbinqlen, dbmkdir, dbmkmrgtree, dbmkobject
+      integer  dbmkoptlist, dbmkptr, dbopen, dbpmrgv, dbputca, dbputcsgm
+      integer  dbputcsgv, dbputcsgzl, dbputcurve, dbputdefvars, dbputfl
+      integer  dbputgrplmap, dbputmat, dbputmmat, dbputmmesh
+      integer  dbputmrgtree, dbputmsp, dbputmvar, dbputpm, dbputpv1
+      integer  dbputqm, dbputqv, dbputqv1, dbputum, dbputuv1, dbputzl
+      integer  dbputzl2, dbrdvar, dbrdvarslice, dbregfopts, dbrmptr
+      integer  dbset2dstrlen, dbsetcksums, dbsetcompress, dbsetcwr
+      integer  dbsetdepwarn, dbsetdir, dbsetdirid, dbsethdfnms
+      integer  dbsetovrwrt, dbshowerrors, dbunregafopts, dbunregfopts
+      integer  dbwrite, dbwriteslice, dbwrtfl
+
+
+!...Parameters.
+      integer  DBCSG_ANGLE_PNLA, DBCSG_ANGLE_PPA, DBCSG_BOX_XYXY
+      integer  DBCSG_BOX_XYZXYZ, DBCSG_CIRCLE_PR, DBCSG_COMPLIMENT
+      integer  DBCSG_CONE_PNLA, DBCSG_CONE_PPA, DBCSG_CYLINDER_PNLR
+      integer  DBCSG_CYLINDER_PPR, DBCSG_DIFF, DBCSG_ELLIPSE_PRR
+      integer  DBCSG_ELLIPSOID_PRRR, DBCSG_HEX_6F, DBCSG_INNER
+      integer  DBCSG_INTERSECT, DBCSG_LINE_G, DBCSG_LINE_PN
+      integer  DBCSG_LINE_PP, DBCSG_LINE_X, DBCSG_LINE_Y, DBCSG_ON
+      integer  DBCSG_OUTER, DBCSG_PLANE_G, DBCSG_PLANE_PN
+      integer  DBCSG_PLANE_PPP, DBCSG_PLANE_X, DBCSG_PLANE_Y
+      integer  DBCSG_PLANE_Z, DBCSG_POLYGON_KP, DBCSG_POLYHEDRON_KF
+      integer  DBCSG_PRISM_5F, DBCSG_PYRAMID_5F, DBCSG_QUADRATIC_G
+      integer  DBCSG_QUADRIC_G, DBCSG_QUAD_4P, DBCSG_SPHERE_PR
+      integer  DBCSG_SWEEP, DBCSG_TET_4F, DBCSG_TRI_3P, DBCSG_UNION
+      integer  DBCSG_XFORM, DBOPT_ALIGN, DBOPT_ALLOWMAT0
+      integer  DBOPT_ASCII_LABEL, DBOPT_BASEINDEX, DBOPT_BLOCKORIGIN
+      integer  DBOPT_BNDNAMES, DBOPT_CONSERVED, DBOPT_COORDSYS
+      integer  DBOPT_CYCLE, DBOPT_DISJOINT_MODE, DBOPT_DTIME
+      integer  DBOPT_EXTENSIVE, DBOPT_EXTENTS, DBOPT_EXTENTS_SIZE
+      integer  DBOPT_FACETYPE, DBOPT_FIRST, DBOPT_GROUPINGNAMES
+      integer  DBOPT_GROUPINGS, DBOPT_GROUPINGS_SIZE, DBOPT_GROUPNUM
+      integer  DBOPT_GROUPORIGIN, DBOPT_H5_ALIGN_MIN, DBOPT_H5_ALIGN_VAL
+      integer  DBOPT_H5_CACHE_NBYTES, DBOPT_H5_CACHE_NELMTS
+      integer  DBOPT_H5_CACHE_POLICY, DBOPT_H5_CORE_ALLOC_INC
+      integer  DBOPT_H5_CORE_NO_BACK_STORE, DBOPT_H5_DIRECT_BLOCK_SIZE
+      integer  DBOPT_H5_DIRECT_BUF_SIZE, DBOPT_H5_DIRECT_MEM_ALIGN
+      integer  DBOPT_H5_FAM_FILE_OPTS, DBOPT_H5_FAM_SIZE, DBOPT_H5_FIRST
+      integer  DBOPT_H5_LAST, DBOPT_H5_LOG_BUF_SIZE, DBOPT_H5_LOG_NAME
+      integer  DBOPT_H5_META_BLOCK_SIZE, DBOPT_H5_META_EXTENSION
+      integer  DBOPT_H5_META_FILE_OPTS, DBOPT_H5_MPIO_COMM
+      integer  DBOPT_H5_MPIO_INFO, DBOPT_H5_MPIP_NO_GPFS_HINTS
+      integer  DBOPT_H5_RAW_EXTENSION, DBOPT_H5_RAW_FILE_OPTS
+      integer  DBOPT_H5_SIEVE_BUF_SIZE, DBOPT_H5_SILO_BLOCK_COUNT
+      integer  DBOPT_H5_SILO_BLOCK_SIZE, DBOPT_H5_SILO_LOG_STATS
+      integer  DBOPT_H5_SILO_USE_DIRECT, DBOPT_H5_SMALL_RAW_SIZE
+      integer  DBOPT_H5_USER_DRIVER_ID, DBOPT_H5_USER_DRIVER_INFO
+      integer  DBOPT_H5_VFD, DBOPT_HAS_EXTERNAL_ZONES
+      integer  DBOPT_HIDE_FROM_GUI, DBOPT_HI_OFFSET, DBOPT_LABEL
+      integer  DBOPT_LAST, DBOPT_LLONGNZNUM, DBOPT_LO_OFFSET
+      integer  DBOPT_MAJORORDER, DBOPT_MATCOLORS, DBOPT_MATCOUNTS
+      integer  DBOPT_MATLISTS, DBOPT_MATNAME, DBOPT_MATNAMES
+      integer  DBOPT_MATNOS, DBOPT_MB_BLOCK_NS, DBOPT_MB_BLOCK_TYPE
+      integer  DBOPT_MB_EMPTY_COUNT, DBOPT_MB_EMPTY_LIST
+      integer  DBOPT_MB_FILE_NS, DBOPT_MIXLENS, DBOPT_MMESH_NAME
+      integer  DBOPT_MRGTREE_NAME, DBOPT_MRGV_ONAMES, DBOPT_MRGV_RNAMES
+      integer  DBOPT_NGROUPS, DBOPT_NMAT, DBOPT_NMATNOS, DBOPT_NMATSPEC
+      integer  DBOPT_NODENUM, DBOPT_NSPACE, DBOPT_ORIGIN
+      integer  DBOPT_PHZONELIST, DBOPT_PLANAR, DBOPT_REFERENCE
+      integer  DBOPT_REGION_PNAMES, DBOPT_REGNAMES, DBOPT_SPECCOLORS
+      integer  DBOPT_SPECNAMES, DBOPT_TENSOR_RANK, DBOPT_TIME
+      integer  DBOPT_TOPO_DIM, DBOPT_TV_CONNECTIVITY, DBOPT_UNITS
+      integer  DBOPT_USESPECMF, DBOPT_XLABEL, DBOPT_XUNITS
+      integer  DBOPT_XVARNAME, DBOPT_YLABEL, DBOPT_YUNITS
+      integer  DBOPT_YVARNAME, DBOPT_ZLABEL, DBOPT_ZONECOUNTS
+      integer  DBOPT_ZONENAMES, DBOPT_ZONENUM, DBOPT_ZUNITS
+      integer  DBOPT_ZVARNAME, DB_ABORT, DB_ABUTTING, DB_ALL
+      integer  DB_ALL_AND_DRVR, DB_APPEND, DB_AREA, DB_ARRAY
+      integer  DB_BLOCKCENT, DB_BNDCENT, DB_CARTESIAN, DB_CHAR
+      integer  DB_CLOBBER, DB_COLLINEAR, DB_COLMAJOR, DB_CRAY
+      integer  DB_CSGMESH, DB_CSGVAR, DB_CSGZONELIST, DB_CURVE
+      integer  DB_CURVILINEAR, DB_CYLINDRICAL, DB_DEBUG, DB_DEFVARS
+      integer  DB_DIR, DB_DOUBLE, DB_EDGECENT, DB_EDGELIST, DB_F77NULL
+      integer  DB_FACECENT, DB_FACELIST, DB_FILE_OPTS_H5_DEFAULT_CORE
+      integer  DB_FILE_OPTS_H5_DEFAULT_DEFAULT
+      integer  DB_FILE_OPTS_H5_DEFAULT_DIRECT
+      integer  DB_FILE_OPTS_H5_DEFAULT_FAMILY
+      integer  DB_FILE_OPTS_H5_DEFAULT_LOG, DB_FILE_OPTS_H5_DEFAULT_MPIO
+      integer  DB_FILE_OPTS_H5_DEFAULT_MPIP
+      integer  DB_FILE_OPTS_H5_DEFAULT_SEC2
+      integer  DB_FILE_OPTS_H5_DEFAULT_SILO
+      integer  DB_FILE_OPTS_H5_DEFAULT_SPLIT
+      integer  DB_FILE_OPTS_H5_DEFAULT_STDIO, DB_FILE_OPTS_LAST
+      integer  DB_FLOAT, DB_FLOATING, DB_FROMCWR, DB_GROUPELMAP
+      integer  DB_H5VFD_CORE, DB_H5VFD_DEFAULT, DB_H5VFD_DIRECT
+      integer  DB_H5VFD_FAMILY, DB_H5VFD_LOG, DB_H5VFD_MPIO
+      integer  DB_H5VFD_MPIP, DB_H5VFD_SEC2, DB_H5VFD_SILO
+      integer  DB_H5VFD_SPLIT, DB_H5VFD_STDIO, DB_HDF5, DB_HDF5X
+      integer  DB_HDF5_CORE, DB_HDF5_CORE_OBSOLETE, DB_HDF5_DIRECT
+      integer  DB_HDF5_FAMILY, DB_HDF5_LOG, DB_HDF5_MPIO, DB_HDF5_MPIOP
+      integer  DB_HDF5_MPIOP_OBSOLETE, DB_HDF5_MPIO_OBSOLETE
+      integer  DB_HDF5_MPIP, DB_HDF5_SEC2, DB_HDF5_SEC2_OBSOLETE
+      integer  DB_HDF5_SILO, DB_HDF5_SPLIT, DB_HDF5_STDIO
+      integer  DB_HDF5_STDIO_OBSOLETE, DB_INT, DB_INTEL
+      integer  DB_INVALID_OBJECT, DB_LOCAL, DB_LONG, DB_LONG_LONG
+      integer  DB_MATERIAL, DB_MATSPECIES, DB_MRGTREE, DB_MRGVAR
+      integer  DB_MULTIBLOCKMESH, DB_MULTIBLOCKVAR, DB_MULTIMAT
+      integer  DB_MULTIMATSPECIES, DB_MULTIMESH, DB_MULTIMESHADJ
+      integer  DB_MULTIVAR, DB_NETCDF, DB_NFILES, DB_NFILTERS
+      integer  DB_NOCLOBBER, DB_NODECENT, DB_NONCOLLINEAR, DB_NONE
+      integer  DB_NOTCENT, DB_NOTYPE, DB_NUMERICAL, DB_OFF, DB_ON
+      integer  DB_OTHER, DB_PDB, DB_PDBP, DB_PHZONELIST, DB_POINTMESH
+      integer  DB_POINTVAR, DB_POSTORDER, DB_PREORDER, DB_QUADCURV
+      integer  DB_QUADMESH, DB_QUADRECT, DB_QUADVAR, DB_QUAD_CURV
+      integer  DB_QUAD_RECT, DB_READ, DB_RECTILINEAR, DB_RESUME
+      integer  DB_ROWMAJOR, DB_RS6000, DB_SGI, DB_SHORT, DB_SPHERICAL
+      integer  DB_SUN3, DB_SUN4, DB_SUSPEND, DB_TAURUS, DB_TOP
+      integer  DB_UCDMESH, DB_UCDVAR, DB_UNKNOWN, DB_USERDEF
+      integer  DB_VARIABLE, DB_VARTYPE_ARRAY, DB_VARTYPE_LABEL
+      integer  DB_VARTYPE_MATERIAL, DB_VARTYPE_SCALAR
+      integer  DB_VARTYPE_SPECIES, DB_VARTYPE_SYMTENSOR
+      integer  DB_VARTYPE_TENSOR, DB_VARTYPE_VECTOR, DB_VOLUME
+      integer  DB_ZONECENT, DB_ZONELIST, DB_ZONETYPE_BEAM
+      integer  DB_ZONETYPE_HEX, DB_ZONETYPE_POLYGON
+      integer  DB_ZONETYPE_POLYHEDRON, DB_ZONETYPE_PRISM
+      integer  DB_ZONETYPE_PYRAMID, DB_ZONETYPE_QUAD, DB_ZONETYPE_TET
+      integer  DB_ZONETYPE_TRIANGLE, SILO_VERS_MAJ, SILO_VERS_MIN
+      integer  SILO_VERS_PAT, SILO_VERS_PRE
+      character*12  DB_F77NULLSTRING
+
+      parameter (SILO_VERS_MAJ             = 4              )
+      parameter (SILO_VERS_MIN             = 8              )
+      parameter (SILO_VERS_PAT             = 0              )
+      parameter (SILO_VERS_PRE             = 0              )
+      parameter (DB_NETCDF                 = 0              )
+      parameter (DB_PDB                    = 2              )
+      parameter (DB_TAURUS                 = 3              )
+      parameter (DB_UNKNOWN                = 5              )
+      parameter (DB_DEBUG                  = 6              )
+      parameter (DB_HDF5X                  = 7              )
+      parameter (DB_PDBP                   = 1              )
+      parameter (DB_HDF5_SEC2_OBSOLETE     = 256            )
+      parameter (DB_HDF5_STDIO_OBSOLETE    = 512            )
+      parameter (DB_HDF5_CORE_OBSOLETE     = 768            )
+      parameter (DB_HDF5_MPIO_OBSOLETE     = 1024           )
+      parameter (DB_HDF5_MPIOP_OBSOLETE    = 1280           )
+      parameter (DB_H5VFD_DEFAULT          = 0              )
+      parameter (DB_H5VFD_SEC2             = 1              )
+      parameter (DB_H5VFD_STDIO            = 2              )
+      parameter (DB_H5VFD_CORE             = 3              )
+      parameter (DB_H5VFD_LOG              = 4              )
+      parameter (DB_H5VFD_SPLIT            = 5              )
+      parameter (DB_H5VFD_DIRECT           = 6              )
+      parameter (DB_H5VFD_FAMILY           = 7              )
+      parameter (DB_H5VFD_MPIO             = 8              )
+      parameter (DB_H5VFD_MPIP             = 9              )
+      parameter (DB_H5VFD_SILO             = 10             )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_DEFAULT = DB_H5VFD_DEFAULT)
+      parameter (DB_FILE_OPTS_H5_DEFAULT_SEC2 = DB_H5VFD_SEC2  )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_STDIO = DB_H5VFD_STDIO )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_CORE = DB_H5VFD_CORE  )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_LOG = DB_H5VFD_LOG   )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_SPLIT = DB_H5VFD_SPLIT )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_DIRECT = DB_H5VFD_DIRECT)
+      parameter (DB_FILE_OPTS_H5_DEFAULT_FAMILY = DB_H5VFD_FAMILY)
+      parameter (DB_FILE_OPTS_H5_DEFAULT_MPIO = DB_H5VFD_MPIO  )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_MPIP = DB_H5VFD_MPIP  )
+      parameter (DB_FILE_OPTS_H5_DEFAULT_SILO = DB_H5VFD_SILO  )
+      parameter (DB_FILE_OPTS_LAST         = DB_FILE_OPTS_H5_DEF
+     cAULT_SILO)
+      parameter (DB_HDF5                   = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_DEFAULT*2048)
+      parameter (DB_HDF5_SEC2              = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_SEC2*2048)
+      parameter (DB_HDF5_STDIO             = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_STDIO*2048)
+      parameter (DB_HDF5_CORE              = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_CORE*2048)
+      parameter (DB_HDF5_LOG               = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_LOG*2048)
+      parameter (DB_HDF5_SPLIT             = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_SPLIT*2048)
+      parameter (DB_HDF5_DIRECT            = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_DIRECT*2048)
+      parameter (DB_HDF5_FAMILY            = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_FAMILY*2048)
+      parameter (DB_HDF5_MPIO              = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_MPIO*2048)
+      parameter (DB_HDF5_MPIOP             = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_MPIP*2048)
+      parameter (DB_HDF5_MPIP              = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_MPIP*2048)
+      parameter (DB_HDF5_SILO              = DB_HDF5X+DB_FILE_OP
+     cTS_H5_DEFAULT_SILO*2048)
+      parameter (DB_NFILES                 = 256            )
+      parameter (DB_NFILTERS               = 32             )
+      parameter (DB_COLLINEAR              = 130            )
+      parameter (DB_NONCOLLINEAR           = 131            )
+      parameter (DB_QUAD_RECT              = DB_COLLINEAR   )
+      parameter (DB_QUAD_CURV              = DB_NONCOLLINEAR)
+      parameter (DB_INVALID_OBJECT         = -1             )
+      parameter (DB_QUADRECT               = DB_QUAD_RECT   )
+      parameter (DB_QUADCURV               = DB_QUAD_CURV   )
+      parameter (DB_QUADMESH               = 500            )
+      parameter (DB_QUADVAR                = 501            )
+      parameter (DB_UCDMESH                = 510            )
+      parameter (DB_UCDVAR                 = 511            )
+      parameter (DB_MULTIMESH              = 520            )
+      parameter (DB_MULTIVAR               = 521            )
+      parameter (DB_MULTIMAT               = 522            )
+      parameter (DB_MULTIMATSPECIES        = 523            )
+      parameter (DB_MULTIBLOCKMESH         = DB_MULTIMESH   )
+      parameter (DB_MULTIBLOCKVAR          = DB_MULTIVAR    )
+      parameter (DB_MULTIMESHADJ           = 524            )
+      parameter (DB_MATERIAL               = 530            )
+      parameter (DB_MATSPECIES             = 531            )
+      parameter (DB_FACELIST               = 550            )
+      parameter (DB_ZONELIST               = 551            )
+      parameter (DB_EDGELIST               = 552            )
+      parameter (DB_PHZONELIST             = 553            )
+      parameter (DB_CSGZONELIST            = 554            )
+      parameter (DB_CSGMESH                = 555            )
+      parameter (DB_CSGVAR                 = 556            )
+      parameter (DB_CURVE                  = 560            )
+      parameter (DB_DEFVARS                = 565            )
+      parameter (DB_POINTMESH              = 570            )
+      parameter (DB_POINTVAR               = 571            )
+      parameter (DB_ARRAY                  = 580            )
+      parameter (DB_DIR                    = 600            )
+      parameter (DB_VARIABLE               = 610            )
+      parameter (DB_MRGTREE                = 611            )
+      parameter (DB_GROUPELMAP             = 612            )
+      parameter (DB_MRGVAR                 = 613            )
+      parameter (DB_USERDEF                = 700            )
+      parameter (DB_INT                    = 16             )
+      parameter (DB_SHORT                  = 17             )
+      parameter (DB_LONG                   = 18             )
+      parameter (DB_FLOAT                  = 19             )
+      parameter (DB_DOUBLE                 = 20             )
+      parameter (DB_CHAR                   = 21             )
+      parameter (DB_LONG_LONG              = 22             )
+      parameter (DB_NOTYPE                 = 25             )
+      parameter (DB_CLOBBER                = 0              )
+      parameter (DB_NOCLOBBER              = 1              )
+      parameter (DB_READ                   = 1              )
+      parameter (DB_APPEND                 = 2              )
+      parameter (DB_LOCAL                  = 0              )
+      parameter (DB_SUN3                   = 10             )
+      parameter (DB_SUN4                   = 11             )
+      parameter (DB_SGI                    = 12             )
+      parameter (DB_RS6000                 = 13             )
+      parameter (DB_CRAY                   = 14             )
+      parameter (DB_INTEL                  = 15             )
+      parameter (DBOPT_FIRST               = 260            )
+      parameter (DBOPT_ALIGN               = 260            )
+      parameter (DBOPT_COORDSYS            = 262            )
+      parameter (DBOPT_CYCLE               = 263            )
+      parameter (DBOPT_FACETYPE            = 264            )
+      parameter (DBOPT_HI_OFFSET           = 265            )
+      parameter (DBOPT_LO_OFFSET           = 266            )
+      parameter (DBOPT_LABEL               = 267            )
+      parameter (DBOPT_XLABEL              = 268            )
+      parameter (DBOPT_YLABEL              = 269            )
+      parameter (DBOPT_ZLABEL              = 270            )
+      parameter (DBOPT_MAJORORDER          = 271            )
+      parameter (DBOPT_NSPACE              = 272            )
+      parameter (DBOPT_ORIGIN              = 273            )
+      parameter (DBOPT_PLANAR              = 274            )
+      parameter (DBOPT_TIME                = 275            )
+      parameter (DBOPT_UNITS               = 276            )
+      parameter (DBOPT_XUNITS              = 277            )
+      parameter (DBOPT_YUNITS              = 278            )
+      parameter (DBOPT_ZUNITS              = 279            )
+      parameter (DBOPT_DTIME               = 280            )
+      parameter (DBOPT_USESPECMF           = 281            )
+      parameter (DBOPT_XVARNAME            = 282            )
+      parameter (DBOPT_YVARNAME            = 283            )
+      parameter (DBOPT_ZVARNAME            = 284            )
+      parameter (DBOPT_ASCII_LABEL         = 285            )
+      parameter (DBOPT_MATNOS              = 286            )
+      parameter (DBOPT_NMATNOS             = 287            )
+      parameter (DBOPT_MATNAME             = 288            )
+      parameter (DBOPT_NMAT                = 289            )
+      parameter (DBOPT_NMATSPEC            = 290            )
+      parameter (DBOPT_BASEINDEX           = 291            )
+      parameter (DBOPT_ZONENUM             = 292            )
+      parameter (DBOPT_NODENUM             = 293            )
+      parameter (DBOPT_BLOCKORIGIN         = 294            )
+      parameter (DBOPT_GROUPNUM            = 295            )
+      parameter (DBOPT_GROUPORIGIN         = 296            )
+      parameter (DBOPT_NGROUPS             = 297            )
+      parameter (DBOPT_MATNAMES            = 298            )
+      parameter (DBOPT_EXTENTS_SIZE        = 299            )
+      parameter (DBOPT_EXTENTS             = 300            )
+      parameter (DBOPT_MATCOUNTS           = 301            )
+      parameter (DBOPT_MATLISTS            = 302            )
+      parameter (DBOPT_MIXLENS             = 303            )
+      parameter (DBOPT_ZONECOUNTS          = 304            )
+      parameter (DBOPT_HAS_EXTERNAL_ZONES  = 305            )
+      parameter (DBOPT_PHZONELIST          = 306            )
+      parameter (DBOPT_MATCOLORS           = 307            )
+      parameter (DBOPT_BNDNAMES            = 308            )
+      parameter (DBOPT_REGNAMES            = 309            )
+      parameter (DBOPT_ZONENAMES           = 310            )
+      parameter (DBOPT_HIDE_FROM_GUI       = 311            )
+      parameter (DBOPT_TOPO_DIM            = 312            )
+      parameter (DBOPT_REFERENCE           = 313            )
+      parameter (DBOPT_GROUPINGS_SIZE      = 314            )
+      parameter (DBOPT_GROUPINGS           = 315            )
+      parameter (DBOPT_GROUPINGNAMES       = 316            )
+      parameter (DBOPT_ALLOWMAT0           = 317            )
+      parameter (DBOPT_MRGTREE_NAME        = 318            )
+      parameter (DBOPT_REGION_PNAMES       = 319            )
+      parameter (DBOPT_TENSOR_RANK         = 320            )
+      parameter (DBOPT_MMESH_NAME          = 321            )
+      parameter (DBOPT_TV_CONNECTIVITY     = 322            )
+      parameter (DBOPT_DISJOINT_MODE       = 323            )
+      parameter (DBOPT_MRGV_ONAMES         = 324            )
+      parameter (DBOPT_MRGV_RNAMES         = 325            )
+      parameter (DBOPT_SPECNAMES           = 326            )
+      parameter (DBOPT_SPECCOLORS          = 327            )
+      parameter (DBOPT_LLONGNZNUM          = 328            )
+      parameter (DBOPT_CONSERVED           = 329            )
+      parameter (DBOPT_EXTENSIVE           = 330            )
+      parameter (DBOPT_MB_FILE_NS          = 331            )
+      parameter (DBOPT_MB_BLOCK_NS         = 332            )
+      parameter (DBOPT_MB_BLOCK_TYPE       = 333            )
+      parameter (DBOPT_MB_EMPTY_LIST       = 334            )
+      parameter (DBOPT_MB_EMPTY_COUNT      = 335            )
+      parameter (DBOPT_LAST                = 499            )
+      parameter (DBOPT_H5_FIRST            = 500            )
+      parameter (DBOPT_H5_VFD              = 500            )
+      parameter (DBOPT_H5_RAW_FILE_OPTS    = 501            )
+      parameter (DBOPT_H5_RAW_EXTENSION    = 502            )
+      parameter (DBOPT_H5_META_FILE_OPTS   = 503            )
+      parameter (DBOPT_H5_META_EXTENSION   = 504            )
+      parameter (DBOPT_H5_CORE_ALLOC_INC   = 505            )
+      parameter (DBOPT_H5_CORE_NO_BACK_STORE = 506            )
+      parameter (DBOPT_H5_META_BLOCK_SIZE  = 507            )
+      parameter (DBOPT_H5_SMALL_RAW_SIZE   = 508            )
+      parameter (DBOPT_H5_ALIGN_MIN        = 509            )
+      parameter (DBOPT_H5_ALIGN_VAL        = 510            )
+      parameter (DBOPT_H5_DIRECT_MEM_ALIGN = 511            )
+      parameter (DBOPT_H5_DIRECT_BLOCK_SIZE = 512            )
+      parameter (DBOPT_H5_DIRECT_BUF_SIZE  = 513            )
+      parameter (DBOPT_H5_LOG_NAME         = 514            )
+      parameter (DBOPT_H5_LOG_BUF_SIZE     = 515            )
+      parameter (DBOPT_H5_MPIO_COMM        = 516            )
+      parameter (DBOPT_H5_MPIO_INFO        = 517            )
+      parameter (DBOPT_H5_MPIP_NO_GPFS_HINTS = 518            )
+      parameter (DBOPT_H5_SIEVE_BUF_SIZE   = 519            )
+      parameter (DBOPT_H5_CACHE_NELMTS     = 520            )
+      parameter (DBOPT_H5_CACHE_NBYTES     = 521            )
+      parameter (DBOPT_H5_CACHE_POLICY     = 522            )
+      parameter (DBOPT_H5_FAM_SIZE         = 523            )
+      parameter (DBOPT_H5_FAM_FILE_OPTS    = 524            )
+      parameter (DBOPT_H5_USER_DRIVER_ID   = 525            )
+      parameter (DBOPT_H5_USER_DRIVER_INFO = 526            )
+      parameter (DBOPT_H5_SILO_BLOCK_SIZE  = 527            )
+      parameter (DBOPT_H5_SILO_BLOCK_COUNT = 528            )
+      parameter (DBOPT_H5_SILO_LOG_STATS   = 529            )
+      parameter (DBOPT_H5_SILO_USE_DIRECT  = 530            )
+      parameter (DBOPT_H5_LAST             = 599            )
+      parameter (DB_TOP                    = 0              )
+      parameter (DB_NONE                   = 1              )
+      parameter (DB_ALL                    = 2              )
+      parameter (DB_ABORT                  = 3              )
+      parameter (DB_SUSPEND                = 4              )
+      parameter (DB_RESUME                 = 5              )
+      parameter (DB_ALL_AND_DRVR           = 6              )
+      parameter (DB_ROWMAJOR               = 0              )
+      parameter (DB_COLMAJOR               = 1              )
+      parameter (DB_NOTCENT                = 0              )
+      parameter (DB_NODECENT               = 110            )
+      parameter (DB_ZONECENT               = 111            )
+      parameter (DB_FACECENT               = 112            )
+      parameter (DB_BNDCENT                = 113            )
+      parameter (DB_EDGECENT               = 114            )
+      parameter (DB_BLOCKCENT              = 115            )
+      parameter (DB_CARTESIAN              = 120            )
+      parameter (DB_CYLINDRICAL            = 121            )
+      parameter (DB_SPHERICAL              = 122            )
+      parameter (DB_NUMERICAL              = 123            )
+      parameter (DB_OTHER                  = 124            )
+      parameter (DB_RECTILINEAR            = 100            )
+      parameter (DB_CURVILINEAR            = 101            )
+      parameter (DB_AREA                   = 140            )
+      parameter (DB_VOLUME                 = 141            )
+      parameter (DB_ON                     = 1000           )
+      parameter (DB_OFF                    = -1000          )
+      parameter (DB_ABUTTING               = 142            )
+      parameter (DB_FLOATING               = 143            )
+      parameter (DB_VARTYPE_SCALAR         = 200            )
+      parameter (DB_VARTYPE_VECTOR         = 201            )
+      parameter (DB_VARTYPE_TENSOR         = 202            )
+      parameter (DB_VARTYPE_SYMTENSOR      = 203            )
+      parameter (DB_VARTYPE_ARRAY          = 204            )
+      parameter (DB_VARTYPE_MATERIAL       = 205            )
+      parameter (DB_VARTYPE_SPECIES        = 206            )
+      parameter (DB_VARTYPE_LABEL          = 207            )
+      parameter (DBCSG_QUADRIC_G           = 16777216       )
+      parameter (DBCSG_SPHERE_PR           = 33619968       )
+      parameter (DBCSG_ELLIPSOID_PRRR      = 33685504       )
+      parameter (DBCSG_PLANE_G             = 50331648       )
+      parameter (DBCSG_PLANE_X             = 50397184       )
+      parameter (DBCSG_PLANE_Y             = 50462720       )
+      parameter (DBCSG_PLANE_Z             = 50528256       )
+      parameter (DBCSG_PLANE_PN            = 50593792       )
+      parameter (DBCSG_PLANE_PPP           = 50659328       )
+      parameter (DBCSG_CYLINDER_PNLR       = 67108864       )
+      parameter (DBCSG_CYLINDER_PPR        = 67174400       )
+      parameter (DBCSG_BOX_XYZXYZ          = 83886080       )
+      parameter (DBCSG_CONE_PNLA           = 100663296      )
+      parameter (DBCSG_CONE_PPA            = 100728832      )
+      parameter (DBCSG_POLYHEDRON_KF       = 117440512      )
+      parameter (DBCSG_HEX_6F              = 117506048      )
+      parameter (DBCSG_TET_4F              = 117571584      )
+      parameter (DBCSG_PYRAMID_5F          = 117637120      )
+      parameter (DBCSG_PRISM_5F            = 117702656      )
+      parameter (DBCSG_QUADRATIC_G         = 134217728      )
+      parameter (DBCSG_CIRCLE_PR           = 150994944      )
+      parameter (DBCSG_ELLIPSE_PRR         = 151060480      )
+      parameter (DBCSG_LINE_G              = 167772160      )
+      parameter (DBCSG_LINE_X              = 167837696      )
+      parameter (DBCSG_LINE_Y              = 167903232      )
+      parameter (DBCSG_LINE_PN             = 167968768      )
+      parameter (DBCSG_LINE_PP             = 168034304      )
+      parameter (DBCSG_BOX_XYXY            = 184549376      )
+      parameter (DBCSG_ANGLE_PNLA          = 201326592      )
+      parameter (DBCSG_ANGLE_PPA           = 201392128      )
+      parameter (DBCSG_POLYGON_KP          = 218103808      )
+      parameter (DBCSG_TRI_3P              = 218169344      )
+      parameter (DBCSG_QUAD_4P             = 218234880      )
+      parameter (DBCSG_INNER               = 2130706432     )
+      parameter (DBCSG_OUTER               = 2130771968     )
+      parameter (DBCSG_ON                  = 2130837504     )
+      parameter (DBCSG_UNION               = 2130903040     )
+      parameter (DBCSG_INTERSECT           = 2130968576     )
+      parameter (DBCSG_DIFF                = 2131034112     )
+      parameter (DBCSG_COMPLIMENT          = 2131099648     )
+      parameter (DBCSG_XFORM               = 2131165184     )
+      parameter (DBCSG_SWEEP               = 2131230720     )
+      parameter (DB_PREORDER               = 1              )
+      parameter (DB_POSTORDER              = 2              )
+      parameter (DB_FROMCWR                = 4              )
+      parameter (DB_F77NULL                = (-99)          )
+      parameter (DB_ZONETYPE_BEAM          = 10             )
+      parameter (DB_ZONETYPE_POLYGON       = 20             )
+      parameter (DB_ZONETYPE_TRIANGLE      = 23             )
+      parameter (DB_ZONETYPE_QUAD          = 24             )
+      parameter (DB_ZONETYPE_POLYHEDRON    = 30             )
+      parameter (DB_ZONETYPE_TET           = 34             )
+      parameter (DB_ZONETYPE_PYRAMID       = 35             )
+      parameter (DB_ZONETYPE_PRISM         = 36             )
+      parameter (DB_ZONETYPE_HEX           = 38             )
+      parameter (DB_F77NULLSTRING          = "NULLSTRING"   )
+
+
+! End.
diff --git a/src/silo/silo_drivers.h b/src/silo/silo_drivers.h
new file mode 100644
index 0000000..31022bd
--- /dev/null
+++ b/src/silo/silo_drivers.h
@@ -0,0 +1,292 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * Programmer:  Robb Matzke <robb at arborea.spizella.com>
+ *              Tuesday, February  9, 1999
+ */
+#ifndef SILO_DRIVERS_H
+#define SILO_DRIVERS_H
+
+
+/*
+ * SILO drivers header file.
+ *
+ * This file contains the definitions for SILO drivers and should be included
+ * by every SILO source file that defines DB_MAIN.
+ *
+ * Normally, programs cannot tell if a particular driver is defined by just
+ * including silo.h.  To determine if a driver is defined, include this file.
+ */
+#include "config.h" /* Included for driver tests */
+#include "silo.h"
+
+/*
+ * Get rid of the driver definitions from silo.h so that we can define the
+ * actual drivers.
+ */
+#undef DB_NETCDF
+#undef DB_PDB
+#undef DB_PDBP
+#undef DB_TAURUS
+#undef DB_UNKNOWN
+#undef DB_DEBUG
+#undef DB_HDF5X
+
+/* Now set up the real driver definitions. */
+#ifdef HAVE_NETCDF_DRIVER
+#  define DB_NETCDF
+#endif
+#ifdef HAVE_PDB_DRIVER
+#  define DB_PDB
+#endif
+#ifdef HAVE_PDBP_DRIVER
+#  define DB_PDBP
+#endif
+#ifdef HAVE_TAURUS_DRIVER
+#  define DB_TAURUS
+#endif
+#define DB_UNKNOWN
+#define DB_DEBUG
+#ifdef HAVE_HDF5_DRIVER
+#  define DB_HDF5X
+#endif
+
+/*-------------------------------------------------------------------------
+ * Conditionally include definitions for the file formats that the application
+ * is about to use.  As we include the format header files, we should make
+ * sure that the file format constant is properly defined.  Each file format
+ * should be given a unique small integer that will be used as an index into
+ * an array.  If a new file format is added, be sure to increment the value
+ * of DB_NFORMATS.
+ *
+ * Don't use slot `1' of these arrays as that reduces the error checking if
+ * the user doesn't spell the format name correctly.
+ *
+ * Anyone can change this info as long as the DB_NFORMATS constant doesn't
+ * change.  If anything else changes, the silo library must be recompiled.
+ *
+ * Opening a database file of type DB_UNKNOWN will try to open the database
+ * file with each driver that is defined beginning with the lowest numbered
+ * driver.  Therefore, the most specific drivers should be listed first.
+ *-------------------------------------------------------------------------
+ */
+#ifdef DB_NETCDF
+#undef  DB_NETCDF
+#define DB_NETCDF            0
+#define DB_NETCDF_OPEN     db_cdf_Open
+#define DB_NETCDF_CREATE   NULL
+#define DB_NETCDF_FSINGLE  db_cdf_ForceSingle
+
+extern DBfile *db_cdf_Open(char *, int, int);
+extern int db_cdf_ForceSingle(int);
+
+#else
+#define DB_NETCDF_OPEN     NULL
+#define DB_NETCDF_CREATE   NULL
+#define DB_NETCDF_FSINGLE  NULL
+#endif
+
+/* Slot 1 is for PDB Proper */
+#ifdef DB_PDBP
+#undef  DB_PDBP
+#define DB_PDBP       1
+#define DB_PDBP_OPEN        db_pdbp_Open
+#define DB_PDBP_CREATE      db_pdbp_Create
+#define DB_PDBP_FSINGLE     db_pdbp_ForceSingle
+
+extern DBfile *db_pdbp_Open(char *, int, int);
+extern DBfile *db_pdbp_Create(char *, int, int, int, char *);
+extern int db_pdbp_ForceSingle(int);
+
+#else
+#define DB_PDBP_OPEN        NULL
+#define DB_PDBP_CREATE      NULL
+#define DB_PDBP_FSINGLE     NULL
+#endif
+
+/* Slot 2 is PDB Lite */
+#ifdef DB_PDB
+#undef  DB_PDB
+#define DB_PDB       2
+#define DB_PDB_OPEN        db_pdb_Open
+#define DB_PDB_CREATE      db_pdb_Create
+#define DB_PDB_FSINGLE     db_pdb_ForceSingle
+
+extern DBfile *db_pdb_Open(char *, int, int);
+extern DBfile *db_pdb_Create(char *, int, int, int, char *);
+extern int db_pdb_ForceSingle(int);
+
+#else
+#define DB_PDB_OPEN        NULL
+#define DB_PDB_CREATE      NULL
+#define DB_PDB_FSINGLE     NULL
+#endif
+
+#ifdef DB_TAURUS
+#undef  DB_TAURUS
+#define DB_TAURUS            3
+#define DB_TAURUS_OPEN     db_taur_Open
+#define DB_TAURUS_CREATE   NULL
+#define DB_TAURUS_FSINGLE  NULL
+
+extern DBfile *db_taur_Open(char *, int, int);
+
+#else
+#define DB_TAURUS_OPEN     NULL
+#define DB_TAURUS_CREATE   NULL
+#define DB_TAURUS_FSINGLE  NULL
+#endif
+
+#ifdef DB_UNKNOWN               /*For opening files of unknown type */
+#undef  DB_UNKNOWN
+#define DB_UNKNOWN           5
+#define DB_UNKNOWN_OPEN    db_unk_Open
+#define DB_UNKNOWN_CREATE  NULL
+#define DB_UNKNOWN_FSINGLE NULL
+
+extern DBfile *db_unk_Open(char *, int, int);
+
+#else
+#define DB_UNKNOWN_OPEN    NULL
+#define DB_UNKNOWN_CREATE  NULL
+#define DB_UNKNOWN_FSINGLE NULL
+#endif
+
+#ifdef DB_DEBUG                 /*A Demo */
+#undef  DB_DEBUG
+#define DB_DEBUG           6
+#define DB_DEBUG_OPEN      db_debug_open
+#define DB_DEBUG_CREATE    db_debug_create
+#define DB_DEBUG_FSINGLE   NULL
+
+extern DBfile *db_debug_open(char *, int, int);
+extern DBfile *db_debug_create(char *, int, int, int, char *);
+
+#else
+#define DB_DEBUG_OPEN      NULL
+#define DB_DEBUG_CREATE    NULL
+#define DB_DEBUG_FSINGLE   NULL
+#endif
+
+#ifdef DB_HDF5X
+#undef DB_HDF5X
+#define DB_HDF5X            7
+#define DB_HDF5_OPEN       db_hdf5_Open
+#define DB_HDF5_CREATE     db_hdf5_Create
+#define DB_HDF5_FSINGLE    db_hdf5_ForceSingle
+
+extern DBfile *db_hdf5_Open(char*, int, int);
+extern DBfile *db_hdf5_Create(char*, int, int, int, char*);
+extern int db_hdf5_ForceSingle(int);
+
+#else
+#define DB_HDF5_OPEN       NULL
+#define DB_HDF5_CREATE     NULL
+#define DB_HDF5_FSINGLE    NULL
+#endif
+
+/*
+ * If DB_NFORMATS is changed, the silo library must be recompiled!
+ */
+#define DB_NFORMATS     10          /*Total number of file formats */
+
+#ifdef DB_MAIN
+/*-------------------------------------------------------------------------
+ * The DBOpen and DBCreate functions/macros reference global variables
+ * DBOpenCB and DBCreateCB which are arrays of pointers to open and
+ * create functions for the various file types.
+ *
+ * The items in this array must be listed in order of file format type,
+ * since the file format type will be used to index the array.
+ *-------------------------------------------------------------------------
+ */
+#define DBOPENCB        {DB_NETCDF_OPEN,        \
+                         DB_PDBP_OPEN,          \
+                         DB_PDB_OPEN,           \
+                         DB_TAURUS_OPEN,        \
+                         NULL,                  /*unused*/\
+                         DB_UNKNOWN_OPEN,       \
+                         DB_DEBUG_OPEN,         \
+                         DB_HDF5_OPEN,          \
+                         NULL,                  /*unused*/\
+                         NULL}                  /*unused*/
+
+#define DBCREATECB      {DB_NETCDF_CREATE,      \
+                         DB_PDBP_CREATE,        \
+                         DB_PDB_CREATE,         \
+                         DB_TAURUS_CREATE,      \
+                         NULL,                  /*unused*/\
+                         DB_UNKNOWN_CREATE,     \
+                         DB_DEBUG_CREATE,       \
+                         DB_HDF5_CREATE,        \
+                         NULL,                  /*unused*/\
+                         NULL}                  /*unused*/
+
+#define DBFSINGLECB     {DB_NETCDF_FSINGLE,     \
+                         DB_PDBP_FSINGLE,       \
+                         DB_PDB_FSINGLE,        \
+                         DB_TAURUS_FSINGLE,     \
+                         NULL,                  /*unused*/\
+                         DB_UNKNOWN_FSINGLE,    \
+                         DB_DEBUG_FSINGLE,      \
+                         DB_HDF5_FSINGLE,       \
+                         NULL,                  /*unused*/\
+                         NULL}                  /*unused*/
+
+DBfile *(*DBOpenCB[DB_NFORMATS]) (char *, int, int) = DBOPENCB;
+DBfile *(*DBCreateCB[DB_NFORMATS]) (char *, int, int, int, char *) = DBCREATECB;
+int     (*DBFSingleCB[DB_NFORMATS]) (int) = DBFSINGLECB;
+#endif /* DB_MAIN */
+
+#endif /* !SILO_DRIVERS_H */
diff --git a/src/silo/silo_f.c b/src/silo/silo_f.c
new file mode 100644
index 0000000..d6910ad
--- /dev/null
+++ b/src/silo/silo_f.c
@@ -0,0 +1,5373 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * SILO FORTRAN Interface.
+ */
+#include <stdio.h>
+#include "silo_private.h"
+#include "silo_f.h"
+
+/* Array of pointers that Fortran accesses */
+static void  **DBFortranPointers = NULL;
+static int     DBMaxFortranPointer = 0;
+static int     DBFortranEmptyPointerSpaces = 0;
+static int     fortran2DStrLen = 32;
+
+/*----------------------------------------------------------------------
+ * Routine                                           DBFortranAccessPointer
+ *
+ * Programmer
+ *     Sean Ahern
+ *     Mon Apr 10 19:21:46 PDT 1995
+ *
+ * Purpose
+ *     Access an entry in the DBFortranPointers array.
+ *
+ * Notes
+ *     The fortran value starts at 1.
+ *
+ * Returns
+ *     Returns a void* from the DBFortranPointers array.
+ *
+ * Modifications
+ *
+ *     Jim Reus, 23 Apr 97
+ *     Changed to prototype form.
+ *
+ *     Eric Brugger, Tue Jun 17 11:12:38 PDT 1997
+ *     I made the routine externally accessable.
+ *
+ *--------------------------------------------------------------------*/
+void *
+DBFortranAccessPointer (int value)
+{
+    static char    *me = "DBFortranAccessPointer";
+
+    if (value == DB_F77NULL)
+    {
+        return (NULL);
+    }
+    if ((value < 1) || (value > DBMaxFortranPointer))
+    {
+        db_perror(NULL, E_BADARGS, me);
+        return (NULL);
+    } else
+        return (DBFortranPointers[value - 1]);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                            DBFortranAllocPointer
+ *
+ * Programmer
+ *     Sean Ahern
+ *     Mon Apr 10 19:21:46 PDT 1995
+ *
+ * Purpose
+ *     Add an entry to the DBFortranPointers array, allocating memory
+ *     if needed.
+ *
+ * Notes
+ *     The first value (array element 0) is given to Fortran as 1
+ *
+ * Returns
+ *     Returns an integer index into the DBFortranPointer array.
+ *     Returns -1 on error (NULL is passed is one example).
+ *
+ * Modifications:
+ *
+ *     Jim Reus, 23 Apr 97
+ *     Changed to prototype form.
+ *
+ *     Sean Ahern, Tue Feb  1 15:52:31 PST 2000
+ *     Made this function publically accessible.
+ *
+ *--------------------------------------------------------------------*/
+int
+DBFortranAllocPointer(void *pointer)
+{
+    int            i;
+    int            found = -1;
+    static char   *me = "DBFortranAllocPointer";
+
+    if (pointer == NULL)
+        return (DB_F77NULL);
+
+    if (DBFortranPointers == NULL) {
+        DBFortranPointers = ALLOC(void *);
+
+        if (DBFortranPointers == NULL) {
+            db_perror(NULL, E_NOMEM, me);
+            return (DB_F77NULL);
+        }
+        DBFortranPointers[0] = pointer;
+        DBMaxFortranPointer = 1;
+        return (1);
+    }
+    else {
+        /* Check for NULL space */
+        if (DBFortranEmptyPointerSpaces > 0) {
+            for (i = 0; i < DBMaxFortranPointer; i++)
+                if (DBFortranPointers[i] == NULL)
+                    found = i;
+        }
+
+        /* Found a NULL space.  Use it */
+        if (found != -1) {
+            DBFortranPointers[found] = pointer;
+            DBFortranEmptyPointerSpaces--;
+            return (found + 1);
+        }
+        else {
+            /* No NULL space found.  Make room. */
+            /* I am using realloc instead of REALLOC because the REALLOC macro
+             * hates allocating pointers */
+            DBFortranPointers = (void **)realloc(DBFortranPointers,
+                             sizeof(void *) * (DBMaxFortranPointer + 1));
+
+            if (DBFortranPointers == NULL) {
+                db_perror(NULL, E_NOMEM, me);
+                return (DB_F77NULL);
+            }
+            DBFortranPointers[DBMaxFortranPointer] = pointer;
+            DBMaxFortranPointer++;
+            return (DBMaxFortranPointer);
+        }
+    }
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                        DBFortranRemovePointer
+ *
+ * Programmer
+ *     Sean Ahern
+ *     Mon Apr 10 19:21:46 PDT 1995
+ *
+ * Purpose
+ *     Remove an entry from the DBFortranPointers array.
+ *
+ * Returns
+ *     Returns nothing.
+ *
+ * Modifications
+ *
+ *     Robb Matzke, 15 May 1996
+ *     Removed the unused `i' auto variable.
+ *
+ *     Jim Reus, 23 Apr 97
+ *     Changed to prototype form.
+ *
+ *     Sean Ahern, Mon Nov 22 12:43:22 PST 1999
+ *     Moved the test of the value range up before we use the value.  We 
+ *     wouldn't want to walk into bad memory.
+ *
+ *     Sean Ahern, Tue Feb  1 15:53:01 PST 2000
+ *     Made this function publically accessible.
+ *
+ *--------------------------------------------------------------------*/
+void
+DBFortranRemovePointer (int value)
+{
+    static char   *me = "DBFortranRemovePointer";
+
+    if ((value > DBMaxFortranPointer) || (value < 1)) {
+        db_perror(NULL, E_BADARGS, me);
+        return;
+    }
+
+    if (DBFortranPointers[value - 1] == NULL) {
+        db_perror(NULL, E_BADARGS, me);
+        return;
+    }
+
+    DBFortranPointers[value-1] = NULL;
+    DBFortranEmptyPointerSpaces++;
+}
+
+SILO_API FORTRAN
+DBMKPTR_FC (void *p)
+{
+    return DBFortranAllocPointer(p);
+}
+
+SILO_API FORTRAN
+DBRMPTR_FC (int *pid)
+{
+    DBFortranRemovePointer(*pid);
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDIOPT_FC
+ *
+ * Purpose
+ *     Add an integer option to the given option list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDIOPT_FC (int *optlist_id, int *option, int *ivalue)
+{
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbaddiopt", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (!optlist)
+            API_ERROR("optlist_id", E_BADARGS);
+        if (optlist->numopts >= optlist->maxopts)
+            API_ERROR("optlist numopts", E_BADARGS);
+
+        optlist->options[optlist->numopts] = *option;
+        optlist->values[optlist->numopts] = ivalue;
+        optlist->numopts++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDROPT_FC
+ *
+ * Purpose
+ *     Add a real option to the given option list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0.  On error, it calles API_ERROR.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDROPT_FC (int *optlist_id, int *option, float *rvalue)
+{
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbaddropt", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (!optlist)
+            API_ERROR("optlist_id", E_BADARGS);
+        if (optlist->numopts >= optlist->maxopts)
+            API_ERROR("optlist numopts", E_BADARGS);
+
+        optlist->options[optlist->numopts] = *option;
+        optlist->values[optlist->numopts] = rvalue;
+        optlist->numopts++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDDOPT_FC
+ *
+ * Purpose
+ *     Add a double precision option to the given option list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDDOPT_FC (int *optlist_id, int *option, double *dvalue)
+{
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbadddopt", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (!optlist)
+            API_ERROR("optlist_id", E_BADARGS);
+        if (optlist->numopts >= optlist->maxopts)
+            API_ERROR("optlist numopts", E_BADARGS);
+
+        optlist->options[optlist->numopts] = *option;
+        optlist->values[optlist->numopts] = dvalue;
+        optlist->numopts++;
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDCOPT_FC
+ *
+ * Purpose
+ *     Add a character option to the given option list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Warning
+ *     THIS FUNCTION CAUSES A MEMORY LEAK. The temporary string,
+ *     cval, is never freed.  It is put in the optlist instead.
+ *
+ * Returns
+ *
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Eric Brugger, Thu Mar 14 11:06:07 PST 1996
+ *     I corrected a bug where the copy of cvalue was always freed,
+ *     causing the option value to always be NULL, causing the routine
+ *     to never work.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDCOPT_FC (int *optlist_id, int *option, FCD_DB cvalue, int *lcvalue)
+{
+    char          *cval = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbaddcopt", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (!optlist)
+            API_ERROR("optlist_id", E_BADARGS);
+        if (*lcvalue <= 0)
+            API_ERROR("lcvalue", E_BADARGS);
+        if (optlist->numopts >= optlist->maxopts)
+            API_ERROR("optlist numopts", E_BADARGS);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+#ifdef CRAY
+        if (strcmp(_fcdtocp(cvalue), DB_F77NULLSTRING) == 0)
+            API_ERROR("cvalue", E_BADARGS);
+        cval = SW_strndup(_fcdtocp(cvalue), *lcvalue);
+#else
+        if (strcmp(cvalue, DB_F77NULLSTRING) == 0)
+            API_ERROR("cvalue", E_BADARGS);
+        cval = SW_strndup(cvalue, *lcvalue);
+#endif
+
+        optlist->options[optlist->numopts] = *option;
+        optlist->values[optlist->numopts] = cval;
+        optlist->numopts++;
+    }
+    API_END;
+
+    return(0);
+}
+/*-------------------------------------------------------------------------
+ * Routine                                                    DBADDCAOPT_FC
+ * 
+ * Purpose
+ *     Add a character array option to the given option list.
+ *     
+ * Notes
+ *     This function was built to be called from Fortran.
+ *     Start of "#ifdef CRAY" deprecation.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Thomas R. Treadway
+ *     Tue Jul 25 11:04:37 PDT 2006
+ *
+ * Modifications
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDCAOPT_FC (int *optlist_id, int *option,
+             int *nval, FCD_DB cvalue, int *lcvalue)
+{
+    char          **cval = NULL;
+    char          *names = NULL;
+    DBoptlist     *optlist = NULL;
+    int           indx, i;
+
+    API_BEGIN("dbaddaopt", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (!optlist)
+            API_ERROR("optlist_id", E_BADARGS);
+
+        if (strcmp(cvalue, DB_F77NULLSTRING) == 0)
+            names = NULL;
+        else
+            names = cvalue;
+
+        if (*nval <= 0)
+            API_ERROR("nval", E_BADARGS);
+        cval = ALLOC_N(char *, *nval);
+
+        for (indx = 0, i = 0; i < *nval; i++) {
+            if (lcvalue[i] < 0)
+                API_ERROR("lcvalue", E_BADARGS);
+            cval[i] = SW_strndup(&names[indx], lcvalue[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lcvalue[i];
+        }
+        optlist->options[optlist->numopts] = *option;
+        optlist->values[optlist->numopts] = cval;
+        optlist->numopts++;
+
+/*** Can't free this memory without removing the data! ***/
+/***
+        for (i = 0; i < *nval; i++)
+            FREE(cval[i]);
+        FREE(cval);
+ ***/
+
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                DBMKOPTLIST_FC
+ *
+ * Purpose
+ *     Create an option list and return its identifier.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBMKOPTLIST_FC (int *maxopts, int *optlist_id)
+{
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbmkoptlist", int, -1) {
+        if (*maxopts <= 0)
+            API_ERROR("maxopts", E_BADARGS);
+
+        optlist = DBMakeOptlist(*maxopts);
+        *optlist_id = DBFortranAllocPointer(optlist);
+
+        API_RETURN(optlist ? 0 : (-1));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                              DBFREEOPTLIST_FC
+ *
+ * Purpose
+ *     Free an option list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBFREEOPTLIST_FC (int *optlist_id)
+{
+    int            err;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbfreeoptlist", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        err = DBFreeOptlist(optlist);
+        DBFortranRemovePointer(*optlist_id);
+        *optlist_id = -1;
+        API_RETURN(err);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                   DBPUTMAT_FC
+ *
+ * Purpose
+ *     Write a material data object into the given SILO file.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Sean Ahern, Wed Apr 12 12:09:20 PDT 1995
+ *     Added a DBoptlist lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMAT_FC (int *dbid, FCD_DB name,
+           int *lname, FCD_DB meshname, int *lmeshname,
+           int *nmat, int *matnos, int *matlist, int *dims, int *ndims,
+           int *mix_next, int *mix_mat, int *mix_zone, DB_DTPTR1 mix_vf,
+           int *mixlen, int *datatype, int *optlist_id, int *status)
+{
+    int           *mixz = NULL;
+    char          *nm = NULL, *mnm = NULL;
+    DBfile        *dbfile = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputmat", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+
+        if (strcmp(_fcdtocp(meshname), DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(_fcdtocp(meshname), *lmeshname);
+#else
+        if (strcmp(meshname, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+
+        if (strcmp(meshname, DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(meshname, *lmeshname);
+#endif
+
+      /*---------------------------------------------
+       *  Check for "null" arrays. The convention is
+       *  that a DB_F77NULL indicates a null array.
+       *--------------------------------------------*/
+
+        mixz = (mix_zone[0] == DB_F77NULL) ? NULL : mix_zone;
+
+        *status = DBPutMaterial(dbfile, nm, mnm, *nmat, matnos, matlist,
+                           dims, *ndims, mix_next, mix_mat, mixz, mix_vf,
+                                *mixlen, *datatype, optlist);
+
+        FREE(nm);
+        FREE(mnm);
+        API_RETURN((*status >= 0) ? 0 : (-1));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                   DBPUTMSP_FC
+ *
+ * Purpose
+ *     Write a material species data object into the given SILO file.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMSP_FC (int *dbid, FCD_DB name, int *lname, FCD_DB matname, int *lmatname,
+           int *nmat, int *nmatspec, int *speclist, int *dims, int *ndims,
+           int *nspecies_mf, DB_DTPTR1 species_mf, int *mix_speclist, int *mixlen,
+           int *datatype, int *optlist_id, int *status)
+{
+    char          *nm = NULL, *mnm = NULL;
+    DBfile        *dbfile = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputmsp", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+
+        if (strcmp(_fcdtocp(matname), DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(_fcdtocp(matname), *lmatname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+
+        if (strcmp(matname, DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(matname, *lmatname);
+#endif
+
+        *status = DBPutMatspecies(dbfile, nm, mnm, *nmat, nmatspec,
+                                  speclist, dims, *ndims, *nspecies_mf,
+                                  species_mf, mix_speclist, *mixlen,
+                                  *datatype, optlist);
+
+        FREE(nm);
+        FREE(mnm);
+        API_RETURN((*status >= 0) ? 0 : (-1));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                   DBCALCFL_FC
+ *
+ * Programmer
+ *     Jeffery W. Long, NSSD-B
+ *
+ * Notes
+ *     This is the Fortran-callable version of DBCalcExternalFacelist.  It
+ *     creates an external facelist, and it returns the pointer to the
+ *     facelist data structure.  This pointer can be written into a SILO
+ *     file with the function DBWRTFL.
+ *
+ *     If the boundary method is > 0, then certain faces on material
+ *     boundaries should be treated as external. The method for
+ *     determining this is defined as follows:
+ *
+ *     0 =  Material boundaries should not be used in
+ *          computing external faces.
+ *     1 =  Material boundaries occuring between two
+ *          clean zones should be marked as external.
+ *     2 =  Material boundaries occuring between two clean
+ *          zones, or between one clean and one mixed zone,
+ *          should be marked as external (but only the face
+ *          from the clean zone will be so marked, the face
+ *          from the mixed zone will be marked as internal)
+ *     4 =  Same as 2, except both faces will always be
+ *          marked as external.
+ *
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Fri Apr 21 14:00:55 PDT 1995
+ *     Added a call to DBFortranAllocPointer to store
+ *     the facelist pointer in the global DBFortranPointers
+ *     array.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBCALCFL_FC (int *znodelist, int *nnodes, int *origin, int *zshapesize,
+           int *zshapecnt, int *nzshapes, int *matlist, int *bnd_method,
+           int *object_id)
+{
+    DBfacelist    *fl = NULL;
+
+    API_BEGIN("dbcalcfl", int, -1) {
+        fl = DBCalcExternalFacelist(znodelist, *nnodes, *origin, zshapesize,
+                                    zshapecnt, *nzshapes,
+                               (*matlist == DB_F77NULL) ? NULL : matlist,
+                                    *bnd_method);
+        *object_id = DBFortranAllocPointer(fl);
+
+        API_RETURN((fl == NULL) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routinex                                                      DBCLOSE_FC
+ *
+ * Purpose
+ *     Close a database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:41:32 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Mon Mar 20 14:59:08 PST 1995
+ *     I added a status return value.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995 Added a
+ *     DBfile lookup in a global array using
+ *     DBFortranAccessPointer.  Also added a call to
+ *     DBFortranRemovePointer to clear a DBfile* from the
+ *     global array.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Nov  5 08:58:42 PST 2009
+ *     Added *dbid = -1
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBCLOSE_FC (int *dbid)
+{
+    int            status;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbclose", int, -1) {
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        status = DBClose(dbfile);
+        DBFortranRemovePointer(*dbid);
+        *dbid = -1;
+        API_RETURN(status);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBCREATE_FC
+ *
+ * Purpose
+ *     Create a new database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:43:57 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:08:16 PDT 1995
+ *     Added a DBFortranAllocPointer call to put the DBfile*
+ *     in a global array.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBCREATE_FC (FCD_DB pathname, int *lpathname, int *mode, int *target,
+           FCD_DB fileinfo, int *lfileinfo, int *filetype, int *dbid)
+{
+    char          *path = NULL, *finfo = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbcreate", int, -1) {
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+#ifdef CRAY
+        if (strcmp(_fcdtocp(pathname), DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(_fcdtocp(pathname), *lpathname);
+
+        if (strcmp(_fcdtocp(fileinfo), DB_F77NULLSTRING) == 0)
+            finfo = NULL;
+        else
+            finfo = SW_strndup(_fcdtocp(fileinfo), *lfileinfo);
+#else
+        if (strcmp(pathname, DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(pathname, *lpathname);
+
+        if (strcmp(fileinfo, DB_F77NULLSTRING) == 0)
+            finfo = NULL;
+        else
+            finfo = SW_strndup(fileinfo, *lfileinfo);
+#endif
+
+        /*------------------------------
+         *  Create file and assign dbid.
+         *-----------------------------*/
+        dbfile = DBCreate(path, *mode, *target, finfo, *filetype);
+
+        FREE(path);
+        FREE(finfo);
+
+        *dbid = DBFortranAllocPointer(dbfile);
+
+        API_RETURN(dbfile ? 0 : (-1));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBINQLEN_FC
+ *
+ * Purpose
+ *     Returns the number of elements of the requested variable.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:46:42 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBINQLEN_FC (int *dbid, FCD_DB varname, int *lvarname, int *len)
+{
+    char          *varnm = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbinqlen", int, -1) {
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        *len = DBGetVarLength(dbfile, varnm);
+
+        FREE(varnm);
+
+        if (*len < 0) {
+            *len = 0;
+            API_RETURN(-1);
+        }
+        else
+            API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBMKDIR_FC
+ *
+ * Purpose
+ *     Creates a new directory.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:49:25 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBMKDIR_FC (int *dbid, FCD_DB dirname, int *ldirname, int *status)
+{
+    char          *dir = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbmkdir", int, -1) {
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*ldirname <= 0)
+            API_ERROR("ldirname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(dirname), DB_F77NULLSTRING) == 0)
+            dir = NULL;
+        else
+            dir = SW_strndup(_fcdtocp(dirname), *ldirname);
+#else
+        if (strcmp(dirname, DB_F77NULLSTRING) == 0)
+            dir = NULL;
+        else
+            dir = SW_strndup(dirname, *ldirname);
+#endif
+
+        /*------------------------------
+         *  Create directory.
+         *-----------------------------*/
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        *status = DBMkDir(dbfile, dir);
+
+        FREE(dir);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                        DBOPEN_FC
+ *
+ * Purpose
+ *     Open an existing database
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:53:00 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:08:16 PDT 1995
+ *     Added a DBFortranAllocPointer call to put the DBfile*
+ *     in a global array.
+ *
+ *     Sean Ahern, Wed Jan 17 17:06:07 PST 1996
+ *     Added the mode parameter.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBOPEN_FC (FCD_DB pathname, int *lpathname, int *type, int *mode, int *dbid)
+{
+    char          *path = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbopen", int, -1) {
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lpathname <= 0)
+            API_ERROR("lpathname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(pathname), DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(_fcdtocp(pathname), *lpathname);
+#else
+        if (strcmp(pathname, DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(pathname, *lpathname);
+#endif
+
+        /*------------------------------
+         *  Open file and assign dbid.
+         *-----------------------------*/
+        dbfile = DBOpen(path, *type, *mode);
+
+        FREE(path);
+
+        *dbid = DBFortranAllocPointer(dbfile);
+        API_RETURN((dbfile == NULL) ? -1 : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTFL_FC
+ *
+ * Purpose
+ *     Write a facelist object into the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 12:55:31 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Mon Mar 20 14:59:57 PST 1995
+ *     Added assignment to *status.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTFL_FC (int *dbid, FCD_DB name, int *lname, int *nfaces, int *ndims,
+          int *nodelist, int *lnodelist, int *origin, int *zoneno,
+          int *shapesize, int *shapecnt, int *nshapes, int *types,
+          int *typelist, int *ntypes, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *nm = NULL;
+
+    API_BEGIN("dbputfl", int, -1) {
+        /*------------------------------
+         *  Initializations.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        /*---------------------------------------------
+         *  Check for "null" arrays. The convention is
+         *  that a -1 indicates a null array.
+         *--------------------------------------------*/
+
+        *status = DBPutFacelist(dbfile, nm, *nfaces, *ndims,
+                                nodelist, *lnodelist, *origin, zoneno,
+                                shapesize, shapecnt, *nshapes,
+                                types, typelist, *ntypes);
+
+        FREE(nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBWRTFL_FC
+ *
+ * Purpose
+ *     Write a facelist object into the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     brugger at aria
+ *     Wed Sep 13 08:02:04 PDT 1995
+ *
+ * Modifications
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBWRTFL_FC (int *dbid, FCD_DB name, int *lname, int *object_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    DBfacelist    *fl = NULL;
+    char          *nm = NULL;
+
+    API_BEGIN("dbputfl", int, -1) {
+        /*------------------------------
+         *  Initializations.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        fl = (DBfacelist *) DBFortranAccessPointer(*object_id);
+
+        /*---------------------------------------------
+         *  Check for "null" arrays. The convention is
+         *  that a -1 indicates a null array.
+         *--------------------------------------------*/
+
+        *status = DBPutFacelist(dbfile, nm, fl->nfaces, fl->ndims,
+                                fl->nodelist, fl->lnodelist, fl->origin,
+                                fl->zoneno, fl->shapesize, fl->shapecnt,
+                                fl->nshapes, fl->types, fl->typelist,
+                                fl->ntypes);
+
+        FREE(nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                    DBPUTMMESH_FC
+ *
+ * Purpose
+ *     Writes a multi-block mesh object into the open database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:00:17 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMMESH_FC (int *dbid, FCD_DB name, int *lname, int *nmesh, FCD_DB meshnames,
+             int *lmeshnames, int *meshtypes, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char         **meshnms = NULL, *nm = NULL;
+    char          *realmeshnames = NULL;
+    int            i, indx;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputmmesh", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(meshnames), DB_F77NULLSTRING) == 0)
+            realmeshnames = NULL;
+        else
+            realmeshnames = _fcdtocp(meshnames);
+#else
+        if (strcmp(meshnames, DB_F77NULLSTRING) == 0)
+            realmeshnames = NULL;
+        else
+            realmeshnames = meshnames;
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (*nmesh <= 0)
+            API_ERROR("nmesh", E_BADARGS);
+        meshnms = ALLOC_N(char *, *nmesh);
+
+        for (indx = 0, i = 0; i < *nmesh; i++) {
+            if (lmeshnames[i] < 0)
+                API_ERROR("lmeshnames", E_BADARGS);
+            meshnms[i] = SW_strndup(&realmeshnames[indx], lmeshnames[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lmeshnames[i];
+        }
+
+        /*----------------------------------------
+         *  Invoke the C function to do the work.
+         *---------------------------------------*/
+        *status = DBPutMultimesh(dbfile, nm, *nmesh, meshnms,
+                                 meshtypes, optlist);
+
+        for (i = 0; i < *nmesh; i++)
+            FREE(meshnms[i]);
+        FREE(nm);
+        FREE(meshnms);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                  DBPUTDEFVARS_FC
+ *
+ * Purpose
+ *     Writes a defvars object into the open database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     October 12, 2005
+ *
+ * Modifications:
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTDEFVARS_FC (int *dbid, FCD_DB name, int *lname, int *ndefs, FCD_DB names,
+             int *lnames, int *types, FCD_DB defns, int *ldefns,
+             int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char         **nms = NULL, **defs = NULL, *nm = NULL;
+    char          *realnms = NULL, *realdefs = NULL;
+    int            i, indx;
+    DBoptlist     **optlists = NULL;
+
+    API_BEGIN("dbputdefvars", int, -1) {
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+        if (*ndefs <= 0)
+            API_ERROR("ndefs", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(names), DB_F77NULLSTRING) == 0)
+            realnms = NULL;
+        else
+            realnms = _fcdtocp(names);
+#else
+        if (strcmp(names, DB_F77NULLSTRING) == 0)
+            realnms = NULL;
+        else
+            realnms = names;
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(defns), DB_F77NULLSTRING) == 0)
+            realdefs = NULL;
+        else
+            realdefs = _fcdtocp(defns);
+#else
+        if (strcmp(defns, DB_F77NULLSTRING) == 0)
+            realdefs = NULL;
+        else
+            realdefs = defns;
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        nms = ALLOC_N(char *, *ndefs);
+        for (indx = 0, i = 0; i < *ndefs; i++) {
+            if (lnames[i] < 0)
+                API_ERROR("lnames", E_BADARGS);
+            nms[i] = SW_strndup(&realnms[indx], lnames[i]);
+            if (fortran2DStrLen > 0)
+               indx += fortran2DStrLen;
+            else
+                indx += lnames[i] ;
+        }
+        defs = ALLOC_N(char *, *ndefs);
+        for (indx = 0, i = 0; i < *ndefs; i++) {
+            if (ldefns[i] < 0)
+                API_ERROR("ldefns", E_BADARGS);
+            defs[i] = SW_strndup(&realdefs[indx], ldefns[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += ldefns[i] ;
+        }
+        optlists = ALLOC_N(DBoptlist*, *ndefs);
+        for (i = 0; i < *ndefs; i++) {
+            optlists[i] = (DBoptlist *) DBFortranAccessPointer(optlist_id[i]);
+        }
+
+        /*----------------------------------------
+         *  Invoke the C function to do the work.
+         *---------------------------------------*/
+        *status = DBPutDefvars(dbfile, nm, *ndefs, nms, types, defs,
+                      optlists);
+
+        for (i = 0; i < *ndefs; i++)
+        {
+            FREE(nms[i]);
+            FREE(defs[i]);
+        }
+        FREE(nms);
+        FREE(defs);
+        FREE(nm);
+        FREE(optlists);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                     DBPUTMVAR_FC
+ *
+ * Purpose
+ *     Writes a multi-block variable object into the open database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:05:12 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Sean Ahern, Wed Apr 15 11:37:28 PDT 1998
+ *     Made the routine work.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMVAR_FC (int *dbid, FCD_DB name, int *lname, int *nvar, FCD_DB varnames,
+            int *lvarnames, int *vartypes, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char         **varnms = NULL, *nm = NULL;
+    char          *realvarnames = NULL;
+    int            i, indx;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputmvar", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        /* Duplicate all ASCII strings. */
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varnames), DB_F77NULLSTRING) == 0)
+            realvarnames = NULL;
+        else
+            realvarnames = _fcdtocp(varnames);
+#else
+        if (strcmp(varnames, DB_F77NULLSTRING) == 0)
+            realvarnames = NULL;
+        else
+            realvarnames = varnames;
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (*nvar <= 0)
+            API_ERROR("nvar", E_BADARGS);
+        varnms = ALLOC_N(char *, *nvar);
+
+        for(indx = 0, i = 0; i< *nvar; i++) {
+            if (lvarnames[i] < 0)
+                API_ERROR("lvarnames", E_BADARGS);
+            varnms[i] = SW_strndup(&realvarnames[indx], lvarnames[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lvarnames[i];
+        }
+
+        /* Invoke the C function to do the work. */
+        *status = DBPutMultivar(dbfile, nm, *nvar, varnms, vartypes,
+                                optlist);
+
+        for(i=0;i<*nvar;i++)
+            FREE(varnms[i]);
+        FREE(nm);
+        FREE(varnms);
+
+        API_RETURN(*status < 0 ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */ ;
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                     DBPUTMMAT_FC
+ *
+ * Purpose
+ *     Writes a multi-block material object into the open file.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Sean Ahern (ahern at llnl.gov)
+ *     Thu Apr 16 13:12:02 PDT 1998
+ *
+ * Modifications
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMMAT_FC (int *dbid, FCD_DB name, int *lname, int *nmat, FCD_DB matnames,
+            int *lmatnames, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char         **matnms = NULL, *nm = NULL;
+    char          *realmatnames = NULL;
+    int            i, indx;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputmmesh", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(matnames), DB_F77NULLSTRING) == 0)
+            realmatnames = NULL;
+        else
+            realmatnames = _fcdtocp(matnames);
+#else
+        if (strcmp(matnames, DB_F77NULLSTRING) == 0)
+            realmatnames = NULL;
+        else
+            realmatnames = matnames;
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (*nmat <= 0)
+            API_ERROR("nmat", E_BADARGS);
+        matnms = ALLOC_N(char *, *nmat);
+
+        for (indx = 0, i = 0; i < *nmat; i++) {
+            if (lmatnames[i] < 0)
+                API_ERROR("lmatnames", E_BADARGS);
+            matnms[i] = SW_strndup(&realmatnames[indx], lmatnames[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lmatnames[i];
+        }
+
+        /*----------------------------------------
+         *  Invoke the C function to do the work.
+         *---------------------------------------*/
+        *status = DBPutMultimat(dbfile, nm, *nmat, matnms, optlist);
+
+        for (i = 0; i < *nmat; i++)
+            FREE(matnms[i]);
+        FREE(nm);
+        FREE(matnms);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTPM_FC
+ *
+ * Purpose
+ *     Writes a point-mesh object to the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:10:04 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTPM_FC (int *dbid, FCD_DB name, int *lname, int *ndims, DB_DTPTR1 x, DB_DTPTR1 y,
+          DB_DTPTR1 z, int *nels, int *datatype, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *nm = NULL;
+    DB_DTPTR      *coords[3];
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputpm", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        coords[0] = x;
+        coords[1] = y;
+        coords[2] = z;
+
+        *status = DBPutPointmesh(dbfile, nm, *ndims, coords, *nels,
+                                 *datatype, optlist);
+
+        FREE(nm);
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBPUTPV1_FC
+ *
+ * Purpose
+ *     Write a scalar point variable object into the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:26:42 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTPV1_FC (int *dbid, FCD_DB name,
+           int *lname, FCD_DB meshname, int *lmeshname,
+           DB_DTPTR1 var, int *nels, int *datatype, int *optlist_id, int *status)
+{
+    char          *nm = NULL, *mnm = NULL;
+    DBfile        *dbfile = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputpv1", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        if (*lmeshname <= 0)
+            API_ERROR("lmeshname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(meshname), DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(_fcdtocp(meshname), *lmeshname);
+#else
+        if (strcmp(meshname, DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(meshname, *lmeshname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutPointvar1(dbfile, nm, mnm, var, *nels,
+                                 *datatype, optlist);
+
+        FREE(nm);
+        FREE(mnm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTQM_FC
+ *
+ * Purpose
+ *     Write a quadmesh object into the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:44:28 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTQM_FC (int *dbid, FCD_DB name, int *lname, FCD_DB xname, int *lxname,
+          FCD_DB yname, int *lyname, FCD_DB zname, int *lzname, DB_DTPTR1 x,
+          DB_DTPTR1 y, DB_DTPTR1 z, int *dims, int *ndims, int *datatype,
+          int *coordtype, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    int            i;
+    DB_DTPTR      *coords[3];
+    char          *coordnames[3], *nm = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputqm", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        for (i = 0; i < 3; i++) {
+            coords[i] = NULL;
+            coordnames[i] = NULL;
+        }
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        switch (*ndims) {
+            case 3:
+                if (*lzname <= 0)
+                    API_ERROR("lzname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(zname), DB_F77NULLSTRING) == 0)
+                    coordnames[2] = NULL;
+                else
+                    coordnames[2] = SW_strndup(_fcdtocp(zname), *lzname);
+#else
+                if (strcmp(zname, DB_F77NULLSTRING) == 0)
+                    coordnames[2] = NULL;
+                else
+                    coordnames[2] = SW_strndup(zname, *lzname);
+#endif
+                coords[2] = z;
+                /*fall through */
+            case 2:
+                if (*lyname <= 0)
+                    API_ERROR("lyname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(yname), DB_F77NULLSTRING) == 0)
+                    coordnames[1] = NULL;
+                else
+                    coordnames[1] = SW_strndup(_fcdtocp(yname), *lyname);
+#else
+                if (strcmp(yname, DB_F77NULLSTRING) == 0)
+                    coordnames[1] = NULL;
+                else
+                    coordnames[1] = SW_strndup(yname, *lyname);
+#endif
+                coords[1] = y;
+                /*fall through */
+            case 1:
+                if (*lxname <= 0)
+                    API_ERROR("lxname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(xname), DB_F77NULLSTRING) == 0)
+                    coordnames[0] = NULL;
+                else
+                    coordnames[0] = SW_strndup(_fcdtocp(xname), *lxname);
+#else
+                if (strcmp(xname, DB_F77NULLSTRING) == 0)
+                    coordnames[0] = NULL;
+                else
+                    coordnames[0] = SW_strndup(xname, *lxname);
+#endif
+                coords[0] = x;
+                break;
+            default:
+                API_ERROR("ndims", E_BADARGS);
+        }
+
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutQuadmesh(dbfile, nm, coordnames, coords, dims, *ndims,
+                                *datatype, *coordtype, optlist);
+
+        FREE(nm);
+        FREE(coordnames[0]);
+        FREE(coordnames[1]);
+        FREE(coordnames[2]);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBPUTQV1_FC
+ *
+ * Purpose
+ *     Write a single quad variable object to the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:52:23 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTQV1_FC (int *dbid, FCD_DB name,
+           int *lname, FCD_DB meshname, int *lmeshname,
+           DB_DTPTR1 var, int *dims, int *ndims, DB_DTPTR1 mixvar, int *mixlen,
+           int *datatype, int *centering, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *nm = NULL, *mnm = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputqv1", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+        if (*lmeshname <= 0)
+            API_ERROR("lmeshname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(meshname), DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(_fcdtocp(meshname), *lmeshname);
+#else
+        if (strcmp(meshname, DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(meshname, *lmeshname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutQuadvar1(dbfile, nm, mnm, var, dims, *ndims, mixvar,
+                                *mixlen, *datatype, *centering, optlist);
+
+        FREE(nm);
+        FREE(mnm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBPUTQV_FC
+ *
+ * Purpose
+ *     Write a vector quad field object to the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Olivier Cessenat
+ *     Sat Feb  6 18:19:43 CET 2010
+ *
+ * Modifications
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTQV_FC (int *dbid, FCD_DB vname, int *lvname, FCD_DB mname, int *lmname,
+	    int *nvars, FCD_DB varnames, int* lvarnames,
+	    DB_DTPTR1 vars, int *dims, int *ndims, DB_DTPTR1 mixvar, int *mixlen,
+	    int *datatype, int *centering, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *cvname = NULL, *cmname = NULL;
+    DBoptlist     *optlist = NULL;
+    char          **cvarnames = NULL;
+    char          *names = NULL;
+    int           indx, i, j;
+    float **cvars = NULL ;
+    float **cmixvar = NULL ;
+
+    API_BEGIN("dbputqv", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lvname <= 0)
+            API_ERROR("lvname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(vname), DB_F77NULLSTRING) == 0)
+            cvname = NULL;
+        else
+            cvname = SW_strndup(_fcdtocp(vname), *lvname);
+#else
+        if (strcmp(vname, DB_F77NULLSTRING) == 0)
+            cvname = NULL;
+        else
+            cvname = SW_strndup(vname, *lvname);
+#endif
+        if (*lmname <= 0)
+            API_ERROR("lmname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(mname), DB_F77NULLSTRING) == 0)
+            cmname = NULL;
+        else
+            cmname = SW_strndup(_fcdtocp(mname), *lmname);
+#else
+        if (strcmp(mname, DB_F77NULLSTRING) == 0)
+            cmname = NULL;
+        else
+            cmname = SW_strndup(mname, *lmname);
+#endif
+
+        /*------------------------------
+         *  Create the char ** array to variable names as in dbaddcaopt
+         *-----------------------------*/
+        if (strcmp(varnames, DB_F77NULLSTRING) == 0)
+            names = NULL;
+        else
+            names = varnames;
+
+        if (*nvars <= 0)
+            API_ERROR("nvars", E_BADARGS);
+
+        cvarnames = ALLOC_N(char *, *nvars);
+        for (indx = 0, i = 0; i < *nvars; i++) {
+	  if (lvarnames[i] < 0)
+	    API_ERROR("lvarnames", E_BADARGS);
+
+	  cvarnames[i] = SW_strndup(&names[indx], lvarnames[i]);
+	  /* Allow for a matrix or array form */
+	  if (fortran2DStrLen > 0) {
+	    /* Matrix API */
+	    indx += fortran2DStrLen;
+	  } else {
+	    /* More General Vector API */
+	    indx += lvarnames[i];
+	  }
+        }
+
+        /*------------------------------
+         *  Create the float pointers addresses:
+         *-----------------------------*/
+	/* Compute the size of the array */
+	indx = dims[0] ;
+	for (j=1; j<*ndims; j++ ) {
+	  indx *= dims[j] ;
+	}
+	if (*datatype == DB_DOUBLE) {
+	  /* Doubles use twice as much storage as floats */
+	  indx*= 2 ;
+	}
+
+	/* Now convert the Fortran data arrays into C arrays of data */
+
+	if ((*(int *)vars) != DB_F77NULL) {
+	  cvars = malloc(sizeof(float*) * (*nvars));
+	  /* Make pointers to Fortran address in vars array */
+	  for (i=0;i<*nvars;i++) {
+	    cvars[i] = (float*)vars + i*indx ;
+	  }
+	} else {
+	  API_ERROR("vars", E_BADARGS);
+	}
+	if ((*(int *)mixvar) != DB_F77NULL) {
+	  /* Now convert the Fortran data array into a C array of data */
+	  cmixvar = malloc(sizeof(float*) * (*nvars));
+	  /* Make pointers to Fortran address in vars array */
+	  for (i=0;i<*nvars;i++) {
+	    cmixvar[i] = (float*)mixvar + i*indx ;
+	  }
+	}
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutQuadvar(dbfile, cvname, cmname, *nvars,
+			       cvarnames, cvars, dims, *ndims,
+			       cmixvar, *mixlen, *datatype, *centering,
+			       optlist);
+
+	/* Remove pointers to pointers arrays */
+	if (cmixvar != NULL) 
+	  FREE(cmixvar)
+	if (cvars != NULL) 
+	  FREE(cvars)
+
+	/* Remove strings copies */ 
+        for (i = 0; i < *nvars; i++)
+	    FREE(cvarnames[i]);
+        FREE(cvarnames);
+        FREE(cmname);
+        FREE(cvname);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTUM_FC
+ *
+ * Purpose
+ *     Write a UCD mesh object into the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 13:58:25 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTUM_FC (int *dbid, FCD_DB name, int *lname, int *ndims, DB_DTPTR1 x, DB_DTPTR1 y,
+          DB_DTPTR1 z, FCD_DB xname, int *lxname, FCD_DB yname, int *lyname,
+          FCD_DB zname, int *lzname, int *datatype, int *nnodes, int *nzones,
+          FCD_DB zlname, int *lzlname, FCD_DB flname, int *lflname,
+          int *optlist_id, int *status)
+{
+    char          *nm = NULL, *zlnm = NULL, *flnm = NULL, *coordnames[3];
+    DB_DTPTR      *coords[3];
+    DBfile        *dbfile = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputum", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        memset(coords, 0, sizeof(coords));
+        memset(coordnames, 0, sizeof(coordnames));
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        switch (*ndims) {
+            case 3:
+                if (*lzname <= 0)
+                    API_ERROR("lzname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(zname), DB_F77NULLSTRING) == 0)
+                    coordnames[2] = NULL;
+                else
+                    coordnames[2] = SW_strndup(_fcdtocp(zname), *lzname);
+#else
+                if (strcmp(zname, DB_F77NULLSTRING) == 0)
+                    coordnames[2] = NULL;
+                else
+                    coordnames[2] = SW_strndup(zname, *lzname);
+#endif
+                coords[2] = z;
+                /*fall through */
+            case 2:
+                if (*lyname <= 0)
+                    API_ERROR("lyname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(yname), DB_F77NULLSTRING) == 0)
+                    coordnames[1] = NULL;
+                else
+                    coordnames[1] = SW_strndup(_fcdtocp(yname), *lyname);
+#else
+                if (strcmp(yname, DB_F77NULLSTRING) == 0)
+                    coordnames[1] = NULL;
+                else
+                    coordnames[1] = SW_strndup(yname, *lyname);
+#endif
+                coords[1] = y;
+                /*fall through */
+            case 1:
+                if (*lxname <= 0)
+                    API_ERROR("lxname", E_BADARGS);
+#ifdef CRAY
+                if (strcmp(_fcdtocp(xname), DB_F77NULLSTRING) == 0)
+                    coordnames[0] = NULL;
+                else
+                    coordnames[0] = SW_strndup(_fcdtocp(xname), *lxname);
+#else
+                if (strcmp(xname, DB_F77NULLSTRING) == 0)
+                    coordnames[0] = NULL;
+                else
+                    coordnames[0] = SW_strndup(xname, *lxname);
+#endif
+                coords[0] = x;
+                break;
+            default:
+                API_ERROR("ndims", E_BADARGS);
+        }
+
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        if (*lflname <= 0)
+            flnm = NULL;
+        else
+#ifdef CRAY
+        if (strcmp(_fcdtocp(flname), DB_F77NULLSTRING) == 0)
+            flnm = NULL;
+        else
+            flnm = SW_strndup(_fcdtocp(flname), *lflname);
+#else
+        if (strcmp(flname, DB_F77NULLSTRING) == 0)
+            flnm = NULL;
+        else
+            flnm = SW_strndup(flname, *lflname);
+#endif
+
+        if (*lzlname <= 0)
+            zlnm = NULL;
+        else
+#ifdef CRAY
+        if (strcmp(_fcdtocp(zlname), DB_F77NULLSTRING) == 0)
+            zlnm = NULL;
+        else
+            zlnm = SW_strndup(_fcdtocp(zlname), *lzlname);
+#else
+        if (strcmp(zlname, DB_F77NULLSTRING) == 0)
+            zlnm = NULL;
+        else
+            zlnm = SW_strndup(zlname, *lzlname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutUcdmesh(dbfile, nm, *ndims, coordnames,
+                               coords, *nnodes, *nzones, zlnm, flnm,
+                               *datatype, optlist);
+
+        FREE(nm);
+        FREE(zlnm);
+        FREE(flnm);
+        FREE(coordnames[0]);
+        FREE(coordnames[1]);
+        FREE(coordnames[2]);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBPUTUV1_FC
+ *
+ * Purpose
+ *     Write one UCD variable object to the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:07:14 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTUV1_FC (int *dbid, FCD_DB name,
+           int *lname, FCD_DB meshname, int *lmeshname,
+           DB_DTPTR1 var, int *nels, DB_DTPTR1 mixvar, int *mixlen, int *datatype,
+           int *centering, int *optlist_id, int *status)
+{
+    char          *nm = NULL, *mnm = NULL;
+    DBfile        *dbfile = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputuv1", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+        if (*lmeshname <= 0)
+            API_ERROR("lmeshname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(meshname), DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(_fcdtocp(meshname), *lmeshname);
+#else
+        if (strcmp(meshname, DB_F77NULLSTRING) == 0)
+            mnm = NULL;
+        else
+            mnm = SW_strndup(meshname, *lmeshname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutUcdvar1(dbfile, nm, mnm, var, *nels, mixvar, *mixlen,
+                               *datatype, *centering, optlist);
+
+        FREE(nm);
+        FREE(mnm);
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTZL_FC
+ *
+ * Purpose
+ *     Write a zonelist object do the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:15:03 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTZL_FC (int *dbid, FCD_DB name, int *lname, int *nzones, int *ndims,
+          int *nodelist, int *lnodelist, int *origin, int *shapesize,
+          int *shapecnt, int *nshapes, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *nm = NULL;
+
+    API_BEGIN("dbputzl", int, -1) {
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutZonelist(dbfile, nm, *nzones, *ndims,
+                                nodelist, *lnodelist, *origin,
+                                shapesize, shapecnt, *nshapes);
+
+        FREE(nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBPUTZL2_FC
+ *
+ * Purpose
+ *     Write a zonelist object do the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller
+ *     July 19, 2005
+ *
+ * Modifications:
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+
+SILO_API FORTRAN
+DBPUTZL2_FC (int *dbid, FCD_DB name, int *lname, int *nzones, int *ndims,
+          int *nodelist, int *lnodelist, int *origin, int *lo_offset,
+          int *hi_offset, int *shapetype, int *shapesize,
+          int *shapecnt, int *nshapes, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char          *nm = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputzl2", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutZonelist2(dbfile, nm, *nzones, *ndims,
+                                nodelist, *lnodelist, *origin,
+                               *lo_offset, *hi_offset, shapetype,
+                                shapesize, shapecnt, *nshapes, optlist);
+
+        FREE(nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBRDVAR_FC
+ *
+ * Purpose
+ *     Read a simple variable from the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:21:54 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBRDVAR_FC (int *dbid, FCD_DB varname, int *lvarname, void *ptr)
+{
+    int            iret;
+    char          *varnm = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbrdvar", int, -1) {
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        iret = DBReadVar(dbfile, varnm, ptr);
+        FREE(varnm);
+        API_RETURN(iret);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                  DBRDVARSLICE_FC
+ *
+ * Purpose
+ *     Read a slice of a simple variable from the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     brugger at sgibird
+ *     Thu Feb 16 08:34:21 PST 1995
+ *
+ * Modifications
+ *      Sean Ahern Tue Feb 21 14:43:42 PST 1995
+ *      Changed offset to offset2 in the DBReadVarSlice call.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBRDVARSLICE_FC (int *dbid, FCD_DB varname, int *lvarname, int *offset,
+               int *length, int *stride, int *ndims, void *ptr)
+{
+    int            i;
+    int            iret;
+    char          *varnm = NULL;
+    int            offset2[MAXDIMS_VARWRITE];
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbrdvarslice", int, -1) {
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        for (i = 0; i < *ndims && i < MAXDIMS_VARWRITE; i++)
+            offset2[i] = offset[i] - 1;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        iret = DBReadVarSlice(dbfile, varnm, offset2, length,
+                              stride, *ndims, ptr);
+        FREE(varnm);
+        API_RETURN(iret);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBWriteSlice
+ *
+ * Purpose:     Similar to DBWrite except only part of the data is
+ *              written.  If VNAME doesn't exist, space is reserved for
+ *              the entire variable based on DIMS; otherwise we check
+ *              that DIMS has the same value as originally.  Then we
+ *              write the specified slice to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Sean Ahern
+ *              ahern at llnl.gov
+ *              Tue Jan  7 16:37:29 PST 1997
+ *
+ * Modifications:
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *------------------------------------------------------------------------- */
+SILO_API FORTRAN
+DBWRITESLICE_FC (int *dbid, FCD_DB varname, int *lvarname, void *values,
+               int *datatype, int *offset, int *length, int *stride,
+               int *dims, int *ndims)
+{
+    int             iret;
+    DBfile         *dbfile = NULL;
+    char           *varnm = NULL;
+    int             i;
+    int             offset2[MAXDIMS_VARWRITE];
+
+    API_BEGIN("dbwriteslice", int, -1)
+    {
+        /* Duplicate all ASCII strings. */
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        for (i = 0; i < *ndims && i < MAXDIMS_VARWRITE; i++)
+            offset2[i] = offset[i] - 1;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        iret = DBWriteSlice(dbfile, varnm, values, *datatype, offset2,
+                            length, stride, dims, *ndims);
+
+        FREE(varnm);
+        API_RETURN(iret);
+    }
+    API_END_NOPOP;                     /* BEWARE: If API_RETURN above is
+                                        * removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBSETDIR_FC
+ *
+ * Purpose
+ *     Set the current directory within the database
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:26:23 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETDIR_FC (int *dbid, FCD_DB pathname, int *lpathname)
+{
+    int            err;
+    char          *path = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbsetdir", int, -1) {
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lpathname <= 0)
+            API_ERROR("lpathname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(pathname), DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(_fcdtocp(pathname), *lpathname);
+#else
+        if (strcmp(pathname, DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(pathname, *lpathname);
+#endif
+
+      /*------------------------------
+       *  Set directory.
+       *-----------------------------*/
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        err = DBSetDir(dbfile, path);
+        FREE(path);
+        API_RETURN(err);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                    DBSETDIRID_FC
+ *
+ * Purpose
+ *     Set the current directory by ID within the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:28:41 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETDIRID_FC (int *dbid, int *dirid)
+{
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbsetdirid", int, -1) {
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        API_RETURN(DBSetDirID(dbfile, *dirid));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                  DBSHOWERRORS_FC
+ *
+ * Purpose
+ *     Same as DBShowErrors except function pointers cannot be
+ *     passed in Fortran, so the second argument is always NULL
+ *     causing the default error handler to be used.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:30:19 EST 1994
+ *
+ * Modifications
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSHOWERRORS_FC (int *mode)
+{
+    DBShowErrors(*mode, NULL);
+
+    return 0;
+}
+
+SILO_API FORTRAN
+DBERRNO_FC()
+{
+    return DBErrno();
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBWRITE_FC
+ *
+ * Purpose
+ *     Write a simple variable to the database
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     robb at cloud
+ *     Mon Nov 28 14:33:36 EST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBWRITE_FC (int *dbid, FCD_DB varname, int *lvarname, void *var, int *dims,
+          int *ndims, int *datatype)
+{
+    char          *varnm = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbwrite", int, -1) {
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        (void) DBWrite(dbfile, varnm, var, dims, *ndims, *datatype);
+        FREE(varnm);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPUTCA_FC
+ *
+ * Purpose
+ *     Write a compound array object into the given SILO file.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Return
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     matzke at viper
+ *     Tue Oct 25 14:35:37 PDT 1994
+ *
+ *  Modifications
+ *     Robb Matzke, Fri Dec 2 12:57:04 PST 1994
+ *     Removed SCORE memory management.
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTCA_FC (int *dbid, FCD_DB _name, int *lname, FCD_DB enames, int *width,
+          int *elengths, int *nelems, DB_DTPTR1 values, int *datatype,
+          int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    int            i, j, nvalues;
+    char          *array_name = NULL, **elemnames = NULL;
+    char          *realenames = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbputca", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        /*
+         * Duplicate all ascii strings and count the total number
+         * of values.
+         */
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(_name), DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_fcdtocp(_name), *lname);
+#else
+        if (strcmp(_name, DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_name, *lname);
+#endif
+
+#ifdef CRAY
+        realenames = _fcdtocp(enames);
+#else
+        realenames = enames;
+#endif
+        if (*nelems <= 0)
+            API_ERROR("nelems", E_BADARGS);
+        elemnames = ALLOC_N(char *, *nelems);
+
+        for (i = nvalues = 0; i < *nelems; i++) {
+            j = *width;
+            while (j > 0 && ' ' == realenames[j - 1])
+                --j;
+            elemnames[i] = SW_strndup(realenames, j);
+            realenames += *width;
+            nvalues += elengths[i];
+        }
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        *status = DBPutCompoundarray(dbfile, array_name, elemnames,
+                                     elengths, *nelems, (void *)values,
+                                     nvalues, *datatype, optlist);
+
+        /*
+         * Free all temporary memory.
+         */
+        FREE(array_name);
+        for (i = 0; i < *nelems; i++)
+            FREE(elemnames[i]);
+        FREE(elemnames);
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBGETCA_FC
+ *
+ * Purpose
+ *     Retrieve a compound array object from the file. The
+ *     caller should have already allocated the following output
+ *     parameters: enames, lenames, elengths, and values.
+ *
+ * Notes
+ *     This function was designed to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     matzke at viper
+ *     Wed Oct 26 10:53:38 PDT 1994
+ *
+ * Modifications
+ *     matzke at viper, Wed Oct 26 11:15:02 PDT 1994
+ *     The following parameters may be null pointers, in which case
+ *     this function doesn't do anything with them.  This is used by
+ *     the DBFGETCAFC and DBINQCA_FC functions.
+ *
+ *         enames, lenames, elengths, datatype
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETCA_FC (int *dbid, FCD_DB _name, int *lname, int *width, FCD_DB enames,
+          int *elengths, int *nelems, DB_DTPTR1 values, int *nvalues,
+          int *datatype)
+{
+    DBfile        *dbfile = NULL;
+    DBcompoundarray *ca = NULL;
+    char          *array_name = NULL;
+    char          *realenames = NULL;
+    int            to_copy, i;
+
+    API_BEGIN("dbgetca", int, -1) {
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(_name), DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_fcdtocp(_name), *lname);
+#else
+        if (strcmp(_name, DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_name, *lname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (NULL == (ca = DBGetCompoundarray(dbfile, array_name))) {
+            API_ERROR("DBGetCompoundarray", E_CALLFAIL);
+        }
+
+#ifdef CRAY
+        if ((_fcdtocp(enames) == NULL) ||
+            (strcmp(_fcdtocp(enames), DB_F77NULLSTRING) == 0)
+           )
+            realenames = NULL;
+        else
+            realenames = _fcdtocp(enames);
+#else
+        if ((enames == NULL) || (strcmp(enames, DB_F77NULLSTRING) == 0))
+            realenames = NULL;
+        else
+            realenames = enames;
+#endif
+
+        /*
+         * Copy fields of `ca' to the output parameters.
+         */
+        if (realenames)
+            memset(realenames, ' ', *width * (ca->nelems));
+        for (i = 0; i < ca->nelems; i++) {
+            if (realenames) {
+                to_copy = strlen(ca->elemnames[i]);
+                if (to_copy > *width)
+                    to_copy = *width;
+                memcpy(realenames, ca->elemnames[i], to_copy);
+                realenames += *width;
+            }
+            if (elengths)
+                elengths[i] = ca->elemlengths[i];
+        }
+        if (nelems)
+            *nelems = ca->nelems;
+        if (nvalues)
+            *nvalues = ca->nvalues;
+        if (datatype)
+            *datatype = ca->datatype;
+
+        if (values) {
+            memcpy(values, ca->values,
+                   ca->nvalues * db_GetMachDataSize(ca->datatype));
+        }
+
+        FREE(array_name);
+        DBFreeCompoundarray(ca);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBFGETCA_FC
+ *
+ * Purpose
+ *     Same as DBGETCA_FC except not so many parameters.  Similar
+ *     to DBFgetCompoundarray, except return vector is through
+ *     a previously allocated parameter.
+ *
+ * Notes
+ *     This function is designed to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     matzke at viper
+ *     Wed Oct 26 11:10:35 PDT 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBFGETCA_FC (int *dbid, FCD_DB _name, int *lname, DB_DTPTR1 values, int *nvalues)
+{
+    API_BEGIN("dbfgetca", int, -1) {
+#if CRAY
+        _fcd           fstring;
+        
+        fstring = _cptofcd(DB_F77NULLSTRING, strlen(DB_F77NULLSTRING));
+
+        API_RETURN(DBGETCA_FC (dbid, _name, lname,
+                             NULL, fstring, NULL, NULL,
+                             values, nvalues, NULL));
+#else
+        API_RETURN(DBGETCA_FC (dbid, _name, lname,
+                             NULL, NULL, NULL, NULL,
+                             values, nvalues, NULL));
+#endif
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBPUTCURVE_FC
+ *
+ * Purpose: Write a curve object into the given PDB file.
+ *
+ * Return:  Success:    0
+ *
+ *      Failure:    -1
+ *
+ * Programmer:  Robb Matzke
+ *      robb at callisto.nuance.com
+ *      May 17, 1996
+ *
+ * Modifications:
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *------------------------------------------------------------------------- */
+SILO_API FORTRAN
+DBPUTCURVE_FC (int *dbid, FCD_DB _name, int *lname, DB_DTPTR1 xvals, DB_DTPTR1 yvals,
+              int *datatype, int *npts, int *optlist_id, int *status)
+{
+
+   DBfile   *dbfile ;
+   DBoptlist    *optlist ;
+   char     *name ;
+
+   API_BEGIN ("dbputcurve", int, -1) {
+      if (*lname<=0)
+     API_ERROR ("lname", E_BADARGS) ;
+
+      optlist = (DBoptlist *) DBFortranAccessPointer (*optlist_id) ;
+
+#ifdef CRAY
+      if (!strcmp(_fcdtocp(_name), DB_F77NULLSTRING)) {
+     name = NULL ;
+      } else {
+     name = SW_strndup (_fcdtocp(_name), *lname) ;
+      }
+#else
+      if (!strcmp(_name, DB_F77NULLSTRING)) {
+     name = NULL ;
+      } else {
+     name = SW_strndup (_name, *lname) ;
+      }
+#endif
+
+      dbfile = (DBfile *) DBFortranAccessPointer (*dbid) ;
+      *status = DBPutCurve (dbfile, name, xvals, yvals, *datatype,
+                *npts, optlist) ;
+      FREE(name);
+   } API_END;
+   return 0 ;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    DBGETCURVE_FC
+ *
+ * Purpose: Reads a curve from a PDB file.  The caller supplies the
+ *      output buffers for the x and y values but specifies how
+ *          many values they're ready to accept.  The total number
+ *      of points in the curve is returned with the NPTS output
+ *      argument.
+ *
+ * Return:  Success:    0
+ *
+ *      Failure:    -1
+ *
+ * Programmer:  Robb Matzke
+ *      robb at callisto.nuance.com
+ *      May 17, 1996
+ *
+ * Modifications:
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *------------------------------------------------------------------------ */
+SILO_API FORTRAN
+DBGETCURVE_FC (int *dbid, FCD_DB _name, int *lname, int *maxpts, DB_DTPTR1 xvals,
+              DB_DTPTR1 yvals, int *datatype, int *npts)
+{
+
+   DBfile   *dbfile ;
+   char     *name ;
+   DBcurve  *cu ;
+   int      elem_size, total_size ;
+
+   API_BEGIN ("dbgetcurve", int, -1) {
+
+      /*
+       * Check for obvious errors.
+       */
+      if (*lname <= 0) API_ERROR ("lname", E_BADARGS) ;
+      if (*maxpts < 0) API_ERROR ("maxpts", E_BADARGS) ;
+
+      /*
+       * Convert arguments from Fortran to C.
+       */
+#ifdef CRAY
+      if (!strcmp (_fcdtocp(_name), DB_F77NULLSTRING)) {
+     name = NULL ;
+      } else {
+     name = SW_strndup (_fcdtocp (_name), *lname) ;
+      }
+#else
+      if (!strcmp (_name, DB_F77NULLSTRING)) {
+     name = NULL ;
+      } else {
+     name = SW_strndup (_name, *lname) ;
+      }
+#endif
+      dbfile = (DBfile *) DBFortranAccessPointer (*dbid) ;
+
+      /*
+       * Get the curve.
+       */
+      if (NULL==(cu=DBGetCurve(dbfile, name))) {
+     API_ERROR ("DBGetCurve", E_CALLFAIL) ;
+      }
+
+      /*
+       * Copy values to the output arguments.
+       */
+      *datatype = cu->datatype ;
+      *npts = cu->npts ;
+      elem_size = db_GetMachDataSize (cu->datatype) ;
+      total_size = elem_size * MIN(*maxpts, cu->npts) ;
+      memcpy (xvals, cu->x, total_size) ;
+      memcpy (yvals, cu->y, total_size) ;
+      DBFreeCurve (cu) ;
+   } API_END ;
+   return 0 ;
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBINQCA_FC
+ *
+ * Purpose
+ *     Inquire compound array object attributes.
+ *
+ * Notes
+ *     This function is designed to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     matzke at viper
+ *     Wed Oct 26 11:19:51 PDT 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBINQCA_FC (int *dbid, FCD_DB _name, int *lname, int *maxwidth, int *nelems,
+          int *nvalues, int *datatype)
+{
+    DBfile        *dbfile = NULL;
+    char          *array_name = NULL, **elemnames = NULL;
+    int            i, status, len;
+
+    API_BEGIN("dbinqca", int, -1) {
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(_name), DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_fcdtocp(_name), *lname);
+#else
+        if (strcmp(_name, DB_F77NULLSTRING) == 0)
+            array_name = NULL;
+        else
+            array_name = SW_strndup(_name, *lname);
+#endif
+        *maxwidth = 0;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        status = DBInqCompoundarray(dbfile, array_name,
+                                    &elemnames, NULL, nelems,
+                                    nvalues, datatype);
+        if (status < 0)
+            API_RETURN(-1);
+
+        for (i = 0; i < *nelems; i++) {
+            len = strlen(elemnames[i]);
+            if (len > *maxwidth)
+                *maxwidth = len;
+            FREE(elemnames[i]);
+        }
+        FREE(elemnames);
+        FREE(array_name);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                     DBADDICMP
+ *
+ * Purpose
+ *     Add an integer component to the given component list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Robb Matzke, Thu Nov 10 17:46:06 EST 1994
+ *     Added error mechanism.
+ *
+ *     Robb Matzke, Thu Nov 10 17:50:49 EST 1994
+ *     Changed third parameter to be an integer.  If this function
+ *     ever worked, it was pure luck!
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDICMP_FC (int *obj_id, char *compname, int *val)
+{
+    DBobject      *object = NULL;
+
+    API_BEGIN("dbaddicmp", int, -1) {
+        object = (DBobject *) DBFortranAccessPointer(*obj_id);
+        API_RETURN(DBAddIntComponent(object, compname, *val));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDRCMP_FC
+ *
+ * Purpose
+ *     Add a real compname to the given compname list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Robb Matzke, Thu Nov 10 17:55:43 EST 1994
+ *     Fixed third parameter--it should be a `float*' instead of
+ *     a `char*'.
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDRCMP_FC (int *object_id, char *compname, float *val)
+{
+    DBobject      *object = NULL;
+
+    API_BEGIN("dbaddrcmp", int, -1) {
+        object = (DBobject *) DBFortranAccessPointer(*object_id);
+        API_RETURN(DBAddFltComponent(object, compname, *val));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBADDCCMP_FC
+ *
+ * Purpose
+ *     Add a character component to the given comp list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Warning
+ *     THIS FUNCTION CAUSES A MEMORY LEAK. The temporary string,
+ *     cval, is never freed.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Robb Matzke, Thu Nov 10 18:00:17 EST 1994
+ *     Added error mecanism.
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Eric Brugger, Wed Jun 18 14:18:16 PDT 1997
+ *     I removed the return statement at the end of the routine which
+ *     can never be reached.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDCCMP_FC (int *object_id, char *compname, char *val)
+{
+    DBobject      *object = NULL;
+
+    API_BEGIN("dbaddccmp", int, -1) {
+        object = (DBobject *) DBFortranAccessPointer(*object_id);
+        API_RETURN(DBAddStrComponent(object, compname, val));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */ ;
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                 DBMKOBJECT_FC
+ *
+ * Purpose
+ *     Create an component list and return its identifier.
+ *
+ * Notes
+ *    This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Robb Matzke, Thu Nov 10 18:02:04 EST 1994
+ *     Added error mechanism.
+ *
+ *     Robb Matzke, Thu Nov 10 18:04:51 EST 1994
+ *     The interface for this function needs to change!  The underlying
+ *     C-function, DBMakeObject, also requires an object name and
+ *     object type, parameters that are not supplied for this Fortran
+ *     version.  For now, we will call this an error since we aren't
+ *     changing the interface on this pass...
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBMKOBJECT_FC (int *maxcomponents, int *object_id)
+{
+    API_BEGIN("dbmkobject", int, -1) {
+        if (*maxcomponents <= 0)
+            API_ERROR("max components", E_BADARGS);
+        *object_id = -1;
+
+        API_ERROR("INTERFACE WILL CHANGE", E_NOTIMP);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               DBFREEOBJECT_FC
+ *
+ * Purpose
+ *     Free an object list.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Modifications
+ *     Robb Matzke, Thu Nov 10 18:08:32 EST 1994
+ *     Added error mechanism.
+ *
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Eric Brugger, Wed Mar  8 09:11:28 PST 1995
+ *     I corrected the name from DBFREEOBJECT to DBFREEOBJECT_FC.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBFREEOBJECT_FC (int *object_id)
+{
+    DBobject      *obj = NULL;
+
+    API_BEGIN("dbfreeobject", int, -1) {
+        obj = (DBobject *) DBFortranAccessPointer(*object_id);
+        *object_id = -1;
+        API_RETURN(DBFreeObject(obj));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                      DBGETQV1_FC
+ *
+ * Purpose
+ *     Read a quadrilateral variable from the database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     matzke at viper
+ *     Tue Nov 29 13:50:16 PST 1994
+ *
+ * Modifications
+ *     Eric Brugger, Tue Feb  7 08:09:26 PST 1995
+ *     I replaced API_END with API_END_NOPOP.
+ *
+ *     Sean Ahern, Tue Mar 21 17:12:07 PST 1995
+ *     I added support for the _fcd fortran character
+ *     array descriptor.  This is only a Cray thing.
+ *
+ *     Sean Ahern, Mon Apr 10 20:04:23 PDT 1995
+ *     Added a DBfile lookup in a global array using
+ *     DBFortranAccessPointer.
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETQV1_FC (int *dbid, FCD_DB varname, int *lvarname, void *var, int *dims,
+           int *ndims, void *mixvar, int *mixlen, int *datatype, int *centering)
+{
+    char           tmpstr[64];
+    char          *varnm = NULL;
+    int            nbytes, i;
+    DBquadvar     *qv = NULL;
+    DBfile        *dbfile = NULL;
+
+    API_BEGIN("dbgetqv1", int, -1) {
+        if (*lvarname <= 0)
+            API_ERROR("lvarname", E_BADARGS);
+#ifdef CRAY
+        if (strcmp(_fcdtocp(varname), DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(_fcdtocp(varname), *lvarname);
+#else
+        if (strcmp(varname, DB_F77NULLSTRING) == 0)
+            varnm = NULL;
+        else
+            varnm = SW_strndup(varname, *lvarname);
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (NULL == (qv = DBGetQuadvar(dbfile, varnm))) {
+            API_ERROR("DBGetQuadvar", E_CALLFAIL);
+        }
+
+      /*------------------------------
+       *  Copy the quad var into the
+       *  supplied space. Assign the
+       *  misc. attributes.
+       *-----------------------------*/
+        nbytes = qv->nels * db_GetMachDataSize(qv->datatype);
+        memcpy(var, qv->vals[0], nbytes);
+
+        *ndims = qv->ndims;
+        *centering = (qv->align[0] == 0.) ? DB_NODECENT : DB_ZONECENT;
+        *datatype = qv->datatype;
+        for (i = 0; i < qv->ndims; i++)
+            dims[i] = qv->dims[i];
+
+      /*------------------------------------------------------------
+       *  If there was mixed data, copy that too.
+       *
+       *  Kludge city!!! I'm assuming name of mixed component is
+       *  'varname_mix'. This info should be kept in DBquadvar
+       *  somewhere.
+       *-----------------------------------------------------------*/
+        if ((*(int *)mixvar) != DB_F77NULL) {
+            strcpy(tmpstr, varnm);
+            strcat(tmpstr, "_mix");
+
+            *mixlen = DBGetVarLength(dbfile, tmpstr);
+            DBReadVar(dbfile, tmpstr, mixvar);
+        }
+
+        DBFreeQuadvar(qv);
+        FREE(varnm);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                     DBINQFILE_FC
+ *
+ * Purpose
+ *     Tests to see if the filename specified is a Silo file.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns zero on success, -1 on failure.
+ *
+ * Programmer
+ *     Hank Childs
+ *     Tue Feb 29 17:12:47 PST 2000
+ *
+ * Modifications
+ *
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBINQFILE_FC (FCD_DB pathname, int *lpathname, int *is_file)
+{
+    char          *path = NULL;
+
+    API_BEGIN("dbinqfile", int, -1) {
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+        if (*lpathname <= 0)
+            API_ERROR("lpathname", E_BADARGS);
+        if (strcmp(pathname, DB_F77NULLSTRING) == 0)
+            path = NULL;
+        else
+            path = SW_strndup(pathname, *lpathname);
+
+      /*----------------------------------------------------
+       *  Make call to inquire if file is a valid Silo file.
+       *----------------------------------------------------*/
+        *is_file = DBInqFile(path);
+        FREE(path);
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                 DBSET2DSTRLEN_FC
+ *
+ * Purpose
+ *     Set the 2D string length used for a 2D arrays of strings in fortran
+ *     interface
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Thu Jul 28 10:41:14 PDT 2005 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSET2DSTRLEN_FC (int *len)
+{
+    int old = fortran2DStrLen;
+    API_BEGIN("dbset2dstrlen", int, -1) {
+        fortran2DStrLen = *len;
+        API_RETURN(old);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                 DBGET2DSTRLEN_FC
+ *
+ * Purpose
+ *     Get the 2D string length used for a 2D arrays of strings in fortran
+ *     interface
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Thu Jul 28 10:41:14 PDT 2005 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGET2DSTRLEN_FC ()
+{
+    API_BEGIN("dbget2dstrlen", int, -1) {
+        API_RETURN(fortran2DStrLen);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBSETOVRWRT_FC
+ *
+ * Purpose: set value for flag controlling overwrite
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Mon May  1 15:50:09 PDT 2006 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETOVRWRT_FC (int *allow)
+{
+    API_BEGIN("dbsetovrwrt", int, -1) {
+        API_RETURN(DBSetAllowOverwrites(*allow));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBGETOVRWRT_FC
+ *
+ * Purpose: Get value for flag controlling overwrite
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Mon May  1 15:50:09 PDT 2006 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETOVRWRT_FC ()
+{
+    API_BEGIN("dbgetovrwrt", int, -1) {
+        API_RETURN(DBGetAllowOverwrites());
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBSETCKSUMS_FC
+ *
+ * Purpose: set value for flag controlling checksums 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Mon May  1 15:50:09 PDT 2006 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETCKSUMS_FC (int *enable)
+{
+    API_BEGIN("dbsetcksums", int, -1) {
+        API_RETURN(DBSetEnableChecksums(*enable));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBGETCKSUMS_FC
+ *
+ * Purpose: Get value for flag controlling checksums
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller 
+ *     Mon May  1 15:50:09 PDT 2006 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETCKSUMS_FC ()
+{
+    API_BEGIN("dbgetcksums", int, -1) {
+        API_RETURN(DBGetEnableChecksums());
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+/*----------------------------------------------------------------------
+ * Routine                                              DBSETCOMPRESS_FC
+ *
+ * Purpose
+ *     Set the compression information.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Warning
+ *     THIS FUNCTION CAUSES A MEMORY LEAK. The temporary string,
+ *     cval, is never freed.  It is put in the optlist instead.
+ *
+ * Returns
+ *
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Thomas R. Treadway, Tue Feb 27 14:10:03 PST 2007
+ *
+ *
+ *
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETCOMPRESS_FC (FCD_DB cvalue, int *lcvalue)
+{
+    char          *cval = NULL;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbsetcompression", int, -1) {
+        if (*lcvalue <= 0)
+            API_ERROR("lcvalue", E_BADARGS);
+
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (strcmp(cvalue, DB_F77NULLSTRING) == 0)
+            API_ERROR("cvalue", E_BADARGS);
+        cval = SW_strndup(cvalue, *lcvalue);
+
+        DBSetCompression(cval);
+    }
+    API_END;
+
+    return(0);
+}
+/*----------------------------------------------------------------------
+ * Routine                                              DBGETCOMPRESS_FC
+ *
+ * Purpose
+ *     Get the compression information.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Warning
+ *     THIS FUNCTION CAUSES A MEMORY LEAK. The temporary string,
+ *     cval, is never freed.  It is put in the optlist instead.
+ *
+ * Returns
+ *
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Thomas R. Treadway, Tue Feb 27 14:10:03 PST 2007
+ *
+ *
+ *
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETCOMPRESS_FC (FCD_DB cvalue, int *lcvalue)
+{
+    char          *cval = NULL;
+
+    API_BEGIN("dbgetcompression", int, -1) {
+        if (*lcvalue <= 0)
+            API_ERROR("lcvalue", E_BADARGS);
+
+        cval = DBGetCompression();
+        cvalue = SW_strndup(cval, *lcvalue);
+
+        API_RETURN(0);
+    }
+    API_END;
+
+    return(0);
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBSETHDFNMS_FC
+ *
+ * Purpose: set value for flag controlling friendly hdf5 names 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Thu Apr 19 19:26:11 PDT 2007 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETHDFNMS_FC (int *enable)
+{
+    API_BEGIN("dbsethdfnms", int, -1) {
+        API_RETURN(DBSetFriendlyHDF5Names(*enable));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                   DBGETHDFNMS_FC
+ *
+ * Purpose: Get value for flag controlling friendly hdf5 names 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Thu Apr 19 19:26:11 PDT 2007 
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETHDFNMS_FC ()
+{
+    API_BEGIN("dbgethdfnms", int, -1) {
+        API_RETURN(DBGetFriendlyHDF5Names());
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                  DBSETDEPWARN_FC
+ *
+ * Purpose: set maximum deprecation warnings issued by silo lib 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Thu Oct 11 20:56:41 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETDEPWARN_FC (int *max_count)
+{
+    API_BEGIN("dbsetdepwarn", int, -1) {
+        API_RETURN(DBSetDeprecateWarnings(*max_count));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                  DBGETDEPWARN_FC
+ *
+ * Purpose: Get max. number of deprecation warnings issued by Silo lib 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Thu Oct 11 20:56:41 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBGETDEPWARN_FC ()
+{
+    API_BEGIN("dbgetdepwarn", int, -1) {
+        API_RETURN(DBGetDeprecateWarnings());
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+SILO_API FORTRAN
+DBREGFOPTS_FC ( int *optlist_id )
+{
+    DBoptlist *optlist = NULL;
+
+    API_BEGIN("dbregfopts", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        API_RETURN(DBRegisterFileOptionsSet(optlist));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+SILO_API FORTRAN
+DBUNREGFOPTS_FC ( int *opts_set_id )
+{
+    API_BEGIN("dbunregfopts", int, -1) {
+        API_RETURN(DBUnregisterFileOptionsSet(*opts_set_id));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+SILO_API FORTRAN
+DBUNREGAFOPTS_FC ()
+{
+    API_BEGIN("dbunregafopts", int, -1) {
+        DBUnregisterAllFileOptionsSets();
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                DBMKMRGTREE_FC
+ *
+ * Purpose
+ *     Create an mrgtree and return its identifier.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBMKMRGTREE_FC (int *source_mesh_type, int *type_info_bits,
+    int *max_root_descendents, int *optlist_id, int *tree_id)
+{
+    DBmrgtree *tree = NULL;
+    DBoptlist *optlist = NULL;
+
+    API_BEGIN("dbmkmrgtree", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+        tree = DBMakeMrgtree(*source_mesh_type, *type_info_bits,
+            *max_root_descendents, optlist);
+        *tree_id = DBFortranAllocPointer(tree);
+
+        API_RETURN(tree ? 0 : (-1));
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                              DBFREEMRGTREE_FC
+ *
+ * Purpose
+ *     Free an mrg tree.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBFREEMRGTREE_FC (int *tree_id)
+{
+    DBmrgtree     *tree= NULL;
+
+    API_BEGIN("dbfreemrgtree", int, -1) {
+        tree = (DBmrgtree *) DBFortranAccessPointer(*tree_id);
+        DBFreeMrgtree(tree);
+        DBFortranRemovePointer(*tree_id);
+        *tree_id = -1;
+        API_RETURN(0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                DBADDREGION_FC
+ *
+ * Purpose
+ *     Add a region to an mrg tree 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDREGION_FC (int *tree_id, FCD_DB region_name, int *lregion_name,
+    int *type_info_bits, int *max_descendents, FCD_DB maps_name,
+    int *lmaps_name, int *nsegs, int *seg_ids, int *seg_sizes,
+    int *seg_types, int *optlist_id, int *status)
+{
+    DBmrgtree *tree = NULL;
+    DBoptlist *optlist = NULL;
+    char *region_nm = NULL, *maps_nm = NULL;
+
+    API_BEGIN("dbaddregion", int, -1) {
+        if (*lregion_name<=0)
+            API_ERROR ("lregion_name", E_BADARGS) ;
+        if (*lmaps_name<=0)
+            API_ERROR ("lmaps_name", E_BADARGS) ;
+
+        tree = (DBmrgtree*) DBFortranAccessPointer(*tree_id);
+        optlist = (DBoptlist*) DBFortranAccessPointer(*optlist_id);
+
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(region_name), DB_F77NULLSTRING))
+            region_nm = NULL ;
+        else
+            region_nm = SW_strndup(_fcdtocp(region_name), *lregion_name);
+
+        if (!strcmp(_fcdtocp(maps_name), DB_F77NULLSTRING))
+            maps_nm = NULL ;
+        else
+            maps_nm = SW_strndup(_fcdtocp(maps_name), *lmaps_name);
+#else
+        if (!strcmp(region_name, DB_F77NULLSTRING))
+            region_nm = NULL ;
+        else
+            region_nm = SW_strndup(region_name, *lregion_name);
+
+        if (!strcmp(maps_name, DB_F77NULLSTRING))
+            maps_nm = NULL ;
+        else
+            maps_nm = SW_strndup(maps_name, *lmaps_name);
+#endif
+
+        *status = DBAddRegion(tree, region_nm, *type_info_bits,
+             *max_descendents, maps_nm, *nsegs, seg_ids, seg_sizes,
+              seg_types, optlist);
+
+        FREE(region_nm);
+        FREE(maps_nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               DBADDREGIONA_FC
+ *
+ * Purpose
+ *     Add a region to an mrg tree 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBADDREGIONA_FC (int *tree_id, int *nregn, FCD_DB regn_names, int *lregn_names,
+    int *type_info_bits, FCD_DB maps_name, int *lmaps_name, int *nsegs,
+    int *seg_ids, int *seg_sizes, int *seg_types, int *optlist_id, int *status)
+{
+    DBmrgtree *tree = NULL;
+    DBoptlist *optlist = NULL;
+    char **regn_nms = NULL, *maps_nm = NULL;
+    char *realregn_names = NULL;
+    int indx, i;
+
+    API_BEGIN("dbaddregiona", int, -1) {
+        if (*lmaps_name<=0)
+            API_ERROR ("lmaps_name", E_BADARGS) ;
+
+        tree = (DBmrgtree*) DBFortranAccessPointer(*tree_id);
+        optlist = (DBoptlist*) DBFortranAccessPointer(*optlist_id);
+
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+#ifdef CRAY
+        if (strcmp(_fcdtocp(regn_names), DB_F77NULLSTRING) == 0)
+            realregn_names = NULL;
+        else
+            realregn_names = _fcdtocp(regn_names);
+
+        if (!strcmp(_fcdtocp(maps_name), DB_F77NULLSTRING))
+            maps_nm = NULL ;
+        else
+            maps_nm = SW_strndup(_fcdtocp(maps_name), *lmaps_name);
+#else
+        if (strcmp(regn_names, DB_F77NULLSTRING) == 0)
+            realregn_names = NULL;
+        else
+            realregn_names = regn_names;
+
+        if (!strcmp(maps_name, DB_F77NULLSTRING))
+            maps_nm = NULL ;
+        else
+            maps_nm = SW_strndup(maps_name, *lmaps_name);
+#endif
+
+        if (*nregn <= 0)
+            API_ERROR("nmesh", E_BADARGS);
+        regn_nms = ALLOC_N(char *, *nregn);
+
+        for (indx = 0, i = 0; i < *nregn; i++) {
+            if (lregn_names[i] < 0)
+                API_ERROR("lregn_names", E_BADARGS);
+            regn_nms[i] = SW_strndup(&realregn_names[indx], lregn_names[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lregn_names[i] ;
+        }
+
+        *status = DBAddRegionArray(tree, *nregn, regn_nms,
+            *type_info_bits, maps_nm, *nsegs, seg_ids, seg_sizes,
+             seg_types, optlist);
+
+        for (i = 0; i < *nregn; i++)
+            FREE(regn_nms[i]);
+        FREE(maps_nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                   DBSETCWR_FC
+ *
+ * Purpose
+ *     Set current working region of an mrg tree 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBSETCWR_FC (int *tree_id, FCD_DB path, int *lpath)
+{
+    DBmrgtree *tree = NULL;
+    char *path_nm = NULL;
+    int err;
+
+    API_BEGIN("dbsetcwr", int, -1) {
+        if (*lpath<=0)
+            API_ERROR ("lpath", E_BADARGS) ;
+
+        tree = (DBmrgtree*) DBFortranAccessPointer(*tree_id);
+
+      /*------------------------------
+       *  Duplicate all ascii strings.
+       *-----------------------------*/
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(path), DB_F77NULLSTRING))
+            path_nm = NULL ;
+        else
+            path_nm = SW_strndup(_fcdtocp(path), *lpath);
+#else
+        if (!strcmp(path, DB_F77NULLSTRING))
+            path_nm = NULL ;
+        else
+            path_nm = SW_strndup(path, *lpath);
+#endif
+
+        err = DBSetCwr(tree, path_nm);
+        FREE(path_nm);
+        API_RETURN(err);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               DBPUTMRGTREE_FC
+ *
+ * Purpose
+ *     Write mrg tree to a file 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTMRGTREE_FC (int *dbid, FCD_DB mrg_tree_name, int *lmrg_tree_name,
+    FCD_DB mesh_name, int *lmesh_name, int *tree_id, int *optlist_id,
+    int *status)
+{
+    DBfile     *dbfile ;
+    DBoptlist  *optlist ;
+    DBmrgtree  *tree;
+    char     *mrg_tree_nm = NULL, *mesh_nm = NULL;
+
+    API_BEGIN ("dbputmrgtree", int, -1) {
+        if (*lmrg_tree_name<=0)
+            API_ERROR ("lmrg_tree_name", E_BADARGS) ;
+        if (*lmesh_name<=0)
+            API_ERROR ("lmesh_name", E_BADARGS) ;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        tree = (DBmrgtree *) DBFortranAccessPointer(*tree_id);
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(mrg_tree_name), DB_F77NULLSTRING))
+            mrg_tree_nm  = NULL;
+        else
+            mrg_tree_nm  = SW_strndup(_fcdtocp(mrg_tree_name), *lmrg_tree_name);
+
+        if (!strcmp(_fcdtocp(mesh_name), DB_F77NULLSTRING))
+            mesh_nm  = NULL;
+        else
+            mesh_nm  = SW_strndup(_fcdtocp(mesh_name), *lmesh_name);
+#else
+        if (!strcmp(mrg_tree_name, DB_F77NULLSTRING))
+            mrg_tree_nm  = NULL;
+        else
+            mrg_tree_nm  = SW_strndup(mrg_tree_name, *lmrg_tree_name);
+
+        if (!strcmp(mesh_name, DB_F77NULLSTRING))
+            mesh_nm  = NULL;
+        else
+            mesh_nm  = SW_strndup(mesh_name, *lmesh_name);
+#endif
+
+        *status = DBPutMrgtree(dbfile, mrg_tree_nm, mesh_nm, tree, optlist);
+
+        FREE(mrg_tree_nm);
+        FREE(mesh_nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                               DBPUTGRPLMAP_FC
+ *
+ * Purpose
+ *     Set current working region of an mrg tree 
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *     To populate the segment_data_ids and, if needed, segment_fracs_ids
+ *     the fortran client will need to use DBMKPTR to register one of
+ *     its pointers as an integer id and then use the resulting id at
+ *     the appropriate entry in segment_data_ids. The fortran client
+ *     should use DBRMPTR to remove the allocated pointer from the
+ *     table after this call is completed.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications
+ *     Thomas R. Treadway, Thu Oct 11 15:21:03 PDT 2007
+ *     Using AC_FC_WRAPPERS for name-mangling
+ *
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTGRPLMAP_FC (int *dbid, FCD_DB map_name, int *lmap_name,
+    int *num_segments, int *groupel_types, int *segment_lengths,
+    int *segment_ids, int *segment_data_ids, int *segment_fracs_ids,
+    int *fracs_data_type, int *optlist_id, int *status)
+{
+    DBfile     *dbfile ;
+    DBoptlist  *optlist ;
+    char       *map_nm = NULL;
+    int       **segment_data = 0;
+    void      **segment_fracs = 0;
+    int         i;
+
+    API_BEGIN ("dbputgrplmap", int, -1) {
+        if (*map_name<=0)
+            API_ERROR ("lmap_name", E_BADARGS) ;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(map_name), DB_F77NULLSTRING))
+            map_nm  = NULL;
+        else
+            map_nm  = SW_strndup(_fcdtocp(map_name), *lmap_name);
+#else
+        if (!strcmp(map_name, DB_F77NULLSTRING))
+            map_nm  = NULL;
+        else
+            map_nm  = SW_strndup(map_name, *lmap_name);
+#endif
+
+        /* convert array of segment data ids to their pointers */
+        segment_data = (int**) malloc(*num_segments * sizeof(int*));
+        for (i = 0; i < *num_segments; i++)
+            segment_data[i] = DBFortranAccessPointer(segment_data_ids[i]);
+
+        /* convert array of segment fracs ids to their pointers */
+        if (segment_fracs_ids)
+        {
+            segment_fracs = (void**) malloc(*num_segments * sizeof(void*));
+            for (i = 0; i < *num_segments; i++)
+                segment_fracs[i] = DBFortranAccessPointer(segment_fracs_ids[i]);
+        }
+
+        *status = DBPutGroupelmap(dbfile, map_nm, *num_segments,
+            groupel_types, segment_lengths, segment_ids, segment_data,
+            segment_fracs, *fracs_data_type, optlist);
+
+        FREE(segment_data);
+        FREE(segment_fracs);
+        FREE(map_nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                  DBPUTCSGM_FC
+ *
+ * Purpose: Write csg mesh to the silo file
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTCSGM_FC (int *dbid, FCD_DB name, int *lname, int *ndims, int *nbounds,
+    const int *typeflags, const int *bndids, const void *coeffs,
+    int *lcoeffs, int *datatype, const double *extents, FCD_DB zlname,
+    int *lzlname, int *optlist_id, int *status) 
+{
+    DBfile     *dbfile ;
+    DBoptlist  *optlist ;
+    char       *nm = NULL;
+    char       *zl_nm = NULL;
+
+    API_BEGIN ("dbputcsgm", int, -1) {
+        if (*name<=0)
+            API_ERROR ("name", E_BADARGS) ;
+        if (*zlname<=0)
+            API_ERROR ("zlname", E_BADARGS) ;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(name), DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(_fcdtocp(name), *lname);
+        if (!strcmp(_fcdtocp(zlname), DB_F77NULLSTRING))
+            zl_nm  = NULL;
+        else
+            zl_nm  = SW_strndup(_fcdtocp(zlname), *lzlname);
+#else
+        if (!strcmp(name, DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(name, *lname);
+        if (!strcmp(zlname, DB_F77NULLSTRING))
+            zl_nm  = NULL;
+        else
+            zl_nm  = SW_strndup(zlname, *lzlname);
+#endif
+
+        *status = DBPutCsgmesh(dbfile, nm, *ndims, *nbounds, typeflags,
+            bndids, coeffs, *lcoeffs, *datatype, extents, zl_nm, optlist);
+
+        FREE(nm);
+        FREE(zl_nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                 DBPUTCSGV_FC
+ *
+ * Purpose: Write csg variable to the silo file
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *     To populate the data_ids
+ *     the fortran client will need to use DBMKPTR to register 
+ *     its pointers as integer ids and then use the resulting id at
+ *     the appropriate entry in data_ids. The fortran client
+ *     should use DBRMPTR to remove the allocated pointer from the
+ *     table after this call is completed.
+ *
+ * Returns
+ *
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTCSGV_FC (int *dbid, FCD_DB name, int *lname, FCD_DB meshname,
+    int *lmeshname, int *data_ids, int *nvals, int *datatype,
+    int *centering, int *optlist_id, int *status)
+{
+    DBfile     *dbfile ;
+    DBoptlist  *optlist ;
+    char       *nm = NULL;
+    char       *m_nm = NULL;
+    void      **data = NULL;
+    int         i;
+
+    API_BEGIN ("dbputcsgv", int, -1) {
+        if (*name<=0)
+            API_ERROR ("name", E_BADARGS) ;
+        if (*meshname<=0)
+            API_ERROR ("meshname", E_BADARGS) ;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(name), DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(_fcdtocp(name), *lname);
+        if (!strcmp(_fcdtocp(meshname), DB_F77NULLSTRING))
+            m_nm  = NULL;
+        else
+            m_nm  = SW_strndup(_fcdtocp(meshname), *lmeshname);
+#else
+        if (!strcmp(name, DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(name, *lname);
+        if (!strcmp(meshname, DB_F77NULLSTRING))
+            m_nm  = NULL;
+        else
+            m_nm  = SW_strndup(meshname, *lmeshname);
+#endif
+
+        data = (void**) malloc(*nvals * sizeof(void*));
+        for (i = 0; i < *nvals; i++)
+            data[i] = DBFortranAccessPointer(data_ids[i]);
+
+        *status = DBPutCsgvar(dbfile, nm, m_nm, 1, &nm,
+            data, *nvals, *datatype, *centering, optlist);
+
+        FREE(nm);
+        FREE(m_nm);
+        FREE(data);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*----------------------------------------------------------------------
+ * Routine                                                 DBPUTCSGZL_FC
+ *
+ * Purpose: Write csg zonelist to the silo file
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Tue Oct  9 22:25:20 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *--------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPUTCSGZL_FC (int *dbid, FCD_DB name, int *lname, int *nregs,
+    const int *typeflags, const int *leftids, const int *rightids,
+    const void *xforms, int *lxforms, int *datatype, int *nzones,
+    const int *zonelist, int *optlist_id, int *status) 
+{
+    DBfile     *dbfile ;
+    DBoptlist  *optlist ;
+    char       *nm = NULL;
+
+    API_BEGIN ("dbputcsgzl", int, -1) {
+        if (*name<=0)
+            API_ERROR ("name", E_BADARGS) ;
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+
+#ifdef CRAY
+        if (!strcmp(_fcdtocp(name), DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(_fcdtocp(name), *lname);
+#else
+        if (!strcmp(name, DB_F77NULLSTRING))
+            nm  = NULL;
+        else
+            nm  = SW_strndup(name, *lname);
+#endif
+
+        *status = DBPutCSGZonelist(dbfile, nm, *nregs, typeflags, leftids,
+            rightids, xforms, *lxforms, *datatype, *nzones, zonelist,
+            optlist); 
+
+        FREE(nm);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
+/*-------------------------------------------------------------------------
+ * Routine                                                       DBPMRGV_FC
+ *
+ * Purpose
+ *     Writes a mrg variable object into the open database.
+ *
+ * Notes
+ *     This function was built to be called from Fortran.
+ *     To populate the data_ids
+ *     the fortran client will need to use DBMKPTR to register 
+ *     its pointers as integer ids and then use the resulting id at
+ *     the appropriate entry in data_ids. The fortran client
+ *     should use DBRMPTR to remove the allocated pointer from the
+ *     table after this call is completed.
+ *
+ * Returns
+ *
+ * Returns
+ *     Returns 0 on success, -1 on failure.
+ *
+ * Programmer
+ *     Mark C. Miller, Wed Oct 24 15:28:51 PDT 2007
+ *
+ * Modifications:
+ *     Kathleen Bonnell, Wed Sep 2 15:31:26 PDT 2009
+ *     Added SILO_API so symbols are correctly exported on windows.
+ *
+ *     Mark C. Miller, Thu Feb  4 10:10:28 PST 2010
+ *     Added patch by Olivier Cessanat to allow variable length strings.
+ *-------------------------------------------------------------------------*/
+SILO_API FORTRAN
+DBPMRGV_FC (int *dbid, FCD_DB name, int *lname, FCD_DB tname, int *ltname,
+    int *ncomps, FCD_DB compnames, int *lcompnames,
+    int *nregns, FCD_DB regnnames, int *lregnnames,
+    int *datatype, int *data_ids, int *optlist_id, int *status)
+{
+    DBfile        *dbfile = NULL;
+    char         **compnms = NULL, *nm = NULL;
+    char         **regnnms = NULL, *tnm = NULL;
+    char          *realcompnames = NULL;
+    char          *realregnnames = NULL;
+    void         **data = NULL;
+    int            i, indx;
+    DBoptlist     *optlist = NULL;
+
+    API_BEGIN("dbpmrgv", int, -1) {
+        optlist = (DBoptlist *) DBFortranAccessPointer(*optlist_id);
+        /*------------------------------
+         *  Duplicate all ascii strings.
+         *-----------------------------*/
+        if (*lname <= 0)
+            API_ERROR("lname", E_BADARGS);
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(name), DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(_fcdtocp(name), *lname);
+        if (strcmp(_fcdtocp(tname), DB_F77NULLSTRING) == 0)
+            tnm = NULL;
+        else
+            tnm = SW_strndup(_fcdtocp(tname), *ltname);
+#else
+        if (strcmp(name, DB_F77NULLSTRING) == 0)
+            nm = NULL;
+        else
+            nm = SW_strndup(name, *lname);
+        if (strcmp(tname, DB_F77NULLSTRING) == 0)
+            tnm = NULL;
+        else
+            tnm = SW_strndup(tname, *ltname);
+#endif
+
+#ifdef CRAY
+        if (strcmp(_fcdtocp(compnames), DB_F77NULLSTRING) == 0)
+            realcompnames = NULL;
+        else
+            realcompnames = _fcdtocp(compnames);
+        if (strcmp(_fcdtocp(regnnames), DB_F77NULLSTRING) == 0)
+            realregnnames = NULL;
+        else
+            realregnnames = _fcdtocp(regnnames);
+#else
+        if (strcmp(compnames, DB_F77NULLSTRING) == 0)
+            realcompnames = NULL;
+        else
+            realcompnames = compnames;
+        if (strcmp(regnnames, DB_F77NULLSTRING) == 0)
+            realregnnames = NULL;
+        else
+            realregnnames = regnnames;
+#endif
+
+        dbfile = (DBfile *) DBFortranAccessPointer(*dbid);
+
+        if (*ncomps <= 0)
+            API_ERROR("ncomps", E_BADARGS);
+        compnms = ALLOC_N(char *, *ncomps);
+        for (indx = 0, i = 0; i < *ncomps; i++) {
+            if (lcompnames[i] < 0)
+                API_ERROR("lcompnames", E_BADARGS);
+            compnms[i] = SW_strndup(&realcompnames[indx], lcompnames[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lcompnames[i] ;
+        }
+
+        if (*nregns <= 0)
+            API_ERROR("nregns", E_BADARGS);
+        regnnms = ALLOC_N(char *, *nregns);
+        for (indx = 0, i = 0; i < *nregns; i++) {
+            if (lregnnames[i] < 0)
+                API_ERROR("lregnnames", E_BADARGS);
+            regnnms[i] = SW_strndup(&realregnnames[indx], lregnnames[i]);
+            if (fortran2DStrLen > 0)
+                indx += fortran2DStrLen;
+            else
+                indx += lregnnames[i] ;
+        }
+
+        data = (void**) malloc(*nregns * sizeof(void*));
+        for (i = 0; i < *nregns; i++)
+            data[i] = DBFortranAccessPointer(data_ids[i]);
+
+        /*----------------------------------------
+         *  Invoke the C function to do the work.
+         *---------------------------------------*/
+        *status = DBPutMrgvar(dbfile, nm, tnm, *ncomps, compnms,
+            *nregns, regnnms, *datatype, data, optlist);
+
+        for (i = 0; i < *ncomps; i++)
+            FREE(compnms[i]);
+        FREE(compnms);
+        for (i = 0; i < *nregns; i++)
+            FREE(regnnms[i]);
+        FREE(regnnms);
+        FREE(nm);
+        FREE(tnm);
+        FREE(data);
+
+        API_RETURN((*status < 0) ? (-1) : 0);
+    }
+    API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
+}
+
diff --git a/src/silo/silo_f.h b/src/silo/silo_f.h
new file mode 100644
index 0000000..3697fce
--- /dev/null
+++ b/src/silo/silo_f.h
@@ -0,0 +1,154 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef SILO_F_H
+#define SILO_F_H
+
+
+/*
+ * SILO FORTRAN Interface.
+ */
+
+/* I can't use DB_FCD because mkinc looks for DB* identifiers */
+#ifdef CRAY
+#include <fortran.h>
+#define FCD_DB _fcd
+#else
+#define FCD_DB char*
+#endif
+
+#define FPTR(X,T)   ((!(X)||DB_F77NULL==(X))?(T)NULL:(T)(X))
+
+#define DBADDIOPT_FC     FC_FUNC (dbaddiopt,DBADDIOPT)
+#define DBADDROPT_FC     FC_FUNC (dbaddropt,DBADDROPT)
+#define DBADDDOPT_FC     FC_FUNC (dbadddopt,DBADDDOPT)
+#define DBADDCOPT_FC     FC_FUNC (dbaddcopt,DBADDCOPT)
+#define DBADDCAOPT_FC     FC_FUNC (dbaddcaopt,DBADDCAOPT)
+#define DBMKOPTLIST_FC   FC_FUNC (dbmkoptlist,DBMKOPTLIST)
+#define DBFREEOPTLIST_FC FC_FUNC (dbfreeoptlist,DBFREEOPTLIST)
+#define DBPUTMAT_FC      FC_FUNC (dbputmat,DBPUTMAT)
+#define DBPUTMSP_FC      FC_FUNC (dbputmsp,DBPUTMSP)
+#define DBCALCFL_FC      FC_FUNC (dbcalcfl,DBCALCFL)
+#define DBCLOSE_FC       FC_FUNC (dbclose,DBCLOSE)
+#define DBCREATE_FC      FC_FUNC (dbcreate,DBCREATE)
+#define DBINQLEN_FC      FC_FUNC (dbinqlen,DBINQLEN)
+#define DBMKDIR_FC       FC_FUNC (dbmkdir,DBMKDIR)
+#define DBOPEN_FC        FC_FUNC (dbopen,DBOPEN)
+#define DBPUTFL_FC       FC_FUNC (dbputfl,DBPUTFL)
+#define DBWRTFL_FC       FC_FUNC (dbwrtfl,DBWRTFL)
+#define DBPUTDEFVARS_FC  FC_FUNC (dbputdefvars,DBPUTDEFVARS)
+#define DBPUTMMESH_FC    FC_FUNC (dbputmmesh,DBPUTMMESH)
+#define DBPUTMVAR_FC     FC_FUNC (dbputmvar,DBPUTMVAR)
+#define DBPUTMMAT_FC     FC_FUNC (dbputmmat,DBPUTMMAT)
+#define DBPUTPM_FC       FC_FUNC (dbputpm,DBPUTPM)
+#define DBPUTPV1_FC      FC_FUNC (dbputpv1,DBPUTPV1)
+#define DBPUTQM_FC       FC_FUNC (dbputqm,DBPUTQM)
+#define DBPUTQV1_FC      FC_FUNC (dbputqv1,DBPUTQV1)
+#define DBPUTQV_FC       FC_FUNC (dbputqv,DBPUTQV)
+#define DBPUTUM_FC       FC_FUNC (dbputum,DBPUTUM)
+#define DBPUTUV1_FC      FC_FUNC (dbputuv1,DBPUTUV1)
+#define DBPUTZL_FC       FC_FUNC (dbputzl,DBPUTZL)
+#define DBPUTZL2_FC      FC_FUNC (dbputzl2,DBPUTZL2)
+#define DBRDVAR_FC       FC_FUNC (dbrdvar,DBRDVAR)
+#define DBRDVARSLICE_FC  FC_FUNC (dbrdvarslice,DBRDVARSLICE)
+#define DBWRITESLICE_FC  FC_FUNC (dbwriteslice,DBWRITESLICE)
+#define DBSETDIR_FC      FC_FUNC (dbsetdir,DBSETDIR)
+#define DBSETDIRID_FC    FC_FUNC (dbsetdirid,DBSETDIRID)
+#define DBSHOWERRORS_FC  FC_FUNC (dbshowerrors,DBSHOWERRORS)
+#define DBWRITE_FC       FC_FUNC (dbwrite,DBWRITE)
+#define DBPUTCA_FC       FC_FUNC (dbputca,DBPUTCA)
+#define DBGETCA_FC       FC_FUNC (dbgetca,DBGETCA)
+#define DBPUTCURVE_FC    FC_FUNC (dbputcurve,DBPUTCURVE)
+#define DBGETCURVE_FC    FC_FUNC (dbgetcurve,DBGETCURVE)
+#define DBADDICMP_FC     FC_FUNC (dbaddicmp,DBADDICMP)
+#define DBADDRCMP_FC     FC_FUNC (dbaddrcmp,DBADDRCMP)
+#define DBADDCCMP_FC     FC_FUNC (dbaddccmp,DBADDCCMP)
+#define DBMKOBJECT_FC    FC_FUNC (dbmkobject,DBMKOBJECT)
+#define DBFREEOBJECT_FC  FC_FUNC (dbfreeobject,DBFREEOBJECT)
+#define DBGETQV1_FC      FC_FUNC (dbgetqv1,DBGETQV1)
+#define DBFGETCA_FC      FC_FUNC (dbfgetca,DBFGETCA)
+#define DBINQCA_FC       FC_FUNC (dbinqca,DBINQCA)
+#define DBINQFILE_FC     FC_FUNC (dbinqfile,DBINQFILE)
+#define DBSET2DSTRLEN_FC FC_FUNC (dbset2dstrlen,DBSET2DSTRLEN)
+#define DBGET2DSTRLEN_FC FC_FUNC (dbget2dstrlen,DBGET2DSTRLEN)
+#define DBSETOVRWRT_FC   FC_FUNC (dbsetovrwrt,DBSETOVRWRT)
+#define DBGETOVRWRT_FC   FC_FUNC (dbgetovrwrt,DBGETOVRWRT)
+#define DBSETCKSUMS_FC   FC_FUNC (dbsetcksums,DBSETCKSUMS)
+#define DBGETCKSUMS_FC   FC_FUNC (dbgetcksums,DBGETCKSUMS)
+#define DBSETCOMPRESS_FC FC_FUNC (dbsetcompress,DBSETCOMPRESS)
+#define DBGETCOMPRESS_FC FC_FUNC (dbgetcompress,DBGETCOMPRESS)
+#define DBSETHDFNMS_FC   FC_FUNC (dbsethdfnms,DBSETHDFNMS)
+#define DBGETHDFNMS_FC   FC_FUNC (dbgethdfnms,DBGETHDFNMS)
+#define DBSETDEPWARN_FC  FC_FUNC (dbsetdepwarn,DBSETDEPWARN)
+#define DBGETDEPWARN_FC  FC_FUNC (dbgetdepwarn,DBgETDEPWARN)
+#define DBPUTCSGM_FC     FC_FUNC (dbputcsgm,DBPUTCSGM)
+#define DBPUTCSGZL_FC    FC_FUNC (dbputcsgzl,DBPUTCSGZL)
+#define DBPUTCSGV_FC     FC_FUNC (dbputcsgv,DBPUTCSGV)
+#define DBMKMRGTREE_FC   FC_FUNC (dbmkmrgtree,DBMKMRGTREE)
+#define DBFREEMRGTREE_FC FC_FUNC (dbfreemrgtree,DBFREEMRGTREE)
+#define DBADDREGION_FC   FC_FUNC (dbaddregion,DBADDREGION)
+#define DBADDREGIONA_FC  FC_FUNC (dbaddregiona,DBADDREGIONA)
+#define DBSETCWR_FC      FC_FUNC (dbsetcwr,DBSETCWR)
+#define DBPUTMRGTREE_FC  FC_FUNC (dbputmrgtree,DBPUTMRGTREE)
+#define DBPUTGRPLMAP_FC  FC_FUNC (dbputgrplmap,DBPUTGRPLMAP)
+#define DBMKPTR_FC       FC_FUNC (dbmkptr,DBMKPTR)
+#define DBRMPTR_FC       FC_FUNC (dbrmptr,DBRMPTR)
+#define DBPMRGV_FC       FC_FUNC (dbpmrgv,DBPMRGV)
+#define DBERRNO_FC       FC_FUNC (dberrno, DBERRNO)
+#define DBREGFOPTS_FC	 FC_FUNC (dbregfopts, DBREGFOPTS)
+#define DBUNREGFOPTS_FC  FC_FUNC (dbunregfopts, DBUNREGFOPTS)
+#define DBUNREGAFOPTS_FC FC_FUNC (dbunregafopts, DBUNREGAFOPTS)
+
+void    *DBFortranAccessPointer(int value);
+
+#endif /* !SILO_F_H */
diff --git a/src/silo/silo_fcb.c b/src/silo/silo_fcb.c
new file mode 100644
index 0000000..d9c8a35
--- /dev/null
+++ b/src/silo/silo_fcb.c
@@ -0,0 +1,105 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * The application normally defines the DBOpenCB and DBCreateCB
+ * callback vectors, but in fortran the application is not able to
+ * initialize these data structures.
+ *
+ * Fortran programmers must initialize the callback vectors for
+ * the fortran functions `dbopen' and `dbcreate' when their application
+ * is compiled.  This is done by compiling this simple C program
+ * into an object file, and then giving the name of the object file
+ * as one of the Fortran source files.
+ *
+ * First decide which device drivers (database formats) are needed
+ * by your application.  Then either supply the device driver names
+ * on the command line as shown below, or permanently add their
+ * names to this file.  For instance, if your application always
+ * uses the PDB and ASCII drivers, you would add the following
+ * lines below:
+ *
+ *  #define DB_PDB
+ * #define DB_ASCII
+ *
+ * Compile this file with the C compiler.  The requested device drivers
+ * are activated as described above and/or by giving the names to the
+ * C compiler as `-DDB_name'
+ *
+ * cc -c -DDB_PDB -DDB_ASCII silo_fbc.c
+ *
+ * The C compiler will generate a `silo_fbc.o' file which can be
+ * included in the Fortran compiler command line as:
+ *
+ *  f77 ... application.f silo_fbc.o ...
+ */
+
+/***-----------------------------------------------------------***/
+/*** If you always use the same device drivers, they can be    ***/
+/*** defined here | to save you from giving their names to the ***/
+/*** C compiler   |  every time.                               ***/
+/***              |                                            ***/
+/***              V					       ***/
+
+#if 0
+#define DB_DRIVERNAME
+#endif
+
+
+/***-----------------------------------------------------------***/
+/*** Dont change anything below this line...                   ***/
+/***-----------------------------------------------------------***/
+#define DB_MAIN
+#include "silo.h"
+#include "silo_drivers.h"
diff --git a/src/silo/silo_ns.c b/src/silo/silo_ns.c
new file mode 100644
index 0000000..38db9d0
--- /dev/null
+++ b/src/silo/silo_ns.c
@@ -0,0 +1,478 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
+#include <string.h>
+#include <silo_private.h>
+
+typedef struct _DBexprnode {
+    char type;
+    int val;
+    char sval[128];
+    struct _DBexprnode *left;
+    struct _DBexprnode *right;
+} DBexprnode;
+
+static void
+FreeTree(DBexprnode *tree)
+{
+    if (!tree)
+        return;
+    FreeTree(tree->left);
+    FreeTree(tree->right);
+    free(tree);
+}
+
+static DBexprnode *
+UpdateTree(DBexprnode *tree, const char t, int v, char *s)
+{
+    DBexprnode *retval = 0;
+    DBexprnode *newnode = (DBexprnode *) calloc(1,sizeof(DBexprnode));
+    newnode->type = t;
+    if (t == 'c')
+        newnode->val = v;
+    else 
+    {
+        if (s)
+            strncpy(newnode->sval, s, sizeof(newnode->sval)-1);
+        else
+            strcpy(newnode->sval, "(null)");
+    }
+
+    newnode->left = 0;
+    newnode->right = 0;
+
+    if (tree == 0)
+    {
+        retval = newnode;
+    }
+    else if (tree->left == 0 && tree->right == 0)
+    {
+        /* t better be an operator */
+        newnode->left = tree;
+        retval = newnode;
+    }
+    else if (tree->left != 0 && tree->right == 0)
+    {
+        /* t better be a constant */
+        tree->right = newnode;
+        retval = tree;
+    }
+    else if (tree->left == 0 && tree->right != 0)
+    {
+        /* should never happen */
+        ;
+    }
+    else
+    {
+        /* t better be an operator */
+        newnode->left = tree;
+        retval = newnode;
+    }
+
+    return retval;
+}
+
+static DBexprnode *
+BuildExprTree(const char **porig)
+{
+    DBexprnode *tree = 0;
+    const char *p = *porig;
+
+    while (*p != '\0')
+    {
+        switch (*p)
+        {
+            case ' ':
+            {
+                break; /* ignore spaces */
+            }
+
+            case '0': case '1': case '2': case '3': case '4':
+            case '5': case '6': case '7': case '8': case '9':
+            {
+                char tokbuf[256];
+                char *tp = tokbuf;
+                long int val;
+                while ('0' <= *p && *p <= '9')
+                    *tp++ = *p++;
+                p--;
+                *tp = '\0';
+                errno = 0;
+                val = strtol(tokbuf, 0, 0);
+                if (errno == 0 && val != LONG_MIN && val != LONG_MAX)
+                    tree = UpdateTree(tree, 'c', (int) val, 0);
+                break;
+            }
+
+            case '\'': /* beginning of string */
+            {
+                char tokbuf[129];
+                char *tp = tokbuf;
+                p++;
+                while (*p != '\'')
+                    *tp++ = *p++;
+                *tp = '\0';
+                errno = 0;
+                tree = UpdateTree(tree, 's', 0, tokbuf);
+                break;
+            }
+
+            case '$': /* array ref */
+            case '#':
+            {
+                char typec = *p;
+                char tokbuf[129];
+                char *tp = tokbuf;
+                DBexprnode *subtree;
+                p++;
+                while (*p != '[')
+                    *tp++ = *p++;
+                p--;
+                *tp = '\0';
+                errno = 0;
+                tree = UpdateTree(tree, typec, 0, tokbuf);
+                p++;
+                subtree = BuildExprTree(&p);
+                if (tree->left == 0)
+                    tree->left = subtree;
+                else if (tree->right == 0)
+                    tree->right = subtree;
+                break;
+            }
+
+            case 'n':
+            case '+': case '-': case '*': case '/': case '%':
+            case '|': case '&': case '^':
+            {
+                tree = UpdateTree(tree, *p, 0, 0);
+                break;
+            }
+
+            case '(':
+            {
+                DBexprnode *subtree;
+                p++;
+                subtree = BuildExprTree(&p);
+                if (tree == 0)
+                    tree = subtree;
+                else if (tree->left == 0)
+                    tree->left = subtree;
+                else if (tree->right == 0)
+                    tree->right = subtree;
+                break;
+            }
+
+            case ']': /* terminating array ref */
+            case ')': /* terminating subtree */
+            {
+                *porig = p;
+                return tree;
+            }
+
+            case '?':
+            {
+                DBexprnode *newtreeq = 0;
+                DBexprnode *newnodec = 0;
+                DBexprnode *subtreel, *subtreer;
+                newtreeq = UpdateTree(newtreeq, *p, 0, 0);
+                newtreeq->left = tree;
+                p++;
+                subtreel = BuildExprTree(&p);
+                p++;
+                subtreer = BuildExprTree(&p);
+                newnodec = UpdateTree(newnodec, ':', 0, 0);
+                newnodec->left = subtreel;
+                newnodec->right = subtreer;
+                newtreeq->right = newnodec;
+                tree = newtreeq;
+                break;
+            }
+
+            case ':': /* terminating if-then-else (?::) */
+            {
+                *porig = p;
+                return tree;
+            }
+
+
+        }
+        p++;
+    }
+    *porig = p;
+    return tree;
+}
+
+/* very simple circular cache for a handful of embedded strings */
+static int SaveString(DBnamescheme *ns, const char *sval)
+{
+    int modn = ns->nembed++ % DB_MAX_EXPSTRS;
+    FREE(ns->embedstrs[modn]);
+    ns->embedstrs[modn] = STRDUP(sval);
+    return modn;
+}
+
+static int
+EvalExprTree(DBnamescheme *ns, DBexprnode *tree, int n)
+{
+    if (tree == 0)
+        return 0;
+    else if ((tree->type == '$' || tree->type == '#') && tree->left != 0)
+    {
+        int i, q = EvalExprTree(ns, tree->left, n);
+        for (i = 0; i < ns->narrefs; i++)
+        {
+            if (strcmp(tree->sval, ns->arrnames[i]) == 0)
+            {
+                if (tree->type == '$')
+                    return SaveString(ns,  ((char**)ns->arrvals[i])[q]);
+                else
+                    return ns->arrvals[i][q];
+            }
+        }
+    }
+    else if (tree->left == 0 && tree->right == 0)
+    {
+        if (tree->type == 'c')
+            return tree->val;
+        else if (tree->type == 'n')
+            return n;
+        else if (tree->type == 's')
+            return SaveString(ns, tree->sval);
+    }
+    else if (tree->left != 0 && tree->right != 0)
+    {
+        int vc = 0, vl, vr;
+        if (tree->type == '?')
+        {
+            vc = EvalExprTree(ns, tree->left, n);
+            tree = tree->right;
+        }
+        vl = EvalExprTree(ns, tree->left, n);
+        vr = EvalExprTree(ns, tree->right, n);
+        switch (tree->type)
+        {
+            case '+': return vl + vr;
+            case '-': return vl - vr;
+            case '*': return vl * vr;
+            case '/': return vl / vr;
+            case '%': return vl % vr;
+            case '|': return vl | vr;
+            case '&': return vl & vr;
+            case '^': return vl ^ vr;
+            case ':': return vc ? vl : vr; 
+        }
+    }
+    return 0;
+}
+
+PUBLIC DBnamescheme *
+DBMakeNamescheme(const char *fmt, ...)
+{
+    va_list ap;
+    int i, j, k, n, pass, ncspecs, done;
+    DBnamescheme *rv = 0;
+
+    /* We have nothing to do for a null or empty format string */
+    if (fmt == 0 || *fmt == '\0')
+        return 0;
+
+    /* Start by allocating an empty name scheme */
+    rv = DBAllocNamescheme();
+    
+    /* set the delimeter character */
+    rv->delim = fmt[0];
+
+    /* compute length up to max of 4096 of initial segment of fmt representing
+       the printf-style format string. */
+    n = 1;
+    while (n < 4096 && fmt[n] != '\0' && fmt[n] != rv->delim)
+        n++;
+    if (n == 4096) /* we pick arb. upper bound in length of 4096 */
+    {
+        DBFreeNamescheme(rv);
+        return 0;
+    }
+
+    /* grab just the part of fmt that is the printf-style format string */
+    rv->fmt = STRNDUP(&fmt[1],n-1);
+    rv->fmtlen = n-1;
+
+    /* In 2 passes, count conversion specs. and then setup pointers to each */ 
+    for (pass = 0; pass < 2; pass++)
+    {
+        if (pass == 1)
+        {
+            rv->fmtptrs = (const char **) calloc(rv->ncspecs+1, sizeof(char*));
+            rv->ncspecs = 0;
+        }
+        for (i = 0; i < rv->fmtlen-1; i++)
+        {
+            if (rv->fmt[i] == '%' && 
+                rv->fmt[i+1] != '%')
+            {
+                if (pass == 1)
+                    rv->fmtptrs[rv->ncspecs] = &(rv->fmt[i]);
+                rv->ncspecs++;
+            }
+        }
+    }
+    rv->fmtptrs[rv->ncspecs] = &(rv->fmt[n+1]);
+
+    /* If there are no conversion specs., we have nothing to do */
+    if (rv->ncspecs == 0)
+        return rv;
+
+    /* Make a pass through rest of fmt string to count array refs in the
+       expression substrings. */
+    i = n+1;
+    while (i < 4096 && fmt[i] != '\0')
+    {
+        if (fmt[i] == '$' || fmt[i] == '#')
+            rv->narrefs++;
+        i++;
+    }
+    if (i == 4096)
+    {
+        DBFreeNamescheme(rv);
+        return 0;
+    }
+
+    /* allocate various arrays needed by the naming scheme */
+    rv->exprstrs = (char **) calloc(rv->ncspecs, sizeof(char*));
+    if (rv->narrefs > 0)
+    {
+        rv->arrnames = (char **) calloc(rv->narrefs, sizeof(char*));
+        rv->arrvals  = (const int **) calloc(rv->narrefs, sizeof(int*));
+    }
+
+    /* Ok, now go through rest of fmt string a second time and grab each
+       expression that goes with each conversion spec. Also, handle array refs */
+    i = n+1;
+    rv->narrefs = 0;
+    ncspecs = 0;
+    va_start(ap, fmt);
+    done = 0;
+    while (!done)
+    {
+        if (fmt[i] == '$' || fmt[i] == '#')
+        {
+            for (j = 1; fmt[i+j] != '['; j++)
+                ;
+            for (k = 0; k < rv->narrefs; k++)
+            {
+                if (strncmp(&fmt[i+1],rv->arrnames[k],j-1) == 0)
+                    break;
+            }
+            if (k == rv->narrefs)
+            {
+                rv->arrnames[k] = STRNDUP(&fmt[i+1], j-1);
+                rv->arrvals[k] = va_arg(ap, const int *);
+                rv->narrefs++;
+            }
+        }
+        else if (fmt[i] == rv->delim || fmt[i] == '\0')
+        {
+            rv->exprstrs[ncspecs] = STRNDUP(&fmt[n+1],i-(n+1));
+            ncspecs++;
+            if (fmt[i] == '\0' ||
+                (fmt[i] == rv->delim && fmt[i] == '\0'))
+                done = 1;
+            n = i;
+        }
+        i++;
+    }
+    va_end(ap);
+
+    return rv;
+}
+
+PUBLIC const char *
+DBGetName(DBnamescheme *ns, int natnum)
+{
+    char *currentExpr, *tmpExpr;
+    static char retval[1024];
+    int i;
+
+    retval[0] = '\0';
+    strncat(retval, ns->fmt, ns->fmtptrs[0] - ns->fmt);
+    for (i = 0; i < ns->ncspecs; i++)
+    {
+        char tmp[256];
+        char tmpfmt[256] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+        DBexprnode *exprtree;
+        int theVal;
+
+        currentExpr = STRDUP(ns->exprstrs[i]);
+        tmpExpr = currentExpr;
+        exprtree = BuildExprTree((const char **)&currentExpr);
+        theVal = EvalExprTree(ns, exprtree, natnum);
+        FreeTree(exprtree);
+        strncpy(tmpfmt, ns->fmtptrs[i], ns->fmtptrs[i+1] - ns->fmtptrs[i]);
+        if (strcmp(tmpfmt, "%s") == 0)
+            sprintf(tmp, tmpfmt, ns->embedstrs[theVal]);
+        else
+            sprintf(tmp, tmpfmt, theVal);
+        strcat(retval, tmp);
+        FREE(tmpExpr);
+    }
+    return retval;
+}
diff --git a/src/silo/silo_private.h b/src/silo/silo_private.h
new file mode 100644
index 0000000..6a060c1
--- /dev/null
+++ b/src/silo/silo_private.h
@@ -0,0 +1,897 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * SILO Private header file.
+ *
+ * This file contains the private parts of SILO and is included
+ * by every SILO source file.
+ */
+#ifndef SILO_PRIVATE_H
+#define SILO_PRIVATE_H
+
+#include "config.h" /*silo configuration settings */
+#if HAVE_STDLIB_H
+#include <stdlib.h> /*for malloc,calloc,realloc, etc */
+#endif
+#include <setjmp.h> /*for unwind_protect(), etc */
+#if HAVE_STRING_H
+#include <string.h> /*for STR_BEGINSWITH, etc */
+#endif
+#if defined(_WIN32)
+#include <silo_win32_compatibility.h>
+#else
+#if HAVE_UNISTD_H
+#include <unistd.h> /*for access() F_OK, R_OK */
+#endif
+#endif
+#include "silo.h"
+
+/*
+ * The error mechanism....
+ *
+ * All application programming interface (API) function bodies are
+ * surrounded by an `API_BEGIN' and an `API_END.'  Inside this construct,
+ * the `return' statement should not be used is it would result in
+ * leaving an invalid jump structure on the jump stack, Jstk.
+ * If an error occurs which causes db_perror() to longjump back to the
+ * inside of the API_BEGIN macro, the API_BEGIN macro will remove the invalid
+ * entries from the jump stack.  But just to be safe, all occurances of
+ * a `return' statement inside the API_BEGIN/API_END construct should be
+ * coded as an `API_RETURN(x)' macro call.  As a convenience, returning
+ * the failure value as registered with API_BEGIN may be done by calling
+ * API_ERROR().  API_BEGIN and API_BEGIN2 cannot be used in routines that
+ * are recursive.  This is because there are two local variables that are
+ * declared static so that setjmp and longjmp work properly.
+ *
+ * Synopsis:
+ *
+ *  API_BEGIN (name, type, failure) {
+ *
+ *    if (...) API_ERROR(string, errno) ;
+ *
+ *    API_RETURN (retval) ;
+ *
+ *  } API_END ;
+ *
+ * Where:
+ *   `name' is a string that is the name of the API function.
+ *
+ *   `type' is the API function return type.
+ *
+ *   `failure' is the API function failure return value.
+ *
+ *   `string' is an error message auxilliary string--1st arg to db_perror()
+ *
+ *   `errno' is the error number--one of the E_... constants.
+ *
+ *   `retval' is a return value, which can be a function call and the
+ *   function call is protected by the API_BEGIN/API_END.
+ *
+ * Example:
+ *
+ * > This is an application program interface function that calls
+ * > one of the functions in the `DBOpenCB' callback vector.  The
+ * > callback might fail by calling db_perror() in which case this
+ * > API function might be responsible for issuing the error message.
+ *
+ *  PUBLIC DBfile *DBOpen (char *name, int type, int mode) {
+ *
+ *    API_BEGIN ("DBOpen", DBfile*, NULL) {
+ *       if (!name || !*name) API_ERROR ("name", E_BADARG) ;
+ *       if (!DBOpenCB[type]) API_ERROR (NULL, E_NOTIMP) ;
+ *       API_RETURN ((DBOpenCB[type])(name, mode)) ;
+ *    } API_END ;
+ * }
+ *
+ *
+ * > This is an example `open' callback function for the PDB device
+ * > driver.  The function allocates some memory on the heap and then
+ * > calls functions that might fail via db_perror().  The failures
+ * > cause the clean-up body to be executed.  The clean-up code is
+ * > activated in one of three ways:
+ * >   Implicitly by calling db_perror() which may longjmp to the
+ * >     cleanup section.
+ * >   Implicitly by calling a function that might call db_perror()
+ * >     that might longjmp to the cleanup section (possibly after
+ * >     going through other clean-up sections on the jump stack)
+ * >   Explicitly through the UNWIND() macro.  A `return' statement
+ * > should never appear in a PROTECT/CLEANUP/END_PROTECT construct
+ * > as this would bypass the END_PROTECT.
+ * >
+ * > SILO_CALLBACK int db_pdb_open (char *name, int mode)
+ * > {
+ * >     char  *path=NULL, *fullname=NULL;
+ * >     int  fd;
+ * >     
+ * >     PROTECT {
+ * >         path = search_paths (name);
+ * >         fullname = MALLOC (strlen(path)+strlen(name)+2);
+ * >         if (!fullname) {
+ * >             db_perror (NULL, E_NOMEM, "db_pdb_open");
+ * >             UNWIND();
+ * >         }
+ * >         sprintf (fullname, "%s/%s", path, name);
+ * >         fd = db_pdb_open_file (fullname);
+ * >         if (fd<0)
+ * >            UNWIND();
+ * >     } CLEANUP {
+ * >             FREE (path);
+ * >             FREE (fullname);
+ * >     } END_PROTECT;
+ * >     return fd;
+ * > }
+ * 
+ *
+ * API_END_NOPOP should be used in place of API_END if an API_RETURN is
+ * used in the body and will always be executed.  This is to eliminate
+ * warning messages from some compilers that the API_END coding will never
+ * be reached.
+ *
+ * Why is it needed/How does it work?
+ *
+ * SILO has a function, DBShowErrors, that sets a flag to indicate what
+ * level of error reporting should be used.  The DB_TOP level indicates
+ * that when an error occurs deep within SILO or a device driver, that
+ * the error should actually be reported by the API function called by
+ * the application.  The jump stack is the mechanism used to transfer
+ * the error signal to the top-level API function without the need for
+ * device driver developers to constantly worry about the error handling
+ * mechanism.
+ *
+ * Each time an API function is called and the global jump stack, Jstk, is
+ * empty (as it should be at the application level) the API function will
+ * call setjmp() and add the resulting jump buffer to the jump stack.  The
+ * API_END macro conditionally removes this item from the jump stack.  When
+ * an error is detected in the API function or in any SILO or device driver
+ * function in the call stack below the API function, and db_perror is
+ * called as a result of the error, and the error reporting level is
+ * set to DB_TOP, a call to longjmp() will occur with the contents of the
+ * jump buffer at the top of the jump stack.  This causes the corresponding
+ * setjmp() call to return again, and results in db_perror() being called
+ * by the API_BEGIN macro whose setjmp() returned.  The top (only) item from
+ * the jump stack is removed and the API function returns an error status.
+ *
+ * A jump `stack' is used instead of a scalar jump variable so that any
+ * function can register cleanup code to be executed as we are longjmp'ing
+ * back to the top-level API.  This typically includes freeing memory and
+ * continuing the jumping.  However, this mechanism can also be used
+ * to tentatively execute a piece of code without issuing error messages
+ * and then, based on whether an error actually occured, execute some other
+ * chunk of code instead.
+ *
+ * The `CANCEL_UNWIND' statement can be used in the CLEANUP body to
+ * indicate that the cleanup code has handled the error and we shouldn't
+ * continue the unwind process.  This can be used for a piece of code
+ * we expect to fail as in:
+ *
+ *  PROTECT {
+ *    int status = expected_to_fail();
+ * } CLEANUP {
+ *    fix_the_failure();
+ *    CANCEL_UNWIND;
+ * } END_PROTECT;
+ *      -- we continue here regardless of status --
+ */
+typedef struct jstk_t {
+    struct jstk_t *prev;
+    jmp_buf        jbuf;
+} jstk_t;
+
+typedef struct context_t {
+    int            dirid;
+    char          *name;
+} context_t;
+
+#define jstk_push()     {jstk_t*jt=ALLOC(jstk_t);jt->prev=SILO_Globals.Jstk;SILO_Globals.Jstk=jt;}
+#define jstk_pop()      if(SILO_Globals.Jstk){jstk_t*jt=SILO_Globals.Jstk;SILO_Globals.Jstk=SILO_Globals.Jstk->prev;FREE(jt);}
+
+#define DEPRECATE_MSG(M,Maj,Min,Alt)                                          \
+{                                                                             \
+   static int ncalls = 0;                                                     \
+   if (ncalls < SILO_Globals.maxDeprecateWarnings) {                          \
+      fprintf(stderr, "Silo warning %d of %d: \"%s\" was deprecated in version %d.%d.\n", \
+          ncalls+1, SILO_Globals.maxDeprecateWarnings, M,Maj,Min);            \
+      if (strlen(Alt) > 0)                                                                \
+          fprintf(stderr, "Use \"%s\" instead\n", Alt);                       \
+      fprintf(stderr, "Use DBSetDeprecateWarnings(0) to disable this message.\n");    \
+      fflush(stderr);                                                         \
+   }                                                                          \
+   ncalls++;                                                                  \
+}                                                                             \
+
+#define API_DEPRECATE(M,T,R,Maj,Min,Alt)                                      \
+   DEPRECATE_MSG(M,Maj,Min,Alt)                                               \
+   API_BEGIN(M,T,R)
+
+#define API_BEGIN(M,T,R) {                                                    \
+                        char    *me = M ;                                     \
+                        static int     jstat ;                                \
+                        static context_t *jold ;                              \
+                        DBfile  *jdbfile = NULL ;                             \
+                        T jrv = R ;                                           \
+                        jstat = 0 ;                                           \
+                        jold = NULL ;                                         \
+                        if (DBDebugAPI>0) {                                   \
+                           write (DBDebugAPI, M, strlen(M));                  \
+                           write (DBDebugAPI, "\n", 1);                       \
+                        }                                                     \
+                        if (!SILO_Globals.Jstk){                              \
+                           jstk_push() ;                                      \
+                           if (setjmp(SILO_Globals.Jstk->jbuf)) {             \
+                              while (SILO_Globals.Jstk) jstk_pop () ;         \
+                              db_perror ("", db_errno, me) ;                  \
+                              return R ;                                      \
+                           }                                                  \
+                           jstat = 1 ;                                        \
+                        }
+
+#define API_DEPRECATE2(M,T,R,NM,Maj,Min,Alt)                                  \
+   DEPRECATE_MSG(M,Maj,Min,Alt)                                               \
+   API_BEGIN2(M,T,R,NM)
+
+#define API_BEGIN2(M,T,R,NM) {                                                \
+                        char    *me = M ;                                     \
+                        static int     jstat ;                                \
+                        static context_t *jold ;                              \
+                        DBfile  *jdbfile = dbfile ;                           \
+                        T jrv = R ;                                           \
+                        jstat = 0 ;                                           \
+                        jold = NULL ;                                         \
+                        if (db_isregistered_file(dbfile,0) == -1)             \
+                        {                                                     \
+                            db_perror("", E_NOTREG, me);                      \
+                            return R;                                         \
+                        }                                                     \
+                        if (DBDebugAPI>0) {                                   \
+                           write (DBDebugAPI, M, strlen(M));                  \
+                           write (DBDebugAPI, "\n", 1);                       \
+                        }                                                     \
+                        if (!SILO_Globals.Jstk){                              \
+                           jstk_push() ;                                      \
+                           if (setjmp(SILO_Globals.Jstk->jbuf)) {             \
+                              if (jold) {                                     \
+                                 context_restore (jdbfile, jold) ;            \
+                              }                                               \
+                              while (SILO_Globals.Jstk) jstk_pop () ;         \
+                              db_perror ("", db_errno, me) ;                  \
+                              return R ;                                      \
+                           }                                                  \
+                           jstat = 1 ;                                        \
+                           if (NM && jdbfile && !jdbfile->pub.pathok) {       \
+                              char *jr ;                                      \
+                              jold = context_switch (jdbfile,(char *)NM,&jr) ;\
+                              if (!jold) longjmp (SILO_Globals.Jstk->jbuf, -1) ;\
+                              NM = jr ;                                       \
+                           }                                                  \
+                        }
+
+#define API_END         if (jold) context_restore (jdbfile, jold) ;     \
+                        if (jstat) jstk_pop() ;                         \
+                     }                        /*API_BEGIN or API_BEGIN2 */
+
+#define API_END_NOPOP   }         /*API_BEGIN or API_BEGIN2 */
+
+#define API_ERROR(S,N)  {                                               \
+                           db_perror (S,N,me) ; /*might never return*/  \
+                           if (jold) context_restore (jdbfile, jold) ;  \
+                           if (jstat) jstk_pop() ;                      \
+                           return jrv ;                                 \
+                        }
+
+#define API_RETURN(R)   {                                               \
+                           jrv = R ; /*might be a calculation*/         \
+                           if (jold) context_restore (jdbfile, jold) ;  \
+                           if (jstat) jstk_pop() ;                      \
+                           return jrv ;                                 \
+                        }
+
+#define PROTECT         {jstk_push();if(!setjmp(SILO_Globals.Jstk->jbuf)){
+#define UNWIND()        longjmp(SILO_Globals.Jstk->jbuf,-1)
+#define CLEANUP         jstk_pop();}else{int jcan=0;
+#define END_PROTECT     jstk_pop();if(!jcan&&SILO_Globals.Jstk)longjmp(SILO_Globals.Jstk->jbuf,-1);}}
+#define CANCEL_UNWIND   jcan=1
+
+/*
+ * Some convenience macros.
+ * We define some new function return types:
+ *    PRIVATE -- the function is used internally by defining file only.
+ *    INTERNAL -- the function is public, but not part of the API.
+ *    SILO_CALLBACK -- the function is a callback--never called directly
+ *    PUBLIC -- the function can be called publicly
+ *    FORTRAN -- the function is part of the fortran interface.
+ */
+#define PRIVATE         static
+#define INTERNAL                /*semi-private */
+#ifndef CALLBACK
+#define SILO_CALLBACK        static
+#endif
+#define PUBLIC                  /*public */
+#define FORTRAN         int
+
+#define OOPS            -1                /*DONT CHANGE THIS */
+#define OKAY            0                 /*DONT CHANGE THIS */
+#define MAXDIMS_VARWRITE 7
+#define OVER_WRITE      0x0001            /*overwrite DBobject */
+#define FREE_MEM        0x0002            /*free DBobject memory */
+#define NELMTS(X)       (sizeof(X)/sizeof(X[0]))  /*Number of elements */
+
+#define STR_EQUAL(S1,S2) (!strcmp((S1),(S2)))
+#define STR_BEGINSWITH(S,P) ((strstr((S),(P))==(S))?1:0)
+#define STR_LASTCHAR(S) ((S)[strlen((S))-1])
+#define STR_HASCHAR(S,C) (strchr((S),(C))?1:0)
+#define copy_var(FROM,TO,N) (memmove((TO),(FROM),(N)))
+
+/*
+ * Memory management macros.  All memory allocated by device
+ * drivers which is visible to any other device driver or
+ * SILO proper must be allocated with the C library memory
+ * management (malloc, calloc, realloc, strdup, free...).
+ */
+#define ALLOC(T)                ((T*)calloc((size_t)1,sizeof(T)))
+#define ALLOC_N(T,N)            ((T*)((N)>0?calloc((size_t)(N),sizeof(T)):0))
+#define REALLOC(P,T,N)  REALLOC_N((P),(T),(N))
+#define REALLOC_N(P,T,N)        ((T*)((N)>0?realloc((P),(size_t)((N)*sizeof(T))):0))
+#define FREE(M)         if(M){free(M);(M)=NULL;}
+#define STRDUP(S)               safe_strdup((S))
+#define STRNDUP(S,N)            db_strndup((S),(N))
+
+#define SW_strndup(S,N) db_strndup((S),(N))
+#define SW_GetDatatypeString(N) db_GetDatatypeString((N))
+#define SW_GetDatatypeID(S) db_GetDatatypeID((S))
+#define SW_file_exists(S)       (access((S),F_OK)>=0?1:0)
+#define SW_file_readable(S)     (access((S),R_OK)>=0?1:0)
+#define INDEX(col,row,ncol) (((row)*(ncol))+(col))  /* Zero - origin ! */
+#define INDEX3(i,j,k,nx,nxy) ((k)*(nxy)+(j)*(nx)+(i))  /* Zero - origin ! */
+
+#ifndef MAX
+#define MAX(X,Y)        ((X)>(Y)?(X):(Y))
+#define MIN(X,Y)        ((X)<(Y)?(X):(Y))
+#endif
+
+#ifdef   DEREF
+#undef   DEREF
+#endif
+#define  DEREF(type,x)       (* ((type *) (x)))
+
+/*
+ * File status, maintained by DBOpen, DBCreate, and DBClose.
+ */
+#define DB_ISOPEN       0x01          /*database is open; ID is in use */
+
+/*
+ * Global data for Material
+ */
+struct _ma {
+    int            _origin;
+    int            _majororder;
+    char         **_matnames;
+    char         **_matcolors;
+    int            _allowmat0;
+    int            _guihide;
+};
+
+/*
+ * Global data for Material Species.
+ */
+struct _ms {
+    int            _majororder;
+    int            _guihide;
+    char         **_specnames;
+    char         **_speccolors;
+};
+
+/*
+ * Global data for PointMesh and PointVar objects.
+ */
+struct _pm {
+    float          _time;
+    int            _time_set;
+    double         _dtime;
+    int            _dtime_set;
+    int            _cycle;
+    int            _hi_offset;
+    int            _lo_offset;
+    int            _ndims;
+    int            _nspace;
+    int            _nels;
+    int            _origin;
+    int            _minindex;
+    int            _maxindex;
+    char          *_label;
+    char          *_unit;
+    char          *_labels[3];
+    char          *_units[3];
+    char          *_coordnames[3];
+    char           _nm_time[64];
+    char           _nm_dtime[64];
+    char           _nm_cycle[64];
+    int            _group_no;
+    int            _guihide;
+    int            _ascii_labels;
+    int           *_gnodeno;
+    char          *_mrgtree_name;
+    char         **_region_pnames;
+    int            _llong_gnodeno;
+    int            _conserved;
+    int            _extensive;
+
+    /*These used only by NetCDF driver */
+    int            _dim_ndims;
+    int            _dim_nels;
+    int            _dim_scalar;
+    int            _dim_2Xndims;
+    int            _dim_nspace;
+    int            _id_time;
+    int            _id_dtime;
+    int            _id_cycle;
+};
+
+/*
+ * Global data for Quadmesh and Quadvar objects.
+ */
+struct _qm {
+    float          _time;
+    int            _time_set;
+    double         _dtime;
+    int            _dtime_set;
+    float          _align[3];
+    int            _cycle;
+    int            _coordsys;
+    int            _facetype;
+    int            _hi_offset[3];
+    int            _lo_offset[3];
+    int            _majororder;
+    int            _ndims;
+    int            _nspace;
+    int            _nnodes;
+    int            _nzones;
+    int            _origin;
+    int            _planar;
+    int            _dims[3];
+    int            _zones[3];
+    int            _minindex[3];
+    int            _maxindex_n[3];
+    int            _maxindex_z[3];
+    int            _nmat;
+    int            _use_specmf;
+    int            _ascii_labels;
+    char          *_label;
+    char          *_unit;
+    char          *_labels[3];
+    char          *_units[3];
+    char          *_meshname;
+    int            _baseindex[3];
+    int            _baseindex_set;
+    int            _group_no;
+    int            _guihide;
+    char          *_mrgtree_name;
+    char         **_region_pnames;
+    int            _conserved;
+    int            _extensive;
+
+    /* These are probably only used by the pdb driver */
+    char           _nm_dims[64];
+    char           _nm_zones[64];
+    char           _nm_alignz[64];
+    char           _nm_alignn[64];
+    char           _nm_time[64];
+    char           _nm_dtime[64];
+    char           _nm_cycle[64];
+    char           _nm_minindex[64];
+    char           _nm_maxindex_n[64];
+    char           _nm_maxindex_z[64];
+    char           _nm_baseindex[64];
+
+    /*These are used only by the NetCDF driver */
+    int            _dim_nnode[3];
+    int            _dim_nzone[3];
+    int            _dim_ndims;
+    int            _id_dims;
+    int            _id_minindex;
+    int            _id_maxindex_n;
+    int            _id_maxindex_z;
+    int            _id_time;
+    int            _id_dtime;
+    int            _id_alignn;
+    int            _id_alignz;
+    int            _id_zones;
+
+};
+
+/*
+ * Global data for Ucdmesh
+ */
+struct _um {
+    float          _time;
+    int            _time_set;
+    double         _dtime;
+    int            _dtime_set;
+    float          _align[3];
+    int            _cycle;
+    int            _hi_offset;
+    int            _lo_offset;
+    int            _hi_offset_set;
+    int            _lo_offset_set;
+    int            _coordsys;
+    int            _topo_dim;
+    int            _facetype;
+    int            _ndims;
+    int            _nspace;
+    int            _nnodes;
+    int            _nzones;
+    int            _origin;
+    int            _planar;
+    int            _dims[3];
+    int            _zones[3];
+    int            _nmat;
+    int            _use_specmf;
+    int            _ascii_labels;
+    char          *_label;
+    char          *_unit;
+    char          *_labels[3];
+    char          *_units[3];
+    char           _meshname[256];
+    char           _nm_dims[64];
+    char           _nm_zones[64];
+    char           _nm_alignz[64];
+    char           _nm_alignn[64];
+    char           _nm_time[64];
+    char           _nm_dtime[64];
+    char           _nm_cycle[64];
+    int           *_gnodeno;
+    int            _group_no;
+    char          *_phzl_name;
+    int            _guihide;
+    char          *_mrgtree_name;
+    char         **_region_pnames;
+    int            _tv_connectivity;
+    int            _disjoint_mode;
+    int            _llong_gnodeno;
+    int            _conserved;
+    int            _extensive;
+};
+
+/*
+ * Global data for Csgmesh
+ */
+struct _csgm {
+    float          _time;
+    int            _time_set;
+    double         _dtime;
+    int            _dtime_set;
+    int            _cycle;
+    int            _ndims;
+    int            _nbounds;
+    int            _use_specmf;
+    int            _hi_offset;
+    int            _lo_offset;
+    int            _hi_offset_set;
+    int            _lo_offset_set;
+    int            _ascii_labels;
+    char          *_label;
+    char          *_unit;
+    char          *_labels[3];
+    char          *_units[3];
+    char           _meshname[256];
+    char           _nm_time[64];
+    char           _nm_dtime[64];
+    char           _nm_cycle[64];
+    int            _group_no;
+    int            _origin;
+    char          *_csgzl_name;
+    char         **_bndnames;
+    int            _guihide;
+    char          *_mrgtree_name;
+    char         **_region_pnames;
+    int            _tv_connectivity;
+    int            _disjoint_mode;
+    int            _conserved;
+    int            _extensive;
+};
+
+/*
+ * Global data for UCD Zonelist
+ */
+struct _uzl {
+    int           *_gzoneno;
+    int            _llong_gzoneno;
+};
+
+/*
+ * Global data for Poly Zonelist
+ */
+struct _phzl {
+    int           *_gzoneno;
+    int            _llong_gzoneno;
+};
+
+/*
+ * Global data for CSG Zonelist
+ */
+struct _csgzl {
+    char         **_regnames;
+    char         **_zonenames;
+};
+
+/*
+ * Global data for Mulimesh, Multimat, Multivar, and Multimatspecies
+ */
+struct _mm {
+    float          _time;
+    int            _time_set;
+    double         _dtime;
+    int            _dtime_set;
+    int            _cycle;
+    char           _nm_time[64];
+    char           _nm_dtime[64];
+    char           _nm_cycle[64];
+    int            *_matnos;
+    int            _nmatnos;
+    char           *_matname;
+    int            _nmat;
+    int            *_nmatspec;
+    int            _blockorigin;
+    int            _grouporigin;
+    int            _ngroups;
+    int            _extentssize;
+    double         *_extents;
+    int            *_zonecounts;
+    int            *_mixlens;
+    int            *_matcounts;
+    int            *_matlists;
+    int            *_has_external_zones;
+    int            _allowmat0;
+    int            _guihide;
+    int            _lgroupings;
+    int            *_groupings;
+    char           **_groupnames;
+    char           **_matcolors;
+    char           **_matnames;
+    char           *_mrgtree_name;
+    char          **_region_pnames;
+    char           *_mmesh_name;
+    int             _tensor_rank;
+    int             _tv_connectivity;
+    int             _disjoint_mode;
+    int             _topo_dim;
+    char          **_specnames;
+    char          **_speccolors;
+    int            _conserved;
+    int            _extensive;
+    char          *_file_ns;
+    char          *_block_ns;
+    int            _block_type;
+    int           *_empty_list;
+    int            _empty_cnt;
+};
+
+/*
+ * Global data for curves.
+ */
+struct _cu {
+   char         *_label ;
+   char         *_varname[2] ;
+   char         *_labels[2] ;
+   char         *_units[2] ;
+    int          _guihide;
+   char         *_reference ;
+};
+
+/*
+ * Global data for defvars
+ */
+struct _dv {
+    int         _guihide; /* for this object type, its an array */
+};
+
+/*
+ * Global data for mrgtree 
+ */
+struct _mrgt {
+    char      **_mrgvar_onames;
+    char      **_mrgvar_rnames;
+};
+
+extern struct _ma _ma;
+extern struct _ms _ms;
+extern struct _csgm _csgm;
+extern struct _pm _pm;
+extern struct _qm _qm;
+extern struct _um _um;
+extern struct _uzl _uzl;
+extern struct _phzl _phzl;
+extern struct _csgzl _csgzl;
+extern struct _mm _mm;
+extern struct _cu _cu;
+extern struct _dv _dv;
+extern struct _mrgt _mrgt;
+
+/*-------------------------------------------------------------------------
+ * Filter Name Table.  Filters are modules inserted between the API and the
+ * device driver that are able to perform preprocessing of the parameters
+ * and postprocessing of the return values.  This table associates the
+ * filter name (which must be unique) with a filter init routine
+ * which is called just after a database is opened whether the database
+ * requests the filter or not.  There is also a filter open routine which
+ * is called after the init routine, but only if the database requests the
+ * filter.  Either function can be null; if both are null then the entry
+ * is removed from the table.
+ *-------------------------------------------------------------------------
+ */
+typedef struct filter_t {
+    char          *name;        /*filter name    */
+    int            (*init) (DBfile *, char *);
+    int            (*open) (DBfile *, char *);
+} filter_t;
+
+#define MAX_FILE_OPTIONS_SETS 32
+#define NUM_DEFAULT_FILE_OPTIONS_SETS (DB_FILE_OPTS_LAST+1)
+#define DEFAULT_DRIVER_PRIORITIES \
+   {      /* unknown driver priorities */ \
+        1, 2, 7, 0, 3, 6, -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 \
+    }
+
+
+/* Namespace struct for Silo's global variables */
+typedef struct SILO_Globals_t {
+    long dataReadMask;
+    int allowOverwrites;
+    int enableChecksums;
+    int enableFriendlyHDF5Names;
+    int enableGrabDriver;
+    int maxDeprecateWarnings;
+    char *compressionParams;
+    float compressionMinratio;
+    int compressionErrmode;
+    const DBoptlist *fileOptionsSets[MAX_FILE_OPTIONS_SETS];
+    int _db_err_level;
+    void  (*_db_err_func)(char *);
+    int _db_err_level_drvr;
+    jstk_t *Jstk;   /*error jump stack  */
+    int unknownDriverPriorities[MAX_FILE_OPTIONS_SETS+10+1];
+} SILO_Globals_t;
+extern SILO_Globals_t SILO_Globals;
+
+struct db_PathnameComponentTag
+{  char                            *name;
+   struct db_PathnameComponentTag *prevComponent;
+   struct db_PathnameComponentTag *nextComponent;
+};
+
+typedef struct db_PathnameComponentTag   db_PathnameComponent;
+
+struct db_PathnameTag
+{  db_PathnameComponent *firstComponent;
+   db_PathnameComponent *lastComponent;
+};
+
+typedef struct db_PathnameTag            db_Pathname;
+
+/*
+ * Private functions.
+ */
+INTERNAL context_t *context_switch (DBfile *, char *, char **);
+INTERNAL int context_restore (DBfile *, context_t *);
+INTERNAL DBfile *silo_db_close (DBfile *);
+INTERNAL DBtoc *db_AllocToc (void);
+INTERNAL int db_FreeToc (DBfile *);
+INTERNAL int db_GetMachDataSize (int);
+INTERNAL int DBGetObjtypeTag (char *);
+INTERNAL char *DBGetObjtypeName (int);
+INTERNAL char *db_strndup (const char *, int);
+INTERNAL char *db_GetDatatypeString (int);
+INTERNAL int db_GetDatatypeID (char *);
+INTERNAL int db_perror (const char *, int, char *);
+INTERNAL void _DBQQCalcStride (int *, int *, int, int);
+INTERNAL void _DBQMSetStride (DBquadmesh *);
+INTERNAL int _DBstrprint (FILE *, char **, int, int, int, int, int);
+INTERNAL void _DBsort_list (char **, int);
+INTERNAL int _DBarrminmax (float *, int, float *, float *);
+INTERNAL int _DBiarrminmax (int *, int, int *, int *);
+INTERNAL int _DBdarrminmax (double *, int, double *, double *);
+INTERNAL char *db_strerror (int);
+INTERNAL int db_ListDir2 (DBfile *, char **, int, int, char **,
+                              int *);
+INTERNAL int CSGM_CalcExtents (int, int, int, const int*,
+                                 const void *, double *, double *);
+INTERNAL int _DBQMCalcExtents (DB_DTPTR2, int, int *, int *, int *, int,
+                                   int, void *, void *);
+INTERNAL int UM_CalcExtents (DB_DTPTR2, int, int, int, void *,
+                                 void *);
+INTERNAL int _DBSubsetMinMax2 (DB_DTPTR1, int, float *, float *, int,
+                                   int, int, int, int);
+INTERNAL int _DBSubsetMinMax3 (float *, int, float *, float *, int, int,
+                               int, int, int, int, int, int);
+INTERNAL int db_ProcessOptlist (int, DBoptlist *);
+INTERNAL int db_VariableNameValid(char *);
+INTERNAL int db_SplitShapelist (DBucdmesh *um);
+INTERNAL int db_ResetGlobalData_Csgmesh ();
+INTERNAL int db_ResetGlobalData_Mrgtree();
+INTERNAL int db_ResetGlobalData_PointMesh (int ndims);
+INTERNAL int db_ResetGlobalData_QuadMesh (int ndims);
+INTERNAL void db_ResetGlobalData_Curve (void);
+INTERNAL int db_ResetGlobalData_Ucdmesh (int ndims, int nnodes, int nzones);
+INTERNAL int db_ResetGlobalData_Ucdzonelist (void);
+INTERNAL int db_ResetGlobalData_MultiMesh (void);
+INTERNAL int db_ResetGlobalData_Defvars(void);
+INTERNAL char *db_FullName2BaseName(const char *);
+INTERNAL void db_StringArrayToStringList(char**, int, char **, int*);
+INTERNAL char ** db_StringListToStringArray(char *, int, int, int);
+INTERNAL void db_DriverTypeAndFileOptionsSetId(int driver, int *type,
+                                               int *opts_set_id);
+INTERNAL void db_IntArrayToIntList(int**, int, const int *const, int**, int *);
+INTERNAL int ** db_IntListToIntArray(const int *const, int, const int *const);
+
+INTERNAL char *db_absoluteOf_path ( const char *cwg, const char *pathname );
+INTERNAL char *db_basename ( const char *pathname );
+INTERNAL char *db_dirname ( const char *pathname );
+INTERNAL int   db_isAbsolute_path ( const char *pathname );
+INTERNAL int   db_isRelative_path ( const char *pathname );
+INTERNAL char *db_join_path ( const char *a, const char *b );
+INTERNAL char *db_normalize_path ( const char *p );
+INTERNAL int   db_relative_path ( char *pathname );
+INTERNAL char *db_unsplit_path ( const db_Pathname *p );
+INTERNAL db_Pathname *db_split_path ( const char *pathname );
+INTERNAL const int *db_get_used_file_options_sets_ids();
+char   *safe_strdup (const char *);
+#undef strdup /*prevent a warning for the following definition*/
+#define strdup(s) safe_strdup(s)
+
+#endif /* !SILO_PRIVATE_H */
diff --git a/src/silo/silo_win32_compatibility.h b/src/silo/silo_win32_compatibility.h
new file mode 100644
index 0000000..7d65b95
--- /dev/null
+++ b/src/silo/silo_win32_compatibility.h
@@ -0,0 +1,40 @@
+#ifdef WIN32
+#ifndef SILO_WIN32_COMPATIBILITY
+#define SILO_WIN32_COMPATIBILITY
+#include <io.h>  /* Include Windows IO */
+#include <errno.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+
+#define snprintf _snprintf
+
+#define write  _write
+#define read   _read
+
+#define stat   _stat
+#define access _access
+
+#ifndef S_IWUSR
+#ifdef S_IWRITE
+#define S_IWUSR S_IWRITE
+#else
+#define S_IWUSR _S_IWRITE
+#endif
+#endif
+
+
+/* Define modes for the call to _access if they are not already defined. */
+#ifndef F_OK
+#define F_OK   0
+#endif
+
+#ifndef W_OK
+#define W_OK   2
+#endif
+
+#ifndef R_OK
+#define R_OK   4
+#endif
+
+#endif
+#endif
diff --git a/src/silo_version.c b/src/silo_version.c
new file mode 100644
index 0000000..0e9d7ba
--- /dev/null
+++ b/src/silo_version.c
@@ -0,0 +1,73 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             silo_version.c
+ *                      Thu Oct  5 16:52:21 PDT 2006
+ *                      Thomas R. Treadway
+ *
+ * Purpose:             Silo Build Configuration Summary
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *silo_configuration = {
+#include "libsilo.settings"
+};
+char * 
+silo_version()
+{
+    return (silo_configuration);
+}
diff --git a/src/siloh5_version.c b/src/siloh5_version.c
new file mode 100644
index 0000000..4c7bf71
--- /dev/null
+++ b/src/siloh5_version.c
@@ -0,0 +1,74 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             siloh5_version.c
+ *                      Thu Oct 10 12:45:21 PDT 2006
+ *                      Thomas R. Treadway
+ *
+ * Purpose:             Silo with HDF5 Build Configuration Summary
+ *                      based on silo_version.c
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *siloh5_configuration = {
+#include "libsiloh5.settings"
+};
+char * 
+siloh5_version()
+{
+    return (siloh5_configuration);
+}
diff --git a/src/taurus/Makefile.am b/src/taurus/Makefile.am
new file mode 100644
index 0000000..c853795
--- /dev/null
+++ b/src/taurus/Makefile.am
@@ -0,0 +1,68 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_taurus.la
+libsilo_taurus_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+
+EXTRA_DIST = \
+ README
+
+noinst_HEADERS = \
+ silo_taurus_private.h \
+ taurus.h
+FILES = \
+ silo_taurus.c \
+ taurus.c
diff --git a/src/taurus/Makefile.in b/src/taurus/Makefile.in
new file mode 100644
index 0000000..5d0ed7f
--- /dev/null
+++ b/src/taurus/Makefile.in
@@ -0,0 +1,556 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/taurus
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_taurus_la_LIBADD =
+am__objects_1 = silo_taurus.lo taurus.lo
+am_libsilo_taurus_la_OBJECTS = $(am__objects_1)
+libsilo_taurus_la_OBJECTS = $(am_libsilo_taurus_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_taurus_la_SOURCES)
+DIST_SOURCES = $(libsilo_taurus_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_taurus.la
+libsilo_taurus_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+EXTRA_DIST = \
+ README
+
+noinst_HEADERS = \
+ silo_taurus_private.h \
+ taurus.h
+
+FILES = \
+ silo_taurus.c \
+ taurus.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/taurus/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/taurus/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_taurus.la: $(libsilo_taurus_la_OBJECTS) $(libsilo_taurus_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_taurus_la_OBJECTS) $(libsilo_taurus_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_taurus.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/taurus.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/taurus/README b/src/taurus/README
new file mode 100644
index 0000000..f73c08e
--- /dev/null
+++ b/src/taurus/README
@@ -0,0 +1,54 @@
+README file for SILO-Taurus device driver
+-----------------------------------------
+
+Taurus is a read-only device driver, so calling any of the API functions
+that would normally modify the database will raise an E_NOTIMP (capability
+not implemented) error.  The following API functions will not work with
+this driver:
+
+        C                       Fortran         Reason (see key below)
+        ----------------------------------------------------------------
+        DBCreate                dbcreate        1
+        DBGetAtt                NA               2
+        DBGetCompoundarray      dbgetca            4
+        DBGetCurve              NA                3
+        DBGetMatspecies         dbgetmsp         2
+        DBGetPointmesh          NA               2
+        DBGetPointvar           NA               2
+        DBGetQuadmesh           NA               2
+        DBGetQuadvar            NA               2
+        DBInqCompoundarray      dbinqca            4
+        DBMkDir                 dbmkdir         1
+        DBPutCompoundarray      dbputca         1
+        DBPutFacelist           dbputfl         1
+        DBPutMaterial           dbputmat        1
+        DBPutMatspecies         dbputmsp        1
+        DBPutMultimesh          dbputmmesh      1
+        DBPutMultivar           dbputmvar       1
+        DBPutPointmesh          dbputpm         1
+        DBPutPointvar           NA              1
+        DBPutPointvar1          dbputpv1        1
+        DBPutQuadmesh           dbputqm         1
+        DBPutQuadvar            NA              1
+        DBPutQuadvar1           dbputqv1        1
+        DBPutUcdmesh            dbputum         1
+        DBPutUcdvar             NA              1
+        DBPutUcdvar1            dbputuv1        1
+        DBPutZonelist           dbputzl         1
+        DBReadAtt               NA               2
+        DBReadVar1              NA               2
+        DBSetDirID              dbsetdirid       2
+        DBWrite                 dbwrite         1
+        DBWriteComponent        NA              1
+        ----------------------------------------------------------------
+
+Reasons:
+        1    Not implemented because this API function normally
+             modifies the database.
+
+        2    No known reason for not being implemented.
+
+        3    Not defined yet.
+
+        4    New functionallity added after the SILO-Taurus driver
+             was written.
diff --git a/src/taurus/silo_taurus.c b/src/taurus/silo_taurus.c
new file mode 100644
index 0000000..dbc7e8e
--- /dev/null
+++ b/src/taurus/silo_taurus.c
@@ -0,0 +1,1933 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo_taurus_private.h"
+#define MAKE_N  DONT_USE_THIS--use ALLOC_N instead
+
+/*-------------------------------------------------------------------------
+ * Private global variables.
+ *-------------------------------------------------------------------------
+ */
+static char   *mesh_names[] =
+{"mesh1", "hs_mesh", "hex_mesh",
+ "shell_mesh", "beam_mesh"};
+
+#define NDIRS 7
+
+static char   *dir_names[] =
+{"almansi", "green", "inf_strain",
+ "nodal", "shell", "stress", "rates"};
+
+PRIVATE int db_taur_cd(TAURUSfile *taurus, char *path);
+PRIVATE int db_taur_pwd(TAURUSfile *taurus, char *path);
+INTERNAL void db_taur_extface(int *znodelist, int nnodes,
+                 int nzones, int *matlist, int **fnodelist,
+                 int *nfaces, int **zoneno);
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_InitCallbacks
+ *
+ * Purpose:     Initialize the callbacks for the Taurus device driver.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 12:14:52 EST 1994
+ *
+ * Modifications:
+ *    Robb Matzke, Tue Mar 7 10:43:02 EST 1995
+ *    I added the callback DBNewToc.
+ *
+ *    Eric Brugger, Wed Oct  4 08:46:31 PDT 1995
+ *    I added the call back db_taur_InqVarExists.
+ *
+ *    Brad Whitlock, Thu Apr 28 16:43:47 PST 2005
+ *    Added callback for db_taur_InqVartype.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+db_taur_InitCallbacks (DBfile *dbfile)
+{
+    dbfile->pub.close = db_taur_Close;
+    dbfile->pub.g_dir = db_taur_GetDir;
+    dbfile->pub.cd = db_taur_SetDir;
+    dbfile->pub.g_comp = db_taur_GetComponent;
+    dbfile->pub.g_ma = db_taur_GetMaterial;
+    dbfile->pub.g_um = db_taur_GetUcdmesh;
+    dbfile->pub.g_uv = db_taur_GetUcdvar;
+    dbfile->pub.g_var = db_taur_GetVar;
+    dbfile->pub.g_varbl = db_taur_GetVarByteLength;
+    dbfile->pub.g_varlen = db_taur_GetVarLength;
+    dbfile->pub.i_meshname = db_taur_InqMeshname;
+    dbfile->pub.exist = db_taur_InqVarExists;
+    dbfile->pub.i_meshtype = db_taur_InqMeshtype;
+    dbfile->pub.r_var = db_taur_ReadVar;
+    dbfile->pub.newtoc = db_taur_NewToc;
+    dbfile->pub.module = db_taur_Filters;
+    dbfile->pub.inqvartype = (DBObjectType(*)(struct DBfile *, char*)) db_taur_InqVartype;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    reduce_path
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Change to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+reduce_path (char *path)
+{
+    int            i, j;
+    int            lpath;
+    char          *npath;
+
+    npath = ALLOC_N(char, strlen(path) + 1);
+
+    npath[0] = '/';
+    npath[1] = '\0';
+    j = 0;
+    lpath = strlen(path);
+    for (i = 0; i < lpath; i++) {
+        while (path[i] == '/' && path[i + 1] == '/')
+            i++;
+        if (path[i] == '/' && path[i + 1] == '.' && path[i + 2] == '.' &&
+            (path[i + 3] == '/' || path[i + 3] == '\0')) {
+            if (j > 0)
+                j--;
+            while (npath[j] != '/' && j > 0)
+                j--;
+            i += 2;
+        }
+        else {
+            npath[j++] = path[i];
+        }
+    }
+    npath[j] = '\0';
+
+    if (j == 0) {
+        npath[0] = '/';
+        npath[1] = '\0';
+    }
+    strcpy(path, npath);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    get_next_int
+ *
+ * Purpose:     Return a sequential list of integers beginning with 1.
+ *
+ * Return:      Success:        n
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 15:56:58 EST 1994
+ *
+ * Modifications:
+ *
+ *              Jim Reus, 23 Apr 97
+ *              Change to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+get_next_int (void)
+{
+    static int     n = 0;
+
+    return ++n;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_Open
+ *
+ * Purpose:     Open a Taurus database.
+ *
+ * Return:      Success:        ptr to new file
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_taur_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:43:02 EST 1995
+ *    I changed the call db_taur_GetToc to DBNewToc.
+ *
+ *    Sean Ahern, Thu Oct  5 09:16:31 PDT 1995
+ *    Fixed a parameter type problem.
+ *
+ *    Sean Ahern, Mon Jan  8 17:41:26 PST 1996
+ *    Added the mode parameter.  The mode information is not yet
+ *    Used in the function.
+ *
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+PUBLIC DBfile *
+db_taur_Open(char *name, int mode, int subtype)
+{
+    TAURUSfile    *taurus;
+    DBfile_taur   *dbfile;
+    char          *me = "db_taur_Open";
+
+    if (!SW_file_exists(name)) {
+        db_perror(name, E_NOFILE, me);
+        return NULL;
+    }
+    else if (!SW_file_readable(name)) {
+        db_perror("not readable", E_NOFILE, me);
+        return NULL;
+    }
+
+    if ((taurus = db_taur_open(name)) == NULL) {
+        db_perror("db_taur_open", E_CALLFAIL, me);
+        return NULL;
+    }
+
+    dbfile = ALLOC(DBfile_taur);
+    memset(dbfile, 0, sizeof(DBfile_taur));
+    dbfile->pub.name = STRDUP(name);
+    dbfile->pub.type = DB_TAURUS;
+    dbfile->taurus = taurus;
+    db_taur_InitCallbacks((DBfile*)dbfile);
+    DBNewToc((DBfile *) dbfile);
+    return (DBfile *) dbfile;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_Close
+ *
+ * Purpose:     Close a Taurus database.
+ *
+ * Return:      Success:        NULL
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Eric Brugger, Mon Feb 27 16:01:37 PST 1995
+ *    I changed the return value to be an integer instead of a pointer
+ *    to a DBfile.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_Close (DBfile *_dbfile)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+
+    if (dbfile) {
+        /*
+         * Free the private parts of the file.
+         */
+        db_taur_close(dbfile->taurus);
+        dbfile->taurus = NULL;
+
+        /*
+         * Free the public parts of the file.
+         */
+        silo_db_close(_dbfile);
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetDir
+ *
+ * Purpose:     Returns the name of the current directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_GetDir(DBfile *_dbfile, char *path)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+
+    db_taur_pwd(dbfile->taurus, path);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_SetDir
+ *
+ * Purpose:     Sets the current directory within the Taurus database.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I changed the call DBGetToc to db_taur_GetToc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:43:20 EST 1995
+ *    I changed the call db_taur_GetToc to DBNewToc.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_SetDir(DBfile *_dbfile, char *path)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    char          *me = "db_taur_SetDir";
+
+    if (db_taur_cd(dbfile->taurus, path) < 0) {
+        return db_perror("db_taur_cd", E_CALLFAIL, me);
+    }
+
+    /* Must make new table-of-contents since dir has changed */
+    db_FreeToc(_dbfile);
+    DBNewToc(_dbfile);
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_Filters
+ *
+ * Purpose:     Print the name of this filter to the specified stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  robb at cloud
+ *              Tue Mar  7 11:18:19 EST 1995
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/* ARGSUSED */
+SILO_CALLBACK int
+db_taur_Filters(DBfile *dbfile, FILE *stream)
+{
+    fprintf(stream, "Taurus Device Driver\n");
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_NewToc
+ *
+ * Purpose:     Free the old table of contents (toc) and read a new
+ *              one.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Robb Matzke, Fri Dec 9 13:58:52 EST 1994
+ *    Memory management is with macros defined in silo_private.h (which
+ *    are normally bound to the C library malloc family).  The function
+ *    builds a table of contents for the DBfile pointer and returns an
+ *    int instead of returning a table of contents.  The old table
+ *    of contents is freed.
+ *
+ *    Eric Brugger, Fri Jan 27 08:27:46 PST 1995
+ *    I made it into an internal routine.
+ *
+ *    Robb Matzke, Tue Feb 21 16:19:37 EST 1995
+ *    Removed references to the `id' fields of the DBtoc.
+ *
+ *    Robb Matzke, Tue Mar 7 10:44:02 EST 1995
+ *    Changed the name from db_taur_GetToc to db_taur_NewToc.
+ *
+ *    Robb Matzke, Tue Mar 7 11:23:19 EST 1995
+ *    Changed this to a CALLBACK.
+ *
+ *    Eric Brugger, Tue Mar 28 15:54:19 PST 1995
+ *    I corrected the spelling of the material variable name when no
+ *    state data is present.
+ *
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Thu Jul 27 13:18:52 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Brad Whitlock, Thu Apr 28 15:42:05 PST 2005
+ *    I modified the routine so it exposes more of the meshes that are used
+ *    by the various variables that we added to the toc. This helps VisIt
+ *    read Taurus files.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_NewToc(DBfile *_dbfile)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int            i, j, k;
+    int            idir;
+    DBtoc         *toc;
+
+    db_FreeToc(_dbfile);
+    dbfile->pub.toc = toc = db_AllocToc();
+
+    if (taurus->state == -1) {
+        if (taurus->nstates == 0) {
+            /*
+             * We have no solution data, only the mesh and
+             * materials.  In this case we have no directories.
+             */
+            toc->ucdmesh_names = ALLOC_N(char *, 1);
+
+            toc->ucdmesh_names[0] = STRDUP("mesh1");
+            toc->ucdmesh_names[1] = STRDUP("hs_mesh");
+            toc->nucdmesh = 2;
+
+            toc->mat_names = ALLOC_N(char *, 1);
+
+            toc->mat_names[0] = STRDUP("mat1");
+            toc->nmat = 1;
+        }
+        else {
+            /*
+             * We are at the top level so we have only directories.
+             */
+            toc->ucdmesh_names = NULL;
+            toc->nucdmesh = 0;
+
+            toc->ucdvar_names = NULL;
+            toc->nucdvar = 0;
+
+            toc->mat_names = NULL;
+            toc->nmat = 0;
+
+            toc->dir_names = ALLOC_N(char *, taurus->nstates);
+
+            for (i = 0; i < taurus->nstates; i++) {
+                toc->dir_names[i] = ALLOC_N(char, 12);
+
+                if (taurus->nstates < 100) {
+                    sprintf(toc->dir_names[i], "state%02d", i);
+                }
+                else {
+                    sprintf(toc->dir_names[i], "state%03d", i);
+                }
+            }
+            toc->ndir = taurus->nstates;
+        }
+    }
+    else {
+        /*
+         * We are in a state.
+         */
+        if (taurus->idir == -1) {
+            /*
+             * We are at the top of a state, we have the
+             * meshes, materials.
+             */
+            toc->ucdmesh_names = ALLOC_N(char *, 2);
+
+            toc->ucdmesh_names[0] = STRDUP("mesh1");
+            toc->ucdmesh_names[1] = STRDUP("hs_mesh");
+            toc->nucdmesh = 2;
+
+            toc->mat_names = ALLOC_N(char *, 1);
+
+            toc->mat_names[0] = STRDUP("mat1");
+            toc->nmat = 1;
+        }
+
+        if (taurus->icode == 1)
+            idir = 8;
+        else if (taurus->icode == 200)
+            idir = 9;
+        else
+            idir = taurus->idir;
+        if (idir == -1) {
+            /*
+             * We are not in a directory, also have directories.
+             */
+            toc->dir_names = ALLOC_N(char *, NDIRS);
+
+            for (i = 0; i < NDIRS; i++)
+                toc->dir_names[i] = STRDUP(dir_names[i]);
+            toc->ndir = NDIRS;
+        }
+        else {
+            /*
+             * We are in a directory, get the variables from
+             * the directory.
+             */
+            for (i = 0; taur_var_list[i].idir < idir; i++)
+                /* do nothing */ ;
+
+            k = 0;
+            for (j = i; taur_var_list[j].idir == idir; j++) {
+                if (taurus->var_start[taur_var_list[j].ival] != -1)
+                    k++;
+            }
+            toc->nucdvar = k;
+            toc->ucdvar_names = ALLOC_N(char *, k);
+
+            k = 0;
+            for (j = i; taur_var_list[j].idir == idir; j++) {
+                if (taurus->var_start[taur_var_list[j].ival] != -1)
+                    toc->ucdvar_names[k++] = STRDUP(taur_var_list[j].name);
+            }
+        }
+    }
+
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetComponent
+ *
+ * Purpose:     Returns a pointer to a newly allocated space containing
+ *              the component value.
+ *
+ * Return:      Success:        ptr to component
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Fri Sep 24 09:24:58 PDT 1999
+ *    I modified the routine to also return the matnos component of
+ *    the mat1 object.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_taur_GetComponent(DBfile *_dbfile, char *obj_name, char *comp_name)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int           *v;
+    char          *me = "db_taur_GetComponent";
+
+    if (taurus->state == -1 && taurus->nstates != 0) {
+        db_perror(NULL, E_TAURSTATE, me);
+        return (NULL);
+    }
+    if (taurus->idir != -1) {
+        db_perror(NULL, E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    /*
+     * We only support the components "nmat" and "matnos" from the
+     * object "mat1".
+     */
+    if (strcmp(obj_name, "mat1") == 0) {
+        if (strcmp(comp_name, "nmat") == 0) {
+            v = ALLOC_N(int, 1);
+            *v = taurus->nmat;
+        }
+        else if (strcmp(comp_name, "matnos") == 0) {
+            v = ALLOC_N(int, taurus->nmat);
+            memcpy (v, taurus->matnos, taurus->nmat * sizeof(int));
+        }
+        else {
+            db_perror("comp_name!=\"nmat\" or comp_name!=\"matnos\"",
+                      E_NOTIMP, me);
+            return (NULL);
+        }
+    }
+    else {
+            db_perror("obj_name!=\"mat1\"", E_NOTIMP, me);
+            return (NULL);
+    }
+
+    return v;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetMaterial
+ *
+ * Purpose:     Allocates a DBmaterial data structure and  reads material
+ *              data from the Taurus database.
+ *
+ * Return:      Success:        ptr to DBmaterial.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Mon Aug 28 13:40:41 PDT 1995
+ *    I modified the routine to return the matnos array added to the
+ *    TAURUSfile structure as the matnos, instead of returning an array
+ *    of integers from 1 to nmat.
+ *
+ *    Eric Brugger, Thu Dec 21 07:51:53 PST 1995
+ *    I modified the code to handle the activity data.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBmaterial *
+db_taur_GetMaterial(DBfile *_dbfile, char *mat_name)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int            i, j;
+    int            nhex, nshell, nbeam;
+    int            nhex2, nshell2, nbeam2;
+    int           *buf;
+    DBmaterial    *mat;
+    char          *me = "db_taur_GetMaterial";
+
+    if (taurus->state == -1 && taurus->nstates != 0) {
+        db_perror(NULL, E_TAURSTATE, me);
+        return (NULL);
+    }
+    if (taurus->idir != -1) {
+        db_perror(NULL, E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    /*
+     * Get the material.
+     */
+    if (taurus->mesh_read == 0)
+        init_mesh_info(taurus);
+
+    if (taurus->coord_state != taurus->state) {
+        init_coord_info (taurus);
+        init_zone_info (taurus);
+    }
+
+    mat = DBAllocMaterial();
+
+    mat->id = get_next_int();
+    mat->name = STRDUP(mat_name);
+    mat->ndims = taurus->ndim;
+    mat->origin = 0;
+    mat->dims[0] = taurus->nhex +
+        taurus->nshell +
+        taurus->nbeam;
+    mat->dims[1] = 1;
+    mat->dims[2] = 1;
+    mat->major_order = 1;
+    mat->stride[0] = 1;
+    mat->stride[1] = 1;
+    mat->stride[2] = 1;
+
+    mat->nmat = taurus->nmat;
+
+    if (SILO_Globals.dataReadMask & DBMatMatnos)
+    {
+        mat->matnos = ALLOC_N(int, mat->nmat);
+
+        for (i = 0; i < mat->nmat; i++)
+            mat->matnos[i] = taurus->matnos[i];
+    }
+
+    if (SILO_Globals.dataReadMask & DBMatMatlist)
+    {
+        nhex = taurus->nhex;
+        nshell = taurus->nshell;
+        nbeam = taurus->nbeam;
+
+        mat->matlist = ALLOC_N(int, nhex + nshell + nbeam);
+
+        if (taurus->activ >= 1000 && taurus->activ <= 1005) {
+            for (i = 0, j = 0; i < nhex; i++) {
+                if (taurus->hex_activ [i] != 0) {
+                    mat->matlist[j] = taurus->hex_matlist[i];
+                    j++;
+                }
+            }
+            nhex2 = j;
+
+            buf = &(mat->matlist [nhex2]);
+            for (i = 0, j = 0; i < nshell; i++) {
+                if (taurus->shell_activ [i] != 0) {
+                    buf[j] = taurus->shell_matlist[i];
+                    j++;
+                }
+            }
+            nshell2 = j;
+
+            buf = &(mat->matlist[nhex2+nshell2]);
+            for (i = 0, j = 0; i < nbeam; i++) {
+                if (taurus->beam_activ [i] != 0) {
+                    buf[j] = taurus->beam_matlist[i];
+                    j++;
+                }
+            }
+            nbeam2 = j;
+
+            mat->dims[0] = nhex2 + nshell2 + nbeam2;
+        }
+        else {
+            for (i = 0; i < nhex; i++)
+                mat->matlist[i] = taurus->hex_matlist[i];
+            for (i = 0, j = nhex; i < nshell; i++, j++)
+                mat->matlist[j] = taurus->shell_matlist[i];
+            for (i = 0, j = nhex + nshell; i < nbeam; i++, j++)
+                mat->matlist[j] = taurus->beam_matlist[i];
+        }
+    }
+
+    mat->mixlen = 0;
+    mat->datatype = DB_FLOAT;
+    mat->mix_vf = NULL;
+    mat->mix_next = NULL;
+    mat->mix_mat = NULL;
+    mat->mix_zone = NULL;
+
+    return (mat);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetUcdmesh
+ *
+ * Purpose:     Allocate and read a UCD mesh from the Taurus database.
+ *
+ * Return:      Success:        ptr to new UCD mesh
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Wed Dec 20 17:08:26 PST 1995
+ *    I modified the code to handle the activity data.
+ *
+ *    Eric Brugger, Tue Feb  6 10:24:21 PST 1996
+ *    I corrected a bug, where the wrong number of elements would be
+ *    returned for the shell and beam meshes.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBucdmesh *
+db_taur_GetUcdmesh(DBfile *_dbfile, char *mesh_name)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int            i, j;
+    int            nhex, nshell, nbeam;
+    int            nhex2, nshell2, nbeam2;
+    int            nhexface, nshellface, nbeamface;
+    int            nshellface2, nbeamface2;
+    int            imesh;
+    int           *buf;
+    DBfacelist    *faces;
+    DBzonelist    *zones;
+    DBucdmesh     *mesh;
+    char          *me = "db_taur_GetUcdmesh";
+
+    if (taurus->state == -1 && taurus->nstates != 0) {
+        db_perror(NULL, E_TAURSTATE, me);
+        return (NULL);
+    }
+    if (taurus->idir != -1) {
+        db_perror(NULL, E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    for (imesh = 0;
+         imesh < MAX_MESH && strcmp(mesh_names[imesh], mesh_name) != 0;
+         imesh++)
+        /* do nothing */ ;
+
+    if (imesh >= MAX_MESH) {
+        db_perror("imesh", E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    /*
+     * Get the ucd mesh.
+     */
+    if (taurus->mesh_read == 0)
+        init_mesh_info (taurus);
+
+    if (taurus->coord_state != taurus->state) {
+        init_coord_info (taurus);
+        init_zone_info (taurus);
+    }
+
+    mesh = DBAllocUcdmesh();
+
+    /*
+     * Add the coordinate information and some miscellaneous information.
+     */
+    mesh->id = get_next_int();
+    mesh->block_no = 1;
+    mesh->name = STRDUP(mesh_name);
+    mesh->cycle = taurus->state;
+    mesh->time = taurus->state_time[taurus->state];
+    mesh->coord_sys = DB_CARTESIAN;
+    mesh->units[0] = STRDUP("cm");
+    mesh->units[1] = STRDUP("cm");
+    mesh->units[2] = STRDUP("cm");
+    mesh->labels[0] = STRDUP("x");
+    mesh->labels[1] = STRDUP("y");
+    mesh->labels[2] = STRDUP("z");
+
+    for (i = 0; i < 3; i++) {
+        if (SILO_Globals.dataReadMask & DBUMCoords)
+        {
+            mesh->coords[i] = ALLOC_N(float, taurus->numnp);
+
+            for (j = 0; j < taurus->numnp; j++) {
+                ((float**)(mesh->coords))[i][j] = taurus->coords[i][j];
+            }
+        }
+        mesh->min_extents[i] = taurus->min_extents[i];
+        mesh->max_extents[i] = taurus->max_extents[i];
+    }
+    mesh->datatype = DB_FLOAT;
+    mesh->ndims = 3;
+    mesh->nnodes = taurus->numnp;
+    mesh->origin = 0;
+
+    /*
+     * Determine which types of zones should be included in the
+     * zone list.
+     */
+    nhex = 0;
+    nbeam = 0;
+    nshell = 0;
+    if (imesh == 0 || imesh == 1 || imesh == 2)
+        nhex = taurus->nel8;
+    if (imesh == 0 || imesh == 1 || imesh == 3)
+        nshell = taurus->nel4;
+    if (imesh == 0 || imesh == 4)
+        nbeam = taurus->nel2;
+
+    /*
+     * Add the zone information.
+     */
+
+    if (SILO_Globals.dataReadMask & DBUMZonelist)
+    {
+        zones               = ALLOC_N(DBzonelist, 1);
+        zones->ndims        = taurus->ndim;
+        zones->nzones       = nhex + nbeam + nshell;
+        zones->nshapes      = 1;
+        zones->shapecnt     = ALLOC_N(int, 1);
+        zones->shapecnt[0]  = nhex + nbeam + nshell;
+        zones->shapesize    = ALLOC_N(int, 1);
+        zones->shapesize[0] = 8;
+        zones->lnodelist    = (nhex + nbeam + nshell) * 8;
+
+        if (SILO_Globals.dataReadMask & DBCalc)
+        {
+            zones->nodelist     = ALLOC_N(int, zones->lnodelist);
+
+            if (taurus->activ >= 1000 || taurus->activ <= 1005) {
+                for (i = 0, j = 0; i < nhex; i++) {
+                    if (taurus->hex_activ [i] != 0) {
+                        zones->nodelist[j * 8] = taurus->hex_nodelist[i * 8];
+                        zones->nodelist[j * 8 + 1] = taurus->hex_nodelist[i * 8 + 1];
+                        zones->nodelist[j * 8 + 2] = taurus->hex_nodelist[i * 8 + 2];
+                        zones->nodelist[j * 8 + 3] = taurus->hex_nodelist[i * 8 + 3];
+                        zones->nodelist[j * 8 + 4] = taurus->hex_nodelist[i * 8 + 4];
+                        zones->nodelist[j * 8 + 5] = taurus->hex_nodelist[i * 8 + 5];
+                        zones->nodelist[j * 8 + 6] = taurus->hex_nodelist[i * 8 + 6];
+                        zones->nodelist[j * 8 + 7] = taurus->hex_nodelist[i * 8 + 7];
+                        j++;
+                    }
+                }
+                nhex2 = j;
+
+                buf = &(zones->nodelist[nhex2 * 8]);
+                for (i = 0, j = 0; i < nshell; i++) {
+                    if (taurus->shell_activ [i] != 0) {
+                        buf[j * 8] = taurus->shell_nodelist[i * 4];
+                        buf[j * 8 + 1] = taurus->shell_nodelist[i * 4 + 1];
+                        buf[j * 8 + 2] = taurus->shell_nodelist[i * 4 + 2];
+                        buf[j * 8 + 3] = taurus->shell_nodelist[i * 4 + 3];
+                        buf[j * 8 + 4] = taurus->shell_nodelist[i * 4];
+                        buf[j * 8 + 5] = taurus->shell_nodelist[i * 4 + 1];
+                        buf[j * 8 + 6] = taurus->shell_nodelist[i * 4 + 2];
+                        buf[j * 8 + 7] = taurus->shell_nodelist[i * 4 + 3];
+                        j++;
+                    }
+                }
+                nshell2 = j;
+
+                buf = &(zones->nodelist[(nhex2 + nshell2) * 8]);
+                for (i = 0, j = 0; i < nbeam; i++) {
+                    if (taurus->beam_activ [i] != 0) {
+                        buf[j * 8] = taurus->beam_nodelist[i * 2];
+                        buf[j * 8 + 1] = taurus->beam_nodelist[i * 2 + 1];
+                        buf[j * 8 + 2] = taurus->beam_nodelist[i * 2];
+                        buf[j * 8 + 3] = taurus->beam_nodelist[i * 2 + 1];
+                        buf[j * 8 + 4] = taurus->beam_nodelist[i * 2];
+                        buf[j * 8 + 5] = taurus->beam_nodelist[i * 2 + 1];
+                        buf[j * 8 + 6] = taurus->beam_nodelist[i * 2];
+                        buf[j * 8 + 7] = taurus->beam_nodelist[i * 2 + 1];
+                        j++;
+                    }
+                }
+                nbeam2 = j;
+
+                zones->nzones = nhex2 + nshell2 + nbeam2;
+                zones->shapecnt [0] = nhex2 + nshell2 + nbeam2;
+                zones->lnodelist = (nhex2 + nshell2 + nbeam2) * 8;
+            }
+            else {
+                for (i = 0, j = 0; i < nhex * 8; i++, j++)
+                    zones->nodelist[j] = taurus->hex_nodelist[i];
+                for (i = 0; i < nshell * 8; i++, j++)
+                    zones->nodelist[j] = taurus->shell_nodelist[i];
+                for (i = 0; i < nbeam * 8; i++, j++)
+                    zones->nodelist[j] = taurus->beam_nodelist[i];
+            }
+
+            zones->origin = 0;
+        } else
+        {
+            zones->nodelist     = NULL;
+        }
+        mesh->zones = zones;
+    }
+
+    /*
+     * Determine which types of zones should be included in the
+     * face list.
+     */
+    if (SILO_Globals.dataReadMask & DBUMFacelist)
+    {
+        nhexface = 0;
+        nshellface = 0;
+        nbeamface = 0;
+        if (imesh == 0 || imesh == 1 || imesh == 2)
+            nhexface = taurus->nhex_faces;
+        if (imesh == 0 || imesh == 1 || imesh == 3)
+            nshellface = taurus->nel4;
+        if (imesh == 0 || imesh == 4)
+            nbeamface = taurus->nel2;
+
+        /*
+         * Add the face information.
+         */
+        faces = ALLOC_N(DBfacelist, 1);
+        faces->ndims = taurus->ndim;
+        faces->origin = 0;
+        faces->lnodelist = nhexface * 4 + nbeamface * 2 + nshellface * 4;
+
+        if (SILO_Globals.dataReadMask & DBCalc)
+        {
+            faces->nodelist = ALLOC_N(int, faces->lnodelist);
+
+            if (taurus->activ >= 1000 || taurus->activ <= 1005) {
+                for (i = 0; i < nhexface*4; i++)
+                    faces->nodelist[i] = taurus->hex_facelist[i];
+
+                buf = &(faces->nodelist [nhexface*4]);
+                for (i = 0, j = 0; i < nshellface; i++) {
+                    if (taurus->shell_activ [i] != 0) {
+                        buf[j*4] = taurus->shell_nodelist[i*4];
+                        buf[j*4+1] = taurus->shell_nodelist[i*4+1];
+                        buf[j*4+2] = taurus->shell_nodelist[i*4+2];
+                        buf[j*4+3] = taurus->shell_nodelist[i*4+3];
+                        j++;
+                    }
+                }
+                nshellface2 = j;
+
+                buf = &(faces->nodelist [(nhexface+nshellface2)*4]);
+                for (i = 0, j = 0; i < nbeamface; i++) {
+                    if (taurus->beam_activ [i] != 0) {
+                        buf[j*2] = taurus->beam_nodelist[i*2];
+                        buf[j*2+1] = taurus->beam_nodelist[i*2+1];
+                        j++;
+                    }
+                }
+                nbeamface2 = j;
+            }
+            else {
+                for (i = 0; i < nhexface*4; i++)
+                    faces->nodelist[i] = taurus->hex_facelist[i];
+                for (i = 0, j = nhexface*4; i < nshellface*4; i++, j++)
+                    faces->nodelist[j] = taurus->shell_nodelist[i];
+                nshellface2 = nshellface;
+                for (i = 0; i < nbeamface * 2; i++, j++)
+                    faces->nodelist[j] = taurus->beam_nodelist[i];
+                nbeamface2 = nbeamface;
+            }
+
+            faces->nfaces = nhexface + nshellface2 + nbeamface2;
+            faces->lnodelist = nhexface * 4 + nbeamface2 * 2 + nshellface2 * 4;
+
+            if (nbeamface2 == 0) {
+                faces->nshapes = 1;
+                faces->shapecnt = ALLOC_N(int, 1);
+
+                faces->shapecnt[0] = nhexface + nshellface2;
+                faces->shapesize = ALLOC_N(int, 1);
+
+                faces->shapesize[0] = 4;
+            }
+            else {
+                faces->nshapes = 2;
+                faces->shapecnt = ALLOC_N(int, 2);
+
+                faces->shapecnt[0] = nhexface + nshellface2;
+                faces->shapecnt[1] = nbeamface2;
+                faces->shapesize = ALLOC_N(int, 2);
+
+                faces->shapesize[0] = 4;
+                faces->shapesize[1] = 2;
+            }
+
+            faces->ntypes = 0;
+            faces->typelist = NULL;
+            faces->types = NULL;
+
+            faces->zoneno = ALLOC_N(int, nhexface + nshellface2 + nbeamface2);
+
+            if (taurus->activ >= 1000 || taurus->activ <= 1005) {
+                for (i = 0; i < nhexface; i++)
+                    faces->zoneno[i] = taurus->hex_zoneno[i];
+
+                buf = &(faces->zoneno[nhexface]);
+                for (i = 0, j = 0; i < nshellface; i++)
+                    if (taurus->shell_activ [i] != 0) {
+                        buf[j] = nhex2 + j;
+                        j++;
+                    }
+
+                buf = &(faces->zoneno[nhexface+nshellface2]);
+                for (i = 0, j = 0; i < nbeamface; i++)
+                    if (taurus->beam_activ [i] != 0) {
+                        buf [j] = nhex2 + nshell2 + j;
+                        j++;
+                    }
+            }
+            else {
+                for (i = 0; i < nhexface; i++)
+                    faces->zoneno[i] = taurus->hex_zoneno[i];
+                for (i = 0, j = nhexface; i < nshellface; i++, j++)
+                    faces->zoneno[j] = taurus->nel8 + i;
+                for (i = 0, j = nhexface + nshellface; i < nbeamface; i++, j++)
+                    faces->zoneno[j] = taurus->nel8 + taurus->nel4 + i;
+            }
+        } else
+        {
+            faces->nodelist     = NULL;
+        }
+
+        mesh->faces = faces;
+    }
+
+    /*
+     * Add the edge information.
+     */
+    mesh->edges = NULL;
+
+    return (mesh);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetUcdvar
+ *
+ * Purpose:     Reads a ucd variable from the Taurus database.
+ *
+ * Return:      Success:        ptr to UCD variable
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 15:09:34 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Thu Jul 27 13:18:52 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Eric Brugger, Thu Dec 21 09:47:28 PST 1995
+ *    I modified the code to handle the activity data.
+ *
+ *    Brad Whitlock, Thu Apr 28 14:13:26 PST 2005
+ *    I changed the code so certain ucd var information is set even when
+ *    the data read mask is not on.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK DBucdvar *
+db_taur_GetUcdvar(DBfile *_dbfile, char *var_name)
+{
+    int            i, j;
+    int            nhex, nshell;
+    float         *buf, *buf2;
+    char           meshname [256];
+    DBucdvar      *uv;
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    char          *me = "db_taur_GetUcdvar";
+
+    if (taurus->state == -1) {
+        db_perror(NULL, E_TAURSTATE, me);
+        return (NULL);
+    }
+    if (taurus->icode != 1 && taurus->icode != 200 && taurus->idir == -1) {
+        db_perror(NULL, E_NOTFOUND, me);
+        return (NULL);
+    }
+
+    /*
+     * Get the ucd var.
+     */
+    if (taurus->mesh_read == 0)
+        init_mesh_info (taurus);
+
+    if (taurus->coord_state != taurus->state) {
+        init_coord_info (taurus);
+        init_zone_info (taurus);
+    }
+
+    uv = DBAllocUcdvar();
+
+    uv->id = get_next_int();
+    uv->name = STRDUP(var_name);
+    uv->cycle = taurus->state;
+    uv->time = taurus->state_time[taurus->state];
+    uv->units = NULL;
+    uv->label = NULL;
+    uv->meshid = get_next_int();
+
+    if (SILO_Globals.dataReadMask & DBUVData)
+    {
+        uv->vals = (DB_DTPTR*) ALLOC_N(float *, 1);
+        if (taurus_readvar(taurus, var_name, &(((float **)(uv->vals))[0]), &uv->nels,
+                           &uv->centering, meshname) < 0) {
+            db_perror("taurus_readvar", E_CALLFAIL, me);
+            FREE(uv->name);
+            FREE(uv);
+            return (NULL);
+        }
+
+        /*
+         * Subselect the active values, if the activ flag is set and
+         * the variable is zone centered.
+         */
+        if (taurus->activ >= 1000 && taurus->activ <= 1005) {
+            if (uv->centering != 0) {
+                buf = uv->vals[0];
+                if (strcmp (meshname, "hs_mesh") == 0) {
+                    for (i = 0, j = 0; i < taurus->nhex; i++) {
+                        if (taurus->hex_activ [i] != 0) {
+                            buf [j] = buf [i];
+                            j++;
+                        }
+                    }
+                    nhex = j;
+
+                    buf = &(((float**)(uv->vals))[0][taurus->nhex]);
+                    buf2 = &(((float**)(uv->vals))[0][nhex]);
+                    for (i = 0, j = 0; i < taurus->nshell; i++) {
+                        if (taurus->shell_activ [i] != 0) {
+                            buf2 [j] = buf [i];
+                            j++;
+                        }
+                    }
+                    nshell = j;
+
+                    uv->nels = nhex + nshell;
+                }
+                else if (strcmp (meshname, "shell_mesh") == 0) {
+                    for (i = 0, j = 0; i < taurus->nshell; i++) {
+                        if (taurus->shell_activ [i] != 0) {
+                            buf [j] = buf [i];
+                            j++;
+                        }
+                    }
+
+                    uv->nels = j;
+                }
+            }
+        }
+    }
+    else
+    {
+        uv->vals = NULL;
+        uv->nels = 0;
+    }
+
+    uv->datatype = DB_FLOAT;
+    uv->nvals = 1;
+    uv->ndims = 3;
+    uv->origin = 0;
+
+    if (uv->centering == 0)
+        uv->centering = DB_NODECENT;
+    else
+        uv->centering = DB_ZONECENT;
+
+    return (uv);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetVar
+ *
+ * Purpose:     Allocates space for a new variable and reads the variable
+ *              from the Taurus database.
+ *
+ * Bugs:        By allocating only 20 bytes for the variable, we may
+ *              run into problems with memory overrun.
+ *
+ * Return:      Success:        ptr to new variable.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Aug 31 15:06:58 PDT 1995
+ *    I increased the size of the array the routine allocates for the
+ *    variable to 40 bytes from 20 bytes.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK void *
+db_taur_GetVar(DBfile *_dbfile, char *varname)
+{
+    void          *ptr;
+    char          *me = "db_taur_GetVar";
+
+    ptr = ALLOC_N(char, 40);
+
+    if (DBReadVar(_dbfile, varname, ptr) < 0) {
+        db_perror("DBReadVar", E_CALLFAIL, me);
+        FREE(ptr);
+        return NULL;
+    }
+    return (ptr);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetVarByteLength
+ *
+ * Purpose:     Returns the length of the given variable in bytes.
+ *
+ * Return:      Success:        length of variable.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 15:21:45 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 13:13:40 PDT 1995
+ *    I modified the routine to return the title in the file
+ *    as _fileinfo.
+ *
+ *    Eric Brugger, Thu Aug 31 15:06:58 PDT 1995
+ *    I modified the routine to return the defaults plots as _meshtvinfo.
+ *
+ *    Brad Whitlock, Thu Apr 28 16:24:58 PST 2005
+ *    Added dtime for VisIt.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_GetVarByteLength(DBfile *_dbfile, char *varname)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    char          *me = "db_taur_GetVarByteLength";
+
+    if (strcmp(varname, "time") == 0) {
+        return (4);
+    }
+    else if (strcmp(varname, "dtime") == 0) {
+        return (8);
+    }
+    else if (strcmp(varname, "cycle") == 0) {
+        return (4);
+    }
+    else if (strcmp(varname, "noreg") == 0) {
+        return (4);
+    }
+    else if (strcmp(varname, "_fileinfo") == 0) {
+        return (strlen(taurus->title) + 1);
+    }
+    else if (strcmp(varname, "_meshtvinfo") == 0) {
+        return (32);
+    }
+    else {
+        return db_perror(varname, E_NOTIMP, me);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_GetVarLength
+ *
+ * Purpose:     Returns the number of elements in the given variable.
+ *
+ * Return:      Success:        number of elements
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 15:24:04 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 13:13:40 PDT 1995
+ *    I modified the routine to return the title in the file
+ *    as _fileinfo.
+ *
+ *    Eric Brugger, Thu Aug 31 15:06:58 PDT 1995
+ *    I modified the routine to return the defaults plots as _meshtvinfo.
+ *
+ *    Brad Whitlock, Thu Apr 28 16:25:38 PST 2005
+ *    Added dtime for VisIt.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_GetVarLength(DBfile *_dbfile, char *varname)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    char          *me = "db_taur_GetVarLength";
+
+    if (strcmp(varname, "time") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "dtime") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "cycle") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "noreg") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "_fileinfo") == 0) {
+        return (strlen(taurus->title) + 1);
+    }
+    else if (strcmp(varname, "_meshtvinfo") == 0) {
+        return (32);
+    }
+    else {
+        return db_perror(varname, E_NOTIMP, me);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_InqMeshname
+ *
+ * Purpose:     Returns the name of a mesh associated with a mesh variable.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 15:26:45 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Feb  7 08:57:18 PST 1995
+ *    I removed some code that is never executed.
+ *
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Thu Jul 27 13:18:52 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_InqMeshname(DBfile *_dbfile, char *var_name, char *mesh_name)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int            i;
+    int            idir;
+    char          *me = "db_taur_InqMeshname";
+
+    if (taurus->state == -1 && taurus->nstates != 0) {
+        return db_perror(NULL, E_TAURSTATE, me);
+    }
+
+    if (taurus->nstates == 0) {
+        /*
+         * Check against the material names.
+         */
+        if (strcmp(var_name, "mat1") == 0) {
+            strcpy(mesh_name, "mesh1");
+            return (0);
+        }
+    }
+    else {
+        if (taurus->state == -1)
+            return db_perror(var_name, E_NOTFOUND, me);
+
+        if (taurus->idir == -1) {
+            /*
+             * Check against the material names.
+             */
+            if (strcmp(var_name, "mat1") == 0) {
+                if (taurus->nstates < 100)
+                    sprintf(mesh_name, "/state%02d/mesh1", taurus->state);
+                else
+                    sprintf(mesh_name, "/state%03d/mesh1", taurus->state);
+                return (0);
+            }
+        }
+
+        if (taurus->icode == 1)
+            idir = 8;
+        else if (taurus->icode == 200)
+            idir = 9;
+        else
+            idir = taurus->idir;
+        if (idir != -1) {
+            /*
+             * Check against the variable names.
+             */
+            for (i = 0; taur_var_list[i].idir < idir; i++)
+                /* do nothing */ ;
+            for (i = i; taur_var_list[i].idir == idir &&
+                 strcmp(var_name, taur_var_list[i].name) != 0; i++)
+                /* do nothing */ ;
+
+            if (taur_var_list[i].idir == idir) {
+                if (taurus->nstates < 100)
+                    sprintf(mesh_name, "/state%02d/%s", taurus->state,
+                            taur_var_list[i].mesh);
+                else
+                    sprintf(mesh_name, "/state%03d/%s", taurus->state,
+                            taur_var_list[i].mesh);
+                return (0);
+            }
+        }
+    }
+
+    return db_perror(var_name, E_NOTFOUND, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_InqMeshtype
+ *
+ * Purpose:     Returns the mesh type for the given mesh.
+ *
+ * Return:      Success:        mesh type
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 14:13:03 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Thu Jul 27 13:18:52 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_InqMeshtype(DBfile *_dbfile, char *mesh_name)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    int            i;
+    int            idir;
+    char          *me = "db_taur_InqMeshtype";
+
+    if (taurus->state == -1 && taurus->nstates != 0) {
+        return db_perror(NULL, E_TAURSTATE, me);
+    }
+
+    if (taurus->nstates == 0) {
+        /*
+         * Check against the material and mesh names.
+         */
+        if (strcmp(mesh_name, "mat1") == 0)
+            return (DB_MATERIAL);
+        else if (strcmp(mesh_name, "mesh1") == 0)
+            return (DB_UCDMESH);
+    }
+    else {
+        if (taurus->state == -1)
+            return db_perror(mesh_name, E_NOTFOUND, me);
+
+        if (taurus->idir == -1) {
+            /*
+             * Check against the material and mesh names.
+             */
+            if (strcmp(mesh_name, "mat1") == 0) {
+                return (DB_MATERIAL);
+            }
+            else {
+                for (i = 0; i < MAX_MESH &&
+                     strcmp(mesh_name, mesh_names[i]) != 0; i++)
+                    /* do nothing */ ;
+
+                if (i < MAX_MESH)
+                    return (DB_UCDMESH);
+            }
+        }
+
+        if (taurus->icode == 1)
+            idir = 8;
+        else if (taurus->icode == 200)
+            idir = 9;
+        else
+            idir = taurus->idir;
+        if (idir != -1) {
+            /*
+             * Check against the variable names.
+             */
+            for (i = 0; taur_var_list[i].idir < idir; i++)
+                /* do nothing */ ;
+            for (i = i; taur_var_list[i].idir == idir &&
+                 strcmp(mesh_name, taur_var_list[i].name) != 0; i++)
+                /* do nothing */ ;
+
+            if (taur_var_list[i].idir == idir)
+                return (DB_UCDVAR);
+        }
+    }
+
+    return db_perror(mesh_name, E_NOTFOUND, me);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_InqVartype
+ *
+ * Purpose:     Returns the var type for the given var.
+ *
+ * Return:      Success:        var type
+ *
+ *              Failure:        -1
+ *
+ * Programmer: Brad Whitlock
+ *             Thu Apr 28 16:41:21 PST 2005
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_InqVartype(DBfile *_dbfile, char *varname)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    char          *me = "db_taur_InqVartype";
+    int            pos = strlen(varname) - 1;
+
+    if(pos >= 0)
+    {
+        char  pwd[400];
+        char *path = 0;
+        int   vartype = DB_INVALID_OBJECT;
+        int   changeDir = 0;
+        char *var = varname + pos;
+        while(*var != '/' && var != varname)
+            --var;
+        /* If we have a slash in the name then we have a directory and 
+         * we chould cd into that directory.
+         */
+        if(*var == '/')
+        {
+            ++var;
+
+            /* Get the current directory so we can restore it later. */
+            db_taur_pwd(taurus, pwd);
+
+            /* cd into the specified directory. */
+            pos = var - varname;
+            path = ALLOC_N(char, pos);
+            strncpy(path, varname, pos);
+            path[pos-1] = '\0';
+
+            db_taur_cd(taurus, path);
+            FREE(path);
+
+            changeDir = 1;
+        }
+  
+        vartype = db_taur_InqMeshtype(_dbfile, var);
+
+        /* Return to the old directory. */
+        if(changeDir)
+            db_taur_cd(taurus, pwd);
+
+        return vartype;
+    }
+    
+    return db_perror(varname, E_NOTFOUND, me);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                         db_taur_InqVarExists
+ *
+ *  Purpose
+ *      Check whether the variable exists and return non-zero if so,
+ *      and 0 if not
+ *
+ *  Programmer
+ *      Eric Brugger, Wed Oct  4 08:46:31 PDT 1995
+ *
+ *  Modifications
+ *    Brad Whitlock, Thu Apr 28 13:40:41 PST 2005
+ *    Added support for dtime.
+ *
+ *--------------------------------------------------------------------*/
+/* ARGSUSED */
+SILO_CALLBACK int
+db_taur_InqVarExists(DBfile *_dbfile, char *varname)
+{
+    if (strcmp(varname, "time") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "dtime") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "cycle") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "noreg") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "_fileinfo") == 0) {
+        return (1);
+    }
+    else if (strcmp(varname, "_meshtvinfo") == 0) {
+        return (1);
+    }
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_ReadVar
+ *
+ * Purpose:     Read a variable into caller-allocated memory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Jan 27 15:57:47 PST 1995
+ *    I replaced the call to byte_copy with a call to memcpy.
+ *
+ *    Eric Brugger, Wed Apr 26 13:13:40 PDT 1995
+ *    I modified the routine to return the title in the file
+ *    as _fileinfo.
+ *
+ *    Eric Brugger, Thu Aug 31 15:06:58 PDT 1995
+ *    I modified the routine to return the defaults plots as _meshtvinfo.
+ *
+ *    Brad Whitlock, Thu Apr 28 13:40:17 PST 2005
+ *    Added support for dtime.
+ *
+ *-------------------------------------------------------------------------
+ */
+SILO_CALLBACK int
+db_taur_ReadVar(DBfile *_dbfile, char *varname, void *ptr)
+{
+    DBfile_taur   *dbfile = (DBfile_taur *) _dbfile;
+    TAURUSfile    *taurus = dbfile->taurus;
+    char          *me = "db_taur_ReadVar";
+
+    if (strcmp(varname, "time") == 0) {
+        memcpy(ptr, &taurus->state_time[taurus->state], 4);
+    }
+    else if (strcmp(varname, "dtime") == 0) {
+        double dtime = (double)taurus->state_time[taurus->state];
+        memcpy(ptr, &dtime, sizeof(double));
+    }
+    else if (strcmp(varname, "cycle") == 0) {
+        memcpy(ptr, &taurus->state, 4);
+    }
+    else if (strcmp(varname, "noreg") == 0) {
+        memcpy(ptr, &taurus->nmat, 4);
+    }
+    else if (strcmp(varname, "_fileinfo") == 0) {
+        memcpy(ptr, &(taurus->title), strlen(taurus->title) + 1);
+    }
+    else if (strcmp(varname, "_meshtvinfo") == 0) {
+        memcpy(ptr, "filled-boundary mat1;mesh mesh1", 32);
+    }
+    else {
+        return db_perror(varname, E_NOTIMP, me);
+    }
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_cd
+ *
+ * Purpose:     Change to the specified directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 12:13:05 PDT 1995
+ *    I modified the routine to handle directories within states.
+ *
+ *    Eric Brugger, Thu Jul 27 13:18:52 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_taur_cd(TAURUSfile *taurus, char *path)
+{
+    int            i;
+    int            state;
+    char          *dir;
+    char           opath[160];
+    char           npath[160];
+
+    /*
+     * Form the new path.
+     */
+    if (path[0] == '/') {
+        strcpy(npath, path);
+    }
+    else {
+        db_taur_pwd(taurus, opath);
+        sprintf(npath, "%s/%s", opath, path);
+    }
+    reduce_path(npath);
+
+    /*
+     * Convert the new path into a state.
+     */
+    /*
+     * Handle the case where we are specifying the root directory.
+     */
+    if (strcmp(npath, "/") == 0) {
+        taurus->state = -1;
+        return (0);
+    }
+
+    /*
+     * Pick off the state directory.
+     */
+    if (strncmp(npath, "/state", 6) != 0)
+        return (-1);
+    for (i = 6; npath[i] >= '0' && npath[i] <= '9'; i++)
+        /* do nothing */ ;
+    if (i == 6)
+        return (-1);
+
+    if (taurus->icode == 1 || taurus->icode == 200) {
+        if (npath[i] != '\0')
+            return (-1);
+    }
+    else {
+        if (npath[i] != '\0' && npath[i] != '/')
+            return (-1);
+    }
+    sscanf(&npath[6], "%d", &state);
+    if (state >= taurus->nstates)
+        return (-1);
+
+    /*
+     * Pick off the directory within the state, if one is present.
+     */
+    if (npath[i] == '\0') {
+        taurus->state = state;
+        taurus->idir = -1;
+    }
+    else {
+        dir = &npath[i + 1];
+        for (i = 0; i < NDIRS && strcmp(dir, dir_names[i]) != 0; i++)
+            /* do nothing */ ;
+        if (i < NDIRS) {
+            taurus->state = state;
+            taurus->idir = i;
+        }
+        else {
+            return (-1);
+        }
+    }
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_pwd
+ *
+ * Purpose:     Fill in the `path' buffer with the name of the current
+ *              directory.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 12:13:05 PDT 1995
+ *    I modified the routine to handle directories within states.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE int
+db_taur_pwd(TAURUSfile *taurus, char *path)
+{
+    if (taurus->state == -1) {
+        strcpy(path, "/");
+    }
+    else {
+        if (taurus->idir == -1) {
+            if (taurus->nstates < 100) {
+                sprintf(path, "/state%02d", taurus->state);
+            }
+            else {
+                sprintf(path, "/state%03d", taurus->state);
+            }
+        }
+        else {
+            if (taurus->nstates < 100) {
+                sprintf(path, "/state%02d/%s", taurus->state,
+                        dir_names[taurus->idir]);
+            }
+            else {
+                sprintf(path, "/state%03d/%s", taurus->state,
+                        dir_names[taurus->idir]);
+            }
+        }
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_extface
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+INTERNAL void
+db_taur_extface(int *znodelist, int nnodes, int nzones, int *matlist,
+                int **fnodelist, int *nfaces, int **zoneno)
+{
+    int            nzshapes;
+    int            zshapecnt[1];
+    int            zshapesize[1];
+    DBfacelist    *fl;
+
+    nzshapes = 1;
+    zshapecnt[0] = nzones;
+    zshapesize[0] = 8;
+
+    fl = DBCalcExternalFacelist(znodelist, nnodes, 0, zshapesize,
+                                zshapecnt, nzshapes, matlist, 2);
+
+    *fnodelist = fl->nodelist;
+    *nfaces = fl->nfaces;
+    *zoneno = fl->zoneno;
+
+    FREE(fl->shapecnt);
+    FREE(fl->shapesize);
+    FREE(fl);
+}
diff --git a/src/taurus/silo_taurus_private.h b/src/taurus/silo_taurus_private.h
new file mode 100644
index 0000000..35ed5c5
--- /dev/null
+++ b/src/taurus/silo_taurus_private.h
@@ -0,0 +1,111 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef SILO_TAURUS_PRIVATE_H
+#define SILO_TAURUS_PRIVATE_H
+
+/*
+ * SILO Taurus Private header file.
+ *
+ * This header file is included by all SILO-Taurus source files and
+ * contains constants and prototypes that should be visible to
+ * the SILO-Taurus source files, but not to the application.
+ */
+
+#include "silo_private.h"
+#include "taurus.h"
+
+/*
+ * The private version of the DBfile structure is defined here.
+ */
+typedef struct DBfile_taur {
+    DBfile_pub     pub;
+    TAURUSfile    *taurus;
+} DBfile_taur;
+
+#ifndef SILO_NO_CALLBACKS
+SILO_CALLBACK int db_taur_Close(DBfile *);
+SILO_CALLBACK int db_taur_GetDir(DBfile *, char *);
+SILO_CALLBACK int db_taur_SetDir(DBfile *, char *);
+SILO_CALLBACK void *db_taur_GetComponent(DBfile *, char *, char *);
+SILO_CALLBACK int db_taur_InqMeshname(DBfile *, char *, char *);
+SILO_CALLBACK int db_taur_InqVarExists(DBfile *, char *);
+SILO_CALLBACK int db_taur_InqMeshtype(DBfile *, char *);
+SILO_CALLBACK int db_taur_InqVartype(DBfile *, char *);
+SILO_CALLBACK int db_taur_ReadVar(DBfile *, char *, void *);
+SILO_CALLBACK DBmaterial *db_taur_GetMaterial(DBfile *, char *);
+SILO_CALLBACK DBucdmesh *db_taur_GetUcdmesh(DBfile *, char *);
+SILO_CALLBACK DBucdvar *db_taur_GetUcdvar(DBfile *, char *);
+SILO_CALLBACK void *db_taur_GetVar(DBfile *, char *);
+SILO_CALLBACK int db_taur_GetVarByteLength(DBfile *, char *);
+SILO_CALLBACK int db_taur_GetVarLength(DBfile *, char *);
+SILO_CALLBACK int db_taur_Filters(DBfile *, FILE *);
+SILO_CALLBACK int db_taur_NewToc(DBfile *);
+
+#endif /* !SILO_NO_CALLBACKS */
+
+/*-------------------------------------------------------------------------
+ * Private or Internal functions.  These functions should only be called
+ * by the Taurus device driver.
+ *-------------------------------------------------------------------------
+ */
+extern TAURUSfile *db_taur_open(char *);
+extern int db_taur_close(TAURUSfile *);
+extern void init_coord_info(TAURUSfile *);
+extern void init_mesh_info(TAURUSfile *);
+extern void init_zone_info(TAURUSfile *);
+extern int taurus_readvar(TAURUSfile *, char *, float **, int *, int *,
+                          char *);
+extern void db_taur_extface(int *, int, int, int *, int **, int *, int **);
+
+#endif /* !SILO_TAURUS_PRIVATE_H */
diff --git a/src/taurus/taurus.c b/src/taurus/taurus.c
new file mode 100644
index 0000000..b6aa022
--- /dev/null
+++ b/src/taurus/taurus.c
@@ -0,0 +1,2358 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * Robb Matzke, Fri Dec 9 13:05:38 EST 1994
+ * Changed for device independence.  This is a support file and is not
+ * strictly part of SILO or the SILO-Taurus device driver.  However,
+ * we are including the `silo_taurus_private.h' header file to get the
+ * memory management macros, `taurus.h' header file, and function
+ * prototype for `db_taur_extface'.
+ */
+
+#define SILO_NO_CALLBACKS
+#include "config.h"
+#include "silo_taurus_private.h"
+
+#if HAVE_FCNTL_H
+#include <fcntl.h>              /*open */
+#endif
+#if HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>              /*open */
+#endif
+#include <math.h>               /*sqrt, acos */
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>           /*stat */
+#endif
+#include <ctype.h>		/*isspace */
+
+#define MAXBUF 100000
+
+#ifndef FALSE
+#define FALSE  0
+#endif
+#ifndef TRUE
+#define TRUE   1
+#endif
+
+/*
+ * ftpi = (4/3)*pi, ttpi = (2/3)*pi
+ */
+#define ftpi 4.188790205
+#define ttpi 2.094395102
+
+/*
+ * The list of taurus variables.
+ */
+var_list_s     taur_var_list[] =
+{
+    {"disp_x", "mesh1", 3, NODAL_VAR,
+     VAL_COORDX, VAR_DISPX},
+    {"disp_y", "mesh1", 3, NODAL_VAR,
+     VAL_COORDY, VAR_DISPY},
+    {"disp_z", "mesh1", 3, NODAL_VAR,
+     VAL_COORDZ, VAR_DISPZ},
+    {"disp_mag", "mesh1", 3, NODAL_VAR,
+     VAL_COORDX, VAR_DISP_MAG},
+    {"vel_x", "mesh1", 3, NODAL_VAR,
+     VAL_VELX, VAR_NORMAL},
+    {"vel_y", "mesh1", 3, NODAL_VAR,
+     VAL_VELY, VAR_NORMAL},
+    {"vel_z", "mesh1", 3, NODAL_VAR,
+     VAL_VELZ, VAR_NORMAL},
+    {"vel_mag", "mesh1", 3, NODAL_VAR,
+     VAL_VELX, VAR_VEL_MAG},
+    {"acc_x", "mesh1", 3, NODAL_VAR,
+     VAL_ACCX, VAR_NORMAL},
+    {"acc_y", "mesh1", 3, NODAL_VAR,
+     VAL_ACCY, VAR_NORMAL},
+    {"acc_z", "mesh1", 3, NODAL_VAR,
+     VAL_ACCZ, VAR_NORMAL},
+    {"acc_mag", "mesh1", 3, NODAL_VAR,
+     VAL_ACCX, VAR_ACC_MAG},
+    {"temp_x", "mesh1", 3, NODAL_VAR,
+     VAL_TEMPX, VAR_NORMAL},
+    {"temp_y", "mesh1", 3, NODAL_VAR,
+     VAL_TEMPY, VAR_NORMAL},
+    {"temp_z", "mesh1", 3, NODAL_VAR,
+     VAL_TEMPZ, VAR_NORMAL},
+    {"m_xx_bending", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES1, VAR_NORMAL},
+    {"m_yy_bending", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES2, VAR_NORMAL},
+    {"m_xy_bending", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES3, VAR_NORMAL},
+    {"q_xx_shear", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES4, VAR_NORMAL},
+    {"q_yy_shear", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES5, VAR_NORMAL},
+    {"n_xx_normal", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES6, VAR_NORMAL},
+    {"n_yy_normal", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES7, VAR_NORMAL},
+    {"n_xy_normal", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_RES8, VAR_NORMAL},
+    {"thickness", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_THICKNESS, VAR_NORMAL},
+    {"int_energy", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_INT_ENG, VAR_NORMAL},
+    {"surf_stress_1", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_1},
+    {"surf_stress_2", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_2},
+    {"surf_stress_3", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_3},
+    {"surf_stress_4", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_4},
+    {"surf_stress_5", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_5},
+    {"surf_stress_6", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_SURF_STRESS_6},
+    {"eff_upp_stress", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_UP_STRESS},
+    {"eff_low_stress", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_LOW_STRESS},
+    {"eff_max_stress", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_MAX_STRESS},
+    {"upp_surf_eps", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_EPS_EFF, VAR_NORMAL},
+    {"low_surf_eps", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_EPS_EFF, VAR_NORMAL},
+    {"low_xx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGX, VAR_NORMAL},
+    {"low_yy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGY, VAR_NORMAL},
+    {"low_zz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGZ, VAR_NORMAL},
+    {"low_xy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGXY, VAR_NORMAL},
+    {"low_yz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGYZ, VAR_NORMAL},
+    {"low_zx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_IN_SIGZX, VAR_NORMAL},
+    {"upp_xx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGX, VAR_NORMAL},
+    {"upp_yy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGY, VAR_NORMAL},
+    {"upp_zz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGZ, VAR_NORMAL},
+    {"upp_xy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGXY, VAR_NORMAL},
+    {"upp_yz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGYZ, VAR_NORMAL},
+    {"upp_zx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_OUT_SIGZX, VAR_NORMAL},
+    {"mid_xx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGX, VAR_NORMAL},
+    {"mid_yy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGY, VAR_NORMAL},
+    {"mid_zz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGZ, VAR_NORMAL},
+    {"mid_xy_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGXY, VAR_NORMAL},
+    {"mid_yz_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGYZ, VAR_NORMAL},
+    {"mid_zx_strain", "shell_mesh", 4, ZONAL_VAR,
+     VAL_SHELL_MID_SIGZX, VAR_NORMAL},
+    {"stress_xx", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_SIGX},
+    {"stress_yy", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGY, VAR_SIGY},
+    {"stress_zz", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGZ, VAR_SIGZ},
+    {"stress_xy", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGXY, VAR_SIGXY},
+    {"stress_yz", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGYZ, VAR_SIGYZ},
+    {"stress_zx", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGZX, VAR_SIGZX},
+    {"stress_eps", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_EPS_EFF, VAR_EPS},
+    {"pressure", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_PRESSURE},
+    {"stress_eff", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_SIG_EFF},
+    {"princ_dev_stress_1", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_DEV_STRESS_1},
+    {"princ_dev_stress_2", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_DEV_STRESS_2},
+    {"princ_dev_stress_3", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_DEV_STRESS_3},
+    {"max_shear_stress", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_MAX_SHEAR_STR},
+    {"princ_stress_1", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_PRINC_STRESS_1},
+    {"princ_stress_2", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_PRINC_STRESS_2},
+    {"princ_stress_3", "hs_mesh", 5, ZONAL_VAR,
+     VAL_HEX_SIGX, VAR_PRINC_STRESS_3},
+    {"temperature", "mesh1", 8, NODAL_VAR,
+     VAL_TEMP, VAR_NORMAL},
+    {"flux_x", "mesh1", 8, NODAL_VAR,
+     VAL_FLUXX, VAR_NORMAL},
+    {"flux_y", "mesh1", 8, NODAL_VAR,
+     VAL_FLUXY, VAR_NORMAL},
+    {"flux_z", "mesh1", 8, NODAL_VAR,
+     VAL_FLUXZ, VAR_NORMAL},
+    {"vel_x", "mesh1", 9, NODAL_VAR,
+     VAL_VELX, VAR_NORMAL},
+    {"vel_y", "mesh1", 9, NODAL_VAR,
+     VAL_VELY, VAR_NORMAL},
+    {"vel_z", "mesh1", 9, NODAL_VAR,
+     VAL_VELZ, VAR_NORMAL},
+    {"vel_mag", "mesh1", 9, NODAL_VAR,
+     VAL_VELX, VAR_VEL_MAG},
+    {"vort_x", "mesh1", 9, NODAL_VAR,
+     VAL_VORTX, VAR_NORMAL},
+    {"vort_y", "mesh1", 9, NODAL_VAR,
+     VAL_VORTY, VAR_NORMAL},
+    {"vort_z", "mesh1", 9, NODAL_VAR,
+     VAL_VORTZ, VAR_NORMAL},
+    {"vort_mag", "mesh1", 9, NODAL_VAR,
+     VAL_VORTX, VAR_VORT_MAG},
+    {"pressure", "hs_mesh", 9, ZONAL_VAR,
+     VAL_PRESSURE, VAR_PRESSURE},
+    {"dummy", "dummy", 10, NODAL_VAR,
+     0, VAR_NORMAL}
+};
+
+/*-------------------------------------------------------------------------
+ * Function:    fam_name
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to proto type form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+fam_name (char *basename, int filenumber, char *filename)
+{
+
+    if (filenumber == 0)
+        strcpy(filename, basename);
+    else if (filenumber < 100)
+        sprintf(filename, "%s%02d", basename, filenumber);
+    else
+        sprintf(filename, "%s%03d", basename, filenumber);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    fix_title
+ *
+ * Purpose:     Fixes the screwy title.  For some reason, the title
+ *              contains extra padding at character positions
+ *              n*8+6 and n*8+7.  The title may also contain leading
+ *              and trailing whitespace.  This routine will remove
+ *              all of this.  This routine replaces a buggy version
+ *              from the old Taurus stuff (see modification section
+ *              below).
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke, Wed Jan 25 15:46:03 PST 1995
+ *
+ * Modifications:
+ *
+ *    Robb Matzke, Wed Jan 25 15:20:03 PST 1995
+ *    Removed final `for' loop since the title should have
+ *    only 41 characters counting the null terminator.
+ *    Fixed final while loop for cases where the title contains
+ *    no printable characters or all whitespce.  After removing
+ *    the junk part of the title and shortening the title, we
+ *    zero-fill everything to the right.  This is because the
+ *    title size is initialized before we know what the title
+ *    is and the browser output routines will print all bytes
+ *    of the title, including the stuff after the null terminator.
+ *
+ *    Eric Brugger, Fri Apr 28 10:09:40 PDT 1995
+ *    I modified the routine to correct screwy titles and leave normal
+ *    ones alone.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+PRIVATE void
+fix_title (char *title)
+{
+    int            i, j;
+    int            fixit;
+
+    /*
+     * Determine if the title needs fixing.
+     */
+    fixit = TRUE;
+    for (i = 0; i < 40; i += 8) {
+        if (title[i + 6] != ' ' || title[i + 7] != ' ')
+            fixit = FALSE;
+    }
+
+    /*
+     * Fix it if necessary.
+     */
+    if (fixit == TRUE) {
+        j = 0;
+        for (i = 0; i < 6; i++)
+            title[j++] = title[i];
+        for (i = 8; i < 14; i++)
+            title[j++] = title[i];
+        for (i = 16; i < 22; i++)
+            title[j++] = title[i];
+        for (i = 24; i < 30; i++)
+            title[j++] = title[i];
+        for (i = 32; i < 38; i++)
+            title[j++] = title[i];
+        for (i = 0; i < 10; i++)
+            title[j++] = ' ';
+    }
+
+    /*
+     * Remove trailing blanks.
+     */
+    j = 39;
+    while (j > 0 && isspace(title[j]))
+        j--;
+    title[j + 1] = '\0';
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_file_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+init_file_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            nfiles;
+    struct stat    statbuf;
+
+    /*
+     * Determine the number of files.
+     */
+    nfiles = 0;
+    fam_name(taurus->basename, nfiles, taurus->filename);
+    while (stat(taurus->filename, &statbuf) != -1) {
+        nfiles++;
+        fam_name(taurus->basename, nfiles, taurus->filename);
+    }
+    taurus->nfiles = nfiles;
+
+    /*
+     * Determine the size of each file in the family.
+     */
+    taurus->filesize = ALLOC_N(int, nfiles);
+
+    for (i = 0; i < nfiles; i++) {
+        fam_name(taurus->basename, i, taurus->filename);
+        stat(taurus->filename, &statbuf);
+        taurus->filesize[i] = statbuf.st_size;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    taurus_read
+ *
+ * Purpose:
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Eric Brugger, Fri Apr 28 10:41:17 PDT 1995
+ *    I modified the routine to handle the case where the address is
+ *    not in the specified file.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+taurus_read (TAURUSfile *taurus, int ifile, int iadd, int length, char *buffer)
+{
+    int            n;
+    int            ibuf;
+    int            idisk;
+
+    /*
+     * Skip to the correct file if the address is not in the
+     * specified file.
+     */
+    while (iadd > taurus->filesize[ifile]) {
+        iadd -= taurus->filesize[ifile];
+        ifile++;
+    }
+
+    /*
+     * Read the file.
+     */
+    ibuf = 0;
+    idisk = iadd;
+    while (length > 0) {
+        /*
+         * If the desired file is not open, close the current file
+         * and open the desired file.
+         */
+        if (taurus->ifile != ifile) {
+            if (taurus->fd != -1)
+                close(taurus->fd);
+            fam_name(taurus->basename, ifile, taurus->filename);
+            if ((taurus->fd = open(taurus->filename, O_RDONLY)) < 0) {
+                return (-1);
+            }
+            taurus->ifile = ifile;
+        }
+
+        /*
+         * Read the maximum amount from the current file.
+         */
+        n = MIN(taurus->filesize[ifile] - idisk, length);
+        lseek(taurus->fd, idisk, SEEK_SET);
+
+        if (read(taurus->fd, &buffer[ibuf], n) != n) {
+            return (-2);
+        }
+
+        ibuf += n;
+        length -= n;
+        ifile++;
+        idisk = 0;
+    }
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_state_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Mar 28 15:03:37 PST 1995
+ *    I modified the routines to read a topaz3d data file.
+ *
+ *    Eric Brugger, Wed Apr 26 13:52:00 PDT 1995
+ *    I modified the routine to set the directory to none.
+ *
+ *    Eric Brugger, Fri Apr 28 10:12:02 PDT 1995
+ *    I modified the routine to handle states that overlapped several
+ *    files.
+ *
+ *    Eric Brugger, Thu Jul 27 12:49:40 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+init_state_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            geomsize;
+    int            statesize;
+    int            totsize;
+    int            maxstates;
+    int            nstates;
+    int            loc;
+    int            ifile;
+    int            nfiles;
+    int            nv1dact, nv2dact, nv3dact;
+
+    nfiles = taurus->nfiles;
+
+    nv1dact = taurus->nv1d;
+    nv2dact = taurus->nv2d;
+    nv3dact = taurus->nv3d;
+    if (taurus->activ >= 1000 && taurus->activ <= 1005) {
+        if (taurus->nel2 > 0)
+            nv1dact++;
+        if (taurus->nel4 > 0)
+            nv2dact++;
+        if (taurus->nel8 > 0)
+            nv3dact++;
+    }
+
+    /*
+     * Determine the file and disk address for the start of each
+     * state in the database.
+     */
+    geomsize = (taurus->ndim * taurus->numnp +
+                9 * taurus->nel8 +
+                5 * taurus->nel4 +
+                6 * taurus->nel2) * sizeof(int);
+
+    switch (taurus->icode) {
+            /*
+             * topaz3d.
+             */
+        case 1:
+            /*
+             * This is an extension to the taurus data base.  If it
+             * is four then fluxes are present.
+             */
+            if (taurus->it == 4)
+                statesize = (4 * taurus->numnp + 1) * sizeof(int);
+
+            else
+                statesize = (1 * taurus->numnp + 1) * sizeof(int);
+
+            break;
+            /*
+             * dyna3d or nike3d.
+             */
+        case 2:
+        case 6:
+        case 200:
+            statesize = (taurus->it * taurus->numnp +
+                         taurus->ndim * taurus->numnp *
+                         (taurus->iu + taurus->iv + taurus->ia) +
+                         taurus->nel8 * nv3dact +
+                         taurus->nel4 * nv2dact +
+                         taurus->nel2 * nv1dact +
+                         taurus->nglbv + 1) * sizeof(int);
+
+            break;
+    }
+
+    totsize = 0;
+    for (i = 0; i < nfiles; i++)
+        totsize += taurus->filesize[i];
+    maxstates = (totsize / statesize) + 1;
+    taurus->state_file = ALLOC_N(int, maxstates);
+    taurus->state_loc = ALLOC_N(int, maxstates);
+    taurus->state_time = ALLOC_N(float, maxstates);
+
+    loc = 64 * sizeof(int) + geomsize;
+
+    ifile = 0;
+    while (loc >= taurus->filesize[ifile]) {
+        loc -= taurus->filesize[ifile];
+        ifile++;
+    }
+
+    for (nstates = 0;; nstates++) {
+        if (nfiles == 1) {
+            if ((loc + statesize) > taurus->filesize[ifile])
+                break;
+        }
+        else if (statesize <= taurus->filesize[1]) {
+            if ((loc + statesize) > taurus->filesize[ifile]) {
+                ifile++;
+                loc = 0;
+                if (ifile >= nfiles)
+                    break;
+            }
+        }
+        else {
+            while (loc > 0) {
+                loc -= taurus->filesize[ifile];
+                ifile++;
+            }
+            loc = 0;
+            if (ifile >= nfiles)
+                break;
+        }
+
+        taurus->state_file[nstates] = ifile;
+        taurus->state_loc[nstates] = loc;
+
+        loc += statesize;
+    }
+
+    taurus->nstates = nstates;
+    taurus->state = -1;
+    taurus->idir = -1;
+
+    /*
+     * Read in the time for each state.
+     */
+    for (i = 0; i < nstates; i++)
+        taurus_read(taurus, taurus->state_file[i], taurus->state_loc[i],
+                    sizeof(float), (char*)&taurus->state_time[i]);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_var_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Mar 28 15:03:37 PST 1995
+ *    I modified the routines to read a topaz3d data file.
+ *
+ *    Eric Brugger, Thu Apr 27 08:47:01 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Thu Jul 27 12:49:40 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+init_var_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            loc;
+
+    /*
+     * Set up the default values.
+     */
+    for (i = 0; i < MAX_VAL; i++)
+        taurus->var_start[i] = -1;
+
+    loc = (1 + taurus->nglbv) * sizeof(float);
+
+    /*
+     * Topaz3d data.
+     */
+    if (taurus->icode == 1) {
+        taurus->var_start[VAL_TEMP] = loc;
+        taurus->var_ncomps[VAL_TEMP] = 1;
+        taurus->var_len[VAL_TEMP] = taurus->numnp;
+        taurus->var_offset[VAL_TEMP] = 0;
+        loc += taurus->numnp * sizeof(float);
+
+        /*
+         * This is an extension to the taurus data base.  If it
+         * is four then fluxes are present.
+         */
+        if (taurus->it == 4) {
+            for (i = VAL_FLUXX; i <= VAL_FLUXZ; i++) {
+                taurus->var_start[i] = loc;
+                taurus->var_ncomps[i] = 3;
+                taurus->var_len[i] = taurus->numnp;
+            }
+            taurus->var_offset[VAL_FLUXX] = 0;
+            taurus->var_offset[VAL_FLUXY] = 1;
+            taurus->var_offset[VAL_FLUXZ] = 2;
+
+            loc += 3 * taurus->numnp * sizeof(float);
+        }
+
+        return;
+    }
+
+    /*
+     * Hydra data.
+     */
+    if (taurus->icode == 200) {
+        if (taurus->iv != 0) {
+            for (i = VAL_VELX; i <= VAL_VELZ; i++) {
+                taurus->var_start[i] = loc;
+                taurus->var_ncomps[i] = 3;
+                taurus->var_len[i] = taurus->numnp;
+            }
+            taurus->var_offset[VAL_VELX] = 0;
+            taurus->var_offset[VAL_VELY] = 1;
+            taurus->var_offset[VAL_VELZ] = 2;
+            loc += taurus->ndim * taurus->numnp * sizeof(float);
+        }
+
+        if (taurus->ia != 0) {
+            for (i = VAL_VORTX; i <= VAL_VORTZ; i++) {
+                taurus->var_start[i] = loc;
+                taurus->var_ncomps[i] = 3;
+                taurus->var_len[i] = taurus->numnp;
+            }
+            taurus->var_offset[VAL_VORTX] = 0;
+            taurus->var_offset[VAL_VORTY] = 1;
+            taurus->var_offset[VAL_VORTZ] = 2;
+            loc += taurus->ndim * taurus->numnp * sizeof(float);
+        }
+
+        if (taurus->nel8 > 0 && taurus->nv3d == 7) {
+            taurus->var_start[VAL_PRESSURE] = loc;
+            taurus->var_ncomps[VAL_PRESSURE] = 7;
+            taurus->var_len[VAL_PRESSURE] = taurus->nel8;
+            taurus->var_offset[VAL_PRESSURE] = 0;
+            loc += taurus->nv3d * taurus->nel8 * sizeof(float);
+        }
+
+        return;
+    }
+
+    /*
+     * Initial nodal coordinates (for displacement calculations).
+     */
+    if (taurus->iu != 0) {
+        for (i = VAL_COORDX; i <= VAL_COORDZ; i++) {
+            taurus->var_start[i] = 64 * sizeof(int);
+
+            taurus->var_ncomps[i] = 3;
+            taurus->var_len[i] = taurus->numnp;
+        }
+        taurus->var_offset[VAL_COORDX] = 0;
+        taurus->var_offset[VAL_COORDY] = 1;
+        taurus->var_offset[VAL_COORDZ] = 2;
+        loc += taurus->ndim * taurus->numnp * sizeof(float);
+    }
+
+    /*
+     * Nodal velocities.
+     */
+    if (taurus->iv != 0) {
+        for (i = VAL_VELX; i <= VAL_VELZ; i++) {
+            taurus->var_start[i] = loc;
+            taurus->var_ncomps[i] = 3;
+            taurus->var_len[i] = taurus->numnp;
+        }
+        taurus->var_offset[VAL_VELX] = 0;
+        taurus->var_offset[VAL_VELY] = 1;
+        taurus->var_offset[VAL_VELZ] = 2;
+        loc += taurus->ndim * taurus->numnp * sizeof(float);
+    }
+
+    /*
+     * Nodal accelerations.
+     */
+    if (taurus->ia != 0) {
+        for (i = VAL_ACCX; i <= VAL_ACCZ; i++) {
+            taurus->var_start[i] = loc;
+            taurus->var_ncomps[i] = 3;
+            taurus->var_len[i] = taurus->numnp;
+        }
+        taurus->var_offset[VAL_ACCX] = 0;
+        taurus->var_offset[VAL_ACCY] = 1;
+        taurus->var_offset[VAL_ACCZ] = 2;
+        loc += taurus->ndim * taurus->numnp * sizeof(float);
+    }
+
+    /*
+     * Nodal temperatures.
+     */
+    if (taurus->it != 0) {
+        for (i = VAL_TEMPX; i <= VAL_TEMPZ; i++) {
+            taurus->var_start[i] = loc;
+            taurus->var_ncomps[i] = 3;
+            taurus->var_len[i] = taurus->numnp;
+        }
+        taurus->var_offset[VAL_TEMPX] = 0;
+        taurus->var_offset[VAL_TEMPY] = 1;
+        taurus->var_offset[VAL_TEMPZ] = 2;
+        loc += taurus->ndim * taurus->numnp * sizeof(float);
+    }
+
+    /*
+     * Brick data.
+     */
+    if (taurus->nel8 > 0 && taurus->nv3d == 7) {
+        for (i = VAL_HEX_SIGX; i <= VAL_HEX_EPS_EFF; i++) {
+            taurus->var_start[i] = loc;
+            taurus->var_ncomps[i] = 7;
+            taurus->var_len[i] = taurus->nel8;
+        }
+        taurus->var_offset[VAL_HEX_SIGX] = 0;
+        taurus->var_offset[VAL_HEX_SIGY] = 1;
+        taurus->var_offset[VAL_HEX_SIGZ] = 2;
+        taurus->var_offset[VAL_HEX_SIGXY] = 3;
+        taurus->var_offset[VAL_HEX_SIGYZ] = 4;
+        taurus->var_offset[VAL_HEX_SIGZX] = 5;
+        taurus->var_offset[VAL_HEX_EPS_EFF] = 6;
+        loc += taurus->nv3d * taurus->nel8 * sizeof(float);
+    }
+
+    /*
+     * Beam data.
+     */
+    if (taurus->nel2 > 0 && taurus->nv1d == 6) {
+        loc += taurus->nv1d * taurus->nel2 * sizeof(float);
+    }
+
+    /*
+     * Shell data.
+     */
+    if (taurus->nel4 > 0 && taurus->nv2d >= 33) {
+        for (i = VAL_SHELL_MID_SIGX; i <= VAL_SHELL_INT_ENG; i++) {
+            taurus->var_start[i] = loc;
+            taurus->var_ncomps[i] = taurus->nv2d;
+            taurus->var_len[i] = taurus->nel4;
+        }
+        taurus->var_offset[VAL_SHELL_MID_SIGX] = 0;
+        taurus->var_offset[VAL_SHELL_MID_SIGY] = 1;
+        taurus->var_offset[VAL_SHELL_MID_SIGZ] = 2;
+        taurus->var_offset[VAL_SHELL_MID_SIGXY] = 3;
+        taurus->var_offset[VAL_SHELL_MID_SIGYZ] = 4;
+        taurus->var_offset[VAL_SHELL_MID_SIGZX] = 5;
+        taurus->var_offset[VAL_SHELL_MID_EPS_EFF] = 6;  /* not used */
+        taurus->var_offset[VAL_SHELL_IN_SIGX] = 7;
+        taurus->var_offset[VAL_SHELL_IN_SIGY] = 8;
+        taurus->var_offset[VAL_SHELL_IN_SIGZ] = 9;
+        taurus->var_offset[VAL_SHELL_IN_SIGXY] = 10;
+        taurus->var_offset[VAL_SHELL_IN_SIGYZ] = 11;
+        taurus->var_offset[VAL_SHELL_IN_SIGZX] = 12;
+        taurus->var_offset[VAL_SHELL_IN_EPS_EFF] = 13;
+        taurus->var_offset[VAL_SHELL_OUT_SIGX] = 14;
+        taurus->var_offset[VAL_SHELL_OUT_SIGY] = 15;
+        taurus->var_offset[VAL_SHELL_OUT_SIGZ] = 16;
+        taurus->var_offset[VAL_SHELL_OUT_SIGXY] = 17;
+        taurus->var_offset[VAL_SHELL_OUT_SIGYZ] = 18;
+        taurus->var_offset[VAL_SHELL_OUT_SIGZX] = 19;
+        taurus->var_offset[VAL_SHELL_OUT_EPS_EFF] = 20;
+        taurus->var_offset[VAL_SHELL_RES1] = 21;
+        taurus->var_offset[VAL_SHELL_RES2] = 22;
+        taurus->var_offset[VAL_SHELL_RES3] = 23;
+        taurus->var_offset[VAL_SHELL_RES4] = 24;
+        taurus->var_offset[VAL_SHELL_RES5] = 25;
+        taurus->var_offset[VAL_SHELL_RES6] = 26;
+        taurus->var_offset[VAL_SHELL_RES7] = 27;
+        taurus->var_offset[VAL_SHELL_RES8] = 28;
+        taurus->var_offset[VAL_SHELL_THICKNESS] = 29;
+        taurus->var_offset[VAL_SHELL_ELDEP1] = 30;  /* not used */
+        taurus->var_offset[VAL_SHELL_ELDEP2] = 31;  /* not used */
+        taurus->var_offset[VAL_SHELL_INT_ENG] = 32;
+        /*
+         * The variables in the following if block are not used.
+         */
+        if (taurus->nv2d == 45 || taurus->nv2d == 46) {
+            for (i = VAL_SHELL_EPSX_IN; i <= VAL_SHELL_EPSZX_OUT; i++) {
+                taurus->var_start[i] = loc;
+                taurus->var_ncomps[i] = taurus->nv2d;
+                taurus->var_len[i] = taurus->nel4;
+            }
+            taurus->var_offset[VAL_SHELL_EPSX_IN] = 33;
+            taurus->var_offset[VAL_SHELL_EPSY_IN] = 34;
+            taurus->var_offset[VAL_SHELL_EPSZ_IN] = 35;
+            taurus->var_offset[VAL_SHELL_EPSXY_IN] = 36;
+            taurus->var_offset[VAL_SHELL_EPSYZ_IN] = 37;
+            taurus->var_offset[VAL_SHELL_EPSZX_IN] = 38;
+            taurus->var_offset[VAL_SHELL_EPSX_OUT] = 39;
+            taurus->var_offset[VAL_SHELL_EPSY_OUT] = 40;
+            taurus->var_offset[VAL_SHELL_EPSZ_OUT] = 41;
+            taurus->var_offset[VAL_SHELL_EPSXY_OUT] = 42;
+            taurus->var_offset[VAL_SHELL_EPSYZ_OUT] = 43;
+            taurus->var_offset[VAL_SHELL_EPSZX_OUT] = 44;
+        }
+        loc += taurus->nv2d * taurus->nel4 * sizeof(float);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_mat_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Aug 28 13:37:09 PDT 1995
+ *    I modified the routine to find the actual materials referenced
+ *    rather than the maximum material number and assume that they were
+ *    all used.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+init_mat_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            iadd, ibuf, imat;
+    int            len;
+    int            lbuf;
+    int           *buf, *buf2;
+    int            maxmat;
+    int            nmat;
+    int           *matnos;
+
+    maxmat = 0;
+
+    /*
+     * Set up for reading the nodelists and material data.
+     */
+    iadd = 64 * sizeof(int) + taurus->numnp * taurus->ndim * sizeof(float);
+
+    ibuf = 0;
+    lbuf = (9 * taurus->nel8) + (5 * taurus->nel4) + (6 * taurus->nel2);
+    buf = ALLOC_N(int, lbuf);
+
+    /*
+     * Read the hexahedron elements.
+     */
+    if (taurus->nel8 > 0) {
+        len = 9 * taurus->nel8 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)buf);
+
+        for (i = 0; i < taurus->nel8; i++)
+            if (buf[i * 9 + 8] > maxmat)
+                maxmat = buf[i * 9 + 8];
+
+        iadd += len;
+        ibuf += 9 * taurus->nel8;
+    }
+
+    /*
+     * Read the beam elements.
+     */
+    if (taurus->nel2 > 0) {
+        len = 6 * taurus->nel2 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)(&buf[ibuf]));
+
+        for (i = 0; i < taurus->nel2; i++)
+            if (buf[ibuf + i * 6 + 5] > maxmat)
+                maxmat = buf[ibuf + i * 6 + 5];
+
+        iadd += len;
+        ibuf += 6 * taurus->nel2;
+    }
+
+    /*
+     * Read the shell elements.
+     */
+    if (taurus->nel4 > 0) {
+        len = 5 * taurus->nel4 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)(&buf[ibuf]));
+
+        for (i = 0; i < taurus->nel4; i++)
+            if (buf[ibuf + i * 5 + 4] > maxmat)
+                maxmat = buf[ibuf + i * 5 + 4];
+    }
+
+    /*
+     * Find all the materials referenced.
+     */
+    buf2 = ALLOC_N(int, maxmat);
+
+    for (i = 0; i < maxmat; i++)
+        buf2[i] = 0;
+
+    ibuf = 0;
+    if (taurus->nel8 > 0) {
+        for (i = 0; i < taurus->nel8; i++)
+            buf2[buf[i * 9 + 8] - 1] = 1;
+        ibuf += taurus->nel8 * 9;
+    }
+    if (taurus->nel2 > 0) {
+        for (i = 0; i < taurus->nel2; i++)
+            buf2[buf[ibuf + i * 6 + 5] - 1] = 1;
+        ibuf += taurus->nel2 * 6;
+    }
+    if (taurus->nel4 > 0) {
+        for (i = 0; i < taurus->nel4; i++)
+            buf2[buf[ibuf + i * 5 + 4] - 1] = 1;
+    }
+
+    /*
+     * Find nmat, and set the matnos array.
+     */
+    nmat = 0;
+    for (i = 0; i < maxmat; i++)
+        nmat += buf2[i];
+    matnos = ALLOC_N(int, nmat);
+
+    imat = 0;
+    for (i = 0; i < maxmat; i++)
+        if (buf2[i] == 1)
+            matnos[imat++] = i + 1;
+
+    FREE(buf);
+    FREE(buf2);
+
+    taurus->nmat = nmat;
+    taurus->matnos = matnos;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    taurus_calc
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Apr 27 08:47:01 PDT 1995
+ *    I modified the code to work properly with state directories.
+ *
+ *    Eric Brugger, Fri Jul 28 08:41:03 PDT 1995
+ *    I added a calculation for the vorticity magnitude.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+taurus_calc (TAURUSfile *taurus, float *buf, int lbuf, int ncomps, int offset,
+             int var_id, float *var, int ivar)
+{
+    int            ibuf;
+    double         t1, t2, t3, t4, t5;
+    double         pr, aa, bb, cc, dd, angp;
+    float         *buf2, *buf3, *buf4;
+
+    switch (var_id) {
+        case VAR_NORMAL:
+        case VAR_SIGX:
+        case VAR_SIGY:
+        case VAR_SIGZ:
+        case VAR_SIGXY:
+        case VAR_SIGYZ:
+        case VAR_SIGZX:
+        case VAR_EPS:
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = buf[ibuf];
+                ivar++;
+            }
+            break;
+        case VAR_PRESSURE:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                ivar++;
+            }
+            break;
+        case VAR_SIG_EFF:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                var[ivar] = sqrt(3.0 * fabs(aa));
+                ivar++;
+            }
+            break;
+        case VAR_DEV_STRESS_1:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = 0.;
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp);
+                }
+                ivar++;
+            }
+            break;
+        case VAR_DEV_STRESS_2:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = 0.;
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp + ftpi);
+                }
+                ivar++;
+            }
+            break;
+        case VAR_DEV_STRESS_3:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = 0.;
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp + ttpi);
+                }
+                ivar++;
+            }
+            break;
+        case VAR_MAX_SHEAR_STR:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = 0.;
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = sqrt(aa / 3.0);
+                    var[ivar] = dd * (cos(angp) - cos(angp + ttpi));
+                }
+                ivar++;
+            }
+            break;
+        case VAR_PRINC_STRESS_1:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+                buf[ibuf + 2] = pr;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = -buf[ibuf + 2];
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp) - buf[ibuf + 2];
+                }
+                ivar++;
+            }
+            break;
+        case VAR_PRINC_STRESS_2:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+                buf[ibuf + 2] = pr;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = -buf[ibuf + 2];
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp + ftpi) - buf[ibuf + 2];
+                }
+                ivar++;
+            }
+            break;
+        case VAR_PRINC_STRESS_3:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                pr = -(buf[ibuf] + buf[ibuf + 1] + buf[ibuf + 2]) / 3.0;
+                buf[ibuf] += pr;
+                buf[ibuf + 1] += pr;
+                buf[ibuf + 2] += pr;
+                aa = buf[ibuf + 3] * buf[ibuf + 3] + buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 5] * buf[ibuf + 5] - buf[ibuf] * buf[ibuf + 1] -
+                    buf[ibuf + 1] * buf[ibuf + 2] - buf[ibuf] * buf[ibuf + 2];
+                bb = buf[ibuf] * buf[ibuf + 4] * buf[ibuf + 4] +
+                    buf[ibuf + 1] * buf[ibuf + 5] * buf[ibuf + 5] +
+                    buf[ibuf + 2] * buf[ibuf + 3] * buf[ibuf + 3] -
+                    buf[ibuf] * buf[ibuf + 1] * buf[ibuf + 2] - 2.0 *
+                    buf[ibuf + 3] * buf[ibuf + 4] * buf[ibuf + 5];
+                buf[ibuf] = aa;
+                buf[ibuf + 1] = bb;
+                buf[ibuf + 2] = pr;
+            }
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                if (buf[ibuf] < 1.0e-25)
+                    var[ivar] = -buf[ibuf + 2];
+                else {
+                    aa = buf[ibuf];
+                    bb = buf[ibuf + 1];
+                    cc = -sqrt(27.0 / aa) * bb * 0.5 / aa;
+                    cc = MAX(MIN(cc, 1.0), -1.0);
+                    angp = acos(cc) / 3.0;
+                    dd = 2.0 * sqrt(aa / 3.0);
+                    var[ivar] = dd * cos(angp + ttpi) - buf[ibuf + 2];
+                }
+                ivar++;
+            }
+            break;
+        case VAR_DISPX:
+            buf2 = taurus->coords[0];
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = buf2[ivar] - buf[ibuf];
+                ivar++;
+            }
+            break;
+        case VAR_DISPY:
+            buf2 = taurus->coords[1];
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = buf2[ivar] - buf[ibuf];
+                ivar++;
+            }
+            break;
+        case VAR_DISPZ:
+            buf2 = taurus->coords[2];
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = buf2[ivar] - buf[ibuf];
+                ivar++;
+            }
+            break;
+        case VAR_DISP_MAG:
+            buf2 = taurus->coords[0];
+            buf3 = taurus->coords[1];
+            buf4 = taurus->coords[2];
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = sqrt((buf2[ivar] - buf[ibuf]) *
+                                 (buf2[ivar] - buf[ibuf]) +
+                                 (buf3[ivar] - buf[ibuf + 1]) *
+                                 (buf3[ivar] - buf[ibuf + 1]) +
+                                 (buf4[ivar] - buf[ibuf + 2]) *
+                                 (buf4[ivar] - buf[ibuf + 2]));
+                ivar++;
+            }
+            break;
+        case VAR_VEL_MAG:
+        case VAR_ACC_MAG:
+        case VAR_VORT_MAG:
+            for (ibuf = offset; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = sqrt(buf[ibuf] * buf[ibuf] +
+                                 buf[ibuf + 1] * buf[ibuf + 1] +
+                                 buf[ibuf + 2] * buf[ibuf + 2]);
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_1:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 26] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_2:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 26] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_3:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 27] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_4:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 27] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_5:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 28] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_SURF_STRESS_6:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                var[ivar] = (buf[ibuf + 28] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                ivar++;
+            }
+            break;
+        case VAR_UP_STRESS:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                t1 = (buf[ibuf + 26] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t2 = (buf[ibuf + 27] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t3 = (buf[ibuf + 28] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                var[ivar] = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                ivar++;
+            }
+            break;
+        case VAR_LOW_STRESS:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                t1 = (buf[ibuf + 26] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t2 = (buf[ibuf + 27] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t3 = (buf[ibuf + 28] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                var[ivar] = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                ivar++;
+            }
+            break;
+        case VAR_MAX_STRESS:
+            for (ibuf = 0; ibuf < lbuf; ibuf += ncomps) {
+                t1 = (buf[ibuf + 26] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t2 = (buf[ibuf + 27] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t3 = (buf[ibuf + 28] / buf[ibuf + 29]) + 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t4 = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                t1 = (buf[ibuf + 26] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 21] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t2 = (buf[ibuf + 27] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 22] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t3 = (buf[ibuf + 28] / buf[ibuf + 29]) - 6.0 *
+                    (buf[ibuf + 23] / (buf[ibuf + 29] * buf[ibuf + 29]));
+                t5 = sqrt(t1 * t1 - t1 * t2 + t2 * t2 + 3.0 * t3 * t3);
+                var[ivar] = MAX(t4, t5);
+                ivar++;
+            }
+            break;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    taurus_readblockvar
+ *
+ * Purpose:
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *     Eric Brugger, Fri Apr 28 09:13:43 PDT 1995
+ *     I removed some debugging code that I accidently left in previously.
+ *
+ *     Jim Reus, 23 Apr 97
+ *     Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+taurus_readblockvar (TAURUSfile *taurus, int var_id, int val_id, float *var)
+{
+    int            size;
+    int            lbuf;
+    float         *buf;
+    int            ivar;
+    int            n;
+    int            ifile, iadd, nel, offset, ncomps;
+
+    /*
+     * When reading displacements we are reading the coordinates in
+     * the first file.  This isn't very pretty but it fits the model.
+     */
+    if (var_id >= VAR_DISPX && var_id <= VAR_DISP_MAG) {
+        ifile = 0;
+        iadd = taurus->var_start[val_id];
+    }
+    else {
+        ifile = taurus->state_file[taurus->state];
+        iadd = taurus->state_loc[taurus->state] +
+            taurus->var_start[val_id];
+    }
+
+    nel = taurus->var_len[val_id];
+    offset = taurus->var_offset[val_id];
+    ncomps = taurus->var_ncomps[val_id];
+
+    /*
+     * Allocate space for the buffer.
+     */
+    size = nel * ncomps;
+
+    if (size < MAXBUF)
+        lbuf = size;
+    else
+        lbuf = (MAXBUF / ncomps) * ncomps;
+
+    buf = ALLOC_N(float, lbuf);
+
+    /*
+     * Read a buffer full of data at a time, and transfer it to
+     * the real variable using the appropriate stride.
+     */
+    ivar = 0;
+    while (size > 0) {
+        n = MIN(size, lbuf);
+        taurus_read(taurus, ifile, iadd, n * sizeof(int), (char*)buf);
+
+        taurus_calc(taurus, buf, n, ncomps, offset, var_id, var, ivar);
+        ivar += n / ncomps;
+        iadd += n * sizeof(int);
+
+        size -= n;
+    }
+
+    FREE(buf);
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_open
+ *
+ * Purpose:     Open a taurus file.
+ *
+ * Return:      Success:        pointer to new file.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Mar 28 15:03:37 PST 1995
+ *    I modified the routines to read a topaz3d data file.
+ *
+ *    Eric Brugger, Wed Apr 26 13:14:42 PDT 1995
+ *    I modified the routine to read the title in the taurus file
+ *    and put it in the taurus structure.
+ *
+ *    Eric Brugger, Thu Jul 27 12:49:40 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+TAURUSfile *
+db_taur_open (char *basename)
+{
+    int            fd;
+    int            loc, size;
+    int            ctl[40];
+    char           title[48];
+    TAURUSfile    *taurus;
+
+    /*
+     * Create the structure to hold the open file information.
+     */
+    taurus = ALLOC_N(TAURUSfile, 1);
+
+    /*
+     * Open the file and read the header.
+     */
+    if ((fd = open(basename, O_RDONLY)) < 0) {
+        FREE(taurus);
+        return (NULL);
+    }
+
+    taurus->ifile = 0;
+    taurus->fd = fd;
+    taurus->basename = ALLOC_N(char, strlen(basename) + 1);
+    strcpy(taurus->basename, basename);
+    taurus->filename = ALLOC_N(char, strlen(basename) + 4);
+
+    taurus->mesh_read = 0;
+
+    loc = 15 * sizeof(int);
+
+    lseek(fd, loc, SEEK_SET);
+    size = 40 * sizeof(int);
+
+    if (read(fd, ctl, size) != size) {
+        FREE(taurus->basename);
+        FREE(taurus->filename);
+        FREE(taurus);
+        close(fd);
+        return (NULL);
+    }
+
+    /*
+     * Do a simple check to see that this is indeed a taurus file.
+     * ctl [0] should really be a 4, which indicates a 3d mesh with
+     * an unpacked node list.  3 indicates a 3d mesh with a packed
+     * node list, but this can still have an unpacked node list, so
+     * we will assume that it is unpacked regardless of the flag.
+     */
+    if (!((ctl[0] == 3 || ctl[0] == 4) &&
+          (ctl[2] == 1 || ctl[2] == 2 || ctl[2] == 6 || ctl[2] == 200))) {
+        FREE(taurus->basename);
+        FREE(taurus->filename);
+        FREE(taurus);
+        close(fd);
+        return (NULL);
+    }
+
+    taurus->ndim = ctl[0];
+    taurus->numnp = ctl[1];
+    taurus->icode = ctl[2];
+    taurus->nglbv = ctl[3];
+    taurus->it = ctl[4];
+    taurus->iu = ctl[5];
+    taurus->iv = ctl[6];
+    taurus->ia = ctl[7];
+    taurus->nel8 = ctl[8];
+    taurus->nummat8 = ctl[9];
+    taurus->nv3d = ctl[12];
+    taurus->nel2 = ctl[13];
+    taurus->nummat2 = ctl[14];
+    taurus->nv1d = ctl[15];
+    taurus->nel4 = ctl[16];
+    taurus->nummat4 = ctl[17];
+    taurus->nv2d = ctl[18];
+    taurus->activ = ctl[20];
+
+    /*
+     * if ndim is 4 then the nodelist are unpacked.  We cannot handle
+     * packed values so let us assume no files exist that are packed.
+     * If the values were packed they would presumably be three values
+     * per integer, which means a very small number of nodes.
+     */
+    if (taurus->ndim == 4)
+        taurus->ndim = 3;
+
+    /*
+     * Read the title.
+     */
+    loc = 0;
+    lseek(fd, loc, SEEK_SET);
+    size = 40 * sizeof(char);
+
+    if (read(fd, title, size) != size) {
+        FREE(taurus->basename);
+        FREE(taurus->filename);
+        FREE(taurus);
+        close(fd);
+        return (NULL);
+    }
+    title[40] = '\0';
+    fix_title(title);
+    strcpy(taurus->title, title);
+
+    /*
+     * Initialize the file information.
+     */
+    init_file_info(taurus);
+
+    /*
+     * Initialize the state information.
+     */
+    init_state_info(taurus);
+
+    /*
+     * Initialize the variable information.
+     */
+    init_var_info(taurus);
+
+    /*
+     * Initialize the material information.
+     */
+    init_mat_info(taurus);
+
+    return (taurus);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    db_taur_close
+ *
+ * Purpose:     Close a taurus file pointer and free the memory that
+ *              belongs to the taurus driver.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  robb at cloud
+ *              Fri Dec  9 12:56:43 EST 1994
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Dec 20 12:04:03 PST 1995
+ *    I modified the code to handle the activity data.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+db_taur_close (TAURUSfile *taurus)
+{
+
+    close(taurus->fd);
+    FREE(taurus->basename);
+    FREE(taurus->filename);
+    FREE(taurus->filesize);
+
+    FREE(taurus->state_file);
+    FREE(taurus->state_loc);
+    FREE(taurus->state_time);
+
+    FREE(taurus->hex_nodelist);
+    FREE(taurus->shell_nodelist);
+    FREE(taurus->beam_nodelist);
+    FREE(taurus->hex_facelist);
+    FREE(taurus->hex_zoneno);
+    FREE(taurus->hex_matlist);
+    FREE(taurus->shell_matlist);
+    FREE(taurus->beam_matlist);
+    FREE(taurus->hex_activ);
+    FREE(taurus->shell_activ);
+    FREE(taurus->beam_activ);
+    if (taurus->coords != NULL) {
+        FREE(taurus->coords[0]);
+        FREE(taurus->coords[1]);
+        if (taurus->ndim > 2)
+            FREE(taurus->coords[2]);
+    }
+    FREE(taurus->coords);
+    FREE(taurus);
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_mesh_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Mon Aug 28 12:00:10 PDT 1995
+ *    I modified the routine to not use unreferenced nodes in the
+ *    mesh extent calculations.
+ *
+ *    Eric Brugger, Wed Dec 20 12:04:03 PST 1995
+ *    I modified the code to handle the activity data.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+init_mesh_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            iadd;
+    int            len;
+    int            lbuf;
+    int           *buf;
+    float         *rbuf;
+    int           *zones, *faces, *mats;
+    int           *zoneno;
+    int            nzones, nfaces;
+    float          minval, maxval;
+    int            ndim, numnp;
+    float         *coords;
+    float          xval, yval, zval;
+
+    if (taurus->mesh_read == 1)
+        return;
+
+    taurus->nhex = 0;
+    taurus->nshell = 0;
+    taurus->nbeam = 0;
+    taurus->coords = NULL;
+    taurus->coord_state = -1;
+
+    /*
+     * Read the coordinate information.
+     */
+    ndim = taurus->ndim;
+    numnp = taurus->numnp;
+
+    /*
+     * Allocate storage if not already allocated.
+     */
+    if (taurus->coords == NULL) {
+        taurus->coords = ALLOC_N(float *, ndim);
+        taurus->coords[0] = ALLOC_N(float, numnp);
+        taurus->coords[1] = ALLOC_N(float, numnp);
+
+        if (ndim > 2)
+            taurus->coords[2] = ALLOC_N(float, numnp);
+    }
+
+    iadd = 64 * sizeof(int);
+
+    lbuf = numnp * ndim;
+    rbuf = ALLOC_N(float, lbuf);
+    len = lbuf * sizeof(float);
+
+    taurus_read(taurus, 0, iadd, len, (char*)rbuf);
+
+    coords = taurus->coords[0];
+    for (i = 0; i < numnp; i++)
+        coords[i] = rbuf[i * ndim];
+
+    coords = taurus->coords[1];
+    for (i = 0; i < numnp; i++)
+        coords[i] = rbuf[i * ndim + 1];
+
+    if (ndim > 2) {
+        coords = taurus->coords[2];
+        for (i = 0; i < numnp; i++)
+            coords[i] = rbuf[i * ndim + 2];
+    }
+
+    FREE(rbuf);
+
+    /*
+     * Set up for reading the nodelists and material data.
+     */
+    iadd = 64 * sizeof(int) + taurus->numnp * taurus->ndim * sizeof(float);
+
+    lbuf = MAX(9 * taurus->nel8, MAX(5 * taurus->nel4, 6 * taurus->nel2));
+    buf = ALLOC_N(int, lbuf);
+
+    /*
+     * Read the hexahedron elements.
+     */
+    if (taurus->nel8 > 0) {
+        zones = ALLOC_N(int, 8 * taurus->nel8);
+        mats = ALLOC_N(int, taurus->nel8);
+
+        len = 9 * taurus->nel8 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)buf);
+        for (i = 0; i < taurus->nel8; i++) {
+            zones[i * 8] = buf[i * 9] - 1;
+            zones[i * 8 + 1] = buf[i * 9 + 1] - 1;
+            zones[i * 8 + 2] = buf[i * 9 + 2] - 1;
+            zones[i * 8 + 3] = buf[i * 9 + 3] - 1;
+            zones[i * 8 + 4] = buf[i * 9 + 4] - 1;
+            zones[i * 8 + 5] = buf[i * 9 + 5] - 1;
+            zones[i * 8 + 6] = buf[i * 9 + 6] - 1;
+            zones[i * 8 + 7] = buf[i * 9 + 7] - 1;
+        }
+        for (i = 0; i < taurus->nel8; i++) {
+            mats[i] = buf[i * 9 + 8];
+        }
+
+        taurus->nhex = taurus->nel8;
+        taurus->hex_nodelist = zones;
+        taurus->hex_matlist = mats;
+        taurus->hex_activ = NULL;
+
+        if (taurus->activ >= 1000 || taurus->activ <= 1005) {
+            taurus->nhex_faces = 0;
+            taurus->hex_facelist = NULL;
+            taurus->hex_zoneno = NULL;
+        }
+        else {
+            db_taur_extface(zones, taurus->numnp, taurus->nel8,
+                            mats, &faces, &nfaces, &zoneno);
+
+            taurus->nhex_faces = nfaces;
+            taurus->hex_facelist = faces;
+            taurus->hex_zoneno = zoneno;
+        }
+
+        iadd += len;
+    }
+
+    /*
+     * Read the beam elements.
+     */
+    if (taurus->nel2 > 0) {
+        zones = ALLOC_N(int, 2 * taurus->nel2);
+        mats = ALLOC_N(int, taurus->nel2);
+
+        len = 6 * taurus->nel2 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)buf);
+        for (i = 0; i < taurus->nel2; i++) {
+            zones[i * 2] = buf[i * 6] - 1;
+            zones[i * 2 + 1] = buf[i * 6 + 1] - 1;
+        }
+        for (i = 0; i < taurus->nel2; i++) {
+            mats[i] = buf[i * 6 + 5];
+        }
+
+        taurus->nbeam = taurus->nel2;
+        taurus->beam_nodelist = zones;
+        taurus->beam_matlist = mats;
+        taurus->beam_activ = NULL;
+
+        iadd += len;
+    }
+
+    /*
+     * Read the shell elements.
+     */
+    if (taurus->nel4 > 0) {
+        zones = ALLOC_N(int, 4 * taurus->nel4);
+        mats = ALLOC_N(int, taurus->nel4);
+
+        len = 5 * taurus->nel4 * sizeof(int);
+
+        taurus_read(taurus, 0, iadd, len, (char*)buf);
+        for (i = 0; i < taurus->nel4; i++) {
+            zones[i * 4] = buf[i * 5] - 1;
+            zones[i * 4 + 1] = buf[i * 5 + 1] - 1;
+            zones[i * 4 + 2] = buf[i * 5 + 2] - 1;
+            zones[i * 4 + 3] = buf[i * 5 + 3] - 1;
+        }
+        for (i = 0; i < taurus->nel4; i++) {
+            mats[i] = buf[i * 5 + 4];
+        }
+
+        taurus->nshell = taurus->nel4;
+        taurus->shell_nodelist = zones;
+        taurus->shell_matlist = mats;
+        taurus->shell_activ = NULL;
+
+        iadd += len;
+    }
+
+    /*
+     * Find the unreferenced coordinates.
+     */
+    for (i = 0; i < numnp; i++)
+        buf[i] = 0;
+
+    zones = taurus->hex_nodelist;
+    nzones = taurus->nel8;
+    for (i = 0; i < nzones * 8; i++)
+        buf[zones[i]] = 1;
+
+    zones = taurus->beam_nodelist;
+    nzones = taurus->nel2;
+    for (i = 0; i < nzones * 2; i++)
+        buf[zones[i]] = 1;
+
+    zones = taurus->shell_nodelist;
+    nzones = taurus->nel4;
+    for (i = 0; i < nzones * 4; i++)
+        buf[zones[i]] = 1;
+
+    for (i = 0; i < numnp && buf[i] == 0; i++)
+        /* do nothing */ ;
+    if (i < numnp) {
+        xval = taurus->coords[0][i];
+        yval = taurus->coords[1][i];
+        if (ndim > 2)
+            zval = taurus->coords[2][i];
+    }
+    else {
+        xval = 0.;
+        yval = 0.;
+        zval = 0.;
+    }
+
+    coords = taurus->coords[0];
+    for (i = 0; i < numnp; i++)
+        if (buf[i] == 0)
+            coords[i] = xval;
+    coords = taurus->coords[1];
+    for (i = 0; i < numnp; i++)
+        if (buf[i] == 0)
+            coords[i] = yval;
+    if (ndim > 2) {
+        coords = taurus->coords[2];
+        for (i = 0; i < numnp; i++)
+            if (buf[i] == 0)
+                coords[i] = zval;
+    }
+
+    /*
+     * Determine the extents of the data.  The extents will change
+     * over the course of the problem but the extents at the beginning
+     * will be used for all the states.
+     */
+    coords = taurus->coords[0];
+    minval = coords[0];
+    maxval = coords[0];
+    for (i = 0; i < numnp; i++) {
+        minval = MIN(minval, coords[i]);
+        maxval = MAX(maxval, coords[i]);
+    }
+    taurus->min_extents[0] = minval;
+    taurus->max_extents[0] = maxval;
+
+    coords = taurus->coords[1];
+    minval = coords[0];
+    maxval = coords[0];
+    for (i = 0; i < numnp; i++) {
+        minval = MIN(minval, coords[i]);
+        maxval = MAX(maxval, coords[i]);
+    }
+    taurus->min_extents[1] = minval;
+    taurus->max_extents[1] = maxval;
+
+    if (ndim > 2) {
+        coords = taurus->coords[2];
+        minval = coords[0];
+        maxval = coords[0];
+        for (i = 0; i < numnp; i++) {
+            minval = MIN(minval, coords[i]);
+            maxval = MAX(maxval, coords[i]);
+        }
+        taurus->min_extents[2] = minval;
+        taurus->max_extents[2] = maxval;
+    }
+    else {
+        taurus->min_extents[2] = 0.;
+        taurus->max_extents[2] = 0.;
+    }
+
+    FREE(buf);
+
+    taurus->mesh_read = 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_coord_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+init_coord_info (TAURUSfile *taurus)
+{
+    int            i;
+    int            ndim, numnp;
+    int            state_loc, state_file;
+    int            loc, len, lbuf;
+    float         *buf;
+    float         *coords;
+
+    ndim = taurus->ndim;
+    numnp = taurus->numnp;
+
+    /*
+     * Allocate storage if not already allocated.
+     */
+    if (taurus->coords == NULL) {
+        taurus->coords = ALLOC_N(float *, ndim);
+        taurus->coords[0] = ALLOC_N(float, numnp);
+        taurus->coords[1] = ALLOC_N(float, numnp);
+
+        if (ndim > 2)
+            taurus->coords[2] = ALLOC_N(float, numnp);
+    }
+
+    /*
+     * Set up the addresses of where to read the data from.
+     */
+    if (taurus->iu == 1) {
+        state_loc = taurus->state_loc[taurus->state];
+        state_file = taurus->state_file[taurus->state];
+        loc = state_loc + (1 + taurus->nglbv) * sizeof(float);
+    }
+    else {
+        state_loc = 64 * sizeof(int);
+
+        state_file = 0;
+        loc = state_loc;
+    }
+
+    lbuf = taurus->numnp * taurus->ndim;
+    buf = ALLOC_N(float, lbuf);
+
+    len = lbuf * sizeof(float);
+
+    taurus_read(taurus, state_file, loc, len, (char*)buf);
+
+    coords = taurus->coords[0];
+    for (i = 0; i < numnp; i++)
+        coords[i] = buf[i * ndim];
+
+    coords = taurus->coords[1];
+    for (i = 0; i < numnp; i++)
+        coords[i] = buf[i * ndim + 1];
+
+    if (taurus->ndim > 2) {
+        coords = taurus->coords[2];
+        for (i = 0; i < numnp; i++)
+            coords[i] = buf[i * ndim + 2];
+    }
+
+    FREE(buf);
+
+    taurus->coord_state = taurus->state;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    init_zone_info
+ *
+ * Purpose:
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Eric Brugger
+ * Date:        December 20, 1995
+ *
+ * Modifications:
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+init_zone_info (TAURUSfile *taurus)
+{
+    int            i, j;
+    int            ifile, loc;
+    int           *zones, *mats;
+    int           *faces, nfaces, *zoneno;
+
+    /*
+     * Check if any work needs to be done.
+     */
+    if (taurus->activ < 1000 && taurus->activ > 1005)
+        return;
+
+    if (taurus->state < 0 && taurus->state >= taurus->nstates)
+        return;
+
+    /*
+     * Allocate storage if not already allocated.
+     */
+    if (taurus->hex_activ == NULL && taurus->nel8 > 0)
+        taurus->hex_activ = ALLOC_N (int, taurus->nel8);
+
+    if (taurus->beam_activ == NULL && taurus->nel2 > 0)
+        taurus->beam_activ = ALLOC_N (int, taurus->nel2);
+
+    if (taurus->shell_activ == NULL && taurus->nel4 > 0)
+        taurus->shell_activ = ALLOC_N (int, taurus->nel4);
+
+    /*
+     * Read the activity data from the file if it is present.
+     */
+    ifile = taurus->state_file [taurus->state];
+    loc  = taurus->state_loc [taurus->state];
+    loc += (taurus->it * taurus->numnp +
+            taurus->ndim * taurus->numnp *
+            (taurus->iu + taurus->iv + taurus->ia) +
+            taurus->nel8 * taurus->nv3d +
+            taurus->nel4 * taurus->nv2d +
+            taurus->nel2 * taurus->nv1d +
+            taurus->nglbv + 1) * sizeof(int); 
+
+    taurus_read (taurus, ifile, loc, sizeof (int)*taurus->nel8,
+                 (char*)(taurus->hex_activ));
+    loc += sizeof (int) * taurus->nel8;
+
+    taurus_read (taurus, ifile, loc, sizeof (int)*taurus->nel2,
+                 (char*)(taurus->beam_activ));
+    loc += sizeof (int) * taurus->nel2;
+
+    taurus_read (taurus, ifile, loc, sizeof (int)*taurus->nel4,
+                 (char*)(taurus->shell_activ));
+    loc += sizeof (int) * taurus->nel4;
+
+    /*
+     * Create the face list for the hex elements.
+     */
+    FREE (taurus->hex_facelist);
+    FREE (taurus->hex_zoneno);
+    zones = ALLOC_N (int, 8 * taurus->nel8);
+    mats = ALLOC_N (int, taurus->nel8);
+    j = 0;
+    for (i = 0; i < taurus->nel8; i++) {
+        if (taurus->hex_activ [i] != 0) {
+            zones[j * 8] = taurus->hex_nodelist[i * 8];
+            zones[j * 8 + 1] = taurus->hex_nodelist[i * 8 + 1];
+            zones[j * 8 + 2] = taurus->hex_nodelist[i * 8 + 2];
+            zones[j * 8 + 3] = taurus->hex_nodelist[i * 8 + 3];
+            zones[j * 8 + 4] = taurus->hex_nodelist[i * 8 + 4];
+            zones[j * 8 + 5] = taurus->hex_nodelist[i * 8 + 5];
+            zones[j * 8 + 6] = taurus->hex_nodelist[i * 8 + 6];
+            zones[j * 8 + 7] = taurus->hex_nodelist[i * 8 + 7];
+            mats[j] = taurus->hex_matlist [i];
+            j++;
+        }
+    }
+    db_taur_extface(zones, taurus->numnp, j,
+                    mats, &faces, &nfaces, &zoneno);
+    taurus->nhex_faces = nfaces;
+    taurus->hex_facelist = faces;
+    taurus->hex_zoneno = zoneno;
+
+    FREE (zones);
+    FREE (mats);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    taurus_readvar
+ *
+ * Purpose:
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Eric Brugger, Wed Apr 26 15:21:29 PDT 1995
+ *    I modified the routine to return the title in the file
+ *    as _fileinfo.
+ *
+ *    Eric Brugger, Thu Jul 27 12:49:40 PDT 1995
+ *    I modified the routine to handle files generated by hydra.
+ *
+ *    Eric Brugger, Thu Dec 21 09:57:09 PST 1995
+ *    I modified the routine to return the meshname of the variable.
+ *
+ *    Jim Reus, 23 Apr 97
+ *    Changed to prototype form.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+taurus_readvar (TAURUSfile *taurus, char *varname, float **var, int *length,
+                int *center, char *meshname)
+{
+    int            i;
+    int            idir;
+    int            ivar;
+    int            var_id, val_id;
+
+    if (taurus->icode == 1)
+        idir = 8;
+    else if (taurus->icode == 200)
+        idir = 9;
+    else
+        idir = taurus->idir;
+
+    if (idir == -1)
+        return (-1);
+
+    /*
+     * Find the variable name in the variable list.
+     */
+    for (i = 0; taur_var_list[i].idir < idir; i++)
+        /* do nothing */ ;
+
+    for (i = i; taur_var_list[i].idir == idir &&
+         strcmp(taur_var_list[i].name, varname) != 0; i++)
+        /* do nothing */ ;
+
+    if (taur_var_list[i].idir != idir)
+        return (-1);
+
+    ivar = i;
+    var_id = taur_var_list[ivar].ivar;
+    val_id = taur_var_list[ivar].ival;
+
+    if (taurus->var_start[val_id] == -1)
+        return (-1);
+
+    /*
+     * Set the return values.
+     */
+    *center = taur_var_list[ivar].centering;
+    if (var_id >= VAR_SIGX && var_id <= VAR_PRINC_STRESS_3) {
+        *length = taurus->nel8 + taurus->nel4;
+    }
+    else {
+        *length = taurus->var_len[val_id];
+    }
+    strcpy (meshname, taur_var_list[ivar].mesh);
+
+    /*
+     * Allocate space for the variable.
+     */
+    *var = ALLOC_N(float, *length);
+
+    /*
+     * Read the variable.
+     */
+    taurus_readblockvar(taurus, var_id, val_id, *var);
+    if (var_id >= VAR_SIGX && var_id <= VAR_PRINC_STRESS_3) {
+        val_id += (VAL_SHELL_MID_SIGX - VAL_HEX_SIGX);
+        taurus_readblockvar(taurus, var_id, val_id,
+                            &(var[0][taurus->nel8]));
+    }
+
+    return (0);
+}
diff --git a/src/taurus/taurus.h b/src/taurus/taurus.h
new file mode 100644
index 0000000..de69ff4
--- /dev/null
+++ b/src/taurus/taurus.h
@@ -0,0 +1,271 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef TAURUS_H
+#define TAURUS_H
+
+#define NODAL_VAR 0
+#define ZONAL_VAR 1
+
+#define MAX_MESH  5
+#define MAX_VAL  69
+
+#define VAR_NORMAL          0
+#define VAR_SIGX            1
+#define VAR_SIGY            2
+#define VAR_SIGZ            3
+#define VAR_SIGXY           4
+#define VAR_SIGYZ           5
+#define VAR_SIGZX           6
+#define VAR_EPS             7
+#define VAR_PRESSURE        8
+#define VAR_SIG_EFF         9
+#define VAR_DEV_STRESS_1   10
+#define VAR_DEV_STRESS_2   11
+#define VAR_DEV_STRESS_3   12
+#define VAR_MAX_SHEAR_STR  13
+#define VAR_PRINC_STRESS_1 14
+#define VAR_PRINC_STRESS_2 15
+#define VAR_PRINC_STRESS_3 16
+#define VAR_DISPX          17
+#define VAR_DISPY          18
+#define VAR_DISPZ          19
+#define VAR_DISP_MAG       20
+#define VAR_VEL_MAG        21
+#define VAR_ACC_MAG        22
+#define VAR_SURF_STRESS_1  23
+#define VAR_SURF_STRESS_2  24
+#define VAR_SURF_STRESS_3  25
+#define VAR_SURF_STRESS_4  26
+#define VAR_SURF_STRESS_5  27
+#define VAR_SURF_STRESS_6  28
+#define VAR_UP_STRESS      29
+#define VAR_LOW_STRESS     30
+#define VAR_MAX_STRESS     31
+#define VAR_VORT_MAG       32
+
+/*
+ * Dyna3d and Nike3d values.
+ */
+#define VAL_HEX_SIGX         0
+#define VAL_HEX_SIGY         1
+#define VAL_HEX_SIGZ         2
+#define VAL_HEX_SIGXY        3
+#define VAL_HEX_SIGYZ        4
+#define VAL_HEX_SIGZX        5
+#define VAL_HEX_EPS_EFF      6
+#define VAL_SHELL_MID_SIGX   7
+#define VAL_SHELL_MID_SIGY   8
+#define VAL_SHELL_MID_SIGZ   9
+#define VAL_SHELL_MID_SIGXY 10
+#define VAL_SHELL_MID_SIGYZ 11
+#define VAL_SHELL_MID_SIGZX 12
+#define VAL_SHELL_MID_EPS_EFF 13
+#define VAL_SHELL_IN_SIGX   14
+#define VAL_SHELL_IN_SIGY   15
+#define VAL_SHELL_IN_SIGZ   16
+#define VAL_SHELL_IN_SIGXY  17
+#define VAL_SHELL_IN_SIGYZ  18
+#define VAL_SHELL_IN_SIGZX  19
+#define VAL_SHELL_IN_EPS_EFF 20
+#define VAL_SHELL_OUT_SIGX  21
+#define VAL_SHELL_OUT_SIGY  23
+#define VAL_SHELL_OUT_SIGZ  24
+#define VAL_SHELL_OUT_SIGXY 25
+#define VAL_SHELL_OUT_SIGYZ 26
+#define VAL_SHELL_OUT_SIGZX 27
+#define VAL_SHELL_OUT_EPS_EFF 28
+#define VAL_SHELL_RES1      29
+#define VAL_SHELL_RES2      30
+#define VAL_SHELL_RES3      31
+#define VAL_SHELL_RES4      32
+#define VAL_SHELL_RES5      33
+#define VAL_SHELL_RES6      34
+#define VAL_SHELL_RES7      35
+#define VAL_SHELL_RES8      36
+#define VAL_SHELL_THICKNESS 37
+#define VAL_SHELL_ELDEP1    38
+#define VAL_SHELL_ELDEP2    39
+#define VAL_SHELL_INT_ENG   40
+#define VAL_SHELL_EPSX_IN   41
+#define VAL_SHELL_EPSY_IN   42
+#define VAL_SHELL_EPSZ_IN   43
+#define VAL_SHELL_EPSXY_IN  44
+#define VAL_SHELL_EPSYZ_IN  45
+#define VAL_SHELL_EPSZX_IN  46
+#define VAL_SHELL_EPSX_OUT  47
+#define VAL_SHELL_EPSY_OUT  48
+#define VAL_SHELL_EPSZ_OUT  49
+#define VAL_SHELL_EPSXY_OUT 50
+#define VAL_SHELL_EPSYZ_OUT 51
+#define VAL_SHELL_EPSZX_OUT 52
+#define VAL_COORDX          53
+#define VAL_COORDY          54
+#define VAL_COORDZ          55
+#define VAL_VELX            56
+#define VAL_VELY            57
+#define VAL_VELZ            58
+#define VAL_ACCX            59
+#define VAL_ACCY            60
+#define VAL_ACCZ            61
+#define VAL_TEMPX           62
+#define VAL_TEMPY           63
+#define VAL_TEMPZ           64
+
+/*
+ * Topaz3d values.
+ */
+#define VAL_TEMP             0
+#define VAL_FLUXX            1
+#define VAL_FLUXY            2
+#define VAL_FLUXZ            3
+
+/*
+ * Hydra values.
+ *
+ * Note: VAL_VELX, VAL_VELY and VAL_VELZ already defined above.
+ *
+ */
+#define VAL_VORTX            0
+#define VAL_VORTY            1
+#define VAL_VORTZ            2
+#define VAL_PRESSURE         3
+
+typedef struct {
+/*
+ * File information.
+ */
+    int            ifile;       /* The number of the currently open file */
+    char           title[48];   /* The title associated with the file */
+    int            fd;          /* File descriptor of currently open file */
+    char          *basename;    /* The file root name */
+    char          *filename;    /* The name of the currently open file */
+    int            nfiles;      /* The number of files in the family */
+    int           *filesize;    /* The size of each file in the family */
+/*
+ * State information.
+ */
+    int            state;       /* The current state, -1 if not in one */
+    int            nstates;     /* The number of states */
+    int           *state_file;  /* The file that each state is in */
+    int           *state_loc;   /* The address of each state */
+    float         *state_time;  /* The time of each state */
+    int            idir;        /* The current directory within a state */
+/*
+ * Variable information.
+ */
+    int            var_start[MAX_VAL];  /* The starting location relative to a state
+                                         */
+    int            var_len[MAX_VAL];  /* The length of the variable */
+    int            var_offset[MAX_VAL];  /* The offset in the vector */
+    int            var_ncomps[MAX_VAL];  /* The number of components to a vector */
+/*
+ * Mesh information.
+ */
+    int            mesh_read;   /* 1 if the mesh information has been read */
+    int            nhex;        /* The number of hex elements */
+    int            nhex_faces;  /* The number of hex face elements */
+    int            nshell;      /* The number of shell elements */
+    int            nbeam;       /* The number of beam elements */
+    int           *hex_nodelist;  /* The node list for the hex elements */
+    int           *shell_nodelist;  /* The node list for the shell elements */
+    int           *beam_nodelist;  /* The node list for the beam elements */
+    int           *hex_facelist;  /* The face list for the hex elements */
+    int           *hex_zoneno;  /* The zone number of each hex face */
+    int           *hex_matlist; /* The material list for the hex elements */
+    int           *shell_matlist;  /* The material list for the shell elements */
+    int           *beam_matlist;  /* The material list for the beam elements */
+    int           *hex_activ;   /* The activity data for the hex elements */
+    int           *shell_activ; /* The activity data for the shell elements */
+    int           *beam_activ;  /* The activity data for the beam elements */
+    int            coord_state; /* The state associated with the coordinates */
+    float        **coords;      /* The mesh coordinates */
+    float          min_extents[3];  /* The minimum extents */
+    float          max_extents[3];  /* The maximum extents */
+    int            nmat;        /* The number of materials present */
+    int           *matnos;      /* The material numbers present */
+/*
+ * Header information.
+ */
+    int            ndim;        /* Dimension of data */
+    int            numnp;       /* The number of nodes */
+    int            icode;       /* Flag for old or new database */
+    int            nglbv;       /* Number of global variables for each state */
+    int            it;          /* Tempuratures included flag */
+    int            iu;          /* Current geometry included flag */
+    int            iv;          /* Current velocity flag */
+    int            ia;          /* Current acceleration flag */
+    int            nel8;        /* Number of brick elements */
+    int            nummat8;     /* Number of materials used by brick elements */
+    int            nv3d;        /* Number of variables for each brick element */
+    int            nel2;        /* Number of beam elements */
+    int            nummat2;     /* Number of materials used by beam elements */
+    int            nv1d;        /* Number of variables for each beam element */
+    int            nel4;        /* Number of shell elements */
+    int            nummat4;     /* Number of materials used by shell elements */
+    int            nv2d;        /* Number of variables for each shell element */
+    int            activ;       /* Element activity included flag */
+} TAURUSfile;
+
+typedef struct {
+    char          *name;
+    char          *mesh;
+    int            idir;
+    int            centering;
+    int            ival;
+    int            ivar;
+} var_list_s;
+
+extern var_list_s taur_var_list[];
+
+#endif
diff --git a/src/unknown/Makefile.am b/src/unknown/Makefile.am
new file mode 100644
index 0000000..76e41eb
--- /dev/null
+++ b/src/unknown/Makefile.am
@@ -0,0 +1,64 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+noinst_LTLIBRARIES = libsilo_unknown.la
+libsilo_unknown_la_SOURCES = $(FILES)
+
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+
+noinst_HEADERS = \
+ silo_unknown_private.h
+
+FILES = \
+ silo_unknown.c
diff --git a/src/unknown/Makefile.in b/src/unknown/Makefile.in
new file mode 100644
index 0000000..00b97d0
--- /dev/null
+++ b/src/unknown/Makefile.in
@@ -0,0 +1,550 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/unknown
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsilo_unknown_la_LIBADD =
+am__objects_1 = silo_unknown.lo
+am_libsilo_unknown_la_OBJECTS = $(am__objects_1)
+libsilo_unknown_la_OBJECTS = $(am_libsilo_unknown_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsilo_unknown_la_SOURCES)
+DIST_SOURCES = $(libsilo_unknown_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libsilo_unknown.la
+libsilo_unknown_la_SOURCES = $(FILES)
+AM_CPPFLAGS = -I$(builddir)/../silo -I$(srcdir)/../silo
+noinst_HEADERS = \
+ silo_unknown_private.h
+
+FILES = \
+ silo_unknown.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/unknown/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/unknown/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsilo_unknown.la: $(libsilo_unknown_la_OBJECTS) $(libsilo_unknown_la_DEPENDENCIES) 
+	$(LINK)  $(libsilo_unknown_la_OBJECTS) $(libsilo_unknown_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silo_unknown.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# 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/src/unknown/silo_unknown.c b/src/unknown/silo_unknown.c
new file mode 100644
index 0000000..f06a9b1
--- /dev/null
+++ b/src/unknown/silo_unknown.c
@@ -0,0 +1,323 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+ * Driver for opening an as-yet-undetermined-type database.
+ */
+
+#include "silo_unknown_private.h"
+
+/*-------------------------------------------------------------------------
+ * Function:    db_unk_Open
+ *
+ * Purpose:     Attempt to open a database whose type we do not know.
+ *              We do this by invoking each callback defined in the
+ *              DBOpenCB vector watching out not to invoke this function
+ *              recursively.
+ *
+ *              If a device driver is unable to open a file, it is required
+ *              to call db_perror() and return a NULL pointer.  This function
+ *              prevents other drivers from issuing error messages by
+ *              setting the error reporting level to DB_NONE.  When a driver
+ *              can't open a file, it will call db_perror which will return
+ *              to this function as things are unwinding back toward the
+ *              DBOpen() that started all this.  When this function gets
+ *              control from an error, it will cancel the error unwinding
+ *              and try the next driver.
+ *
+ *              If all drivers fail, this function raises an E_NOTIMP
+ *              error.
+ *
+ * Return:      Success:        ptr to new file whose callbacks and type
+ *                              are initialized for the appropriate driver.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  robb at cloud
+ *              Mon Dec 12 14:09:59 EST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Mon Jan  8 17:55:54 PST 1996
+ *     Added the mode parameter and logic.
+ *
+ *     Sean Ahern, Tue Jan  9 18:04:17 PST 1996
+ *     Added the ability to specify a driver hierarchy.
+ *
+ *     Sean Ahern, Mon Oct 12 17:45:08 PDT 1998
+ *     Removed AIO, since we no longer support it.
+ *
+ *     Mark Miller, Thu Mar 25 17:54:02 PST 1999
+ *     Added DMF driver
+ *
+ *     Mark C. Miller, Tue Aug  1 10:35:32 PDT 2006
+ *     Added subtype arg. Eliminated exudos. Moved HDF5 to second place.
+ *
+ *     Mark C. Miller, Mon Nov 19 10:45:05 PST 2007
+ *     Added HDF5 driver warning.
+ *
+ *     Mark C. Miller, Fri Feb 12 08:16:37 PST 2010
+ *     Replaced use of access() system call with db_silo_stat.
+ *     Added loop over split vfds trying various defined extension pairs.
+ *
+ *     Mark C. Miller, Thu Mar 18 18:16:22 PDT 2010
+ *     Increased size of tried/ascii to accomodate HDF5 options sets.
+ *
+ *     Mark C. Miller, Sat May 15 16:11:13 PDT 2010
+ *     Add slot for PDB Proper. Put it ahead of PDB (lite) in priority.
+ *
+ *     Mark C. Miller, Fri May 21 08:24:31 PDT 2010
+ *     Moved logic stating a file and checking for write permissions up
+ *     to interface layer, silo.c
+ *-------------------------------------------------------------------------*/
+INTERNAL DBfile *
+db_unk_Open(char *name, int mode, int subtype_dummy)
+{
+    DBfile        *opened = NULL;
+    DBErrFunc_t    oldErrfunc = 0;
+    int            oldErrlvl;
+    int            i, j, type, ntried = 0;
+    int            driver_types_already_tried[MAX_FILE_OPTIONS_SETS+10+1];
+    int            default_driver_priorities[MAX_FILE_OPTIONS_SETS+10+1] =
+                       DEFAULT_DRIVER_PRIORITIES;
+    int            priorities_are_set_to_default = 1;
+    char          *me = "db_unk_Open";
+    char           tried[1024], ascii[32];
+    const int *opts_set_ids = db_get_used_file_options_sets_ids();
+    static const char *hierarchy_names[] = {"NetCDF", "PDB Proper", "PDB",
+                                            "Taurus", "", "", "Debug", "HDF5", "", ""};
+
+    /* Save current error reporting and then turn it off */
+    oldErrlvl = DBErrlvl();
+    oldErrfunc = DBErrfunc();
+    DBShowErrors(DB_SUSPEND, NULL);
+    strcpy(tried, "attempted SILO drivers:");
+
+    /* Initialize list of driver ids we've already tried */
+    for (i = 0; i < sizeof(driver_types_already_tried)/sizeof(driver_types_already_tried[0]); i++)
+        driver_types_already_tried[i] = -1;
+
+    /* See if we're using default priorities or not */
+    for (i = 0; i < sizeof(default_driver_priorities)/sizeof(default_driver_priorities[0]); i++)
+    {
+        if (SILO_Globals.unknownDriverPriorities[i] != default_driver_priorities[i])
+        {
+            priorities_are_set_to_default = 0;
+            break;
+        }
+    }
+
+    /* If we're not using default priorities, we need to try them first */
+    if (!priorities_are_set_to_default)
+    {
+        for (type = 0; !opened && SILO_Globals.unknownDriverPriorities[type]!=-1; type++)
+        {
+            int driverId;
+            int driverType = SILO_Globals.unknownDriverPriorities[type];
+            int tried_already = 0;
+            db_DriverTypeAndFileOptionsSetId(driverType, &driverId, 0);
+            for (i = 0; driver_types_already_tried[i]!=-1; i++)
+            {
+                 if (driverType == driver_types_already_tried[i])
+                 {
+                     tried_already = 1;
+                     break;
+                 }
+            }
+            if (tried_already)
+                continue;
+            if (DBOpenCB[driverId] == NULL)
+                continue;
+            sprintf(ascii, " %s", hierarchy_names[driverId]);
+            strcat(tried, ascii);
+            PROTECT {
+                opened = (DBOpenCB[driverId]) (name, mode, subtype_dummy);
+            }
+            CLEANUP {
+                CANCEL_UNWIND;
+            }
+            END_PROTECT;
+            driver_types_already_tried[ntried++] = driverType;
+        }
+    }
+     
+    /*
+     * Try various registered options sets. Note, here we are going to try
+     * ONLY file options sets registered by Silo client and NOT any of the
+     * default file options sets.
+     */
+    if (DBOpenCB[DB_HDF5X]!=NULL)
+    {
+        for (i = 0; !opened && opts_set_ids[i]!=-1; i++)
+        {
+            int driverId;
+            int driverType = DB_HDF5_OPTS(opts_set_ids[i]); 
+            int tried_already = 0;
+            db_DriverTypeAndFileOptionsSetId(driverType, &driverId, 0);
+            for (j = 0; driver_types_already_tried[j]!=-1; j++)
+            {
+                 if (driverType == driver_types_already_tried[j])
+                 {
+                     tried_already = 1;
+                     break;
+                 }
+            }
+            if (tried_already)
+                continue;
+            /* skip the 'default' ones */
+            if (opts_set_ids[i] < NUM_DEFAULT_FILE_OPTIONS_SETS)
+                continue;
+            sprintf(ascii, " DB_HDF5_OPTS(%d)", opts_set_ids[i]);
+            strcat(tried, ascii);
+            PROTECT {
+                opened = (DBOpenCB[DB_HDF5X]) (name, mode, opts_set_ids[i]);
+            }
+            CLEANUP {
+                CANCEL_UNWIND;
+            }
+            END_PROTECT;
+            driver_types_already_tried[ntried++] = driverType;
+        }
+    }
+
+    /*
+     * Try each driver according to priority ordering specified in Silo
+     * Globals being careful NOT re-try any that we already tried above.
+     */
+    if (priorities_are_set_to_default)
+    {
+        for (type = 0; !opened && SILO_Globals.unknownDriverPriorities[type]!=-1; type++)
+        {
+            int driverId;
+            int driverType = SILO_Globals.unknownDriverPriorities[type];
+            int tried_already = 0;
+            db_DriverTypeAndFileOptionsSetId(driverType, &driverId, 0);
+            for (j = 0; driver_types_already_tried[j]!=-1; j++)
+            {
+                 if (driverType == driver_types_already_tried[j])
+                 {
+                     tried_already = 1;
+                     break;
+                 }
+            }
+            if (tried_already)
+                continue;
+            if (DBOpenCB[driverId] == NULL)
+                continue;
+            sprintf(ascii, " %s", hierarchy_names[driverId]);
+            strcat(tried, ascii);
+            PROTECT {
+                opened = (DBOpenCB[driverId]) (name, mode, subtype_dummy);
+            }
+            CLEANUP {
+                CANCEL_UNWIND;
+            }
+            END_PROTECT;
+            driver_types_already_tried[ntried++] = driverType;
+        }
+    }
+
+    /*
+     * Try default registered options sets now.
+     */
+    if (DBOpenCB[DB_HDF5X]!=NULL)
+    {
+        for (i = 0; !opened && opts_set_ids[i]!=-1; i++)
+        {
+            int driverId;
+            int driverType = DB_HDF5_OPTS(opts_set_ids[i]); 
+            int tried_already = 0;
+            db_DriverTypeAndFileOptionsSetId(driverType, &driverId, 0);
+            for (j = 0; driver_types_already_tried[j]!=-1; j++)
+            {
+                 if (driverType == driver_types_already_tried[j])
+                 {
+                     tried_already = 1;
+                     break;
+                 }
+            }
+            if (tried_already)
+                continue;
+            /* skip the 'default' ones */
+            if (opts_set_ids[i] >= NUM_DEFAULT_FILE_OPTIONS_SETS)
+                continue;
+            sprintf(ascii, " DB_HDF5_OPTS(%d)", opts_set_ids[i]);
+            strcat(tried, ascii);
+            PROTECT {
+                opened = (DBOpenCB[DB_HDF5X]) (name, mode, opts_set_ids[i]);
+            }
+            CLEANUP {
+                CANCEL_UNWIND;
+            }
+            END_PROTECT;
+            driver_types_already_tried[ntried++] = driverType;
+        }
+    }
+
+    /* Return error reporting to behavior we had before entering this function */
+    DBShowErrors(oldErrlvl, oldErrfunc);
+
+    if (!opened)
+    {
+        if (DBGetDriverTypeFromPath(name) == DB_HDF5X)
+        {
+            db_perror(tried, E_NOHDF5, me);
+        }
+        else
+        {
+            db_perror(tried, E_NOTIMP, me);
+        }
+    }
+
+    return (opened);
+}
diff --git a/src/unknown/silo_unknown_private.h b/src/unknown/silo_unknown_private.h
new file mode 100644
index 0000000..8f2d974
--- /dev/null
+++ b/src/unknown/silo_unknown_private.h
@@ -0,0 +1,68 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef SILO_UNKNOWN_PRIVATE_H
+#define SILO_UNKNOWN_PRIVATE_H
+
+
+/*
+ * SILO-Unknown private include file.
+ *
+ * This header file is included by all `SILO-Unknown source files and
+ * contains constants and prototypes that should be visible to
+ * the SILO-Unknown source files, but not to the application.
+ */
+
+#include "silo_private.h"
+
+#endif /* !SILO_UNKNOWN_H */
diff --git a/svn_bin/Makefile.am b/svn_bin/Makefile.am
new file mode 100644
index 0000000..48bdaa1
--- /dev/null
+++ b/svn_bin/Makefile.am
@@ -0,0 +1,63 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+ 
+EXTRA_DIST = \
+ build-3rdparty-closed \
+ build-3rdparty-open \
+ regressiontest \
+ silo-release-closed \
+ silo-release-open \
+ get_sys_info \
+ winsilo-dist
diff --git a/svn_bin/Makefile.in b/svn_bin/Makefile.in
new file mode 100644
index 0000000..17a3df7
--- /dev/null
+++ b/svn_bin/Makefile.in
@@ -0,0 +1,437 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = svn_bin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ build-3rdparty-closed \
+ build-3rdparty-open \
+ regressiontest \
+ silo-release-closed \
+ silo-release-open \
+ get_sys_info \
+ winsilo-dist
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  svn_bin/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  svn_bin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# 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/svn_bin/build-3rdparty-closed b/svn_bin/build-3rdparty-closed
new file mode 100755
index 0000000..66b7f7d
--- /dev/null
+++ b/svn_bin/build-3rdparty-closed
@@ -0,0 +1,568 @@
+#!/bin/sh 
+#######################################################################
+#
+# build-3rdparty-closed - Build and install 3rd party libraries.
+#
+# Author: Thomas Treadway
+# Date: Fri Nov 30 13:26:50 PST 2007
+#
+# Usage:
+#     build-3rdparty-closed
+#
+# This script will build and install szip-2.1 and hdf5-1.6.1 libraries.
+# To change or upgrade szip or hdf5 release:
+# 1) untar the szip/hdf5 distribution in /usr/gapps/silo/szip/src/ or
+# /usr/gapps/silo/hdf5/src/. This should be done on both the BDivision
+# and LC /usr/gapps directories.
+# 2) change the value of the variable SZIPRELEASE or HDF5RELEASE
+# to be the release number
+# 3) run ./build-3rdparty-closed in both the BDivision and then the LC
+# servers
+#
+# Modifications:
+# Thomas R. Treadway, Fri Dec  7 16:03:39 PST 2007
+# Added hdfonly commnad option, will skip the szip build.
+# Added bservers and lcservers for B Division or LC server build.
+#
+#######################################################################
+#
+TOPDIR="/usr/gapps/silo"
+SZIPRELEASE=2.1
+HDF5RELEASE=1.6.6
+QTRELEASE=3.3.8
+lcun=$USER
+bdun=$USER
+bdhost="vader"
+skipszip="no"
+MAKE=gmake
+MAKEOPTS=""
+export TOPDIR MAKE MAKEOPTS SZIPRELEASE HDF5RELEASE QTRELEASE
+export lcun bdun bdhost skipszip
+
+usage() {
+  printf "Usage: %s [-lc-username <lc-username>] [-bdiv-username <username>] [-bdiv-host <hostname>] [hdf5only] [all|localhost|sunset|purple|uv|gauss|lilac|rhea|bgl]" $0
+  printf "\n"
+  printf "Silo 3rd party library installing script. Assumes a tarball exist in\n"
+  printf "/usr/gapps/silo/szip/src/szip-$SZIPRELEASE, and\n"
+  printf "/usr/gapps/silo/hdf5/src/hdf5-$HDF5RELEASE.\n"
+  printf "Log files are stored at ./ARCH.log\n"
+  printf "You may want to run this script from the LC network.\n"
+}
+
+stdbuild() {
+    ssh ${HOSTS} "/bin/sh" << EOF > ${ARCH}.log 2>&1 &
+    $*
+    umask 002
+    if [ "$skipszip" = "no" ] ; then
+      mkdir $TOPDIR/szip/src/$ARCH
+      cd $TOPDIR/szip/src/$ARCH
+      $TOPDIR/szip/src/szip-$SZIPRELEASE/configure $CONFOPTS \
+      --prefix=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+      --disable-shared
+      $MAKE $MAKEOPTS install
+      chmod -R a+rX,ug+w $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      chgrp -R visit $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      cd $TOPDIR/szip/src
+      rm -rf $TOPDIR/szip/src/$ARCH
+    fi
+    mkdir $TOPDIR/hdf5/src/$ARCH
+    cd $TOPDIR/hdf5/src/$ARCH
+    $TOPDIR/hdf5/src/hdf5-$HDF5RELEASE/configure $CONFOPTS \
+    --prefix=$TOPDIR/hdf5/$HDF5RELEASE/$ARCH \
+    --with-szlib=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+    --disable-shared
+    if [ "$POSTCONFCMDS" != "" ]; then
+        echo "prevent an empty if-clause" > /dev/null 
+        $POSTCONFCMDS
+    fi
+    $MAKE $MAKEOPTS -j 4 install
+    chmod -R a+rX,ug+w $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    chgrp -R visit $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    cd $TOPDIR/hdf5/src
+    rm -rf $TOPDIR/hdf5/src/$ARCH
+EOF
+}
+
+stdbuild_nobg() {
+    ssh ${HOSTS} "/bin/sh" << EOF > ${ARCH}.log 2>&1
+    $*
+    umask 002
+    if [ "$skipszip" = "no" ] ; then
+      mkdir $TOPDIR/szip/src/$ARCH
+      cd $TOPDIR/szip/src/$ARCH
+      $TOPDIR/szip/src/szip-$SZIPRELEASE/configure $CONFOPTS \
+      --prefix=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+      --disable-shared
+      $MAKE $MAKEOPTS install
+      chmod -R a+rX,ug+w $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      chgrp -R visit $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      cd $TOPDIR/szip/src
+      rm -rf $TOPDIR/szip/src/$ARCH
+    fi
+    mkdir $TOPDIR/hdf5/src/$ARCH
+    cd $TOPDIR/hdf5/src/$ARCH
+    $TOPDIR/hdf5/src/hdf5-$HDF5RELEASE/configure $CONFOPTS \
+    --prefix=$TOPDIR/hdf5/$HDF5RELEASE/$ARCH \
+    --with-szlib=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+    --disable-shared
+    if [ "$POSTCONFCMDS" != "" ]; then
+        echo "prevent an empty if-clause" > /dev/null 
+        $POSTCONFCMDS
+    fi
+    $MAKE $MAKEOPTS -j 4 install
+    chmod -R a+rX,ug+w $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    chgrp -R visit $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    cd $TOPDIR/hdf5/src
+#    rm -rf $TOPDIR/hdf5/src/$ARCH
+EOF
+}
+
+localhost() {
+    localhostgcc
+    localhostpgc
+    localhosticc
+}
+localhostgcc() {
+    HOSTS="$bdun@${bdhost}"
+    ARCH="i386-pc-linux-gcc-3.2.3"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=\"-fPIC -O2\" \
+CXXFLAGS=\"-fPIC -O2\" FFLAGS=-Wno-globals F77FLAGS=-Wno-globals \
+FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+#
+localhostpgc() {
+    HOSTS="$bdun@${bdhost}"
+    ARCH="i386-pc-linux-pgc-6.2"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" \
+CFLAGS=\"-fPIC -O2\" CXXFLAGS=\"-fPIC -O2\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:/usr/local/pgi/linux86/6.2/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/pgi/linux86/lib" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7128 at helios.llnl.gov:7127 at helios.llnl.gov" \
+    "export PATH LD_LIBRARY_PATH LM_LICENSE_FILE"
+}
+#
+localhosticc() {
+    HOSTS="$bdun@${bdhost}"
+    ARCH="i386-pc-linux-icc-8.1"
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=\"-fPIC -O2\" CXXFLAGS=\"-fPIC -O2\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/local/pgi/linux86/6.0/bin:/usr/security/bin:\
+/usr/local/intel/compiler81/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/intel/compiler81/lib" \
+    "INTEL_LICENSE_FILE=7127 at helios.llnl.gov" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7128 at helios.llnl.gov:7127 at helios.llnl.gov" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE LM_LICENSE_FILE" \
+    ". /usr/local/intel/compiler81/bin/iccvars.sh"
+}
+#
+sunset() {
+    sunsetgcc
+    sunsetcc
+}
+sunsetgcc() {
+    HOSTS=$bdun at sunset
+    ARCH="sparc-sun-solaris-gcc-2.95"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+#
+sunsetcc() {
+    HOSTS=$bdun at sunset
+    ARCH="sparc-sun-solaris-cc-5.2"
+    CONFOPTS="CC=c89 CXX=CC FC=f77 F77=f77"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+purple() {
+    purple64
+    purple32
+    purple64gcc
+    purple32gcc
+}
+purple64() {
+    HOSTS=$lcun at purple
+    ARCH="aix_5_64_fed"
+    CONFOPTS="CC=xlc CXX=xlC FC=xlf F77=xlf \
+CFLAGS=-q64 LDFLAGS=-q64 AR=\"ar -X64\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+#
+purple32() {
+    HOSTS=$lcun at purple
+    ARCH="aix_5_ll"
+    CONFOPTS="CC=xlc CXX=xlC FC=xlf F77=xlf \
+CFLAGS=-q32 LDFLAGS=-q32 AR=\"ar -X32\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+#
+purplegcc() {
+  purplegcc32
+  purplegcc64
+}
+purple64gcc() {
+    HOSTS=$lcun at purple
+    ARCH="aix_5_64_fed-gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix64 -mminimal-toc\" LDFLAGS=-maix64 AR=\"ar -X64\""
+    MAKEOPTS="-i"
+    export HOSTS ARCH CONFOPTS MAKEOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+#
+purple32gcc() {
+    HOSTS=$lcun at purple
+    ARCH="aix_5_ll-gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix32 -mminimal-toc\" LDFLAGS=-maix32 AR=\"ar -X32\""
+    MAKEOPTS="-i"
+    export HOSTS ARCH CONFOPTS MAKEOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+
+lilac() {
+    lilacgcc
+    lilacicc
+}
+lilacgcc() {
+    HOSTS=$lcun at lilac
+    ARCH=chaos_3_x86_elan3
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+lilacicc() {
+    HOSTS=$lcun at lilac
+    ARCH=chaos_3_x86_elan3-icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:\
+/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+gauss() {
+    gaussgcc
+    gaussicc
+}
+gaussgcc() {
+    HOSTS=$lcun at gauss
+    ARCH=chaos_3_x86_64_ib-gcc
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+gaussicc() {
+    HOSTS=$lcun at gauss
+    ARCH=chaos_3_x86_64_ib-icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:\
+/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+rhea() {
+    rheagcc
+    rheaicc
+    rheapc
+    rheapgc
+}
+rheagcc() {
+    HOSTS=$lcun at rhea
+    ARCH=chaos_3_x86_64-gcc-3.4.4
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+rheaicc() {
+    HOSTS=$lcun at rhea
+    ARCH=chaos_3_x86_64-icc-10.0
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+rheapc() {
+    HOSTS=$lcun at rhea
+    ARCH=chaos_3_x86_64-pc-2.4
+    CONFOPTS="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pathscale/pathscale-2.4/bin2:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "PATHSCALE_SUBSCRIPTION_DAEMON=license1ocf.llnl.gov" \
+    "export PATH LM_LICENSE_FILE PATHSCALE_SUBSCRIPTION_DAEMON"
+}
+#
+rheapgc() {
+    HOSTS=$lcun at rhea
+    ARCH=chaos_3_x86_64-pgc-6.2
+  CONFOPTS=" CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pgi6.23/linux86-64/6.2/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "export PATH LM_LICENSE_FILE"
+}
+#
+bgl() {
+    bglxlc
+    bglblrts_xlc
+    rm -rf $TOPDIR/hdf5/src/sles_9_ppc64*
+}
+
+bglxlc() {
+    HOSTS=${lcun}@bgl
+    ARCH=sles_9_ppc64-xlc
+    CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/xlc FC=xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/xlC \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" "
+    export HOSTS ARCH CONFOPTS
+    stdbuild_nobg \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+    cp $TOPDIR/hdf5/src/$ARCH/src/H5Tinit.c $TOPDIR/hdf5/src/.
+}
+
+bglblrts_xlc() {
+    HOSTS=${lcun}@bgl
+    ARCH=sles_9_ppc64-blrts_xlc
+    POSTCONFCMDS="cp $TOPDIR/hdf5/src/H5Tinit.c $TOPDIR/hdf5/src/$ARCH/src/."
+    CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc FC=blrts_xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    `grep ^ac_cv_sizeof $TOPDIR/hdf5/src/sles_9_ppc64-xlc/config.log | tr '\n' ' ' ` \
+    --disable-stream-vfd"
+    export HOSTS ARCH CONFOPTS POSTCONFCMDS
+    stdbuild_nobg \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+umask 002
+if [ "$1" = "-lc-username" ] ; then
+   lcun=$2
+   shift 2
+fi
+if [ "$1" = "-bdiv-username" ] ; then
+    bdun=$2
+    shift 2
+fi
+if [ "$1" = "-bdiv-host" ] ; then
+    bdhost=$2
+    shift 2
+fi
+
+if [ $# -lt 1 ] ; then
+  localhost
+  sunset
+  purple
+  gauss 
+  lilac
+  rhea
+  bgl
+else
+ while [ "$*" != "" ]
+ do 
+  case $1 in
+    bser*|-bser*)
+      localhost
+      sunset
+      shift;;
+    lcser*|-lcser*)
+      purple
+      uv
+      gauss 
+      lilac
+      rhea
+      bgl
+      shift;;
+    hdf*|-hdf*)
+      skipszip="yes"
+      shift;;
+    skip*|-skip*)
+      skipszip="yes"
+      shift;;
+    all|-a*)
+      localhost
+      sunset
+      purple
+      gauss 
+      lilac
+      rhea
+      bgl
+      shift;;
+    local*pgc|-local*pgc)
+      localhostpgc
+      shift;;
+    local*icc|-local*icc)
+      localhosticc
+      shift;;
+    local*gcc|-local*gcc)
+      localhostgcc
+      shift;;
+    localhost|-lo*)
+      localhost
+      shift;;
+    sun*gcc|-sun*gcc)
+      sunsetgcc
+      shift;;
+    sun*cc|-sun*cc)
+      sunsetcc
+      shift;;
+    sun*|-sun*)
+      sunset
+      shift;;
+    purple32|-pu*32)
+      purple32
+      shift;;
+    purple64|-pu*64)
+      purple64
+      shift;;
+    purple|-pu*)
+      purple
+      shift;;
+    uv32|-uv*32)
+      uv32
+      shift;;
+    uv64|-uv*64)
+      uv64
+      shift;;
+    uv|-uv*)
+      uv
+      shift;;
+    sccc|-sccc)
+      sccc
+      shift;;
+    sc|-sc)
+      sc
+      shift;;
+    gaus*icc|-gs*icc)
+      gaussicc
+      shift;;
+    gaus*gcc|-gs*gcc)
+      gaussgcc
+      shift;;
+    gaus*|-gs*)
+      gauss
+      shift;;
+    rhea*icc|-rh*icc)
+      rheaicc
+      shift;;
+    rhea*gcc|-rh*gcc)
+      rheagcc
+      shift;;
+    rhea*|-rh*)
+      rhea
+      shift;;
+    lil*|-li*)
+      lilac
+      shift;;
+    slic*icc|-sl*icc)
+      slicicc
+      shift;;
+    slic*gcc|-sl*gcc)
+      slicgcc
+      shift;;
+    slic*|-sl*)
+      slic
+      shift;;
+    bgltest|-bgltest)
+      bgltest
+      shift;;
+    bgl|-bgl)
+      bgl
+      shift;;
+    sh*|-sh*)
+      shar
+      shift;;
+    *)
+      shift;;
+  esac
+ done
+fi
diff --git a/svn_bin/build-3rdparty-open b/svn_bin/build-3rdparty-open
new file mode 100755
index 0000000..4d9c1b2
--- /dev/null
+++ b/svn_bin/build-3rdparty-open
@@ -0,0 +1,687 @@
+#!/bin/bash
+#######################################################################
+#
+# build-3rdparty-open - Build and install 3rd party libraries.
+#
+# Author: Thomas Treadway
+# Date: Wed Nov 28 16:35:50 PST 2007
+#
+# Usage:
+#     build-3rdparty-open
+#
+# This script will build and install szip-2.1 and hdf5-1.6.1 libraries.
+# To change or upgrade szip or hdf5 release:
+# 1) untar the szip/hdf5 distribution in /usr/gapps/silo/szip/src/ or
+# /usr/gapps/silo/hdf5/src/. This should be done on both the BDivision
+# and LC /usr/gapps directories.
+# 2) change the value of the variable SZIPRELEASE or HDF5RELEASE
+# to be the release number
+# 3) run ./build-3rdparty-open
+#
+# Modifications:
+# Thomas R. Treadway, Fri Dec  7 16:03:39 PST 2007
+# Added hdfonly commnad option, will skip the szip build.
+#
+#######################################################################
+#
+TOPDIR="/usr/gapps/silo"
+SZIPRELEASE=2.1
+HDF5RELEASE=1.8.1
+QTRELEASE=3.3.8
+lcun=$USER
+skipszip="no"
+MAKE="gmake"
+MAKEOPTS=""
+export TOPDIR MAKE MAKEOPTS SZIPRELEASE HDF5RELEASE QTRELEASE lcun skipszip
+
+usage() {
+  printf "Usage: %s [-lc-username <lc-username>] [hdf5only] [all|hoth|up|yana|prism|thunder|pengra|quad|ubgl]" $0
+  printf "\n"
+  printf "Silo 3rd party library installing script. Assumes a tarball exist in\n"
+  printf "/usr/gapps/silo/szip/src/szip-$SZIPRELEASE, and\n"
+  printf "/usr/gapps/silo/hdf5/src/hdf5-$HDF5RELEASE.\n"
+  printf "Log files are stored at ./ARCH.log\n"
+  printf "You may want to run this script from the LC network.\n"
+}
+
+#    --disable-shared --with-default-api-version=v16 --enable-production
+stdbuild() {
+    ssh ${HOSTS} "/bin/sh" << EOF > ${ARCH}.log 2>&1 &
+    $*
+    unalias cp
+    unset noclobber
+    umask 002
+    if [ "$skipszip" = "no" ] ; then
+      mkdir $TOPDIR/szip/src/$ARCH
+      cd $TOPDIR/szip/src/$ARCH
+      $TOPDIR/szip/src/szip-$SZIPRELEASE/configure $CONFOPTS \
+      --prefix=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+      --disable-shared
+      $MAKE $MAKEOPTS install
+      chmod -R a+rX,ug+w $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      chgrp -R visit $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      cd $TOPDIR/szip/src
+      rm -rf $TOPDIR/szip/src/$ARCH
+    fi
+    mkdir $TOPDIR/hdf5/src/$ARCH
+    cd $TOPDIR/hdf5/src/$ARCH
+    $TOPDIR/hdf5/src/hdf5-$HDF5RELEASE/configure $CONFOPTS \
+    --prefix=$TOPDIR/hdf5/$HDF5RELEASE/$ARCH \
+    --with-szlib=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+    --disable-shared --enable-production
+    if [ "$POSTCONFCMDS" != "" ] ; then
+        echo "prevent an empty if-clause" > /dev/null 
+        $POSTCONFCMDS
+    fi
+    $MAKE $MAKEOPTS -j 4 install
+    chmod -R a+rX,ug+w $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    chgrp -R visit $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    cd $TOPDIR/hdf5/src
+#    rm -rf $TOPDIR/hdf5/src/$ARCH
+EOF
+}
+
+stdbuild_nobg() {
+    ssh ${HOSTS} "/bin/sh" << EOF > ${ARCH}.log 2>&1
+    $*
+    unalias cp
+    unset noclobber
+    umask 002
+    if [ "$skipszip" = "no" ] ; then
+      mkdir $TOPDIR/szip/src/$ARCH
+      cd $TOPDIR/szip/src/$ARCH
+      $TOPDIR/szip/src/szip-$SZIPRELEASE/configure $CONFOPTS \
+      --prefix=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+      --disable-shared
+      $MAKE $MAKEOPTS install
+      chmod -R a+rX,ug+w $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      chgrp -R visit $TOPDIR/szip/$SZIPRELEASE/$ARCH
+      cd $TOPDIR/szip/src
+      rm -rf $TOPDIR/szip/src/$ARCH
+    fi
+    mkdir $TOPDIR/hdf5/src/$ARCH
+    cd $TOPDIR/hdf5/src/$ARCH
+    $TOPDIR/hdf5/src/hdf5-$HDF5RELEASE/configure $CONFOPTS \
+    --prefix=$TOPDIR/hdf5/$HDF5RELEASE/$ARCH \
+    --with-szlib=$TOPDIR/szip/$SZIPRELEASE/$ARCH \
+    --disable-shared --enable-production
+    if [ "$POSTCONFCMDS" != "" ] ; then
+        echo "prevent an empty if-clause" > /dev/null 
+        $POSTCONFCMDS
+    fi
+    $MAKE $MAKEOPTS -j 4 install
+    chmod -R a+rX,ug+w $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    chgrp -R visit $TOPDIR/hdf5/$HDF5RELEASE/$ARCH
+    cd $TOPDIR/hdf5/src
+#    rm -rf $TOPDIR/hdf5/src/$ARCH
+EOF
+}
+
+hoth() {
+    hothgcc
+    hothpgc
+    hothicc
+}
+hothgcc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=\"-fPIC -O2\" \
+CXXFLAGS=\"-fPIC -O2\" FFLAGS=-Wno-globals F77FLAGS=-Wno-globals \
+FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+#
+hothpgc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp_pgcc"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" \
+CFLAGS=\"-fPIC -O2\" CXXFLAGS=\"-fPIC -O2\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:/usr/local/pgi/linux86/6.2/bin" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7496 at genesse.llnl.gov:7127 at corona.llnl.gov:28528 at license1ocf.llnl.gov" \
+    "export PATH LM_LICENSE_FILE"
+}
+#
+hothicc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp_icc"
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=\"-fPIC -O2\" CXXFLAGS=\"-fPIC -O2\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:/sbin:\
+/usr/sbin:/opt/bin:/usr/local/apps/bin:/usr/local/intel/cc/current/bin:\
+/usr/local/intel/fc/current/bin:/usr/local/intel/idb/current/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/intel/cc/current/lib:\
+/usr/local/intel/fc/current/lib" \
+    "INTEL_LICENSE_FILE=28528 at license1ocf.llnl.gov" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7496 at genesse.llnl.gov:7127 at corona.llnl.gov:28528 at license1ocf.llnl.gov" \
+    "export PATH INTEL_LICENSE_FILE LM_LICENSE_FILE LD_LIBRARY_PATH" \
+    ". /usr/local/intel/compiler90/bin/iccvars.sh"
+}
+#
+sunspot() {
+    sunspotgcc
+    sunspotcc
+}
+sunspotgcc() {
+    HOSTS=sunspot
+    ARCH="sparc_SunOS_57_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+#
+sunspotcc() {
+    HOSTS=sunspot
+    ARCH="sparc_SunOS_57"
+    CONFOPTS="CC=c89 CXX=CC FC=f77 F77=f77"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+sidious() {
+    HOSTS="sidious"
+    ARCH="x86_64_Linux_el5xen"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=\"-fPIC -O2\" \
+CXXFLAGS=\"-fPIC -O2\" FFLAGS=-Wno-globals F77FLAGS=-Wno-globals \
+FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+tread() {
+    HOSTS="tread"
+    ARCH="i386-apple-darwin8-gcc-4.0.1"
+    CONFOPTS="CC=gcc CXX=g++ FC=\"\" F77=\"\""
+    MAKE=make
+    export HOSTS ARCH CONFOPTS MAKE
+    stdbuild \
+    "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin" \
+    "export PATH"
+}
+
+up() {
+    up64
+    up32
+    upgcc64
+    upgcc32
+}
+up64() {
+    HOSTS=${lcun}@up
+    ARCH="aix_5_64_fed"
+    CONFOPTS="CC=xlc CXX=xlC FC=xlf F77=xlf \
+CFLAGS=-q64 LDFLAGS=-q64 AR=\"ar -X64\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+#
+up32() {
+    HOSTS=${lcun}@up
+    ARCH="aix_5_ll"
+    CONFOPTS="CC=xlc CXX=xlC FC=xlf F77=xlf \
+CFLAGS=-q32 LDFLAGS=-q32 AR=\"ar -X32\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+#
+upgcc64() {
+    HOSTS=${lcun}@up
+    ARCH="aix_5_64_fed_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=-maix64 LDFLAGS=-maix64 AR=\"ar -X64\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+#
+upgcc32() {
+    HOSTS=${lcun}@up
+    ARCH="aix_5_ll_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=-maix32 LDFLAGS=-maix32 AR=\"ar -X32\""
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:\
+/usr/local/gnu/bin:/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+
+pengra() {
+    pengragcc
+    pengraicc
+}
+pengragcc() {
+    HOSTS=${lcun}@pengra
+    ARCH=chaos_3_x86_elan3
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+pengraicc() {
+    HOSTS=${lcun}@pengra
+    ARCH=chaos_3_x86_elan3_icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:\
+/usr/bin:/usr/bin/X11:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler91/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler91/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+yana() {
+    yanagcc
+    yanaicc
+    yanapc
+    yanapgc
+}
+yanagcc() {
+    HOSTS=${lcun}@yana
+    ARCH=chaos_4_x86_64
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+yanaicc() {
+    HOSTS=${lcun}@yana
+    ARCH=chaos_4_x86_64_icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler91/lib" \
+    "INTEL_LICENSE_FILE=/usr/local/intel/compiler91/licenses:\
+/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+yanapc() {
+    HOSTS=${lcun}@yana
+    ARCH=chaos_4_x86_64_pathcc
+    CONFOPTS="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pathscale/pathscale-2.4/bin2:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "PATHSCALE_SUBSCRIPTION_DAEMON=license1ocf.llnl.gov" \
+    "export PATH LM_LICENSE_FILE PATHSCALE_SUBSCRIPTION_DAEMON"
+}
+#
+yanapgc() {
+    HOSTS=${lcun}@yana
+    ARCH=chaos_3_x86_64_pgcc
+  CONFOPTS=" CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pgi6.23/linux86-64/6.2/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "export PATH LM_LICENSE_FILE"
+}
+#
+prism() {
+    prismgcc
+    prismicc
+    prismpc
+    prismpgc
+}
+prismgcc() {
+    HOSTS=${lcun}@prism
+    ARCH=chaos_4_x86_64_ib
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+prismicc() {
+    HOSTS=${lcun}@prism
+    ARCH=chaos_4_x86_64_ib_icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler91/lib" \
+    "INTEL_LICENSE_FILE=/usr/local/intel/compiler91/licenses:\
+/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+#
+prismpc() {
+    HOSTS=${lcun}@prism
+    ARCH=chaos_4_x86_64_ib_pathcc
+    CONFOPTS="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild
+}
+#
+prismpgc() {
+    HOSTS=${lcun}@prism
+    ARCH=chaos_4_x86_64_ib_pgcc
+  CONFOPTS=" CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pgi6.23/linux86-64/6.2/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "export PATH LM_LICENSE_FILE"
+}
+#
+thunder() {
+    thundergcc
+    thundericc
+}
+thundergcc() {
+    HOSTS=${lcun}@thunder
+    ARCH=chaos_3_ia64_elan4
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+#
+thundericc() {
+    HOSTS=${lcun}@thunder
+    ARCH=chaos_3_ia64_elan4_icc
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler91/lib" \
+    "INTEL_LICENSE_FILE=/usr/local/intel/compiler91/licenses:\
+/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+
+quad() {
+    quad32
+    quad64
+}
+quad32() {
+    HOSTS=${lcun}@quad
+    ARCH=irix_6.5_n32
+    CONFOPTS="LDFLAGS=-n32 CFLAGS=-n32 MAKE=$MAKE"
+    export HOSTS ARCH CONFOPTS
+    stdbuild \
+    "PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/usr/bin/X11:/usr/freeware/bin" \
+    "LD_LIBRARY_PATH=/usr/gapps/silo/qt/$QTRELEASE/irix_6.5-gcc-3.3/lib:\
+$LD_LIBRARY_PATH" \
+    "PARALLEL=4" \
+    "export PATH LD_LIBRARY_PATH PARALLEL"
+}
+#
+quad64() {
+    HOSTS=${lcun}@quad
+    ARCH=irix_6.5_64
+    CONFOPTS="LDFLAGS=-64 CFLAGS=-64 MAKE=$MAKE"
+    MAKEOPTS="-i"
+    export HOSTS ARCH CONFOPTS MAKEOPTS
+    stdbuild \
+    "PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/usr/bin/X11:/usr/freeware/bin" \
+    "PARALLEL=4" \
+    "export PATH PARALLEL"
+}
+
+ubgl() {
+    ubglxlc
+    ubglblrts_xlc
+    rm -rf $TOPDIR/hdf5/src/sles_9_ppc64*
+}
+
+ubglxlc() {
+    HOSTS=${lcun}@ubgl
+    ARCH=sles_9_ppc64-xlc
+    CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/xlc FC=xlf \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" "
+    export HOSTS ARCH CONFOPTS
+    stdbuild_nobg \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+    if [ "`hostname`" = "ubgl" ] ; then
+        cp -f $TOPDIR/hdf5/src/$ARCH/src/H5Tinit.c $TOPDIR/hdf5/src/.
+    else
+        ssh ${lcun}@ubgl "cp -f --reply=yes $TOPDIR/hdf5/src/$ARCH/src/H5Tinit.c $TOPDIR/hdf5/src/."
+    fi
+}
+
+ubglblrts_xlc() {
+    HOSTS=${lcun}@ubgl
+    ARCH=sles_9_ppc64-blrts_xlc
+    POSTCONFCMDS="cp -f --reply=yes $TOPDIR/hdf5/src/H5Tinit.c $TOPDIR/hdf5/src/$ARCH/src/."
+    if [ "`hostname`" = "ubgl" ] ; then
+        CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc FC=blrts_xlf \
+        CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+        CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+        `grep ^ac_cv_sizeof $TOPDIR/hdf5/src/sles_9_ppc64-xlc/config.log | tr '\n' ' ' ` \
+        --disable-stream-vfd"
+    else
+        CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc FC=blrts_xlf \
+        CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+        CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+        `ssh ${lcun}@ubgl \"grep ^ac_cv_sizeof $TOPDIR/hdf5/src/sles_9_ppc64-xlc/config.log | tr '\n' ' '\"` \
+        --disable-stream-vfd"
+    fi
+    export HOSTS ARCH CONFOPTS POSTCONFCMDS
+    stdbuild_nobg \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+umask 002
+if [ "$1" = "-lc-username" ] ; then
+   lcun=$2
+   shift 2
+fi
+
+# disable the 'automatic' mode of setting which hosts get built
+if false ; then
+    hoth
+    sidious
+    up
+    thunder
+    pengra
+    yana
+    quad
+    ubgl
+else
+ while [ "$*" != "" ]
+ do
+  case $1 in
+    hdf*|-hdf*)
+      skipszip="yes"
+      shift;;
+    skip*|-skip*)
+      skipszip="yes"
+      shift;;
+    all|-a*)
+      hoth
+      sidious
+      up
+      thunder
+      pengra
+      yana
+      quad
+      ubgl
+      shift;;
+    hothgcc|-hothgcc)
+      hothgcc
+      shift;;
+    hothpgc|-hothpgc)
+      hothpgc
+      shift;;
+    hothicc|-hothicc)
+      hothicc
+      shift;;
+    hoth|-ho*)
+      hoth
+      shift;;
+    sun*gcc|-sun*gcc)
+      sunspotgcc
+      shift;;
+    sun*cc|-sun*cc)
+      sunspotcc
+      shift;;
+    sun*|-sun*)
+      sunspot
+      shift;;
+    sidious)
+      sidious
+      shift;;
+    upgcc32|-up*gcc32)
+      upgcc32
+      shift;;
+    up32|-up*32)
+      up32
+      shift;;
+    upgcc64|-up*gcc64)
+      upgcc64
+      shift;;
+    up64|-up*64)
+      up64
+      shift;;
+    upgcc|-upgcc)
+      upgcc
+      shift;;
+    up|-up*)
+      up
+      shift;;
+    thun*icc|-th*icc)
+      thundericc
+      shift;;
+    thun*gcc|-th*gcc)
+      thundergcc
+      shift;;
+    thun*|-th*)
+      thunder
+      shift;;
+    yana*pgc|-ya*pgc)
+      yanapgc
+      shift;;
+    yana*pc|-ya*pc)
+      yanapc
+      shift;;
+    yana*icc|-ya*icc)
+      yanaicc
+      shift;;
+    yana*gcc|-ya*gcc)
+      yanagcc
+      shift;;
+    yana*|-ya*)
+      yana
+      shift;;
+    prism*pgc)
+      prismpgc
+      shift;;
+    prism*pc)
+      prismpc
+      shift;;
+    prism*icc)
+      prismicc
+      shift;;
+    prism*gcc)
+      prismgcc
+      shift;;
+    prism*)
+      prism
+      shift;;
+    pen*icc|-pe*icc)
+      pengraicc
+      shift;;
+    pen*gcc|-pe*gcc)
+      pengragcc
+      shift;;
+    pen*|-pe*)
+      pengra
+      shift;;
+    quad32|-quad32)
+      quad32
+      shift;;
+    quad64|-quad64)
+      quad64
+      shift;;
+    quad|-quad)
+      quad
+      shift;;
+    ubgl|-ubgl)
+      ubgl
+      shift;;
+    tread|-tread)
+      tread
+      shift;;
+    sh*|-sh*)
+      shar
+      shift;;
+    *)
+      shift;;
+    esac
+  done
+fi
diff --git a/svn_bin/get_sys_info b/svn_bin/get_sys_info
new file mode 100755
index 0000000..8262221
--- /dev/null
+++ b/svn_bin/get_sys_info
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Script to iterate over a set of machine names and determine
+# the unique set of machines and compilers on them
+#
+
+#machine_names="alc atlas prism snowbert thunder up yana zeus"
+machine_names="hera zeus up yana prism"
+machine_types=""
+for m in $machine_names; do
+    sys_type=`ssh mcmiller@$m -x 'echo $SYS_TYPE'`
+    machine_types="$machine_types ${m}:$sys_type"
+done
+unique_machine_types=`echo $machine_types | tr ' ' '\n' | tr ':' ' ' | sort -k2 | uniq -f1 | cut -d' ' -f2`
+unique_machine_names=`echo $machine_types | tr ' ' '\n' | tr ':' ' ' | sort -k2 | uniq -f1 | cut -d' ' -f1`
+unique_machine_tnpairs=`echo $machine_types | tr ' ' '\n' | tr ':' ' ' | sort -k2 | uniq -f1 | tr ' ' ':'`
+echo $unique_machine_tnpairs | tr ' ' '\n'
+
+compiler_names="gcc xlc icc pgcc pathcc cc blrts_xlc"
+compile_modes=""
+for ump in $unique_machine_tnpairs; do
+    compilers=
+    um_name=`echo $ump | cut -d':' -f1`
+    um_type=`echo $ump | cut -d':' -f2`
+    for c in $compiler_names; do
+        has_c=`ssh mcmiller@$um_name -x "which $c"`
+        if test $? -eq 0; then
+            compile_modes="$compile_modes ${um_type}_${c}"
+            compilers="$compilers ${um_type}_${c}"
+        fi
+    done
+    echo "For machine name=\"$um_name\", type=\"$um_type\"..."
+    for c in $compilers; do
+        echo "    $c"
+    done
+done
diff --git a/svn_bin/regressiontest b/svn_bin/regressiontest
new file mode 100755
index 0000000..0798c6c
--- /dev/null
+++ b/svn_bin/regressiontest
@@ -0,0 +1,418 @@
+#!/bin/sh
+
+#--------------------------------------------------------------------------------
+#
+# Purpose: Run nightly tests for silo, create HTML and post results to
+# VisIt's testing web pages
+#
+# This script does the following
+#     * builds silo library in its vob
+#     * runs silo's make check create a 'checklog' file
+#     * installs silo library to publicly visible place
+#     * builds VisIt with this silo library
+#     * selects 10% of VisIt's tests, runs them creating its index.html file
+#     * digests checklog, index.html, etc. to produce final html output
+#     * copys final html output to ~visit and adds link at top level
+#
+# Programmer: Mark C. Miller
+# Created:    August 21, 2006
+#
+# Modifications:
+#
+#   Mark C. Miller, Tue Aug 22 08:46:41 PDT 2006
+#   Fixed various issues with initial script development
+#
+#   Mark C. Miller, Tue Aug 22 10:21:42 PDT 2006
+#   Added VisIt tests in both Silo/PDB and Silo/HDF5
+#
+#   Mark C. Miller, Wed Aug 23 08:50:08 PDT 2006
+#   Added PATH stuff
+#
+#   Mark C. Miller, Thu Aug 24 13:54:00 PDT 2006
+#   Added error thresholds to runtest for VisIt's tests. Added code to
+#   skipp tests if no changes
+#
+#   Mark C. Miller, Thu Aug 31 15:50:10 PDT 2006
+#   Fixed problem including view-private files in checksum checks
+#
+#   Mark C. Miller, Tue Sep  5 12:36:16 PDT 2006
+#   Redirected some command error output to /dev/null
+#
+#   Mark C. Miller, Wed Feb  7 22:34:32 PST 2007
+#   Fixed build of visit's data so visit gets built before its data
+#   Made it build visit with -J 3 (3 processors)
+#
+#   Mark C. Miller, Thu Feb  8 08:23:39 PST 2007
+#   Added PATH=...;export PATH lines to just after each ct startview command
+#   so that we get the right path each time we start a new view
+#   changed min/max-error tolerances flags to runtest to pix/avg-diff to
+#   confirm to new argument format.
+#
+#   Mark C. Miller, Thu Feb  8 11:26:01 PST 2007
+#   Changed HTML output to include visit's html output dir. Fixed problems
+#   with incorrect reporting of top-level pass/fail.
+#
+#   Mark C. Miller, Thu Feb  8 16:13:18 PST 2007
+#   Added '-m silo,optimized' to VisIt's runtest
+#
+#   Mark C. Miller, Fri Feb  9 08:33:36 PST 2007
+#   Added backslash chars to quotes surrounding href in code that inserts
+#   a line into visit account's top-level index.html
+#
+#   Mark C. Miller, Sat Feb 10 20:44:53 PST 2007
+#   Added code to populate visit account top-level public_html index file
+#   even when we choose not to run Silo's tests due to lack of any changes
+#   to sources. Made code to wait for an html dir to post to into its own
+#   subroutine.
+#
+#   Mark C. Miller, Mon Feb 12 09:42:02 PST 2007
+#   Sort list of VisIt tests by category
+#
+#   Mark C. Miller, Tue Feb 13 09:07:23 PST 2007
+#   Added email log when deciding to re-run due to changes. Removed tarballs
+#   from VisIt test runs after scp'ing them to visit acct. Added logic to
+#   terminate waiting for current dir after 12 hours.
+#
+#   Mark C. Miller, Wed Feb 14 08:39:43 PST 2007
+#   Fixed problem where md5sums were emailed and not differences in sums
+#
+#   Mark C. Miller, Thu Feb 22 08:04:47 PST 2007
+#   Fixed problem correctly posting fact of skipped test due to no changes
+#
+#   Mark C. Miller, Sat Feb 24 13:16:15 PST 2007
+#   Exclude files in 'lost+found' dir from checksum change testing
+#
+#   Mark C. Miller, Tue Dec  4 07:12:44 PST 2007
+#   Modified to use temporary nersc test install in /gscratch
+#--------------------------------------------------------------------------------
+
+umask 002
+useMake=gmake
+parMake="-j 4"
+tmpRoot="/gscratch/silo_test"
+tmpInstall="$tmpRoot/silo"
+logrecipients="miller treadway"
+dateBase=`date +%Y-%m-%d`
+now=`date`
+PATH=/misc/gapps/mpich/1.2.4/Linux/serial/64/debug/bin:/home/visit/bin:/home/visit/clearcase_bin:/usr/atria/bin:/usr/security/bin:/sbin:/usr/sbin:/usr/bsd:/usr/local/bin:/usr/bin:/bin:/etc:/usr/bin/X11:/usr/local/X11:/usr/etc:/usr/lib:/usr/atria/bin:/usr/ccs/bin:/usr/SUNWspro/bin:.
+export PATH
+
+#
+# Check current error status and, if set, log the given error
+# ifErrorSendMessage args...
+#     $1 <error-flag>
+#     $2 <subject-text>
+#     $3 <optional file or string containing details>
+#     $4 <fatal-must-exit-flag>
+#
+ifErrorSendMessage() {
+    if test "$1" != "0" && test "$1" != ""; then
+        rm -rf mailmsg
+        cat > mailmsg << EOF
+From: silo at lists.llnl.gov
+Subject: $2
+This is a message from Silo's automatic test run
+
+$2
+EOF
+        if test -n "$3"; then
+            if test -e $3; then
+	        echo "##################################################" >> mailmsg
+                cat $3 >> mailmsg
+	        echo "##################################################" >> mailmsg
+            else
+	        echo "##################################################" >> mailmsg
+                echo "$3" >> mailmsg
+	        echo "##################################################" >> mailmsg
+            fi
+        fi
+        for user in $logrecipients; do
+            /home/visit/bin/sendregressionmail $user mailmsg
+        done
+        if test -n "$4" && test $4 -eq 1; then
+	    arg1Len=`expr length "$1"`
+	    if test $arg1Len -lt 3; then
+                exit $1
+	    else
+	        exit 1
+	    fi
+        fi
+	rm -f mailmsg
+    fi
+}
+
+#
+# Function to search visit account's public_html dir and
+# find most recent posting of silo test results
+htmlCiteMostRecentSiloDir () {
+    mruSiloDir=`ls -1tdF /home/visit/public_html/*/silo | grep -v @$ | head -n 1 | cut -d'/' -f5`
+    mruSiloFailed=`grep Failed /home/visit/public_html/$mruSiloDir/silo/index.html`
+    ssh visit at hoth -x "cd $todaysDir ; ln -s ../$mruSiloDir/silo ."
+    if test "$mruSiloFailed" = ""; then
+        ssh visit at hoth -x "/bin/sed -i \"10 i \<tr><td align=center><b><a href=\\\"$todaysBase/silo\\\">silo</a></b></td><td align=center bgcolor=#00ff00><b>SKIPPED</b></td><td align=center><i>PASSED most recent run</i></td></tr>\" /home/visit/public_html/index.html"
+    else
+        ssh visit at hoth -x "/bin/sed -i \"10 i \<tr><td align=center><b><a href=\\\"$todaysBase/silo\\\">silo</a></b></td><td align=center bgcolor=#ff0000><b>SKIPPED</b></td><td align=center><i>FAILED most recent run</i></td></tr>\" /home/visit/public_html/index.html"
+    fi
+}
+
+#
+# Function to wait until visit account's public_html dir
+# has today's dir to post results to (generated by VisIt's
+# regression test tools) and return the name of that dir
+#
+waitForTodaysDir () {
+    todaysDir=`ls -d /home/visit/public_html/${dateBase}* 2>/dev/null`
+    theHour=`date +%k`
+    theHour=`expr $theHour + 12`
+    while test "$todaysDir" = ""; do
+        sleep 600
+        todaysDir=`ls -d /home/visit/public_html/${dateBase}* 2>/dev/null`
+        if test `date +%k` -gt $theHour; then
+            ifErrorSendMessage 1 "Silo tests stopped waiting for today's dir" "" 1
+	fi
+    done
+    echo $todaysDir
+}
+
+#
+#
+# Start up the test view, cd there, remove old test install point
+#
+cleartool startview silo_VOBowner_test  1> /dev/null 2>&1
+cd /view/silo_VOBowner_test/data_vobs/Silo
+
+#
+# First, see if we even need to run the tests
+#
+cleartool ls -recurse -view -short | grep -v md5sums_last.txt | xargs -n 1 rm -rf 2>/dev/null
+find . -type f \! -name "md5sums*.txt" -exec md5sum {} \; | grep -v .mvfs_ | grep -v 'lost+found' 1>md5sums_current.txt 2>&1
+if test -e md5sums_last.txt; then
+    if test "`diff md5sums_last.txt md5sums_current.txt`" = ""; then
+        todaysDir=`waitForTodaysDir`
+        todaysBase=`basename $todaysDir`
+	htmlCiteMostRecentSiloDir
+        ifErrorSendMessage 1 "Silo tests skipped. No changes since last run" "" 1
+    else
+        diff md5sums_last.txt md5sums_current.txt 1>md5sums_diffs.txt 2>&1
+        chmod 660 md5sums_last.txt 1>/dev/null 2>&1
+        mv -f md5sums_current.txt md5sums_last.txt 1>/dev/null 2>&1
+        chmod 440 md5sums_last.txt 1>/dev/null 2>&1
+        ifErrorSendMessage 1 "Running silo tests. Changed files listed" md5sums_diffs.txt
+	rm -f md5sums_diffs.txt
+    fi
+else
+    mv -f md5sums_current.txt md5sums_last.txt 1>/dev/null 2>&1
+    chmod 440 md5sums_last.txt 1>/dev/null 2>&1
+fi
+
+#
+# Configure silo library and make clean
+#
+rm -rf $tmpRoot 1>/dev/null 2>&1
+mkdir $tmpRoot 1>/dev/null 2>&1
+chmod 775 $tmpRoot 1>/dev/null 2>&1
+./configure --prefix=$tmpInstall --with-hdf5=/usr/gapps/silo/hdf5/1.6.6/linux_rhel3-gcc-3.2.3/include,/usr/gapps/silo/hdf5/1.6.6/linux_rhel3-gcc-3.2.3/lib --with-szlib=/misc/gapps/silo/szip/2.1/linux_rhel3-gcc-3.2.3/include,/misc/gapps/silo/szip/2.1/linux_rhel3-gcc-3.2.3/lib 1>configlog --with-Qt-dir=/misc/gapps/silo/qt/3.3.8/i386-pc-linux-gcc-3.2.3 2>&1
+$useMake clean 1>/dev/null 2>&1
+uncleanedFiles=`find . -regex '.*\.o$' | grep -v -e '_pure_p9_c0_'`
+ifErrorSendMessage "$uncleanedFiles" "'make clean' missed some files" $uncleanedFiles 0
+if test ! "$uncleanedFiles" = ""; then
+    find . -regex '.*\.o$' -exec rm -f {} \; 1> /dev/null 2>&1
+fi
+
+#
+# Make silo library
+#
+$useMake $parMake 1>> buildlog 2>&1
+ifErrorSendMessage $? "Failed to build Silo library" buildlog 1
+
+#
+# Run silo's tests
+#
+$useMake $parMake check 1>checklog 2>&1
+ifErrorSendMessage $? "Failed to run Silo's tests" checklog 1
+cp checklog $tmpRoot
+
+#
+# Ok, now build VisIt with this Silo
+#
+$useMake install 1>/dev/null 2>&1
+cd /gscratch/miller/silo_visit_test/trunk/src
+PATH=/misc/gapps/mpich/1.2.4/Linux/serial/64/debug/bin:/home/visit/bin:/home/visit/clearcase_bin:/usr/atria/bin:/usr/security/bin:/sbin:/usr/sbin:/usr/bsd:/usr/local/bin:/usr/bin:/bin:/etc:/usr/bin/X11:/usr/local/X11:/usr/etc:/usr/lib:/usr/atria/bin:/usr/ccs/bin:/usr/SUNWspro/bin:.
+export PATH
+env CXXFLAGS=-g MAKE=gmake ./configure --with-silo_include=$tmpInstall/include --with-silo_library=$tmpInstall/lib --with-hdf5=/usr/gapps/silo/hdf5/1.6.6/linux_rhel3-gcc-3.2.3/include,/usr/gapps/silo/hdf5/1.6.6/linux_rhel3-gcc-3.2.3/lib --with-szip=/misc/gapps/silo/szip/2.1/linux_rhel3-gcc-3.2.3/include,/misc/gapps/silo/szip/2.1/linux_rhel3-gcc-3.2.3/lib --enable-parallel 1>configlog 2>&1
+cat config.log >> configlog
+ifErrorSendMessage $? "Failed to configure VisIt" configlog 1
+gmake -j 3 1>buildlog 2>&1
+ifErrorSendMessage $? "Failed to build VisIt" buildlog 1
+# short term fix for repo src tree changes
+sed -i -e 's|../src/exe/visitconvert_ser|../exe/visitconvert_ser|' data/Makefile
+sed -i -e 's|../src/bin/visitconvert|../bin/visitconvert|' data/Makefile
+cd data
+gmake clean 1>/dev/null 2>&1
+gmake test 1>makedatalog 2>&1
+ifErrorSendMessage $? "Failed to make VisIt's Silo/PDB data" makedatalog 1
+cd ../test
+# short term fix for repo src tree changes
+sed -i -e 's|^exepath="../src/bin/visit"|exepath="../bin/visit"|' runtest
+sed -i -e 's|^#  CLARGS: -cli -s ../src/bin/visitdiff.py \(.*\)|#  CLARGS: -cli -s ../bin/visitdiff.py \1|' tests/databases/diff.py
+rm -f ~miller/.visit/linux-intel/plugins/databases/*.so
+
+#
+# Examine VisIt's test .py files and find "best" 10% to run
+# the "best" is determined by number of references to silo data files
+#
+rm -f datafiles.txt
+grep -e .silo tests/*/*.py | grep OpenDatabase | cut -d'"' -f2 | grep -v database | sort | uniq | xargs -n 1 basename >> datafiles.txt
+pyFiles=`ls -1 tests/*/*.py`
+pyidx=1
+pyScores=
+for pfile in $pyFiles; do
+    pyScores[$pyidx]=`grep -f datafiles.txt $pfile | sort | uniq | wc -l`
+    pyidx=`expr $pyidx + 1`
+done
+rm -f scores.txt sorted_scores.txt
+pyidx=1
+for pfile in $pyFiles; do
+    echo "${pfile} ${pyScores[$pyidx]}" >> scores.txt
+    pyidx=`expr $pyidx + 1`
+done
+cat scores.txt | sort -r -n -k 2 > sorted_scores.txt
+tenPercent=`expr $pyidx / 10`
+testsToRun=`head -n $tenPercent sorted_scores.txt | cut -d' ' -f1 | sort`
+rm -f datafiles.txt scores.txt sorted_scores.txt
+
+#
+# Run selected VisIt tests for both PDB and HDF5 data
+# Note: since its an optimized build, use non-zero error tolerances 
+# Note: We also need to tell runtest this is an optimized run to
+# get the correct diffing behavior
+#
+./runtest -m silo,optimized -notrackmem -q -pixdiff 10 -avgdiff 10 $testsToRun
+siloVisItPDBStatus=$?
+cp -R html html_pdb 1>/dev/null 2>&1
+chgrp -R visit html_pdb 1>/dev/null 2>&1
+chmod -R g+rwX html_pdb 1>/dev/null 2>&1
+tar cf - html_pdb | gzip > $tmpRoot/html_pdb.tar.gz
+rm -rf html_pdb
+cd ../data
+rm -f makedatalog
+gmake testh5 1>makedatalog 2>&1
+ifErrorSendMessage $? "Failed to make VisIt's Silo/HDF5data" makedatalog 1
+cd ../test
+./runtest -m hdf5,silo,optimized -notrackmem -q -pixdiff 10 -avgdiff 10 $testsToRun
+siloVisItHDF5Status=$?
+cp -R html html_hdf5 1>/dev/null 2>&1
+chgrp -R visit html_hdf5 1>/dev/null 2>&1
+chmod -R g+rwX html_hdf5 1>/dev/null 2>&1
+tar cf - html_hdf5 | gzip > $tmpRoot/html_hdf5.tar.gz
+rm -rf html_hdf5
+
+#
+# Back to silo vob
+#
+cd /view/silo_VOBowner_test/data_vobs/Silo
+PATH=/misc/gapps/mpich/1.2.4/Linux/serial/64/debug/bin:/home/visit/bin:/home/visit/clearcase_bin:/usr/atria/bin:/usr/security/bin:/sbin:/usr/sbin:/usr/bsd:/usr/local/bin:/usr/bin:/bin:/etc:/usr/bin/X11:/usr/local/X11:/usr/etc:/usr/lib:/usr/atria/bin:/usr/ccs/bin:/usr/SUNWspro/bin:.
+export PATH
+
+#
+# Construct HTML for results from silo library tests
+#
+siloHtmlFile="silo_index.html"
+rm -f $siloHtmlFile
+echo "<html><head><title>Silo Library Results - $now</title></head>" >> $siloHtmlFile
+echo "<body bgcolor=\"#a0a0f0\">"                                    >> $siloHtmlFile
+echo "<H1>Results of Silo Library Tests - $now</H1>"                 >> $siloHtmlFile
+echo "<table border>"                                                >> $siloHtmlFile
+echo " <tr>"                                                         >> $siloHtmlFile
+echo "  <td><b><i>Test Case</b></i></td>"                            >> $siloHtmlFile
+echo "  <td><b><i>Status</b></i></td>"                               >> $siloHtmlFile
+echo " </tr>"                                                        >> $siloHtmlFile
+echo ""                                                              >> $siloHtmlFile
+
+testNames=`cat ${tmpRoot}/checklog| grep -e "^ *[0-9]*:" | cut -d':' -f2 | cut -d' ' -f1-10 | sed "s/  /%%/" | sed "s/ /~/g" | cut -d'%' -f1`
+testStats=`cat ${tmpRoot}/checklog| grep -e "^ *[0-9]*:" | cut -d':' -f2 | cut -d' ' -f11- | sed "s/ /~/g"`
+testidx=1
+anyerror=0
+for tname in $testNames; do
+    theName=`echo $testNames | cut -d' ' -f$testidx | sed "s/~/ /g"`
+    theStat=`echo $testStats | cut -d' ' -f$testidx | sed "s/~/ /g"`
+    echo " <tr>"                                                         >> $siloHtmlFile
+    echo " <td><b><i>$theName</b></i></td>"                              >> $siloHtmlFile
+    if test "`echo $theStat | grep ok`" != ""; then
+        echo "  <td bgcolor="#00ff00"><b><i>Succeeded</b></i></td>"      >> $siloHtmlFile
+    else
+        echo "  <td bgcolor="#ff0000"><b><i>Unacceptable</b></i></td>"   >> $siloHtmlFile
+	anyerror=1
+    fi
+    echo " </tr>"                                                        >> $siloHtmlFile
+    testidx=`expr $testidx + 1`
+done
+
+echo "</table>"   >> $siloHtmlFile
+echo "</html>"    >> $siloHtmlFile
+
+#
+# Construct top-level HTML file for this round of silo tests
+#
+topHtmlFile="index.html"
+rm -f $topHtmlFile
+echo "<html><head><title>Silo Regression Results - $now</title></head>" >> $topHtmlFile
+echo "<body bgcolor=\"#a0a0f0\">"                                       >> $topHtmlFile
+echo "<H1>Results of Silo Regression Tests - $now</H1>"                 >> $topHtmlFile
+echo "<table border>"                                                >> $topHtmlFile
+echo " <tr>"                                                         >> $topHtmlFile
+echo "  <td><b><i>Test</b></i></td>"                                 >> $topHtmlFile
+echo "  <td><b><i>Status</b></i></td>"                               >> $topHtmlFile
+echo " </tr>"                                                        >> $topHtmlFile
+echo ""                                                              >> $topHtmlFile
+echo " <tr>"                                                         >> $topHtmlFile
+echo " <td><b><i>Silo Library</b></i></td>"                          >> $topHtmlFile
+if test $anyerror -ne 0; then
+    echo "  <td bgcolor="#ff0000"><b><i><a href="$siloHtmlFile">Failed</a></b></i></td>"   >> $topHtmlFile
+else
+    echo "  <td bgcolor="#00ff00"><b><i><a href="$siloHtmlFile">Succeeded</a></b></i></td>"      >> $topHtmlFile
+fi
+echo " </tr>"                                                        >> $topHtmlFile
+echo " <tr>"                                                         >> $topHtmlFile
+echo " <td><b><i>VisIt Tests on Silo/PDB</b></i></td>"               >> $topHtmlFile
+if test $siloVisItPDBStatus -ne 0; then
+    echo "  <td bgcolor="#ff0000"><b><i><a href="html_pdb/index.html">Failed</a></b></i></td>"   >> $topHtmlFile
+else
+    echo "  <td bgcolor="#00ff00"><b><i><a href="html_pdb/index.html">Succeeded</a></b></i></td>"      >> $topHtmlFile
+fi
+echo " </tr>"                                                        >> $topHtmlFile
+echo " <tr>"                                                         >> $topHtmlFile
+echo " <td><b><i>VisIt Tests on Silo/HDF5</b></i></td>"              >> $topHtmlFile
+if test $siloVisItHDF5Status -ne 0; then
+    echo "  <td bgcolor="#ff0000"><b><i><a href="html_hdf5/index.html">Failed</a></b></i></td>"   >> $topHtmlFile
+else
+    echo "  <td bgcolor="#00ff00"><b><i><a href="html_hdf5/index.html">Succeeded</a></b></i></td>"      >> $topHtmlFile
+fi
+echo " </tr>"                                                        >> $topHtmlFile
+echo "</table>"   >> $topHtmlFile
+echo "</html>"    >> $topHtmlFile
+
+todaysDir=`waitForTodaysDir`
+todaysBase=`basename $todaysDir`
+
+#
+# Copy results to visit's public directory and update main index.html
+#
+ssh visit at hoth -x "mkdir $todaysDir/silo"
+scp $siloHtmlFile $topHtmlFile $tmpRoot/html_pdb.tar.gz $tmpRoot/html_hdf5.tar.gz visit at hoth:$todaysDir/silo/.
+ssh visit at hoth -x "cd $todaysDir/silo ; gunzip < html_pdb.tar.gz | tar xf - ; rm -f html_pdb.tar.gz"
+ssh visit at hoth -x "cd $todaysDir/silo ; gunzip < html_hdf5.tar.gz | tar xf - ; rm -f html_hdf5.tar.gz"
+
+#
+# Update visit account's top-level public html file
+# Note: 3 backslash chars ('\') needed before quotes surrounding
+# href so that VisIt's html generation code won't miss this
+# line that we're adding when it re-scans the file
+#
+if test $anyerror -eq 0 && test $siloVisItPDBStatus -eq 0 && test $siloVisItHDF5Status -eq 0; then
+    ssh visit at hoth -x "/bin/sed -i \"10 i \<tr><td align=center><b><a href=\\\"$todaysBase/silo\\\">silo</a></b></td><td align=center bgcolor=#00ff00><b>PASSED</b></td><td align=center><i>$now</i></td></tr>\" /home/visit/public_html/index.html"
+    ifErrorSendMessage 1 "Silo Passed nightly tests" "" 0 
+else
+    ssh visit at hoth -x "/bin/sed -i \"10 i \<tr><td align=center><b><a href=\\\"$todaysBase/silo\\\">silo</a></b></td><td align=center bgcolor=#ff0000><b>FAILED</b></td><td align=center><i>$now</i></td></tr>\" /home/visit/public_html/index.html"
+    ifErrorSendMessage 1 "Silo Failed nightly tests" "" 0 
+fi
diff --git a/svn_bin/silo-release-closed b/svn_bin/silo-release-closed
new file mode 100755
index 0000000..45c8544
--- /dev/null
+++ b/svn_bin/silo-release-closed
@@ -0,0 +1,1338 @@
+#!/bin/bash
+#######################################################################
+#
+# silo-release-closed - Build and install a tarball on the closed network.
+#
+# Author: Thomas Treadway
+# Date: Fri Dec 14 15:13:23 PST 2007
+#
+# Usage:
+#    silo-release-closed version [host-options]
+#
+# Modifications:
+#    Thomas R. Treadway, Wed Oct  3 13:48:15 PDT 2007
+#    Removed gps, added up
+#    Added build of silex, and included szip
+#
+#    Thomas R. Treadway, Fri Nov  2 16:17:59 PDT 2007
+#    Tunning for release 4.6
+#
+#    Thomas R. Treadway, Wed Nov 14 12:54:37 PST 2007
+#    Corrected some of the pathc issues.
+#
+#    Thomas R. Treadway, Thu Dec 27 14:06:40 PST 2007
+#    reformatted, added -final, -clean, all-lc, and all-bdiv  options.
+#
+#######################################################################
+#
+function usage() {
+  printf "Usage: %s version [-lc-username <lc-username>] [-check-install | -no-install | -final | -clean] [-bdiv-username <username>] [-bdiv-host <hostname>] [all|all-lc|all-bdiv|localhost|sunset|purple|uv|gauss|lilac|rhea|bgl]" $0
+
+  printf "\n"
+  printf "Build options\n"
+  printf "                  -- default, runs make install\n"
+  printf -- "-check-install -- runs make check before make install\n"
+  printf -- "-no-install    -- runs make only no make install step\n"
+  printf -- "-final {host}  -- creates links to silo/current directory\n"
+  printf "                  and other convenient symbolic links\n"
+  printf -- "-clean {host}  -- removes the build directories\n"
+  printf "\n"
+  printf "Host select options\n"
+  printf "all            -- tries to build on both BDiv, and LC host\n"
+  printf "all-lc         -- tries to build on LC host only\n"
+  printf "all-bdiv       -- tries to build on both BDiv host only\n"
+  printf "{hostopt}      -- host, host list or host option list, such as:\n"
+  printf "               localhost, localhostgcc, localhosticc, localhostpgc,\n"  printf "               sunset, sunsetcc, purple, purple32, purple64,\n"
+  printf "               purple32gcc, purple64gcc, gauss, gaussgcc, gaussicc,\n"
+  printf "               rhea, rheagcc, rheaicc, lilac, lilacgcc, lilacicc,\n"
+  printf "               all, all-lc, all-bd, etc.\n"
+  printf "{host}         -- host name or host name list, such as:\n"
+  printf "               localhost, sunset, purple, uv, gauss, lilac, rhea,\n"
+  printf "               all, all-lc, all-bd\n"
+  printf "\n"
+  printf "Silo release installing script. Assumes a tarball exist in\n"
+  printf "current directory, named something like silo-\$1.tar.gz.\n"
+  printf "This script will attempt to:\n"
+  printf "  1) copy tarball to B Div's /usr/gapps/silo/$VERSION and\n"
+  printf "     LC's /usr/gapps/silo/$VERSION.\n"
+  printf "  2) untar in /usr/gapps/silo/$VERSION/test.\n"
+  printf "  3) start remote scripts on the target machines that\n"
+  printf "     perform a configure, make check, followed by a make install\n"
+  printf "     into directories /usr/gapps/silo/$VERSION/$ARCH.\n"
+  printf "Log files are stored at ./ARCH.log\n"
+  printf "You may want to run this script on both the LC and BDiv network.\n"
+  printf "Typical usage:\n"
+  printf "ssh lilac\n"
+  printf "ftp fis\n"
+  printf "cd FROM\n"
+  printf "get silo-4.6.1.tar.gz\n"
+  printf "quit\n"
+  printf "tar zxf silo-4.6.1.tar.gz\n"
+  printf "cp silo-4.6.1/clearcase_bin/silo-release-closed .\n"
+  printf "./silo-release-closed 4.6.1 all-lc\n"
+  printf "./silo-release-closed 4.6.1 final all-lc\n"
+  printf "./silo-release-closed 4.6.1 clean all-lc\n"
+}
+
+function build() {
+    ssh ${HOSTS} "/bin/bash" << EOF > ${ARCH}.log 2>&1 &
+    $*
+    umask 002
+    rm -rf $TOPDIR/$VERSION/test/$ARCH
+    mkdir $TOPDIR/$VERSION/test/$ARCH
+    cd $TOPDIR/$VERSION/test/$ARCH
+    unsetenv QTDIR
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH \
+--disable-browser --disable-silex --without-hdf5 --without-szlib $CONFOPTS
+    $MAKE $MAKEOPTS
+    if [ "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check && $MAKE $MAKEOPTS install
+    elif [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE $MAKEOPTS install
+    fi
+    $MAKE $MAKEOPTS clean
+    chmod -R g+w $TOPDIR/$VERSION/$ARCH
+    unsetenv QTDIR
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH $CONFOPTS
+    $MAKE $MAKEOPTS
+    if [ "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check && $MAKE $MAKEOPTS install
+    elif [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE $MAKEOPTS install
+    fi
+    chmod -R a+rX,ug+w $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+rX,ug+w $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+EOF
+}
+function build2() {
+    ssh ${HOSTS} "/bin/bash" << EOF > ${ARCH}.log 2>&1 &
+    $*
+    umask 002
+    rm -rf $TOPDIR/$VERSION/test/$ARCH
+    mkdir $TOPDIR/$VERSION/test/$ARCH
+    cd $TOPDIR/$VERSION/test/$ARCH
+    unsetenv QTDIR
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH \
+--disable-browser --disable-silex --without-hdf5 --without-szlib $CONFOPTS
+    $MAKE $MAKEOPTS
+    if [ "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check && $MAKE $MAKEOPTS install
+    elif [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE $MAKEOPTS install
+    fi
+    $MAKE $MAKEOPTS clean
+    chmod -R g+w $TOPDIR/$VERSION/$ARCH
+    unsetenv QTDIR
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH $CONFOPTS2
+    $MAKE $MAKEOPTS
+    if [ "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check && $MAKE $MAKEOPTS install
+    elif [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE $MAKEOPTS install
+    fi
+    chmod -R a+rX,ug+w $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+rX,ug+w $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+EOF
+}
+
+function localhost() {
+  localhostgcc
+#  localhostpgc - fails to find include file float.h during compile
+#  localhosticc - fails to find libstdc++_shared during configure
+}
+function localhostfinal() {
+    ssh ${bdun}@${bdhost} "/bin/bash" << EOF >> linux_rhel3-gcc-3.2.3.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/linux_rhel3-gcc-3.2.3
+    for FILE in $BININSTALLS
+    do if [[ -e /misc/gapps/Linux/bin/\$FILE ]] ; then
+          rm -f /misc/gapps/Linux/bin/\$FILE
+       fi
+    done
+    PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:/usr/security/bin
+    LD_LIBRARY_PATH=/usr/lib:/lib
+    export PATH LD_LIBRARY_PATH
+    gmake bindir=/misc/gapps/Linux/bin install-exec
+    for FILE in $BININSTALLS
+    do chmod a+rX,ug+w /misc/gapps/Linux/bin/\$FILE
+       chgrp visit /misc/gapps/Linux/bin/\$FILE
+    done
+    for ARCHDIR in "linux_rhel3-gcc-3.2.3" "linux_rhel3-pgc-4.0" \
+        "linux_rhel3-icc-8.1"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/linux/hdfview \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+    done
+    for ARCHDIR in "linux_rhel3-pgc-4.0" "linux_rhel3-icc-8.1"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+       ln -s $TOPDIR/$VERSION/linux_rhel3-gcc-3.2.3/bin/silex \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+    done
+EOF
+}
+function localhostclean() {
+    ssh ${bdun}@${bdhost} "/bin/bash" << EOF >> linux_rhel3-gcc-3.2.3.log 2>&1
+    for ARCHDIR in "linux_rhel3-gcc-3.2.3" "linux_rhel3-pgc-4.0" \
+        "linux_rhel3-icc-8.1"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+
+function localhostgcc() {
+    HOSTS="${bdun}@${bdhost}"
+    ARCH="linux_rhel3-gcc-3.2.3"
+    CONFOPTS="FC=g77 F77=g77 \
+    FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals LDFLAGS=-L/usr/X11R6/lib"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+function localhostpgc() {
+    HOSTS="${bdun}@${bdhost}"
+    ARCH="linux_rhel3-pgc-4.0"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=pgf77 --disable-silex"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:/usr/local/pgi/linux86/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/pgi/linux86/lib" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7128 at helios.llnl.gov:7127 at helios.llnl.gov" \
+    "export PATH LD_LIBRARY_PATH LM_LICENSE_FILE"
+}
+function localhosticc() {
+    HOSTS="${bdun}@${bdhost}"
+    ARCH="linux_rhel3-icc-8.1"
+    CONFOPTS="CC=icc CXX=icpc FC=ifort LDFLAGS=-lstdc++ --disable-silex"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/local/pgi/linux86/6.0/bin:/usr/security/bin:\
+/usr/local/intel/compiler81/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/intel/compiler81/lib" \
+    "INTEL_LICENSE_FILE=7127 at helios.llnl.gov" \
+    "LM_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat:\
+7128 at helios.llnl.gov:7127 at helios.llnl.gov" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE LM_LICENSE_FILE"
+}
+
+function sunset() {
+  sunsetgcc
+  sunsetcc
+}
+function sunsetfinal() {
+    ssh sunset "/bin/bash" << EOF >> sunos_57.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/sunos_57
+    for FILE in $BININSTALLS
+    do if [[ -e /misc/gapps/SunOS/bin/\$FILE ]] ; then
+          rm -f /misc/gapps/SunOS/bin/\$FILE
+       fi
+    done
+    PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin
+    LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
+    export PATH LD_LIBRARY_PATH
+    gmake bindir=/misc/gapps/SunOS/bin install-exec
+    for FILE in $BININSTALLS
+    do chmod a+rX,ug+w /misc/gapps/SunOS/bin/\$FILE
+       chgrp visit /misc/gapps/SunOS/bin/\$FILE
+    done
+    ln -s $TOPDIR/$VERSION/sunos_57/bin/silex \
+       $TOPDIR/$VERSION/sunos_57-cc-5.2/bin/silex
+    chgrp visit $TOPDIR/$VERSION/sunos_57-cc-5.2/bin/silex
+EOF
+}
+function sunsetclean() {
+    ssh sunset "/bin/bash" << EOF >> sunos_57.log 2>&1
+    for ARCHDIR in "sunos_57" "sunos_57-cc-5.2"
+    do rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+    done
+EOF
+}
+function sunsetgcc() {
+    HOSTS="sunset"
+    ARCH="sunos_57"
+    CONFOPTS="FC=g77 F77=g77 \
+    FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    MAKE="make"
+    export HOSTS ARCH CONFOPTS MAKE
+    build \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+function sunsetcc() {
+    HOSTS="sunset"
+    ARCH="sunos_57-cc-5.2"
+    CONFOPTS="FC=g77 F77=g77 \
+    FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    CONFOPTS2="CC=cc CXX=CC FC=f77 \
+LDFLAGS=-L/usr/local/lib --disable-silex --without-readline \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/sparc-sun-solaris-cc-5.2 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/sparc-sun-solaris-cc-5.2/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/sparc-sun-solaris-cc-5.2/lib"
+    MAKE="make"
+    export HOSTS ARCH CONFOPTS CONFOPTS2 MAKE
+    build2 \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+function macosfinal() {
+    ssh macos "/bin/bash" << EOF
+    cd $TOPDIR/$VERSION/test/i386-apple-darwin8-gcc-4.0.1
+    PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin
+    export PATH
+    make bindir=/misc/gapps/Darwin/bin install-exec
+    for FILE in $BININSTALLS
+    do chmod a+rX,ug+w /misc/gapps/Darwin/bin/\$FILE
+       chgrp visit /misc/gapps/Darwin/bin/\$FILE
+    done
+    ln -s $TOPDIR/hdfview/MacOSX-i386/hdfview/HDFView.app \
+       $TOPDIR/$VERSION/i386-apple-darwin8-gcc-4.0.1/bin/HDFView.app
+    chgrp visit $TOPDIR/$VERSION/i386-apple-darwin8-gcc-4.0.1/bin/HDFView.app
+EOF
+}
+function macosclean() {
+    ssh macos "/bin/bash" << EOF
+    rm -rf $TOPDIR/$VERSION/test/i386-apple-darwin8-gcc-4.0.1
+EOF
+}
+function macos() {
+    HOSTS="macos"
+    ARCH="i386-apple-darwin8-gcc-4.0.1"
+    CONFOPTS="--enable-shared"
+    MAKE="make" 
+    export HOSTS ARCH CONFOPTS MAKE
+    build \
+    "PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin" \
+    "export PATH"
+}
+
+function purple() {
+# not using gcc
+# use gmake for parallel seems to hang
+# 32-bit and 64-bit compiles
+  purple64
+  purple32
+  purplegcc
+}
+function purplefinal() {
+    ssh ${lcun}@purple "/bin/bash" << EOF >> aix_5_64_fed.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/aix_5_64_fed
+    for ARCHDIR in "aix_5_64" "aix_5_64_fed" "aix_5_ll"
+    do
+       for FILE in $BININSTALLS
+       do if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             rm -f /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+       done
+       PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin
+       OBJECT_MODE=64
+       export PATH OBJECT_MODE
+       gmake bindir=/usr/gapps/bin/\$ARCHDIR install-exec
+       for FILE in $BININSTALLS
+       do
+          if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             chmod a+rX,ug+w /usr/gapps/bin/\$ARCHDIR/\$FILE
+             chgrp visit /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+       done
+    done
+    for ARCHDIR in "aix_5_ll" "aix_5_64_fed" "aix_5_ll-gcc" "aix_5_64_fed-gcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/hdfview/AIX/hdfview \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+    done
+    for ARCHDIR in "aix_5_ll" "aix_5_ll-gcc" "aix_5_64_fed-gcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/$VERSION/aix_5_64_fed/bin/silex \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+    done
+EOF
+}
+function purpleclean() {
+    ssh ${lcun}@purple "/bin/bash" << EOF >> aix_5_64_fed.log 2>&1
+    for ARCHDIR in "aix_5_ll" "aix_5_64_fed" "aix_5_ll-gcc" "aix_5_64_fed-gcc" \
+        "linux_rhel3-icc-9.1"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+function purple32() {
+    HOSTS="${lcun}@purple"
+    ARCH="aix_5_ll"
+    CONFOPTS="CFLAGS=-q32 LDFLAGS=-q32 AR=\"ar -X32\" --disable-silex"
+    CONFOPTS2="CFLAGS=-q32 LDFLAGS=-q32 AR=\"ar -X32\" --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/aix_5_ll \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_ll/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_ll/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+function purple64() {
+    HOSTS="${lcun}@purple"
+    ARCH="aix_5_64_fed"
+    CONFOPTS="CFLAGS=-q64 LDFLAGS=-q64 AR=\"ar -X64\""
+    CONFOPTS2="CFLAGS=-q64 LDFLAGS=-q64 AR=\"ar -X64\" --enable-silex \
+--with-Qt-include-dir=/usr/gapps/silo/qt/3.3.8/aix_5_64_fed/include \
+--with-Qt-bin-dir=/usr/gapps/silo/qt/3.3.8/aix_5_64_fed/bin \
+--with-Qt-lib-dir=/usr/gapps/silo/qt/3.3.8/aix_5_64_fed/lib \
+--with-Qt-lib=\"qt-mt -lSM -lICE  -L/usr/X11R6/lib -lX11 -lXext -lXt -lXi\""
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+
+function purplegcc() {
+# use gmake for parallel seems to hang
+# 32-bit and 64-bit compiles
+  purplegcc32
+  purplegcc64
+}
+function purplegcc32() {
+    HOSTS="${lcun}@purple"
+    ARCH="aix_5_ll-gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix32 -mminimal-toc\" CXXFLAGS=\"-maix32 -mminimal-toc\" \
+LDFLAGS=-maix32 AR=\"ar -X32\""
+    CONFOPTS2="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix32 -mminimal-toc\" CXXFLAGS=\"-maix32 -mminimal-toc\" \
+LDFLAGS=-maix32 AR=\"ar -X32\" --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/aix_5_ll-gcc \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_ll-gcc/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_ll-gcc/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+function purplegcc64() {
+    HOSTS="${lcun}@purple"
+    ARCH="aix_5_64_fed-gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix64 -mminimal-toc\" CXXFLAGS=\"-maix64 -mminimal-toc\" \
+LDFLAGS=-maix64 AR=\"ar -X64\" \
+PYTHON_CPPFLAGS=-I/usr/apps/python64/include/python2.4"
+    CONFOPTS2="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix64 -mminimal-toc\" CXXFLAGS=\"-maix64 -mminimal-toc\" \
+LDFLAGS=-maix64 AR=\"ar -X64\" --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/aix_5_64_fed-gcc \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_64_fed-gcc/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/aix_5_64_fed-gcc/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+
+function lilac() {
+  lilacgcc
+  lilacicc
+}
+
+function lilacfinal() {
+    ssh ${lcun}@lilac "/bin/bash" << EOF >> chaos_3_x86_elan3.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/chaos_3_x86_elan3
+    for FILE in $BININSTALLS
+    do if [[ -e /usr/gapps/bin/chaos_3_x86_elan3/\$FILE ]] ; then
+          rm -f /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+       fi
+    done
+    PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin
+    export PATH
+    gmake bindir=/usr/gapps/bin/chaos_3_x86_elan3 install-exec
+    for FILE in $BININSTALLS
+    do
+       if [[ -e /usr/gapps/bin/chaos_3_x86_elan3/\$FILE ]] ; then
+          chmod a+rX,ug+w /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+          chgrp visit /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+       fi
+    done
+    for ARCHDIR in "chaos_3_x86_elan3" "chaos_3_x86_elan3-icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/hdfview/Linux/hdfview \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+    done
+    for ARCHDIR in "chaos_3_x86_elan3-icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/$VERSION/chaos_3_x86_elan3/bin/silex \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+    done
+EOF
+}
+function lilacclean() {
+    ssh ${lcun}@lilac "/bin/bash" << EOF >> chaos_3_x86_elan3.log 2>&1
+    for ARCHDIR in "chaos_3_x86_elan3" "chaos_3_x86_elan3-icc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+
+function lilacgcc() {
+    HOSTS="${lcun}@lilac"
+    ARCH="chaos_3_x86_elan3"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+        FFLAGS=\"-fno-second-underscore -Wno-globals\" "
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+function lilacicc() {
+    HOSTS="${lcun}@lilac"
+    ARCH="chaos_3_x86_elan3-icc"
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/chaos_3_x86_elan3-icc \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_x86_elan3-icc/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_x86_elan3-icc/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:\
+/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+
+function gauss() {
+  gaussgcc
+  gaussicc
+}
+
+function gaussfinal() {
+    ssh ${lcun}@gauss "/bin/bash" << EOF >> chaos_3_x86_64_ib-gcc.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/chaos_3_x86_64_ib-gcc
+#   for FILE in $BININSTALLS
+#   do if [[ -e /usr/gapps/bin/chaos_3_x86_elan3/\$FILE ]] ; then
+#         rm -f /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+#      fi
+#   done
+#   gmake bindir=/usr/gapps/bin/chaos_3_x86_elan3 install-exec
+#   for FILE in $BININSTALLS
+#   do chmod a+rX,ug+w /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+#      chgrp visit /usr/gapps/bin/chaos_3_x86_elan3/\$FILE
+#   done
+    for ARCHDIR in "chaos_3_x86_64_ib-gcc" "chaos_3_x86_64_ib-icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/Linux64/hdfview \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+    done
+#   for ARCHDIR in "chaos_3_x86_64_ib-icc"
+#   do
+#      if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+#         rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+#      fi
+#      ln -s $TOPDIR/$VERSION/chaos_3_x86_64_ib-gcc/bin/silex \
+#         $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+#      chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+#   done
+EOF
+}
+function gaussclean() {
+    ssh ${lcun}@gauss "/bin/bash" << EOF >> chaos_3_x86_64_ib-gcc.log 2>&1
+    for ARCHDIR in "chaos_3_x86_64_ib-gcc" "chaos_3_x86_64_ib-icc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+
+function gaussgcc() {
+    HOSTS="${lcun}@gauss"
+    ARCH="chaos_3_x86_64_ib-gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/bin/X11:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+function gaussicc() {
+    HOSTS="${lcun}@gauss"
+    ARCH="chaos_3_x86_64_ib-icc"
+    CONFOPTS="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --enable-silex \
+--with-Qt-dir=/usr/gapps/silo/qt/$QTRELEASE/$ARCH \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:\
+/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+
+function rhea() {
+  rheagcc
+  rheaicc
+# rheapgc
+# rheapsc
+}
+function rheafinal() {
+    ssh ${lcun}@rhea "/bin/bash" << EOF >> chaos_3_x86_64 2>&1
+    umask 002
+#   cd $TOPDIR/$VERSION/test/chaos_3_x86_64
+#   gmake bindir=/usr/gapps/bin/chaos_3_x86_64 install-exec
+#   gmake bindir=/usr/gapps/bin/chaos_3_x86_64_elan4 install-exec
+#   gmake bindir=/usr/gapps/bin/chaos_3_x86_64_ib install-exec
+    for ARCHDIR in "chaos_3_x86_64" "chaos_3_x86_64_elan4" "chaos_3_x86_64_ib"
+    do
+       for FILE in $BININSTALLS
+       do
+          if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             rm -f /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+          if [[ -d /usr/gapps/bin/\$ARCHDIR ]] ; then
+             ln -s $TOPDIR/$VERSION/chaos_3_x86_64/bin/\$FILE \
+                /usr/gapps/bin/\$ARCHDIR/\$FILE
+             chmod a+rX,ug+w /usr/gapps/bin/\$ARCHDIR/\$FILE
+             chgrp visit /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+       done
+       if [[ -e /usr/gapps/bin/\$ARCHDIR/hdfview ]] ; then
+          rm -f /usr/gapps/bin/\$ARCHDIR/hdfview
+       fi
+       if [[ -d /usr/gapps/bin/\$ARCHDIR ]] ; then
+          ln -s $TOPDIR/hdfview/linux64amd/hdfview \
+             /usr/gapps/bin/\$ARCHDIR/hdfview
+          chgrp visit /usr/gapps/bin/\$ARCHDIR/hdfview
+       fi
+    done
+    for ARCHDIR in "chaos_3_x86_64" "chaos_3_x86_64-icc-10.0" \
+        "chaos_3_x86_64-pc-2.4" "chaos_3_x86_64-pgc-6.2"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/hdfview/Linux64/hdfview \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+    done
+    for ARCHDIR in "chaos_3_x86_64-icc-10.0" "chaos_3_x86_64-pc-2.4" \
+       "chaos_3_x86_64-pgc-6.2"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi 
+       if [[ -d $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          ln -s $TOPDIR/$VERSION/chaos_3_x86_64/bin/silex \
+             $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+          chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+    done
+EOF
+}
+function rheaclean() {
+    ssh ${lcun}@rhea "/bin/bash" << EOF >> chaos_3_x86_64 2>&1
+    for ARCHDIR in "chaos_3_x86_64" "chaos_3_x86_64-icc-10.0" \
+        "chaos_3_x86_64-pc-2.4" "chaos_3_x86_64-pgc-6.2"
+    do rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+    done
+EOF
+}
+function rheagcc() {
+    HOSTS="${lcun}@rhea"
+    ARCH="chaos_3_x86_64"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+function rheaicc() {
+    HOSTS="${lcun}@rhea"
+    ARCH="chaos_3_x86_64-icc-10.0"
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/chaos_3_x86_64-icc-10.0 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_x86_64-icc-10.0/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_x86_64-icc-10.0/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+function rheapsc() {
+    HOSTS="${lcun}@rhea"
+    ARCH="chaos_3_x86_64-pc-2.4"
+    CONFOPTS="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/chaos_3_ia64-pc-2.4 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-pc-2.4/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-pc-2.4/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pathscale/pathscale-2.4/bin2:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "PATHSCALE_SUBSCRIPTION_DAEMON=license1ocf.llnl.gov" \
+    "export PATH LM_LICENSE_FILE PATHSCALE_SUBSCRIPTION_DAEMON"
+}
+function rheapgc() {
+    HOSTS="${lcun}@rhea"
+    ARCH="chaos_3_x86_64-pgc-6.2"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-silex --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/chaos_3_ia64-pgc-6.2 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-pgc-6.2/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-pgc-6.2/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pgi6.23/linux86-64/6.2/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "export PATH LM_LICENSE_FILE"
+}
+
+function thunder() {
+  thundergcc
+  thundericc
+}
+function thunderfinal() {
+    ssh ${lcun}@thunder "/bin/bash" << EOF >> chaos_3_ia64-gcc-3.4.4.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/chaos_3_ia64-gcc-3.4.4
+    for ARCHDIR in "chaos_3_ia64" "chaos_3_ia64_elan4"
+    do
+       for FILE in $BININSTALLS
+       do if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             rm -f /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+       done
+       PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin
+       export PATH
+       gmake bindir=/usr/gapps/bin/\$ARCHDIR install-exec
+       for FILE in $BININSTALLS
+       do chmod a+rX,ug+w /usr/gapps/bin/\$ARCHDIR/\$FILE
+          chgrp visit /usr/gapps/bin/\$ARCHDIR/\$FILE
+       done
+    done
+#   for ARCHDIR in "chaos_3_ia64-gcc-3.4.4" "chaos_3_ia64-icc"
+#   do if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+#         rm -rf $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+#      fi
+#      ln -s $TOPDIR/hdfview/linuxia64/hdfview \
+#         $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+#      chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+#   done
+    for ARCHDIR in "chaos_3_ia64-icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/silex ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       fi
+       ln -s $TOPDIR/$VERSION/chaos_3_ia64-gcc-3.4.4/bin/silex \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/silex
+    done
+EOF
+}
+function thunderclean() {
+    ssh ${lcun}@thunder "/bin/bash" << EOF >> chaos_3_ia64-gcc-3.4.4.log 2>&1
+    for ARCHDIR in "chaos_3_ia64-gcc-3.4.4" "chaos_3_ia64-icc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+function thundergcc() {
+    HOSTS="${lcun}@thunder"
+    ARCH="chaos_3_ia64-gcc-3.4.4"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+function thundericc() {
+    HOSTS="${lcun}@thunder"
+    ARCH="chaos_3_ia64-icc-10.0"
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=icc CXX=icc FC=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --enable-silex \
+--with-Qt-dir=/usr/gapps/silo/qt/$QTRELEASE/chaos_3_ia64-icc \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/chaos_3_ia64-icc-10.0 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-icc-10.0/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/chaos_3_ia64-icc-10.0/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build \
+    "PATH=/usr/local/intel/compiler100_025/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "LD_LIBRARY_PATH=/usr/local/intel/compiler100_025/lib" \
+    "INTEL_LICENSE_FILE=${INTEL_LICENSE_FILE}:\
+/usr/local/intel/compiler100_025/licenses:/opt/intel/licenses" \
+    "export PATH LD_LIBRARY_PATH INTEL_LICENSE_FILE"
+}
+
+function quad() {
+# not using gcc
+# IRIX make doesn't support VPATH
+# 32-bit and 64-bit compiles
+  quad32
+  quad64
+}
+function quadfinal() {
+    ssh ${lcun}@quad "/bin/bash" << EOF >> irix_6.5_n32.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/irix_6.5_n32
+    for FILE in $BININSTALLS
+    do if [[ -e /usr/gapps/bin/irix_6.5_64/\$FILE ]] ; then
+          rm -f /usr/gapps/bin/irix_6.5_64/\$FILE
+       fi
+    done
+    PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/usr/bin/X11:/usr/freeware/bin
+    LD_LIBRARY_PATH=/usr/gapps/silo/qt/$QTRELEASE/irix_6.5-gcc-3.3/lib:\
+$LD_LIBRARY_PATH
+    PARALLEL=4
+    export PATH LD_LIBRARY_PATH PARALLEL
+    gmake bindir=/usr/gapps/bin/irix_6.5_64 install-exec
+    for FILE in $BININSTALLS
+    do chmod a+rX,ug+w /usr/gapps/bin/irix_6.5_64/\$FILE
+       chgrp visit /usr/gapps/bin/irix_6.5_64/\$FILE
+    done
+    for FILE in $BININSTALLS
+    do ln -s $TOPDIR/$VERSION/irix_6.5_n32/bin/\$FILE \
+       $TOPDIR/$VERSION/irix_6.5_64/bin/\$FILE
+       chmod a+rX,ug+w $TOPDIR/$VERSION/irix_6.5_64/bin/\$FILE
+       chgrp visit $TOPDIR/$VERSION/irix_6.5_64/bin/\$FILE
+    done
+EOF
+}
+function quadclean() {
+    ssh ${lcun}@quad "/bin/bash" << EOF >> irix_6.5_n32.log 2>&1
+    for ARCHDIR in "irix_6.5_n32" "irix_6.5_64"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+function quad32() {
+    HOSTS="${lcun}@quad"
+    ARCH="irix_6.5_n32"
+    CONFOPTS="CC=\"cc -n32\" CXX=\"CC -n32\" FC=\"f77 -n32\" \
+LDFLAGS=-n32 CFLAGS=\"-O2 -c99\" \
+PYTHON_CPPFLAGS=-I/usr/freeware/include/python2.1"
+    CONFOPTS2="CC=\"cc -n32\" CXX=\"CC -n32\" FC=\"f77 -n32\" \
+LDFLAGS=-n32 CFLAGS=\"-O2 -c99\" --enable-silex \
+--with-Qt-dir=/usr/gapps/silo/qt/$QTRELEASE/irix_6.5-gcc-3.3 \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/irix_6.5_n32 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/irix_6.5_n32/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/irix_6.5_n32/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/usr/bin/X11:/usr/freeware/bin" \
+    "LD_LIBRARY_PATH=/usr/gapps/silo/qt/$QTRELEASE/irix_6.5-gcc-3.3/lib:\
+$LD_LIBRARY_PATH" \
+    "PARALLEL=4" \
+    "export PATH LD_LIBRARY_PATH PARALLEL"
+}
+function quad64() {
+    HOSTS="${lcun}@quad"
+    ARCH="irix_6.5_64"
+    CONFOPTS="CC=\"cc -64\" CXX=\"CC -64\" FC=\"f77 -64\" \
+LDFLAGS=-64 CFLAGS=\"-O2 -c99\" \
+PYTHON_CPPFLAGS=-I/usr/freeware/include/python2.1"
+    CONFOPTS2="CC=\"cc -64\" CXX=\"CC -64\" FC=\"f77 -64\" \
+LDFLAGS=-64 CFLAGS=\"-O2 -c99\" \
+PYTHON_CPPFLAGS=-I/usr/freeware/include/python2.1 \
+--disable-silex --disable-browser \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/irix_6.5_n32 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/irix_6.5_n32/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/irix_6.5_n32/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/usr/bin/X11:/usr/freeware/bin" \
+    "PARALLEL=4" \
+    "export PATH PARALLEL"
+}
+
+function bgl() {
+    HOSTS="${lcun}@bgl"
+    ARCH="sles_9_ppc64-blrts_xlc"
+    CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc FC=blrts_xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" "
+    CONFOPTS2="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc FC=blrts_xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --disable-silex --disable-browser --without-readline \
+    --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+    --with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+    ARCH="sles_9_ppc64-xlc"
+    CONFOPTS="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/xlc FC=xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/xlC \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" "
+    CONFOPTS2="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/xlc FC=xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/xlC \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --enable-silex --with-Qt-dir=/usr/local/tools/qt/3.3.2-g++ \
+    --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+    --with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/opt/ibmcmp/vacpp/bg/8.0/bin:/opt/ibmcmp/xlf/bg/10.1/bin:/usr/local/bin:\
+/bin:/usr/bin:/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+TOPDIR="/usr/gapps/silo"
+SZIPRELEASE=2.1
+HDF5RELEASE=1.6.6
+QTRELEASE=3.3.8
+lcun=$USER
+bdun=$USER
+bdhost="vader"
+BININSTALLS="browser silex silock silodiff"
+declare -i i
+declare -af list
+MAKE="gmake"
+#MAKEOPTS="-s LIBTOOLFLAGS=--silent"   # low noise
+MAKEOPTS="-j 4"
+DOINSTALL="yes"
+DOCHECK="no"
+DOFINAL="no"
+DOCLEAN="no"
+DOBDIV="no"
+DOLC="no"
+
+if (( $# < 1 )) ; then
+  usage
+  exit 2
+fi
+umask 002
+VERSION=$1
+shift
+TARFILE="silo-$VERSION.tar.gz"
+TOPSRCDIR="silo-$VERSION"
+
+if (( $# < 1 )) ; then
+    list=("localhost" "sunset" "purple" "gauss" "lilac" "rhea" "bgl")
+    DOBDIV="yes";DOLC="yes"
+else
+ i=0
+ while [[ "$*" != "" ]]
+ do
+  case $1 in
+    all-lc*|-all-lc*|lc-in*|-lc-in*)
+      list[i]="purple" ; i=i+1
+      list[i]="gauss" ; i=i+1
+      list[i]="lilac" ; i=i+1
+      list[i]="rhea" ; i=i+1
+      list[i]="bgl" ; i=i+1
+      DOLC="yes"
+      shift;;
+    all-bd*|-all-bd*|bd-in*|-bd-in*)
+      list[i]="localhost" ; i=i+1
+      list[i]="sunset" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    all|-a*)
+      list[i]="localhost" ; i=i+1
+      list[i]="sunset" ; i=i+1
+      list[i]="purple" ; i=i+1
+      list[i]="gauss" ; i=i+1
+      list[i]="lilac" ; i=i+1
+      list[i]="rhea" ; i=i+1
+      list[i]="bgl" ; i=i+1
+      DOBDIV="yes";DOLC="yes"
+      shift;;
+    local*pgc|-local*pgc)
+      list[i]="localhostpgc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    local*icc|-local*icc)
+      list[i]="localhosticc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    local*gcc|-local*gcc)
+      list[i]="localhostgcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    localhost|-lo*)
+      list[i]="localhost" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*gcc|-sun*gcc)
+      list[i]="sunsetgcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*cc|-sun*cc)
+      list[i]="sunsetcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*|-sun*)
+      list[i]="sunset" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    purplegcc32|-purple*gcc32)
+      list[i]="purplegcc32" ; i=i+1
+      DOLC="yes"
+      shift;;
+    purple32|-purple*32)
+      list[i]="purple32" ; i=i+1
+      DOLC="yes"
+      shift;;
+    purplegcc64|-purple*gcc64)
+      list[i]="purplegcc64" ; i=i+1
+      DOLC="yes"
+      shift;;
+    purple64|-purple*64)
+      list[i]="purple64" ; i=i+1
+      DOLC="yes"
+      shift;;
+    purplegcc|-purplegcc)
+      list[i]="purplegcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    purple|-purple*)
+      list[i]="purple" ; i=i+1
+      DOLC="yes"
+      shift;;
+    gaus*icc|-ga*icc)
+      list[i]="gaussicc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    gaus*gcc|-ga*gcc)
+      list[i]="gaussgcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    gaus*|-ga*)
+      list[i]="gauss" ; i=i+1
+      DOLC="yes"
+      shift;;
+    rhea*pgc|-rh*pgc)
+      list[i]="rheapgc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    rhea*psc|-rh*psc)
+      list[i]="rheapsc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    rhea*icc|-rh*icc)
+      list[i]="rheaicc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    rhea*gcc|-rh*gcc)
+      list[i]="rheagcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    rhea*|-rh*)
+      list[i]="rhea" ; i=i+1
+      DOLC="yes"
+      shift;;
+    lil*icc|-li*icc)
+      list[i]="lilacicc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    lil*gcc|-li*gcc)
+      list[i]="lilacgcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    lil*|-li*)
+      list[i]="lilac" ; i=i+1
+      DOLC="yes"
+      shift;;
+    quad32|-quad32)
+      list[i]="quad32" ; i=i+1
+      DOLC="yes"
+      shift;;
+    quad64|-quad64)
+      list[i]="quad64" ; i=i+1
+      DOLC="yes"
+      shift;;
+    quad|-quad)
+      list[i]="quad" ; i=i+1
+      DOLC="yes"
+      shift;;
+     bgl|-bgl)
+       list[i]="bgl" ; i=i+1
+       DOLC="yes"
+       shift;;
+    macos|-macos)
+      list[i]="macos" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    lc-use*|-lc-use*)
+      lcun=$2
+      shift 2;;
+    bdiv-use*|-bdiv-use*)
+      bdun=$2
+      shift 2;;
+    bdiv-ho*|-bdiv-ho*)
+      bdhost=$2
+      shift 2;;
+    check*|-check*)
+      DOCHECK="yes"
+      shift;;
+    no*|-no*)
+      DOINSTALL="no"
+      shift;;
+    fin*|-fin*)
+      DOFINAL="yes"
+      shift;;
+    cle*|-cle*)
+      DOCLEAN="yes"
+      shift;;
+    debug*|-debug*)
+      set -vx
+      shift;;
+    trace*|-trace*)
+      set -vx
+      shift;;
+    *)
+      shift;;
+  esac
+ done
+fi
+if [[ "$DOFINAL" == "yes" ]] ; then
+   if [[ "$DOBDIV" == "yes" ]] ; then
+      ssh ${bdun}@${bdhost} "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/current ] ; then
+         rm $TOPDIR/current
+      fi
+      ln -s $TOPDIR/$VERSION $TOPDIR/current
+      chgrp visit $TOPDIR/current
+      if [ -f $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf ] ; then
+         cp $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf \
+            $TOPDIR/$VERSION
+         chgrp visit $TOPDIR/$VERSION/Silo.book.pdf
+      fi
+EOF
+   fi
+   if [ "$DOLC" = "yes" ] ; then
+      ssh ${lcun}@lilac "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/current ] ; then
+         rm $TOPDIR/current
+      fi
+      ln -s $TOPDIR/$VERSION $TOPDIR/current
+      chgrp visit $TOPDIR/current
+      if [ -f $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf ] ; then
+         cp $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf \
+            $TOPDIR/$VERSION
+         chgrp visit $TOPDIR/$VERSION/Silo.book.pdf
+      fi
+EOF
+   fi
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}final
+      i=i+1
+   done
+elif [[ "$DOCLEAN" == "yes" ]] ; then
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}clean
+      i=i+1
+   done
+   if [[ "$DOBDIV" == "yes" ]] ; then
+      ssh ${bdun}@${bdhost} "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/$VERSION/test ] ; then
+         rm -rf $TOPDIR/$VERSION/test
+         rm -rf $TOPDIR/$VERSION/test
+      fi
+EOF
+   fi
+   if [ "$DOLC" = "yes" ] ; then
+      ssh ${lcun}@lilac "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/$VERSION/test ] ; then
+         rm -rf $TOPDIR/$VERSION/test
+         rm -rf $TOPDIR/$VERSION/test
+      fi
+EOF
+   fi
+else
+   if [[ "$DOBDIV" == "yes" ]] ; then
+      ssh ${bdun}@${bdhost} "/bin/bash" << EOF
+      umask 002
+      if [ ! -d $TOPDIR/$VERSION ] ; then
+         mkdir $TOPDIR/$VERSION
+      fi
+      chgrp visit $TOPDIR/$VERSION
+      chmod a+rX,u+w,o-w,g+s $TOPDIR/$VERSION
+      if [ ! -d $TOPDIR/$VERSION/test ] ; then
+         mkdir $TOPDIR/$VERSION/test
+         chgrp visit $TOPDIR/$VERSION/test
+         chmod a+rX,ug+w $TOPDIR/$VERSION/test
+      fi
+EOF
+      if [ -e $TARFILE ] ; then
+         scp $TARFILE ${bdun}@${bdhost}:$TOPDIR/$VERSION
+         ssh ${bdun}@${bdhost} "/bin/bash" << EOF
+         umask 002
+         cd $TOPDIR/$VERSION/test
+         chmod a+r,ug+w ../$TARFILE
+         chgrp visit ../$TARFILE
+         tar zxf ../$TARFILE
+         chgrp -R visit $TOPSRCDIR
+         chmod -R a+rX,ug+w $TOPSRCDIR
+EOF
+      fi
+   fi
+   if [ "$DOLC" == "yes" ] ; then
+      ssh ${lcun}@lilac "/bin/bash" << EOF
+      umask 002
+      if [ ! -d $TOPDIR/$VERSION ] ; then
+         mkdir $TOPDIR/$VERSION
+      fi
+      chgrp visit $TOPDIR/$VERSION
+      chmod a+rX,u+w,o-w,g+s $TOPDIR/$VERSION
+      if [ ! -d $TOPDIR/$VERSION/test ] ; then
+         mkdir $TOPDIR/$VERSION/test
+         chgrp visit $TOPDIR/$VERSION/test
+         chmod a+rX,ug+w $TOPDIR/$VERSION/test
+      fi
+EOF
+      if [ -e $TARFILE ] ; then
+         scp $TARFILE ${lcun}@lilac:$TOPDIR/$VERSION
+         ssh ${lcun}@lilac "/bin/bash" << EOF
+         umask 002
+         cd $TOPDIR/$VERSION/test
+         chmod a+r,ug+w ../$TARFILE
+         chgrp visit ../$TARFILE
+         tar zxf ../$TARFILE
+         chgrp -R visit $TOPSRCDIR
+         chmod -R a+rX,ug+w $TOPSRCDIR
+EOF
+      fi
+   fi
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}
+      i=i+1
+   done
+fi
diff --git a/svn_bin/silo-release-open b/svn_bin/silo-release-open
new file mode 100755
index 0000000..4f7777c
--- /dev/null
+++ b/svn_bin/silo-release-open
@@ -0,0 +1,1063 @@
+#!/bin/bash
+#######################################################################
+#
+# silo-release-open - Build and install a tarball on the open network.
+#
+# Author: Thomas Treadway
+# Date: Thu Jun 15 12:48:17 PDT 2006
+#
+# Usage:
+#    silo-release-open version
+#
+# Modifications:
+#    Thomas R. Treadway, Wed Oct  3 13:48:15 PDT 2007
+#    Removed gps, added up
+#    Added build of silex, and included szip
+#
+#    Thomas R. Treadway, Fri Nov  2 16:17:59 PDT 2007
+#    Tunning for release 4.6
+#
+#    Thomas R. Treadway, Wed Nov 14 12:54:37 PST 2007
+#    Corrected some of the pathc issues.
+#
+#    Thomas R. Treadway, Thu Dec 27 14:06:40 PST 2007
+#    reformatted, added -final, -clean options.
+#
+#######################################################################
+#
+function usage() {
+  printf "Usage: %s version [-lc-username <lc-username>] [-check-install | -no-install | -final | -clean] {all|hoth|sidious|sunspot|up|yana|ubgl|dawndev}" $0
+  printf "\n"
+  printf "Build options\n"
+  printf "                  -- default, runs make install\n"
+  printf -- "-check-install -- runs make check before make install\n"
+  printf -- "-no-install    -- runs make only no make install step\n"
+  printf -- "-final {host}  -- creates links to silo/current directory\n"
+  printf "                  and other convenient symbolic links\n"
+  printf -- "-clean {host}  -- removes the build directories\n"
+  printf "\n"
+  printf "Host select options\n"
+  printf "all            -- tries to build on both BDiv, and LC host\n"
+  printf "all-lc         -- tries to build on LC host only\n"
+  printf "all-bdiv       -- tries to build on both BDiv host only\n"
+  printf "{hostopt}      -- host, host list or host option list, such as:\n"
+  printf "               hoth, hothgcc, hothicc, hothpgc, yana, yanagcc,\n"
+  printf "               yanapgc, yanaicc, yanapsc\n"
+  printf "               thunder, thundericc, pengra, pengraicc, pengragcc,\n"
+  printf "               all, all-lc, all-bd, etc.\n"
+  printf "{host}         -- host name or host name list, such as:\n"
+  printf "               hoth, yana, thunder, pengra, quad, tread,\n"
+  printf "               all, all-lc, all-bd\n"
+  printf "\n"
+  printf "Silo release installing script. Assumes a tarball exist in\n"
+  printf "current directory, named something like silo-\$1.tar.gz.\n"
+  printf "This script will attempt to:\n"
+  printf "  1) copy tarball to B Div's /usr/gapps/silo/$VERSION and\n"
+  printf "     LC's /usr/gapps/silo/$VERSION.\n"
+  printf "  2) untar in /usr/gapps/silo/$VERSION/test.\n"
+  printf "  3) start remote scripts on the target machines that\n"
+  printf "     perform a configure, make check, followed by a make install\n"
+  printf "     into directories /usr/gapps/silo/$VERSION/$ARCH.\n"
+  printf "Log files are stored at ./HOSTNAME.log\n"
+  printf "You may want to run this script from the LC network.\n"
+}
+
+function build() {
+    ssh ${HOSTS} "$SSHSHELL" << EOF > ${ARCH}.log 2>&1 &
+    $*
+    unset QTDIR
+    umask 002
+    ls -l $TOPDIR/$VERSION/test
+    rm -rf $TOPDIR/$VERSION/test/$ARCH
+    mkdir $TOPDIR/$VERSION/test/$ARCH
+    ls -l $TOPDIR/$VERSION/test
+    cd $TOPDIR/$VERSION/test/$ARCH
+
+    ../$TOPSRCDIR/configure --disable-hzip --disable-fpzip --enable-legacy-datatyped-pointers \
+--prefix=$TOPDIR/$VERSION/$ARCH \
+--disable-browser --disable-silex --without-hdf5 --without-szlib $CONFOPTS
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    test $? != 0 && return
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    chmod -R g+w $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure --disable-hzip --disable-fpzip --enable-legacy-datatyped-pointers \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    test $? != 0 && return
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a.saved
+    mv $TOPDIR/$VERSION/$ARCH/include/silo.h $TOPDIR/$VERSION/$ARCH/include/silo.h.saved
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    if [ $? = 0 && "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check TESTARGS="-k \!large"
+    fi
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    mv $TOPDIR/$VERSION/$ARCH/bin $TOPDIR/$VERSION/$ARCH/bin.saved
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure --enable-pythonmodule --enable-shared \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    if [ $? = 0 && "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check TESTARGS="-k compression -k python"
+    fi
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    rm -rf $TOPDIR/$VERSION/$ARCH/libso
+    cp -R $TOPDIR/$VERSION/$ARCH/lib $TOPDIR/$VERSION/$ARCH/libso
+    rm -f $TOPDIR/$VERSION/$ARCH/libso/{*.settings,*.la,*.a}
+    rm -f $TOPDIR/$VERSION/$ARCH/libso/libsiloh5.a.saved
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a $TOPDIR/$VERSION/$ARCH/lib/libsiloxx.a
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a.saved $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a
+    mv $TOPDIR/$VERSION/$ARCH/include/silo.h.saved $TOPDIR/$VERSION/$ARCH/include/silo.h
+    rm -f $TOPDIR/$VERSION/$ARCH/lib/*.so
+    rm -rf $TOPDIR/$VERSION/$ARCH/bin
+    mv $TOPDIR/$VERSION/$ARCH/bin.saved $TOPDIR/$VERSION/$ARCH/bin
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+EOF
+}
+function build2() {
+    ssh -v -v -v ${HOSTS} "$SSHSHELL" << FOOBAR > ${ARCH}.log 2>&1 &
+    $*
+    set -x
+    unset QTDIR
+    umask 002
+    rm -rf $TOPDIR/$VERSION/test/$ARCH
+    mkdir $TOPDIR/$VERSION/test/$ARCH
+    cd $TOPDIR/$VERSION/test/$ARCH
+
+    ../$TOPSRCDIR/configure --disable-hzip --disable-fpzip --enable-legacy-datatyped-pointers \
+--prefix=$TOPDIR/$VERSION/$ARCH \
+--disable-browser --disable-silex --without-hdf5 --without-szlib $CONFOPTS2
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    test $? != 0 && return
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    chmod -R g+w $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure --disable-hzip --disable-fpzip --enable-legacy-datatyped-pointers \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS2
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    test $? != 0 && return
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a.saved
+    mv $TOPDIR/$VERSION/$ARCH/include/silo.h $TOPDIR/$VERSION/$ARCH/include/silo.h.saved
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS2
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    if [ $? = 0 && "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check TESTARGS="-k \!large"
+    fi
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    mv $TOPDIR/$VERSION/$ARCH/bin $TOPDIR/$VERSION/$ARCH/bin.saved
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+    $MAKE clean
+
+    ../$TOPSRCDIR/configure --enable-pythonmodule --enable-shared \
+--prefix=$TOPDIR/$VERSION/$ARCH --with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib \
+$CONFOPTS2
+    test $? != 0 && return
+    $MAKE $MAKEOPTS
+    if [ $? = 0 && "$DOCHECK" = "yes" ] ; then
+       $MAKE $MAKEOPTS check TESTARGS="-k compression -k python"
+    fi
+    if [ "$DOINSTALL" = "yes" ] ; then
+       $MAKE install
+    fi
+    rm -rf $TOPDIR/$VERSION/$ARCH/libso
+    cp -R $TOPDIR/$VERSION/$ARCH/lib $TOPDIR/$VERSION/$ARCH/libso
+    rm -f $TOPDIR/$VERSION/$ARCH/libso/{*.settings,*.la,*.a}
+    rm -f $TOPDIR/$VERSION/$ARCH/libso/libsiloh5.a.saved
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a $TOPDIR/$VERSION/$ARCH/lib/libsiloxx.a
+    mv $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a.saved $TOPDIR/$VERSION/$ARCH/lib/libsiloh5.a
+    mv $TOPDIR/$VERSION/$ARCH/include/silo.h.saved $TOPDIR/$VERSION/$ARCH/include/silo.h
+    rm -f $TOPDIR/$VERSION/$ARCH/lib/*.so
+    rm -rf $TOPDIR/$VERSION/$ARCH/bin
+    mv $TOPDIR/$VERSION/$ARCH/bin.saved $TOPDIR/$VERSION/$ARCH/bin
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/test/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/test/$ARCH
+    chmod -R a+r,ug+w,a+X $TOPDIR/$VERSION/$ARCH
+    chgrp -R visit $TOPDIR/$VERSION/$ARCH
+FOOBAR
+}
+
+function sidious() {
+    sidiousgcc
+}
+
+sidiousgcc() {
+    HOSTS="sidious"
+    ARCH="x86_64_Linux_el5xen"
+    CONFOPTS="FC=g77 F77=g77 \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/atria/bin:\
+/usr/lib/jre/bin:/sbin:/usr/sbin:/opt/bin:/usr/local/apps/bin:\
+/usr/security/bin" \
+    "LD_LIBRARY_PATH=/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+function hoth() {
+    hothgcc
+    hothpgc
+    hothicc
+}
+function hothfinal() {
+    ssh hoth "/bin/bash" << EOF >> i686_Linux_ELsmp.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/i686_Linux_ELsmp
+    for FILE in $BININSTALLS
+    do if [[ -e /misc/gapps/Linux/bin/\$FILE ]] ; then
+          rm -f /misc/gapps/Linux/bin/\$FILE
+       fi
+    done
+    unset QTDIR
+    gmake bindir=/misc/gapps/Linux/bin install-exec
+    for FILE in $BININSTALLS
+    do chmod a+r,ug+w,a+X /misc/gapps/Linux/bin/\$FILE
+       chgrp visit /misc/gapps/Linux/bin/\$FILE
+    done
+    for ARCHDIR in "i686_Linux_ELsmp" "i686_Linux_ELsmp_pgcc" \
+        "i686_Linux_ELsmp_icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/linux/hdfview \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+    done
+    for ARCHDIR in "i686_Linux_ELsmp_pgcc" "i686_Linux_ELsmp_icc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          rm -rf $TOPDIR/$VERSION/\$ARCHDIR/bin
+       fi
+       ln -s $TOPDIR/$VERSION/i686_Linux_ELsmp/bin \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR
+    done
+EOF
+}
+function hothclean() {
+    ssh hoth "/bin/bash" << EOF >> linux_rhel3-gcc-3.2.3.log 2>&1
+    for ARCHDIR in "i686_Linux_ELsmp" "i686_Linux_ELsmp_pgcc" \
+        "i686_Linux_ELsmp_icc" "i686_Linux_ELsmp_pathcc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+
+function hothgcc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp"
+    CONFOPTS="FC=g77 F77=g77 \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS
+    build
+}
+function hothpgc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp_pgcc"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" F77=\"pgf77 -g77libs\" LDFLAGS=-lstdc++ \
+--disable-silex"
+    export HOSTS ARCH CONFOPTS
+    build
+}
+function hothicc() {
+    HOSTS="hoth"
+    ARCH="i686_Linux_ELsmp_icc"
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ --disable-silex"
+    export HOSTS ARCH CONFOPTS
+    build
+}
+
+function sunspot() {
+  sunspotgcc
+  sunspotcc
+}
+function sunspotfinal() {
+    ssh sunspot "/bin/bash" << EOF >> sparc_SunOS_57.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/sparc_SunOS_57
+    for FILE in $BININSTALLS
+    do if [[ -e /misc/gapps/SunOS/bin/\$FILE ]] ; then
+          rm -f /misc/gapps/SunOS/bin/\$FILE
+       fi
+    done
+    PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin
+    LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib
+    export PATH LD_LIBRARY_PATH
+    gmake bindir=/misc/gapps/SunOS/bin install-exec
+    for FILE in $BININSTALLS
+    do chmod a+r,ug+w,a+X /misc/gapps/SunOS/bin/\$FILE
+       chgrp visit /misc/gapps/SunOS/bin/\$FILE
+    done
+    ln -s $TOPDIR/$VERSION/sparc_SunOS_57/bin/silex \
+       $TOPDIR/$VERSION/sparc_SunOS_57_gcc/bin/silex
+    chgrp visit $TOPDIR/$VERSION/sparc_SunOS_57_gcc/bin/silex
+EOF
+}
+function sunspotclean() {
+    ssh sunspot "/bin/bash" << EOF >> sunos_57.log 2>&1
+    for ARCHDIR in "sparc_SunOS_57" "sparc_SunOS_57_cc"
+    do rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+    done
+EOF
+}
+function sunspotgcc() {
+    HOSTS="sunspot"
+    ARCH="sparc_SunOS_57_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    CONFOPTS2="CC=gcc CXX=g++ FC=g77 F77=g77 --disable-silex \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+function sunspotcc() {
+    HOSTS="sunspot"
+    ARCH="sparc_SunOS_57"
+    CONFOPTS="CC=cc CXX=CC FC=f77 F77=f77 LDFLAGS=-L/usr/local/lib"
+    CONFOPTS2="CC=cc CXX=CC FC=f77 F77=f77 \
+LDFLAGS=-L/usr/local/lib --disable-silex --without-readline \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/sparc-sun-solaris-cc-5.2 \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/sparc-sun-solaris-cc-5.2/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/sparc-sun-solaris-cc-5.2/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/bin:/bin:/usr/local/apps/bin:/usr/local/bin:/usr/ccs/bin:\
+/opt/SUNWspro/bin:/usr/ucb:/etc:/usr/openwin/bin:/usr/dt/bin:/usr/java/bin" \
+    "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib" \
+    "export PATH LD_LIBRARY_PATH"
+}
+
+function up() {
+# not using gcc
+# use gmake for parallel seems to hang
+# 32-bit and 64-bit compiles
+  up64
+  up32
+  upgcc
+}
+function upfinal() {
+    ssh ${lcun}@up "/bin/bash" << EOF >> aix_5_64_fed.log 2>&1
+    umask 002
+    cd $TOPDIR/$VERSION/test/aix_5_64_fed
+    for ARCHDIR in "aix_5_64" "aix_5_64_fed" "aix_5_ll"
+    do
+       for FILE in $BININSTALLS
+       do if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             rm -f /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+       done
+       PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin
+       OBJECT_MODE=64
+       export PATH OBJECT_MODE
+       gmake bindir=/usr/gapps/bin/$ARCHDIR install-exec
+       for FILE in $BININSTALLS
+       do chmod a+r,ug+w,a+X /usr/gapps/bin/\$ARCHDIR/\$FILE
+          chgrp visit /usr/gapps/bin/\$ARCHDIR/\$FILE
+       done
+    done
+    for ARCHDIR in "aix_5_ll" "aix_5_64_fed" "aix_5_ll_gcc" "aix_5_64_fed_gcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/AIX/hdfview \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+    done
+    for ARCHDIR in "aix_5_ll" "aix_5_ll_gcc" "aix_5_64_fed_gcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          rm -rf $TOPDIR/$VERSION/\$ARCHDIR/bin
+       fi
+       ln -s $TOPDIR/$VERSION/aix_5_64_fed/bin \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin
+    done
+EOF
+}
+function upclean() {
+    ssh ${lcun}@up "/bin/bash" << EOF >> aix_5_64_fed.log 2>&1
+    for ARCHDIR in "aix_5_ll" "aix_5_64_fed" "aix_5_ll_gcc" "aix_5_64_fed_gcc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+function up32() {
+    HOSTS="${lcun}@up"
+    ARCH="aix_5_ll"
+    CONFOPTS="FC=xlf F77=xlf --disable-silex"
+    CONFOPTS2="FC=xlf F77=xlf --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    MAKEOPTS=""
+    export HOSTS ARCH CONFOPTS CONFOPTS2 MAKEOPTS
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+function up64() {
+    HOSTS="${lcun}@up"
+    ARCH="aix_5_64_fed"
+    CONFOPTS="FC=xlf F77=xlf "
+    CONFOPTS2="FC=xlf F77=xlf --enable-silex"
+    MAKEOPTS=""
+    export HOSTS ARCH CONFOPTS CONFOPTS2 MAKEOPTS
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+
+function upgcc() {
+# use gmake for parallel seems to hang
+# 32-bit and 64-bit compiles
+  upgcc32
+  upgcc64
+}
+function upgcc32() {
+    HOSTS="${lcun}@up"
+    ARCH="aix_5_ll_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix32 -mminimal-toc\" CXXFLAGS=\"-maix32 -mminimal-toc\" \
+LDFLAGS=-maix32 --disable-silex"
+    CONFOPTS2="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix32 -mminimal-toc\" CXXFLAGS=\"-maix32 -mminimal-toc\" \
+LDFLAGS=-maix32 --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=32" \
+    "export PATH OBJECT_MODE"
+}
+function upgcc64() {
+    HOSTS="${lcun}@up"
+    ARCH="aix_5_64_fed_gcc"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix64 -mminimal-toc\" CXXFLAGS=\"-maix64 -mminimal-toc\" \
+LDFLAGS=-maix64"
+    CONFOPTS2="CC=gcc CXX=g++ FC=g77 F77=g77 \
+CFLAGS=\"-maix64 -mminimal-toc\" CXXFLAGS=\"-maix64 -mminimal-toc\" \
+LDFLAGS=-maix64 \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/gnu/bin:\
+/usr/local/scripts:/usr/apps/bin:/usr/gapps/bin" \
+    "OBJECT_MODE=64" \
+    "export PATH OBJECT_MODE"
+}
+
+function yana() {
+  yanagcc
+  yanaicc
+  yanapgc
+  yanapsc
+}
+function yanafinal() {
+    ssh ${lcun}@yana "/bin/bash" << EOF >> chaos_4_x86_64.log 2>&1
+    set -x
+    umask 002
+#   cd $TOPDIR/$VERSION/test/chaos_4_x86_64
+#   gmake bindir=/usr/gapps/bin/chaos_4_x86_64 install-exec
+#   gmake bindir=/usr/gapps/bin/chaos_4_x86_64_elan4 install-exec
+#   gmake bindir=/usr/gapps/bin/chaos_4_x86_64_ib install-exec
+    for ARCHDIR in "chaos_4_x86_64" "chaos_4_x86_64_ib"
+    do
+       for FILE in $BININSTALLS
+       do
+          if [[ -e /usr/gapps/bin/\$ARCHDIR/\$FILE ]] ; then
+             rm -f /usr/gapps/bin/\$ARCHDIR/\$FILE
+          fi
+          ln -s $TOPDIR/$VERSION/chaos_4_x86_64/bin/\$FILE \
+             /usr/gapps/bin/\$ARCHDIR/\$FILE
+          chmod a+r,ug+w,a+X /usr/gapps/bin/\$ARCHDIR/\$FILE
+          chgrp visit /usr/gapps/bin/\$ARCHDIR/\$FILE
+       done
+       if [[ -e /usr/gapps/bin/\$ARCHDIR/hdfview ]] ; then
+          rm -f /usr/gapps/bin/\$ARCHDIR/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/linux64amd/hdfview \
+          /usr/gapps/bin/\$ARCHDIR/hdfview
+       chgrp visit /usr/gapps/bin/\$ARCHDIR/hdfview
+    done
+    for ARCHDIR in "chaos_4_x86_64" "chaos_4_x86_64_icc" \
+        "chaos_4_x86_64_pathcc" "chaos_4_x86_64_pgcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview ]] ; then
+          rm -f $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       fi
+       ln -s $TOPDIR/hdfview/linux64amd/hdfview \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin/hdfview
+    done
+    for ARCHDIR in "chaos_4_x86_64" "chaos_4_x86_64_pathcc" \
+       "chaos_4_x86_64_pgcc"
+    do
+       if [[ -e $TOPDIR/$VERSION/\$ARCHDIR/bin ]] ; then
+          rm -rf $TOPDIR/$VERSION/\$ARCHDIR/bin
+       fi
+       ln -s $TOPDIR/$VERSION/chaos_4_x86_64_icc/bin \
+          $TOPDIR/$VERSION/\$ARCHDIR/bin
+       chgrp visit $TOPDIR/$VERSION/\$ARCHDIR/bin
+    done
+EOF
+}
+function yanaclean() {
+    ssh ${lcun}@yana "/bin/bash" << EOF >> chaos_4_x86_64.log 2>&1
+    for ARCHDIR in "chaos_4_x86_64" "chaos_4_x86_64_icc" \
+        "chaos_4_x86_64_pathcc" "chaos_4_x86_64_pgcc"
+    do if [[ -d $TOPDIR/$VERSION/test/\$ARCHDIR ]] ; then
+          rm -rf $TOPDIR/$VERSION/test/\$ARCHDIR
+       fi
+    done
+EOF
+}
+function yanagcc() {
+    HOSTS="${lcun}@yana"
+    ARCH="chaos_4_x86_64"
+    CONFOPTS="CC=gcc CXX=g++ FC=g77 F77=g77 CFLAGS=-fPIC CXXFLAGS=-fPIC \
+FFLAGS=-Wno-globals F77FLAGS=-Wno-globals FCFLAGS=-Wno-globals --enable-silex"
+    export HOSTS ARCH CONFOPTS
+    build \
+    "PATH=/usr/local/intel/compiler91/bin:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin" \
+    "export PATH"
+}
+
+function yanaicc() {
+    HOSTS="${lcun}@yana"
+    ARCH="chaos_4_x86_64_icc"
+    CONFOPTS="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=icc CXX=icc FC=ifort F77=ifort LDFLAGS=-lstdc++ \
+CFLAGS=-fPIC CXXFLAGS=-fPIC \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "LD_LIBRARY_PATH=/usr/local/tools/icc/lib" \
+    "export LD_LIBRARY_PATH"
+}
+function yanapsc() {
+    HOSTS="${lcun}@yana"
+    ARCH="chaos_4_x86_64_pathcc"
+    CONFOPTS="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC"
+    CONFOPTS2="CC=pathcc CXX=pathCC FC=pathf90 F77=pathf90 \
+CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2 \
+    "PATH=/usr/global/tools/RSI/bin:\
+/usr/local/tools/pathscale/pathscale-2.4/bin2:/usr/local/bin:/bin:/usr/bin:\
+/usr/bin/X11:/usr/lib/mpi/bin:/usr/apps/bin:/usr/gapps/bin:/usr/kerberos/bin" \
+    "LM_LICENSE_FILE=/usr/local/etc/license.client" \
+    "PATHSCALE_SUBSCRIPTION_DAEMON=license1ocf.llnl.gov" \
+    "export PATH LM_LICENSE_FILE PATHSCALE_SUBSCRIPTION_DAEMON"
+}
+function yanapgc() {
+    HOSTS="${lcun}@yana"
+    ARCH="chaos_4_x86_64_pgcc"
+    CONFOPTS="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" F77=\"pgf77 -g77libs\" \
+CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=/usr/local/tools/pgi-7.0.6/linux86-64/7.0-6/lib/pgfmain.o"
+    CONFOPTS2="CC=pgcc CXX=pgCC FC=\"pgf77 -g77libs\" F77=\"pgf77 -g77libs\" \
+CFLAGS=-fPIC CXXFLAGS=-fPIC  LDFLAGS=/usr/local/tools/pgi-7.0.6/linux86-64/7.0-6/lib/pgfmain.o --disable-silex \
+--with-szlib=/usr/gapps/silo/szip/$SZIPRELEASE/$ARCH \
+--with-hdf5=/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/include,\
+/usr/gapps/silo/hdf5/$HDF5RELEASE/$ARCH/lib"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2
+}
+
+function ubgl() {
+    ubglblrts_xlc
+    ubglxlc
+}
+
+function ubglblrts_xlc() {
+    HOSTS="${lcun}@ubgl"
+    ARCH="sles_9_ppc64"
+    CONFOPTS2="CC=blrts_xlc FC=blrts_xlf CXX=blrts_xlC \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    ac_cv_type_long=yes ac_cv_sizeof_long=4 \
+    ac_cv_type_long_long=yes ac_cv_sizeof_long_long=8 \
+    ac_cv_type_double=yes ac_cv_sizeof_double=8 \
+    CPPFLAGS=-I/usr/gapps/silo/zlib/1.2.3/sles_9_ppc64-blrts_xlc/include \
+    LDFLAGS=\"-L/usr/gapps/silo/zlib/1.2.3/sles_9_ppc64-blrts_xlc/lib -lz\" \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --disable-silex"
+    export HOSTS ARCH CONFOPTS2
+    build2
+}
+
+function ubglxlc() {
+    HOSTS="${lcun}@ubgl"
+    ARCH="sles_9_ppc64_xlc"
+    CONFOPTS2="CC=/opt/ibmcmp/vacpp/bg/8.0/bin/xlc FC=xlf \
+    CXX=/opt/ibmcmp/vacpp/bg/8.0/bin/xlC \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --disable-silex"
+    export HOSTS ARCH CONFOPTS2
+    build2
+}
+
+
+function dawndev() {
+    dawndevbgxlc_r
+    dawndevxlc
+}
+
+function dawndevbgxlc_r() {
+    HOSTS="${lcun}@dawndev"
+    ARCH="sles_10_ppc64"
+    CONFOPTS2="CC=bgxlc_r FC=bgxlf_r \
+    CXX=bgxlC_r \
+    ac_cv_type_off64_t=yes ac_cv_sizeof_off64_t=8 \
+    ac_cv_type_long=yes ac_cv_sizeof_long=4 \
+    ac_cv_type_long_long=yes ac_cv_sizeof_long_long=8 \
+    ac_cv_type_double=yes ac_cv_sizeof_double=8 \
+    CPPFLAGS=-I/usr/gapps/silo/zlib/1.2.3/sles_10_ppc64-bgxlc_r/include \
+    LDFLAGS=\"-L/usr/gapps/silo/zlib/1.2.3/sles_10_ppc64-bgxlc_r/lib -lz\" \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --disable-silex"
+    export HOSTS ARCH CONFOPTS2
+    build2
+}
+
+
+function dawndevxlc() {
+    HOSTS="${lcun}@dawndev"
+    ARCH="sles_10_ppc64_xlc"
+    CONFOPTS2="CC=xlc FC=xlf \
+    CXX=xlC \
+    CPPFLAGS=-I/usr/gapps/silo/zlib/1.2.3/sles_10_ppc64-xlc/include \
+    LDFLAGS=\"-L/usr/gapps/silo/zlib/1.2.3/sles_10_ppc64-xlc/lib -lz\" \
+    CFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    CXXFLAGS=\"-O -qlanglvl=extended -qmaxmem=64000\" \
+    --disable-silex"
+    export HOSTS ARCH CONFOPTS CONFOPTS2
+    build2
+}
+
+TOPDIR="/usr/gapps/silo"
+SSHSHELL="/bin/bash"
+SZIPRELEASE=2.1
+HDF5RELEASE=1.8.4
+QTRELEASE=3.3.8
+lcun=$USER
+BININSTALLS="browser silex silock silodiff silofile"
+declare -i i
+declare -af list
+MAKE="gmake"
+#MAKEOPTS="-s LIBTOOLFLAGS=--silent"   # low noise
+MAKEOPTS="-j 4"
+DOINSTALL="yes"
+DOCHECK="no"
+DOFINAL="no"
+DOCLEAN="no"
+DOBDIV="no"
+DOLC="no"
+
+if (( $# < 1 )) ; then
+  usage
+  exit 2
+fi
+umask 002
+VERSION=$1
+shift
+TARFILE="silo-$VERSION.tar.gz"
+TOPSRCDIR="silo-$VERSION"
+
+if (( $# < 1 )) ; then
+    list=("hoth" "sidious" "sunspot" "up" "yana" "hera" "ubgl" "dawndev")
+    DOBDIV="yes";DOLC="yes"
+else
+ i=0
+ while [[ "$*" != "" ]]
+ do
+  case $1 in
+    all-lc*|-all-lc*)
+      list[i]="up" ; i=i+1
+      list[i]="yana" ; i=i+1
+      list[i]="hera" ; i=i+1
+      list[i]="ubgl" ; i=i+1
+      list[i]="dawndev" ; i=i+1
+      DOLC="yes"
+      shift;;
+    all-bd*|-all-bd*)
+      list[i]="hoth" ; i=i+1
+      list[i]="sidious" ; i=i+1
+      list[i]="sunspot" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    all|-a*)
+      list[i]="hoth" ; i=i+1
+      list[i]="sidious" ; i=i+1
+      list[i]="sunspot" ; i=i+1
+      list[i]="up" ; i=i+1
+      list[i]="yana" ; i=i+1
+      list[i]="hera" ; i=i+1
+      list[i]="ubgl" ; i=i+1
+      list[i]="dawndev" ; i=i+1
+      DOBDIV="yes";DOLC="yes"
+      shift;;
+    sidiousgcc|-sidiousgcc)
+      list[i]="sidiousgcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    hothgcc|-hothgcc)
+      list[i]="hothgcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    hothpgc|-hothpgc)
+      list[i]="hothpgc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    hothicc|-hothicc)
+      list[i]="hothicc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sidious|-sid*)
+      list[i]="sidious" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    hoth|-ho*)
+      list[i]="hoth" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*gcc|-sun*gcc)
+      list[i]="sunspotgcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*cc|-sun*cc)
+      list[i]="sunspotcc" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    sun*|-sun*)
+      list[i]="sunspot" ; i=i+1
+      DOBDIV="yes"
+      shift;;
+    upgcc32|-up*gcc32)
+      list[i]="upgcc32" ; i=i+1
+      DOLC="yes"
+      shift;;
+    up32|-up*32)
+      list[i]="up32" ; i=i+1
+      DOLC="yes"
+      shift;;
+    upgcc64|-up*gcc64)
+      list[i]="upgcc64" ; i=i+1
+      DOLC="yes"
+      shift;;
+    up64|-up*64)
+      list[i]="up64" ; i=i+1
+      DOLC="yes"
+      shift;;
+    upgcc|-upgcc)
+      list[i]="upgcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    up|-up*)
+      list[i]="up" ; i=i+1
+      DOLC="yes"
+      shift;;
+    yana*pgc|-ya*pgc)
+      list[i]="yanapgc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    yana*psc|-ya*psc)
+      list[i]="yanapsc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    yana*icc|-ya*icc)
+      list[i]="yanaicc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    yana*gcc|-ya*gcc)
+      list[i]="yanagcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    yana*|-ya*)
+      list[i]="yana" ; i=i+1
+      DOLC="yes"
+      shift;;
+    hera*pgc)
+      list[i]="herapgc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    hera*psc)
+      list[i]="herapsc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    hera*icc)
+      list[i]="heraicc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    hera*gcc)
+      list[i]="heragcc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    hera*)
+      list[i]="hera" ; i=i+1
+      DOLC="yes"
+      shift;;
+    ubgl|-ubgl)
+      list[i]="ubgl" ; i=i+1
+      DOLC="yes"
+      shift;;
+    ubglblrts_xlc|-ubglblrts_xlc)
+      list[i]="ubglblrts_xlc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    ubglxlc|-ubglxlc)
+      list[i]="ubglxlc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    dawndevbgxlc_r|-dawndevbgxlc_r)
+      list[i]="dawndevbgxlc_r" ; i=i+1
+      DOLC="yes"
+      shift;;
+    dawndevxlc|-dawndevxlc)
+      list[i]="dawndevxlc" ; i=i+1
+      DOLC="yes"
+      shift;;
+    dawndev|-dawndev)
+      list[i]="dawndev" ; i=i+1
+      DOLC="yes"
+      shift;;
+    lc-use*|-lc-use*)
+      lcun=$2
+      shift 2;;
+    check*|-check*)
+      DOCHECK="yes"
+      shift;;
+    no*|-no*)
+      DOINSTALL="no"
+      shift;;
+    fin*|-fin*)
+      DOFINAL="yes"
+      shift;;
+    cle*|-cle*)
+      DOCLEAN="yes"
+      shift;;
+    debug*|-debug*)
+      set -vx
+      shift;;
+    trace*|-trace*)
+      set -vx
+      shift;;
+    *)
+      shift;;
+  esac
+ done
+fi
+if [[ "$DOFINAL" = "yes" ]] ; then
+   if [[ "$DOBDIV" = "yes" ]] ; then
+      ssh hoth "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/current ] ; then
+         rm $TOPDIR/current
+      fi
+      ln -s $TOPDIR/$VERSION $TOPDIR/current
+      chgrp visit $TOPDIR/current
+      if [ -f $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf ] ; then
+         cp $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf \
+            $TOPDIR/$VERSION
+         chgrp visit $TOPDIR/$VERSION/Silo.book.pdf
+      fi
+EOF
+   fi
+   if [ "$DOLC" = "yes" ] ; then
+      ssh ${lcun}@yana "/bin/bash" << EOF
+      umask 002
+      if [ -d $TOPDIR/current ] ; then
+         rm $TOPDIR/current
+      fi
+      ln -s $TOPDIR/$VERSION $TOPDIR/current
+      chgrp visit $TOPDIR/current
+      if [ -f $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf ] ; then
+         cp $TOPDIR/$VERSION/test/$TOPSRCDIR/docs/Silo.book.pdf \
+            $TOPDIR/$VERSION
+         chgrp visit $TOPDIR/$VERSION/Silo.book.pdf
+      fi
+EOF
+   fi
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}final
+      i=i+1
+   done
+elif [[ "$DOCLEAN" = "yes" ]] ; then
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}clean
+      i=i+1
+   done
+   if [[ "$DOBDIV" = "yes" ]] ; then
+      ssh hoth "/bin/bash" << EOF
+      if [ -d $TOPDIR/$VERSION/test ] ; then
+         rm rf $TOPDIR/$VERSION/test
+      fi
+EOF
+   fi 
+   if [ "$DOLC" = "yes" ] ; then
+      ssh ${lcun}@yana "/bin/bash" << EOF
+      if [ -d $TOPDIR/$VERSION/test ] ; then
+         rm rf $TOPDIR/$VERSION/test
+      fi
+EOF
+   fi
+else
+   if [[ "$DOBDIV" = "yes" ]] ; then
+      ssh hoth "/bin/bash" << EOF
+      umask 002
+      if [ ! -d $TOPDIR/$VERSION ] ; then
+         mkdir $TOPDIR/$VERSION
+      fi
+      chgrp visit $TOPDIR/$VERSION
+      chmod a+rX,u+w,o-w,g+s $TOPDIR/$VERSION
+      if [ ! -d $TOPDIR/$VERSION/test ] ; then
+         mkdir $TOPDIR/$VERSION/test
+         chgrp visit $TOPDIR/$VERSION/test
+         chmod a+rX,ug+w $TOPDIR/$VERSION/test
+      fi
+      sleep 5
+EOF
+      if [[ -e $TARFILE ]] ; then
+         scp $TARFILE hoth:$TOPDIR/$VERSION
+         ssh hoth "/bin/bash" << EOF
+         umask 002
+         cd $TOPDIR/$VERSION/test
+         chmod a+r,ug+w ../$TARFILE
+         chgrp visit ../$TARFILE
+         tar zxf ../$TARFILE
+         chgrp -R visit $TOPSRCDIR
+         chmod -R a+rX,ug+w $TOPSRCDIR
+EOF
+      fi
+   fi
+   if [ "$DOLC" = "yes" ] ; then
+      ssh ${lcun}@yana "/bin/bash" << EOF
+      umask 002
+      if [ ! -d $TOPDIR/$VERSION ] ; then
+         mkdir $TOPDIR/$VERSION
+      fi
+      chgrp visit $TOPDIR/$VERSION
+      chmod a+rX,u+w,o-w,g+s $TOPDIR/$VERSION
+      if [ ! -d $TOPDIR/$VERSION/test ] ; then
+         mkdir $TOPDIR/$VERSION/test
+         chgrp visit $TOPDIR/$VERSION/test
+         chmod a+rX,ug+w $TOPDIR/$VERSION/test
+      fi
+EOF
+      if [ -e $TARFILE ] ; then
+         scp $TARFILE ${lcun}@yana:$TOPDIR/$VERSION
+         ssh ${lcun}@yana "/bin/bash" << EOF
+         umask 002
+         cd $TOPDIR/$VERSION/test
+         chmod a+r,ug+w ../$TARFILE
+         chgrp visit ../$TARFILE
+         tar zxf ../$TARFILE
+         chgrp -R visit $TOPSRCDIR
+         chmod -R a+rX,ug+w $TOPSRCDIR
+EOF
+      fi
+   fi
+   i=0
+   while (( i < ${#list[*]} ))
+   do
+      ${list[i]}
+      i=i+1
+   done
+fi
diff --git a/svn_bin/winsilo-dist b/svn_bin/winsilo-dist
new file mode 100755
index 0000000..9e5c749
--- /dev/null
+++ b/svn_bin/winsilo-dist
@@ -0,0 +1,55 @@
+#!/bin/csh -f
+
+# Make a temporary directory and cd into it.
+mkdir tmpsilodir
+cd tmpsilodir
+
+# Unzip the SiloWindows tar file in the current directory
+cp ../silo/SiloWindows.tar .
+tar xvf SiloWindows.tar > /dev/null
+
+# Copy certain header files into the SiloWindows/include directory.
+# The SiloWindows directory already contains config.h and pdform.h which
+# has platform related information but it needs the rest of these directories
+# to build Silo.
+cp ../silo/debug/silo_debug_private.h      SiloWindows/include
+cp ../silo/pdb/pdb.h                       SiloWindows/include
+cp ../silo/pdb_drv/silo_pdb_private.h      SiloWindows/include
+cp ../silo/score/score.h                   SiloWindows/include
+cp ../silo/silo/silo.h                     SiloWindows/include
+cp ../silo/silo/silo_drivers.h             SiloWindows/include
+cp ../silo/silo/silo_f.h                   SiloWindows/include
+cp ../silo/silo/silo_private.h             SiloWindows/include
+cp ../silo/silo/silo_win32_compatibility.h SiloWindows/include
+cp ../silo/swat/swat.h                     SiloWindows/include
+cp ../silo/unknown/silo_unknown_private.h  SiloWindows/include
+
+# Create a silo directory and copy the parts that we will build in
+# the Windows version of Silo.
+mkdir silo
+mkdir silo/debug
+cp ../silo/debug/*.c   silo/debug
+mkdir silo/pdb
+cp ../silo/pdb/*.c     silo/pdb
+mkdir silo/pdb_drv
+cp ../silo/pdb_drv/*.c silo/pdb_drv
+mkdir silo/score
+cp ../silo/score/*.c   silo/score
+mkdir silo/silo
+cp ../silo/silo/*.c    silo/silo
+mkdir silo/swat
+cp ../silo/swat/*.c    silo/swat
+mkdir silo/unknown
+cp ../silo/unknown/*.c silo/unknown
+
+# Create a tar file that has the SiloWindows and silo directories in it.
+tar cf winsilo.tar SiloWindows silo
+gzip winsilo.tar
+
+# Move the tar file to the top directory and remove the tmp directory.
+mv winsilo.tar.gz ..
+cd ..
+rm -rf tmpsilodir
+
+# Tell the user
+echo "The pieces of Silo needed to build on Windows have been placed in winsilo.tar.gz"
diff --git a/tests/Make_ioperf b/tests/Make_ioperf
new file mode 100644
index 0000000..ba41364
--- /dev/null
+++ b/tests/Make_ioperf
@@ -0,0 +1,116 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+SILO_HOME=/groups/visit/miller/silo/trunk/install
+SILO_INC=../src/silo
+SILO_LIB=../src/.libs
+SILO_LIBF=$(SILO_LIB)/libsiloh5.a
+
+# set for pdb-lite
+PDB_HOME=$(SILO_HOME)
+PDB_INC=/usr/gapps/visit/1.12.1/linux-intel/include/visit
+PDB_LIB=$(PDB_HOME)/lib
+PDB_LIBF=$(SILO_LIBF)
+
+HDF5_HOME=/usr/gapps/silo/hdf5/1.8.4/i686_Linux_ELsmp
+HDF5_INC=$(HDF5_HOME)/include
+HDF5_LIB=$(HDF5_HOME)/lib
+HDF5_LIBF=$(HDF5_LIB)/libhdf5.a
+
+# only for linking
+SZIP_HOME=/usr/gapps/silo/szip/2.1/i686_Linux_ELsmp
+SZIP_LIB=$(SZIP_HOME)/lib
+SZIP_LIBF=$(SZIP_LIB)/libsz.a
+
+#ZLIB_HOME=/usr/gapps/silo/zlib/1.2.3/sles_10_ppc64
+#ZLIB_LIB=$(ZLIB_HOME)/lib
+#ZLIB_LIBF=$(ZLIB_LIB)/libz.a
+
+#CFLAGS=-DPARALLEL
+#CC=mpixlc
+#LINK=mpixlcxx
+
+CFLAGS=-g -pg
+CC=gcc
+LINK=g++
+
+.SUFFIXES: .c .so .o
+
+DRIVER_SRC=\
+    ioperf_sec2.c \
+    ioperf_stdio.c \
+    ioperf_hdf5.c \
+    ioperf_silo.c \
+    ioperf_pdb.c
+
+DRIVER_STATIC_OBJ=$(DRIVER_SRC:.c=.o)
+DRIVER_SHARED_OBJ=$(DRIVER_SRC:.c=.so)
+
+# shared object rule
+.c.so:
+	$(CC) $< -o $@ -shared $(CFLAGS) -I. -I$(HDF5_INC) -I$(PDB_INC) -I$(SILO_INC) \
+		$(SILO_LIBF) $(HDF5_LIBF) $(SZIP_LIBF) $(ZLIB_LIBF)
+
+# object rule
+.c.o:
+	$(CC) $< -o $@ -c -DSTATIC_PLUGINS $(CFLAGS) -I. -I$(HDF5_INC) -I$(PDB_INC) -I$(SILO_INC)
+
+ioperf_shared.o: ioperf.c
+	$(CC) $< -o $@ -c $(CFLAGS) -I.
+
+ioperf_static.o: ioperf.c
+	$(CC) $< -o $@ -c -DSTATIC_PLUGINS $(CFLAGS) -I.
+
+ioperf_shared: ioperf_shared.o $(DRIVER_SHARED_OBJ)
+	$(LINK) $< -o $@ $(CFLAGS) $(DRIVER_SHARED_OBJ) -ldl -lz -lm \
+	-Wl,-rpath -Wl,`pwd`
+
+ioperf_static: ioperf_static.o $(DRIVER_STATIC_OBJ)
+	$(LINK) $< -o $@ $(CFLAGS) $(DRIVER_STATIC_OBJ) $(SILO_LIBF) $(HDF5_LIBF) $(SZIP_LIBF) $(ZLIB_LIBF) -lz -lm
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..44e102d
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,382 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+# making use of the autotest features in autoconf
+# 
+
+# some example commands to compile ioperf plugins
+# gcc -shared -I. ioperf_sec2.c -o libiop_sec2.so
+# gcc -shared -I. ioperf_stdio.c -o libiop_stdio.so
+# gcc -shared -I. -I/usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/include ioperf_hdf5.c -o libiop_hdf5.so /usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/lib/libhdf5.a
+
+EXTRA_DIST= \
+ package.m4 \
+ pdbcmp.csh \
+ testsuite.at \
+ testsuite \
+ pmpio_hdf5_test.c \
+ pmpio_silo_test_mesh.c \
+ add_amr_mrgtree.c \
+ amr3d.silo \
+ amr2d.silo \
+ amr2d_mesh_config.xml \
+ amr3d_mesh_config.xml \
+ not_a_silo_file.h5 \
+ not_a_silo_file.pdb \
+ ioperf_sec2.c \
+ ioperf_stdio.c \
+ ioperf_hdf5.c \
+ ioperf_pdb.c \
+ ioperf_silo.c \
+ Make_ioperf \
+ ioperf_tests \
+ std.c \
+ $(check_SCRIPTS) \
+ $(check_DATA)
+
+include_HEADERS = \
+ ioperf.h
+
+# Note: use top entry in check_SCRIPTS as sole target to
+# copy all scripts and data in one rule
+check_SCRIPTS= \
+ checksums \
+ testhzip \
+ testxvers \
+ test_error.py \
+ test_read.py \
+ test_write.py \
+ testsilock \
+ testdtypes
+
+check_DATA= \
+ xvers_data.tar.bz2 \
+ pion0244.silo
+
+DISTCLEANFILES = atconfig
+AUTOM4TE = autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+TESTSUITE = $(srcdir)/testsuite
+
+if HDF5_DRV_NEEDED
+  LDADD = ../src/libsiloh5.la
+else
+  LDADD = ../src/libsilo.la
+endif
+
+# paths look at install directories before sources
+AM_CPPFLAGS = \
+ -I$(srcdir)/../src/pdb \
+ -I$(srcdir)/../src/score \
+ -I$(builddir)/../src/silo \
+ -I$(srcdir)/../src/silo \
+ -I$(includedir)
+quad_CPPFLAGS = $(AM_CPPFLAGS)
+TestReadMask_CPPFLAGS = $(AM_CPPFLAGS)
+AM_FFLAGS = $(AM_CPPFLAGS)
+
+HDF5PROGS=compression grab
+FCPROGS= arrayf77 curvef77 matf77 pointf77 quadf77 ucdf77 testallf77
+PROGS=array dir extface multi_test partial_io point quad simple ucd \
+      ucdsamp3 testall obj onehex oneprism onepyramid onetet subhex \
+      TestReadMask twohex multispec sami specmix spec cpz1plt spec \
+      cpz1plt group_test listtypes alltypes wave multi_file polyzl csg \
+      rocket mmadjacency largefile version namescheme efcentering \
+      mk_nasf_pdb ioperf arbpoly2d readstuff
+
+dir_SOURCES = \
+ dir.c \
+ testlib.c
+quad_SOURCES = \
+ quad.c \
+ testlib.c
+rocket_SOURCES = \
+ rocket.cpp
+
+check_PROGRAMS = \
+ arbpoly2d \
+ array \
+ extface \
+ multi_test \
+ partial_io \
+ point \
+ group_test \
+ listtypes \
+ simple \
+ ucd \
+ ucdsamp3 \
+ testall \
+ alltypes \
+ obj \
+ onehex \
+ oneprism \
+ onepyramid \
+ onetet \
+ TestReadMask \
+ subhex \
+ twohex \
+ multispec \
+ specmix \
+ testpdb \
+ sami \
+ spec \
+ cpz1plt \
+ merge_block \
+ mat3d_3across \
+ ucd1d \
+ wave \
+ multi_file \
+ polyzl \
+ csg \
+ rocket \
+ mmadjacency \
+ largefile \
+ dir \
+ quad \
+ version \
+ namescheme \
+ efcentering \
+ mk_nasf_pdb \
+ ioperf \
+ readstuff
+
+
+# Deal with need to use c++ linker whenever we've got C++
+# sources compiled with the silo library and the fact that
+# Automake/gmake won't let me just say LINK=$(CXXLINK). 
+# This is a hack to force c++ linkage when we have
+# c++ code compiled into Silo. I got this hack from
+# automake manaual.
+if CXX_LINK_NEEDED
+ nodist_EXTRA_arbpoly2d_SOURCES = dummy.cxx
+ nodist_EXTRA_array_SOURCES = dummy.cxx
+ nodist_EXTRA_extface_SOURCES = dummy.cxx
+ nodist_EXTRA_multi_test_SOURCES = dummy.cxx
+ nodist_EXTRA_partial_io_SOURCES = dummy.cxx
+ nodist_EXTRA_point_SOURCES = dummy.cxx
+ nodist_EXTRA_group_test_SOURCES = dummy.cxx
+ nodist_EXTRA_listtypes_SOURCES = dummy.cxx
+ nodist_EXTRA_simple_SOURCES = dummy.cxx
+ nodist_EXTRA_ucd_SOURCES = dummy.cxx
+ nodist_EXTRA_ucdsamp3_SOURCES = dummy.cxx
+ nodist_EXTRA_testall_SOURCES = dummy.cxx
+ nodist_EXTRA_alltypes_SOURCES = dummy.cxx
+ nodist_EXTRA_obj_SOURCES = dummy.cxx
+ nodist_EXTRA_onehex_SOURCES = dummy.cxx
+ nodist_EXTRA_oneprism_SOURCES = dummy.cxx
+ nodist_EXTRA_onepyramid_SOURCES = dummy.cxx
+ nodist_EXTRA_onetet_SOURCES = dummy.cxx
+ nodist_EXTRA_TestReadMask_SOURCES = dummy.cxx
+ nodist_EXTRA_subhex_SOURCES = dummy.cxx
+ nodist_EXTRA_twohex_SOURCES = dummy.cxx
+ nodist_EXTRA_multispec_SOURCES = dummy.cxx
+ nodist_EXTRA_specmix_SOURCES = dummy.cxx
+ nodist_EXTRA_testpdb_SOURCES = dummy.cxx
+ nodist_EXTRA_sami_SOURCES = dummy.cxx
+ nodist_EXTRA_spec_SOURCES = dummy.cxx
+ nodist_EXTRA_cpz1plt_SOURCES = dummy.cxx
+ nodist_EXTRA_merge_block_SOURCES = dummy.cxx
+ nodist_EXTRA_mat3d_3across_SOURCES = dummy.cxx
+ nodist_EXTRA_ucd1d_SOURCES = dummy.cxx
+ nodist_EXTRA_wave_SOURCES = dummy.cxx
+ nodist_EXTRA_multi_file_SOURCES = dummy.cxx
+ nodist_EXTRA_polyzl_SOURCES = dummy.cxx
+ nodist_EXTRA_csg_SOURCES = dummy.cxx
+ nodist_EXTRA_rocket_SOURCES = dummy.cxx
+ nodist_EXTRA_mmadjacency_SOURCES = dummy.cxx
+ nodist_EXTRA_largefile_SOURCES = dummy.cxx
+ nodist_EXTRA_dir_SOURCES = dummy.cxx
+ nodist_EXTRA_quad_SOURCES = dummy.cxx
+ nodist_EXTRA_version_SOURCES = dummy.cxx
+ nodist_EXTRA_namescheme_SOURCES = dummy.cxx
+ nodist_EXTRA_arrayf77_SOURCES = dummy.cxx
+ nodist_EXTRA_curvef77_SOURCES = dummy.cxx
+ nodist_EXTRA_matf77_SOURCES = dummy.cxx
+ nodist_EXTRA_pointf77_SOURCES = dummy.cxx
+ nodist_EXTRA_quadf77_SOURCES = dummy.cxx
+ nodist_EXTRA_ucdf77_SOURCES = dummy.cxx
+ nodist_EXTRA_testallf77_SOURCES = dummy.cxx
+ nodist_EXTRA_compression_SOURCES = dummy.cxx
+ nodist_EXTRA_grab_SOURCES = dummy.cxx
+ nodist_EXTRA_efcentering_SOURCES = dummy.cxx
+ nodist_EXTRA_mk_nasf_pdb_SOURCES = dummy.cxx
+ nodist_EXTRA_ioperf_SOURCES = dummy.cxx
+ nodist_EXTRA_readstuff_SOURCES = dummy.cxx
+endif
+
+ioperf_LDADD = -ldl
+
+if HDF5_DRV_NEEDED
+  PROGS += $(HDF5PROGS)
+  check_PROGRAMS += $(HDF5PROGS)
+  compression_SOURCES = compression.c
+  compression_LDADD = $(LDADD)
+  grab_SOURCES = grab.c
+  grab_LDADD = $(LDADD)
+endif
+
+if FORTRAN_NEEDED
+  PROGS += $(FCPROGS)
+  check_PROGRAMS += $(FCPROGS)
+  arrayf77_SOURCES = arrayf77.f
+  arrayf77_LDADD = $(LDADD) $(FCLIBS)
+  curvef77_SOURCES = curvef77.f
+  curvef77_LDADD = $(LDADD) $(FCLIBS)
+  matf77_SOURCES = matf77.f
+  matf77_LDADD = $(LDADD) $(FCLIBS)
+  pointf77_SOURCES = pointf77.f
+  pointf77_LDADD = $(LDADD) $(FCLIBS)
+  quadf77_SOURCES = quadf77.f
+  quadf77_LDADD = $(LDADD) $(FCLIBS)
+  ucdf77_SOURCES = ucdf77.f
+  ucdf77_LDADD = $(LDADD) $(FCLIBS)
+  testallf77_SOURCES = testallf77.f
+  testallf77_LDADD = $(LDADD) $(FCLIBS)
+endif
+
+all-local:
+	@echo
+	@if (fmt</dev/null)>/dev/null 2>&1;then fmt="fmt -70";else fmt=cat;fi;\
+	   echo 'Silo test cases are not compiled by default.  To compile and'\
+	      'test them run "make check" from the silo "tests" directory.'\
+	      'Otherwise you can compile them individually with "make'\
+	      'TESTNAME".  The test names are: $(PROGS:=,) but "testall" is'\
+	      'a good one to start with.' |\
+	   $$fmt | sed 's/^/NOTICE: /'
+	@echo
+
+#
+# Autotest targets.
+# Since we run testsuite multiple times in different 'modes', we
+# need some extra logic to contatentate all the results into a
+# single, final testsuite.log.
+# ATARGS = args to testsuite (autotest) script itself.
+# STARGS = args to silo tests.
+# By default, with no special args, we run the testsuite twice,
+# first on PDB driver and then on HDF5 driver.
+check-local: $(TESTSUITE) $(PROGS)
+	$(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS="$(STARGS)" $(ATARGS)
+	@if test -e testsuite.log; then \
+	    cp testsuite.log testsuite.log.pdb ; \
+	fi
+if PDBP_DRV_NEEDED
+	@if test -z "$(STARGS)"; then \
+	    $(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS=DB_PDBP $(ATARGS); \
+	    if test -e testsuite.log; then \
+	        cp testsuite.log testsuite.log.pdbp ; \
+	    fi \
+	fi
+endif
+if HDF5_DRV_NEEDED
+	@if test -z "$(STARGS)"; then \
+	    $(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS=DB_HDF5 $(ATARGS); \
+	    if test -e testsuite.log; then \
+	        cp testsuite.log testsuite.log.hdf5; \
+	    fi \
+	fi
+endif
+	@rm -f testsuite.log
+	@if test -e testsuite.log.pdb; then \
+	    cat testsuite.log.pdb >> testsuite.log ; \
+	fi
+	@if test -e testsuite.log.pdbp; then \
+	    cat testsuite.log.pdbp >> testsuite.log ; \
+	fi
+	@if test -e testsuite.log.hdf5; then \
+	    cat testsuite.log.hdf5 >> testsuite.log ; \
+	fi
+
+clean-local:
+	rm -f testsuite.log
+	rm -rf testsuite.dir
+
+testsuite: $(srcdir)/testsuite.at $(top_srcdir)/VERSION
+	$(AUTOTEST) -I $(srcdir) $@.at -o $@.tmp
+	-mv -f $@.tmp $@
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac $(top_srcdir)/VERSION
+	{					\
+	  echo '# Signature of the current package.'; \
+	  echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+	  echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+	  echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+	  echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+	} >$(srcdir)/package.m4
+
+# deal with the CC=mpicc until I can find a better way
+# Mark C. Miller, Sat May 29 08:15:48 PDT 2010
+#     put CPPFLAGS ahead of AMCPPFLAGS
+resample$(EXEEXT): $(resample_OBJECTS) $(resample_DEPENDENCIES)
+	@rm -f resample$(EXEEXT)
+	$(LIBTOOL) --tag=CC --mode=link $(MPICC) $(AM_CFLAGS) $(CFLAGS) \
+		$(AM_LDFLAGS) $(LDFLAGS) -o $@ $(resample_LDFLAGS) \
+		$(resample_OBJECTS) $(resample_LDADD) $(LIBS)
+resample.o: resample.c
+	$(MPICC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resample.o `test -f 'resample.c' || echo '$(srcdir)/'`resample.c
+resample.lo: resample.c
+	$(LIBTOOL) --tag=CC --mode=compile $(MPICC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $<
+
+tests: $(PROGS)
+
+# Single rule to capture anything put into check_DATA or check_SCRIPTS
+# this assumes the only action necessary to create is a copy
+checksums: copy_cksd
+copy_cksd:
+	@for f in $(check_SCRIPTS) $(check_DATA); do \
+	    if test ! -e $$f ; then \
+	        cp $(srcdir)/$$f . ;\
+	    fi ;\
+	done
+	touch $@
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..ee18680
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,1538 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+# making use of the autotest features in autoconf
+# 
+
+# some example commands to compile ioperf plugins
+# gcc -shared -I. ioperf_sec2.c -o libiop_sec2.so
+# gcc -shared -I. ioperf_stdio.c -o libiop_stdio.so
+# gcc -shared -I. -I/usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/include ioperf_hdf5.c -o libiop_hdf5.so /usr/gapps/silo/hdf5/1.8.1/i686_Linux_ELsmp/lib/libhdf5.a
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = arbpoly2d$(EXEEXT) array$(EXEEXT) extface$(EXEEXT) \
+	multi_test$(EXEEXT) partial_io$(EXEEXT) point$(EXEEXT) \
+	group_test$(EXEEXT) listtypes$(EXEEXT) simple$(EXEEXT) \
+	ucd$(EXEEXT) ucdsamp3$(EXEEXT) testall$(EXEEXT) \
+	alltypes$(EXEEXT) obj$(EXEEXT) onehex$(EXEEXT) \
+	oneprism$(EXEEXT) onepyramid$(EXEEXT) onetet$(EXEEXT) \
+	TestReadMask$(EXEEXT) subhex$(EXEEXT) twohex$(EXEEXT) \
+	multispec$(EXEEXT) specmix$(EXEEXT) testpdb$(EXEEXT) \
+	sami$(EXEEXT) spec$(EXEEXT) cpz1plt$(EXEEXT) \
+	merge_block$(EXEEXT) mat3d_3across$(EXEEXT) ucd1d$(EXEEXT) \
+	wave$(EXEEXT) multi_file$(EXEEXT) polyzl$(EXEEXT) csg$(EXEEXT) \
+	rocket$(EXEEXT) mmadjacency$(EXEEXT) largefile$(EXEEXT) \
+	dir$(EXEEXT) quad$(EXEEXT) version$(EXEEXT) \
+	namescheme$(EXEEXT) efcentering$(EXEEXT) mk_nasf_pdb$(EXEEXT) \
+	ioperf$(EXEEXT) readstuff$(EXEEXT) $(am__EXEEXT_2) \
+	$(am__EXEEXT_4)
+ at HDF5_DRV_NEEDED_TRUE@am__append_1 = $(HDF5PROGS)
+ at HDF5_DRV_NEEDED_TRUE@am__append_2 = $(HDF5PROGS)
+ at FORTRAN_NEEDED_TRUE@am__append_3 = $(FCPROGS)
+ at FORTRAN_NEEDED_TRUE@am__append_4 = $(FCPROGS)
+subdir = tests
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__EXEEXT_1 = compression$(EXEEXT) grab$(EXEEXT)
+ at HDF5_DRV_NEEDED_TRUE@am__EXEEXT_2 = $(am__EXEEXT_1)
+am__EXEEXT_3 = arrayf77$(EXEEXT) curvef77$(EXEEXT) matf77$(EXEEXT) \
+	pointf77$(EXEEXT) quadf77$(EXEEXT) ucdf77$(EXEEXT) \
+	testallf77$(EXEEXT)
+ at FORTRAN_NEEDED_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3)
+TestReadMask_SOURCES = TestReadMask.c
+TestReadMask_OBJECTS = TestReadMask-TestReadMask.$(OBJEXT)
+TestReadMask_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@TestReadMask_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@TestReadMask_DEPENDENCIES = ../src/libsiloh5.la
+alltypes_SOURCES = alltypes.c
+alltypes_OBJECTS = alltypes.$(OBJEXT)
+alltypes_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@alltypes_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@alltypes_DEPENDENCIES = ../src/libsiloh5.la
+arbpoly2d_SOURCES = arbpoly2d.c
+arbpoly2d_OBJECTS = arbpoly2d.$(OBJEXT)
+arbpoly2d_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@arbpoly2d_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@arbpoly2d_DEPENDENCIES = ../src/libsiloh5.la
+array_SOURCES = array.c
+array_OBJECTS = array.$(OBJEXT)
+array_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@array_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@array_DEPENDENCIES = ../src/libsiloh5.la
+am__arrayf77_SOURCES_DIST = arrayf77.f
+ at FORTRAN_NEEDED_TRUE@am_arrayf77_OBJECTS = arrayf77.$(OBJEXT)
+arrayf77_OBJECTS = $(am_arrayf77_OBJECTS)
+am__DEPENDENCIES_1 =
+ at FORTRAN_NEEDED_TRUE@arrayf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+am__compression_SOURCES_DIST = compression.c
+ at HDF5_DRV_NEEDED_TRUE@am_compression_OBJECTS = compression.$(OBJEXT)
+compression_OBJECTS = $(am_compression_OBJECTS)
+ at HDF5_DRV_NEEDED_TRUE@compression_DEPENDENCIES = $(LDADD)
+cpz1plt_SOURCES = cpz1plt.c
+cpz1plt_OBJECTS = cpz1plt.$(OBJEXT)
+cpz1plt_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@cpz1plt_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@cpz1plt_DEPENDENCIES = ../src/libsiloh5.la
+csg_SOURCES = csg.c
+csg_OBJECTS = csg.$(OBJEXT)
+csg_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@csg_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@csg_DEPENDENCIES = ../src/libsiloh5.la
+am__curvef77_SOURCES_DIST = curvef77.f
+ at FORTRAN_NEEDED_TRUE@am_curvef77_OBJECTS = curvef77.$(OBJEXT)
+curvef77_OBJECTS = $(am_curvef77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@curvef77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+am_dir_OBJECTS = dir.$(OBJEXT) testlib.$(OBJEXT)
+dir_OBJECTS = $(am_dir_OBJECTS)
+dir_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@dir_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@dir_DEPENDENCIES = ../src/libsiloh5.la
+efcentering_SOURCES = efcentering.c
+efcentering_OBJECTS = efcentering.$(OBJEXT)
+efcentering_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@efcentering_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@efcentering_DEPENDENCIES = ../src/libsiloh5.la
+extface_SOURCES = extface.c
+extface_OBJECTS = extface.$(OBJEXT)
+extface_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@extface_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@extface_DEPENDENCIES = ../src/libsiloh5.la
+am__grab_SOURCES_DIST = grab.c
+ at HDF5_DRV_NEEDED_TRUE@am_grab_OBJECTS = grab.$(OBJEXT)
+grab_OBJECTS = $(am_grab_OBJECTS)
+ at HDF5_DRV_NEEDED_TRUE@grab_DEPENDENCIES = $(LDADD)
+group_test_SOURCES = group_test.c
+group_test_OBJECTS = group_test.$(OBJEXT)
+group_test_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@group_test_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@group_test_DEPENDENCIES = ../src/libsiloh5.la
+ioperf_SOURCES = ioperf.c
+ioperf_OBJECTS = ioperf.$(OBJEXT)
+ioperf_DEPENDENCIES =
+largefile_SOURCES = largefile.c
+largefile_OBJECTS = largefile.$(OBJEXT)
+largefile_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@largefile_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@largefile_DEPENDENCIES = ../src/libsiloh5.la
+listtypes_SOURCES = listtypes.c
+listtypes_OBJECTS = listtypes.$(OBJEXT)
+listtypes_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@listtypes_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@listtypes_DEPENDENCIES = ../src/libsiloh5.la
+mat3d_3across_SOURCES = mat3d_3across.c
+mat3d_3across_OBJECTS = mat3d_3across.$(OBJEXT)
+mat3d_3across_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@mat3d_3across_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@mat3d_3across_DEPENDENCIES =  \
+ at HDF5_DRV_NEEDED_TRUE@	../src/libsiloh5.la
+am__matf77_SOURCES_DIST = matf77.f
+ at FORTRAN_NEEDED_TRUE@am_matf77_OBJECTS = matf77.$(OBJEXT)
+matf77_OBJECTS = $(am_matf77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@matf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+merge_block_SOURCES = merge_block.c
+merge_block_OBJECTS = merge_block.$(OBJEXT)
+merge_block_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@merge_block_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@merge_block_DEPENDENCIES = ../src/libsiloh5.la
+mk_nasf_pdb_SOURCES = mk_nasf_pdb.c
+mk_nasf_pdb_OBJECTS = mk_nasf_pdb.$(OBJEXT)
+mk_nasf_pdb_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@mk_nasf_pdb_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@mk_nasf_pdb_DEPENDENCIES = ../src/libsiloh5.la
+mmadjacency_SOURCES = mmadjacency.c
+mmadjacency_OBJECTS = mmadjacency.$(OBJEXT)
+mmadjacency_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@mmadjacency_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@mmadjacency_DEPENDENCIES = ../src/libsiloh5.la
+multi_file_SOURCES = multi_file.c
+multi_file_OBJECTS = multi_file.$(OBJEXT)
+multi_file_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@multi_file_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@multi_file_DEPENDENCIES = ../src/libsiloh5.la
+multi_test_SOURCES = multi_test.c
+multi_test_OBJECTS = multi_test.$(OBJEXT)
+multi_test_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@multi_test_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@multi_test_DEPENDENCIES = ../src/libsiloh5.la
+multispec_SOURCES = multispec.c
+multispec_OBJECTS = multispec.$(OBJEXT)
+multispec_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@multispec_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@multispec_DEPENDENCIES = ../src/libsiloh5.la
+namescheme_SOURCES = namescheme.c
+namescheme_OBJECTS = namescheme.$(OBJEXT)
+namescheme_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@namescheme_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@namescheme_DEPENDENCIES = ../src/libsiloh5.la
+obj_SOURCES = obj.c
+obj_OBJECTS = obj.$(OBJEXT)
+obj_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@obj_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@obj_DEPENDENCIES = ../src/libsiloh5.la
+onehex_SOURCES = onehex.c
+onehex_OBJECTS = onehex.$(OBJEXT)
+onehex_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@onehex_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@onehex_DEPENDENCIES = ../src/libsiloh5.la
+oneprism_SOURCES = oneprism.c
+oneprism_OBJECTS = oneprism.$(OBJEXT)
+oneprism_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@oneprism_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@oneprism_DEPENDENCIES = ../src/libsiloh5.la
+onepyramid_SOURCES = onepyramid.c
+onepyramid_OBJECTS = onepyramid.$(OBJEXT)
+onepyramid_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@onepyramid_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@onepyramid_DEPENDENCIES = ../src/libsiloh5.la
+onetet_SOURCES = onetet.c
+onetet_OBJECTS = onetet.$(OBJEXT)
+onetet_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@onetet_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@onetet_DEPENDENCIES = ../src/libsiloh5.la
+partial_io_SOURCES = partial_io.c
+partial_io_OBJECTS = partial_io.$(OBJEXT)
+partial_io_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@partial_io_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@partial_io_DEPENDENCIES = ../src/libsiloh5.la
+point_SOURCES = point.c
+point_OBJECTS = point.$(OBJEXT)
+point_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@point_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@point_DEPENDENCIES = ../src/libsiloh5.la
+am__pointf77_SOURCES_DIST = pointf77.f
+ at FORTRAN_NEEDED_TRUE@am_pointf77_OBJECTS = pointf77.$(OBJEXT)
+pointf77_OBJECTS = $(am_pointf77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@pointf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+polyzl_SOURCES = polyzl.c
+polyzl_OBJECTS = polyzl.$(OBJEXT)
+polyzl_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@polyzl_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@polyzl_DEPENDENCIES = ../src/libsiloh5.la
+am_quad_OBJECTS = quad-quad.$(OBJEXT) quad-testlib.$(OBJEXT)
+quad_OBJECTS = $(am_quad_OBJECTS)
+quad_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@quad_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@quad_DEPENDENCIES = ../src/libsiloh5.la
+am__quadf77_SOURCES_DIST = quadf77.f
+ at FORTRAN_NEEDED_TRUE@am_quadf77_OBJECTS = quadf77.$(OBJEXT)
+quadf77_OBJECTS = $(am_quadf77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@quadf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+readstuff_SOURCES = readstuff.c
+readstuff_OBJECTS = readstuff.$(OBJEXT)
+readstuff_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@readstuff_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@readstuff_DEPENDENCIES = ../src/libsiloh5.la
+am_rocket_OBJECTS = rocket.$(OBJEXT)
+rocket_OBJECTS = $(am_rocket_OBJECTS)
+rocket_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@rocket_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@rocket_DEPENDENCIES = ../src/libsiloh5.la
+sami_SOURCES = sami.c
+sami_OBJECTS = sami.$(OBJEXT)
+sami_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@sami_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@sami_DEPENDENCIES = ../src/libsiloh5.la
+simple_SOURCES = simple.c
+simple_OBJECTS = simple.$(OBJEXT)
+simple_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@simple_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@simple_DEPENDENCIES = ../src/libsiloh5.la
+spec_SOURCES = spec.c
+spec_OBJECTS = spec.$(OBJEXT)
+spec_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@spec_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@spec_DEPENDENCIES = ../src/libsiloh5.la
+specmix_SOURCES = specmix.c
+specmix_OBJECTS = specmix.$(OBJEXT)
+specmix_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@specmix_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@specmix_DEPENDENCIES = ../src/libsiloh5.la
+subhex_SOURCES = subhex.c
+subhex_OBJECTS = subhex.$(OBJEXT)
+subhex_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@subhex_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@subhex_DEPENDENCIES = ../src/libsiloh5.la
+testall_SOURCES = testall.c
+testall_OBJECTS = testall.$(OBJEXT)
+testall_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@testall_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@testall_DEPENDENCIES = ../src/libsiloh5.la
+am__testallf77_SOURCES_DIST = testallf77.f
+ at FORTRAN_NEEDED_TRUE@am_testallf77_OBJECTS = testallf77.$(OBJEXT)
+testallf77_OBJECTS = $(am_testallf77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@testallf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+testpdb_SOURCES = testpdb.c
+testpdb_OBJECTS = testpdb.$(OBJEXT)
+testpdb_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@testpdb_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@testpdb_DEPENDENCIES = ../src/libsiloh5.la
+twohex_SOURCES = twohex.c
+twohex_OBJECTS = twohex.$(OBJEXT)
+twohex_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@twohex_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@twohex_DEPENDENCIES = ../src/libsiloh5.la
+ucd_SOURCES = ucd.c
+ucd_OBJECTS = ucd.$(OBJEXT)
+ucd_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@ucd_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@ucd_DEPENDENCIES = ../src/libsiloh5.la
+ucd1d_SOURCES = ucd1d.c
+ucd1d_OBJECTS = ucd1d.$(OBJEXT)
+ucd1d_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@ucd1d_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@ucd1d_DEPENDENCIES = ../src/libsiloh5.la
+am__ucdf77_SOURCES_DIST = ucdf77.f
+ at FORTRAN_NEEDED_TRUE@am_ucdf77_OBJECTS = ucdf77.$(OBJEXT)
+ucdf77_OBJECTS = $(am_ucdf77_OBJECTS)
+ at FORTRAN_NEEDED_TRUE@ucdf77_DEPENDENCIES = $(LDADD) \
+ at FORTRAN_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+ucdsamp3_SOURCES = ucdsamp3.c
+ucdsamp3_OBJECTS = ucdsamp3.$(OBJEXT)
+ucdsamp3_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@ucdsamp3_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@ucdsamp3_DEPENDENCIES = ../src/libsiloh5.la
+version_SOURCES = version.c
+version_OBJECTS = version.$(OBJEXT)
+version_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@version_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@version_DEPENDENCIES = ../src/libsiloh5.la
+wave_SOURCES = wave.c
+wave_OBJECTS = wave.$(OBJEXT)
+wave_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_FALSE@wave_DEPENDENCIES = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@wave_DEPENDENCIES = ../src/libsiloh5.la
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(nodist_EXTRA_TestReadMask_SOURCES) TestReadMask.c \
+	$(nodist_EXTRA_alltypes_SOURCES) alltypes.c \
+	$(nodist_EXTRA_arbpoly2d_SOURCES) arbpoly2d.c \
+	$(nodist_EXTRA_array_SOURCES) array.c $(arrayf77_SOURCES) \
+	$(nodist_EXTRA_arrayf77_SOURCES) $(compression_SOURCES) \
+	$(nodist_EXTRA_compression_SOURCES) \
+	$(nodist_EXTRA_cpz1plt_SOURCES) cpz1plt.c \
+	$(nodist_EXTRA_csg_SOURCES) csg.c $(curvef77_SOURCES) \
+	$(nodist_EXTRA_curvef77_SOURCES) $(dir_SOURCES) \
+	$(nodist_EXTRA_dir_SOURCES) \
+	$(nodist_EXTRA_efcentering_SOURCES) efcentering.c \
+	$(nodist_EXTRA_extface_SOURCES) extface.c $(grab_SOURCES) \
+	$(nodist_EXTRA_grab_SOURCES) \
+	$(nodist_EXTRA_group_test_SOURCES) group_test.c \
+	$(nodist_EXTRA_ioperf_SOURCES) ioperf.c \
+	$(nodist_EXTRA_largefile_SOURCES) largefile.c \
+	$(nodist_EXTRA_listtypes_SOURCES) listtypes.c \
+	$(nodist_EXTRA_mat3d_3across_SOURCES) mat3d_3across.c \
+	$(matf77_SOURCES) $(nodist_EXTRA_matf77_SOURCES) \
+	$(nodist_EXTRA_merge_block_SOURCES) merge_block.c \
+	$(nodist_EXTRA_mk_nasf_pdb_SOURCES) mk_nasf_pdb.c \
+	$(nodist_EXTRA_mmadjacency_SOURCES) mmadjacency.c \
+	$(nodist_EXTRA_multi_file_SOURCES) multi_file.c \
+	$(nodist_EXTRA_multi_test_SOURCES) multi_test.c \
+	$(nodist_EXTRA_multispec_SOURCES) multispec.c \
+	$(nodist_EXTRA_namescheme_SOURCES) namescheme.c \
+	$(nodist_EXTRA_obj_SOURCES) obj.c \
+	$(nodist_EXTRA_onehex_SOURCES) onehex.c \
+	$(nodist_EXTRA_oneprism_SOURCES) oneprism.c \
+	$(nodist_EXTRA_onepyramid_SOURCES) onepyramid.c \
+	$(nodist_EXTRA_onetet_SOURCES) onetet.c \
+	$(nodist_EXTRA_partial_io_SOURCES) partial_io.c \
+	$(nodist_EXTRA_point_SOURCES) point.c $(pointf77_SOURCES) \
+	$(nodist_EXTRA_pointf77_SOURCES) \
+	$(nodist_EXTRA_polyzl_SOURCES) polyzl.c $(quad_SOURCES) \
+	$(nodist_EXTRA_quad_SOURCES) $(quadf77_SOURCES) \
+	$(nodist_EXTRA_quadf77_SOURCES) \
+	$(nodist_EXTRA_readstuff_SOURCES) readstuff.c \
+	$(rocket_SOURCES) $(nodist_EXTRA_rocket_SOURCES) \
+	$(nodist_EXTRA_sami_SOURCES) sami.c \
+	$(nodist_EXTRA_simple_SOURCES) simple.c \
+	$(nodist_EXTRA_spec_SOURCES) spec.c \
+	$(nodist_EXTRA_specmix_SOURCES) specmix.c \
+	$(nodist_EXTRA_subhex_SOURCES) subhex.c \
+	$(nodist_EXTRA_testall_SOURCES) testall.c \
+	$(testallf77_SOURCES) $(nodist_EXTRA_testallf77_SOURCES) \
+	$(nodist_EXTRA_testpdb_SOURCES) testpdb.c \
+	$(nodist_EXTRA_twohex_SOURCES) twohex.c \
+	$(nodist_EXTRA_ucd_SOURCES) ucd.c \
+	$(nodist_EXTRA_ucd1d_SOURCES) ucd1d.c $(ucdf77_SOURCES) \
+	$(nodist_EXTRA_ucdf77_SOURCES) \
+	$(nodist_EXTRA_ucdsamp3_SOURCES) ucdsamp3.c \
+	$(nodist_EXTRA_version_SOURCES) version.c \
+	$(nodist_EXTRA_wave_SOURCES) wave.c
+DIST_SOURCES = TestReadMask.c alltypes.c arbpoly2d.c array.c \
+	$(am__arrayf77_SOURCES_DIST) $(am__compression_SOURCES_DIST) \
+	cpz1plt.c csg.c $(am__curvef77_SOURCES_DIST) $(dir_SOURCES) \
+	efcentering.c extface.c $(am__grab_SOURCES_DIST) group_test.c \
+	ioperf.c largefile.c listtypes.c mat3d_3across.c \
+	$(am__matf77_SOURCES_DIST) merge_block.c mk_nasf_pdb.c \
+	mmadjacency.c multi_file.c multi_test.c multispec.c \
+	namescheme.c obj.c onehex.c oneprism.c onepyramid.c onetet.c \
+	partial_io.c point.c $(am__pointf77_SOURCES_DIST) polyzl.c \
+	$(quad_SOURCES) $(am__quadf77_SOURCES_DIST) readstuff.c \
+	$(rocket_SOURCES) sami.c simple.c spec.c specmix.c subhex.c \
+	testall.c $(am__testallf77_SOURCES_DIST) testpdb.c twohex.c \
+	ucd.c ucd1d.c $(am__ucdf77_SOURCES_DIST) ucdsamp3.c version.c \
+	wave.c
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(includedir)"
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ package.m4 \
+ pdbcmp.csh \
+ testsuite.at \
+ testsuite \
+ pmpio_hdf5_test.c \
+ pmpio_silo_test_mesh.c \
+ add_amr_mrgtree.c \
+ amr3d.silo \
+ amr2d.silo \
+ amr2d_mesh_config.xml \
+ amr3d_mesh_config.xml \
+ not_a_silo_file.h5 \
+ not_a_silo_file.pdb \
+ ioperf_sec2.c \
+ ioperf_stdio.c \
+ ioperf_hdf5.c \
+ ioperf_pdb.c \
+ ioperf_silo.c \
+ Make_ioperf \
+ ioperf_tests \
+ std.c \
+ $(check_SCRIPTS) \
+ $(check_DATA)
+
+include_HEADERS = \
+ ioperf.h
+
+
+# Note: use top entry in check_SCRIPTS as sole target to
+# copy all scripts and data in one rule
+check_SCRIPTS = \
+ checksums \
+ testhzip \
+ testxvers \
+ test_error.py \
+ test_read.py \
+ test_write.py \
+ testsilock \
+ testdtypes
+
+check_DATA = \
+ xvers_data.tar.bz2 \
+ pion0244.silo
+
+DISTCLEANFILES = atconfig
+AUTOM4TE = autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+TESTSUITE = $(srcdir)/testsuite
+ at HDF5_DRV_NEEDED_FALSE@LDADD = ../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@LDADD = ../src/libsiloh5.la
+
+# paths look at install directories before sources
+AM_CPPFLAGS = \
+ -I$(srcdir)/../src/pdb \
+ -I$(srcdir)/../src/score \
+ -I$(builddir)/../src/silo \
+ -I$(srcdir)/../src/silo \
+ -I$(includedir)
+
+quad_CPPFLAGS = $(AM_CPPFLAGS)
+TestReadMask_CPPFLAGS = $(AM_CPPFLAGS)
+AM_FFLAGS = $(AM_CPPFLAGS)
+HDF5PROGS = compression grab
+FCPROGS = arrayf77 curvef77 matf77 pointf77 quadf77 ucdf77 testallf77
+PROGS = array dir extface multi_test partial_io point quad simple ucd \
+	ucdsamp3 testall obj onehex oneprism onepyramid onetet subhex \
+	TestReadMask twohex multispec sami specmix spec cpz1plt spec \
+	cpz1plt group_test listtypes alltypes wave multi_file polyzl \
+	csg rocket mmadjacency largefile version namescheme \
+	efcentering mk_nasf_pdb ioperf arbpoly2d readstuff \
+	$(am__append_1) $(am__append_3)
+dir_SOURCES = \
+ dir.c \
+ testlib.c
+
+quad_SOURCES = \
+ quad.c \
+ testlib.c
+
+rocket_SOURCES = \
+ rocket.cpp
+
+
+# Deal with need to use c++ linker whenever we've got C++
+# sources compiled with the silo library and the fact that
+# Automake/gmake won't let me just say LINK=$(CXXLINK). 
+# This is a hack to force c++ linkage when we have
+# c++ code compiled into Silo. I got this hack from
+# automake manaual.
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_arbpoly2d_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_array_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_extface_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_multi_test_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_partial_io_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_point_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_group_test_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_listtypes_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_simple_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_ucd_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_ucdsamp3_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_testall_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_alltypes_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_obj_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_onehex_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_oneprism_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_onepyramid_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_onetet_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_TestReadMask_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_subhex_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_twohex_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_multispec_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_specmix_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_testpdb_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_sami_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_spec_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_cpz1plt_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_merge_block_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_mat3d_3across_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_ucd1d_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_wave_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_multi_file_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_polyzl_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_csg_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_rocket_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_mmadjacency_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_largefile_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_dir_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_quad_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_version_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_namescheme_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_arrayf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_curvef77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_matf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_pointf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_quadf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_ucdf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_testallf77_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_compression_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_grab_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_efcentering_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_mk_nasf_pdb_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_ioperf_SOURCES = dummy.cxx
+ at CXX_LINK_NEEDED_TRUE@nodist_EXTRA_readstuff_SOURCES = dummy.cxx
+ioperf_LDADD = -ldl
+ at HDF5_DRV_NEEDED_TRUE@compression_SOURCES = compression.c
+ at HDF5_DRV_NEEDED_TRUE@compression_LDADD = $(LDADD)
+ at HDF5_DRV_NEEDED_TRUE@grab_SOURCES = grab.c
+ at HDF5_DRV_NEEDED_TRUE@grab_LDADD = $(LDADD)
+ at FORTRAN_NEEDED_TRUE@arrayf77_SOURCES = arrayf77.f
+ at FORTRAN_NEEDED_TRUE@arrayf77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@curvef77_SOURCES = curvef77.f
+ at FORTRAN_NEEDED_TRUE@curvef77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@matf77_SOURCES = matf77.f
+ at FORTRAN_NEEDED_TRUE@matf77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@pointf77_SOURCES = pointf77.f
+ at FORTRAN_NEEDED_TRUE@pointf77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@quadf77_SOURCES = quadf77.f
+ at FORTRAN_NEEDED_TRUE@quadf77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@ucdf77_SOURCES = ucdf77.f
+ at FORTRAN_NEEDED_TRUE@ucdf77_LDADD = $(LDADD) $(FCLIBS)
+ at FORTRAN_NEEDED_TRUE@testallf77_SOURCES = testallf77.f
+ at FORTRAN_NEEDED_TRUE@testallf77_LDADD = $(LDADD) $(FCLIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .cxx .f .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tests/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+TestReadMask$(EXEEXT): $(TestReadMask_OBJECTS) $(TestReadMask_DEPENDENCIES) 
+	@rm -f TestReadMask$(EXEEXT)
+	$(CXXLINK) $(TestReadMask_OBJECTS) $(TestReadMask_LDADD) $(LIBS)
+alltypes$(EXEEXT): $(alltypes_OBJECTS) $(alltypes_DEPENDENCIES) 
+	@rm -f alltypes$(EXEEXT)
+	$(CXXLINK) $(alltypes_OBJECTS) $(alltypes_LDADD) $(LIBS)
+arbpoly2d$(EXEEXT): $(arbpoly2d_OBJECTS) $(arbpoly2d_DEPENDENCIES) 
+	@rm -f arbpoly2d$(EXEEXT)
+	$(CXXLINK) $(arbpoly2d_OBJECTS) $(arbpoly2d_LDADD) $(LIBS)
+array$(EXEEXT): $(array_OBJECTS) $(array_DEPENDENCIES) 
+	@rm -f array$(EXEEXT)
+	$(CXXLINK) $(array_OBJECTS) $(array_LDADD) $(LIBS)
+arrayf77$(EXEEXT): $(arrayf77_OBJECTS) $(arrayf77_DEPENDENCIES) 
+	@rm -f arrayf77$(EXEEXT)
+	$(CXXLINK) $(arrayf77_OBJECTS) $(arrayf77_LDADD) $(LIBS)
+compression$(EXEEXT): $(compression_OBJECTS) $(compression_DEPENDENCIES) 
+	@rm -f compression$(EXEEXT)
+	$(CXXLINK) $(compression_OBJECTS) $(compression_LDADD) $(LIBS)
+cpz1plt$(EXEEXT): $(cpz1plt_OBJECTS) $(cpz1plt_DEPENDENCIES) 
+	@rm -f cpz1plt$(EXEEXT)
+	$(CXXLINK) $(cpz1plt_OBJECTS) $(cpz1plt_LDADD) $(LIBS)
+csg$(EXEEXT): $(csg_OBJECTS) $(csg_DEPENDENCIES) 
+	@rm -f csg$(EXEEXT)
+	$(CXXLINK) $(csg_OBJECTS) $(csg_LDADD) $(LIBS)
+curvef77$(EXEEXT): $(curvef77_OBJECTS) $(curvef77_DEPENDENCIES) 
+	@rm -f curvef77$(EXEEXT)
+	$(CXXLINK) $(curvef77_OBJECTS) $(curvef77_LDADD) $(LIBS)
+dir$(EXEEXT): $(dir_OBJECTS) $(dir_DEPENDENCIES) 
+	@rm -f dir$(EXEEXT)
+	$(CXXLINK) $(dir_OBJECTS) $(dir_LDADD) $(LIBS)
+efcentering$(EXEEXT): $(efcentering_OBJECTS) $(efcentering_DEPENDENCIES) 
+	@rm -f efcentering$(EXEEXT)
+	$(CXXLINK) $(efcentering_OBJECTS) $(efcentering_LDADD) $(LIBS)
+extface$(EXEEXT): $(extface_OBJECTS) $(extface_DEPENDENCIES) 
+	@rm -f extface$(EXEEXT)
+	$(CXXLINK) $(extface_OBJECTS) $(extface_LDADD) $(LIBS)
+grab$(EXEEXT): $(grab_OBJECTS) $(grab_DEPENDENCIES) 
+	@rm -f grab$(EXEEXT)
+	$(CXXLINK) $(grab_OBJECTS) $(grab_LDADD) $(LIBS)
+group_test$(EXEEXT): $(group_test_OBJECTS) $(group_test_DEPENDENCIES) 
+	@rm -f group_test$(EXEEXT)
+	$(CXXLINK) $(group_test_OBJECTS) $(group_test_LDADD) $(LIBS)
+ioperf$(EXEEXT): $(ioperf_OBJECTS) $(ioperf_DEPENDENCIES) 
+	@rm -f ioperf$(EXEEXT)
+	$(CXXLINK) $(ioperf_OBJECTS) $(ioperf_LDADD) $(LIBS)
+largefile$(EXEEXT): $(largefile_OBJECTS) $(largefile_DEPENDENCIES) 
+	@rm -f largefile$(EXEEXT)
+	$(CXXLINK) $(largefile_OBJECTS) $(largefile_LDADD) $(LIBS)
+listtypes$(EXEEXT): $(listtypes_OBJECTS) $(listtypes_DEPENDENCIES) 
+	@rm -f listtypes$(EXEEXT)
+	$(CXXLINK) $(listtypes_OBJECTS) $(listtypes_LDADD) $(LIBS)
+mat3d_3across$(EXEEXT): $(mat3d_3across_OBJECTS) $(mat3d_3across_DEPENDENCIES) 
+	@rm -f mat3d_3across$(EXEEXT)
+	$(CXXLINK) $(mat3d_3across_OBJECTS) $(mat3d_3across_LDADD) $(LIBS)
+matf77$(EXEEXT): $(matf77_OBJECTS) $(matf77_DEPENDENCIES) 
+	@rm -f matf77$(EXEEXT)
+	$(CXXLINK) $(matf77_OBJECTS) $(matf77_LDADD) $(LIBS)
+merge_block$(EXEEXT): $(merge_block_OBJECTS) $(merge_block_DEPENDENCIES) 
+	@rm -f merge_block$(EXEEXT)
+	$(CXXLINK) $(merge_block_OBJECTS) $(merge_block_LDADD) $(LIBS)
+mk_nasf_pdb$(EXEEXT): $(mk_nasf_pdb_OBJECTS) $(mk_nasf_pdb_DEPENDENCIES) 
+	@rm -f mk_nasf_pdb$(EXEEXT)
+	$(CXXLINK) $(mk_nasf_pdb_OBJECTS) $(mk_nasf_pdb_LDADD) $(LIBS)
+mmadjacency$(EXEEXT): $(mmadjacency_OBJECTS) $(mmadjacency_DEPENDENCIES) 
+	@rm -f mmadjacency$(EXEEXT)
+	$(CXXLINK) $(mmadjacency_OBJECTS) $(mmadjacency_LDADD) $(LIBS)
+multi_file$(EXEEXT): $(multi_file_OBJECTS) $(multi_file_DEPENDENCIES) 
+	@rm -f multi_file$(EXEEXT)
+	$(CXXLINK) $(multi_file_OBJECTS) $(multi_file_LDADD) $(LIBS)
+multi_test$(EXEEXT): $(multi_test_OBJECTS) $(multi_test_DEPENDENCIES) 
+	@rm -f multi_test$(EXEEXT)
+	$(CXXLINK) $(multi_test_OBJECTS) $(multi_test_LDADD) $(LIBS)
+multispec$(EXEEXT): $(multispec_OBJECTS) $(multispec_DEPENDENCIES) 
+	@rm -f multispec$(EXEEXT)
+	$(CXXLINK) $(multispec_OBJECTS) $(multispec_LDADD) $(LIBS)
+namescheme$(EXEEXT): $(namescheme_OBJECTS) $(namescheme_DEPENDENCIES) 
+	@rm -f namescheme$(EXEEXT)
+	$(CXXLINK) $(namescheme_OBJECTS) $(namescheme_LDADD) $(LIBS)
+obj$(EXEEXT): $(obj_OBJECTS) $(obj_DEPENDENCIES) 
+	@rm -f obj$(EXEEXT)
+	$(CXXLINK) $(obj_OBJECTS) $(obj_LDADD) $(LIBS)
+onehex$(EXEEXT): $(onehex_OBJECTS) $(onehex_DEPENDENCIES) 
+	@rm -f onehex$(EXEEXT)
+	$(CXXLINK) $(onehex_OBJECTS) $(onehex_LDADD) $(LIBS)
+oneprism$(EXEEXT): $(oneprism_OBJECTS) $(oneprism_DEPENDENCIES) 
+	@rm -f oneprism$(EXEEXT)
+	$(CXXLINK) $(oneprism_OBJECTS) $(oneprism_LDADD) $(LIBS)
+onepyramid$(EXEEXT): $(onepyramid_OBJECTS) $(onepyramid_DEPENDENCIES) 
+	@rm -f onepyramid$(EXEEXT)
+	$(CXXLINK) $(onepyramid_OBJECTS) $(onepyramid_LDADD) $(LIBS)
+onetet$(EXEEXT): $(onetet_OBJECTS) $(onetet_DEPENDENCIES) 
+	@rm -f onetet$(EXEEXT)
+	$(CXXLINK) $(onetet_OBJECTS) $(onetet_LDADD) $(LIBS)
+partial_io$(EXEEXT): $(partial_io_OBJECTS) $(partial_io_DEPENDENCIES) 
+	@rm -f partial_io$(EXEEXT)
+	$(CXXLINK) $(partial_io_OBJECTS) $(partial_io_LDADD) $(LIBS)
+point$(EXEEXT): $(point_OBJECTS) $(point_DEPENDENCIES) 
+	@rm -f point$(EXEEXT)
+	$(CXXLINK) $(point_OBJECTS) $(point_LDADD) $(LIBS)
+pointf77$(EXEEXT): $(pointf77_OBJECTS) $(pointf77_DEPENDENCIES) 
+	@rm -f pointf77$(EXEEXT)
+	$(CXXLINK) $(pointf77_OBJECTS) $(pointf77_LDADD) $(LIBS)
+polyzl$(EXEEXT): $(polyzl_OBJECTS) $(polyzl_DEPENDENCIES) 
+	@rm -f polyzl$(EXEEXT)
+	$(CXXLINK) $(polyzl_OBJECTS) $(polyzl_LDADD) $(LIBS)
+quad$(EXEEXT): $(quad_OBJECTS) $(quad_DEPENDENCIES) 
+	@rm -f quad$(EXEEXT)
+	$(CXXLINK) $(quad_OBJECTS) $(quad_LDADD) $(LIBS)
+quadf77$(EXEEXT): $(quadf77_OBJECTS) $(quadf77_DEPENDENCIES) 
+	@rm -f quadf77$(EXEEXT)
+	$(CXXLINK) $(quadf77_OBJECTS) $(quadf77_LDADD) $(LIBS)
+readstuff$(EXEEXT): $(readstuff_OBJECTS) $(readstuff_DEPENDENCIES) 
+	@rm -f readstuff$(EXEEXT)
+	$(CXXLINK) $(readstuff_OBJECTS) $(readstuff_LDADD) $(LIBS)
+rocket$(EXEEXT): $(rocket_OBJECTS) $(rocket_DEPENDENCIES) 
+	@rm -f rocket$(EXEEXT)
+	$(CXXLINK) $(rocket_OBJECTS) $(rocket_LDADD) $(LIBS)
+sami$(EXEEXT): $(sami_OBJECTS) $(sami_DEPENDENCIES) 
+	@rm -f sami$(EXEEXT)
+	$(CXXLINK) $(sami_OBJECTS) $(sami_LDADD) $(LIBS)
+simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) 
+	@rm -f simple$(EXEEXT)
+	$(CXXLINK) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
+spec$(EXEEXT): $(spec_OBJECTS) $(spec_DEPENDENCIES) 
+	@rm -f spec$(EXEEXT)
+	$(CXXLINK) $(spec_OBJECTS) $(spec_LDADD) $(LIBS)
+specmix$(EXEEXT): $(specmix_OBJECTS) $(specmix_DEPENDENCIES) 
+	@rm -f specmix$(EXEEXT)
+	$(CXXLINK) $(specmix_OBJECTS) $(specmix_LDADD) $(LIBS)
+subhex$(EXEEXT): $(subhex_OBJECTS) $(subhex_DEPENDENCIES) 
+	@rm -f subhex$(EXEEXT)
+	$(CXXLINK) $(subhex_OBJECTS) $(subhex_LDADD) $(LIBS)
+testall$(EXEEXT): $(testall_OBJECTS) $(testall_DEPENDENCIES) 
+	@rm -f testall$(EXEEXT)
+	$(CXXLINK) $(testall_OBJECTS) $(testall_LDADD) $(LIBS)
+testallf77$(EXEEXT): $(testallf77_OBJECTS) $(testallf77_DEPENDENCIES) 
+	@rm -f testallf77$(EXEEXT)
+	$(CXXLINK) $(testallf77_OBJECTS) $(testallf77_LDADD) $(LIBS)
+testpdb$(EXEEXT): $(testpdb_OBJECTS) $(testpdb_DEPENDENCIES) 
+	@rm -f testpdb$(EXEEXT)
+	$(CXXLINK) $(testpdb_OBJECTS) $(testpdb_LDADD) $(LIBS)
+twohex$(EXEEXT): $(twohex_OBJECTS) $(twohex_DEPENDENCIES) 
+	@rm -f twohex$(EXEEXT)
+	$(CXXLINK) $(twohex_OBJECTS) $(twohex_LDADD) $(LIBS)
+ucd$(EXEEXT): $(ucd_OBJECTS) $(ucd_DEPENDENCIES) 
+	@rm -f ucd$(EXEEXT)
+	$(CXXLINK) $(ucd_OBJECTS) $(ucd_LDADD) $(LIBS)
+ucd1d$(EXEEXT): $(ucd1d_OBJECTS) $(ucd1d_DEPENDENCIES) 
+	@rm -f ucd1d$(EXEEXT)
+	$(CXXLINK) $(ucd1d_OBJECTS) $(ucd1d_LDADD) $(LIBS)
+ucdf77$(EXEEXT): $(ucdf77_OBJECTS) $(ucdf77_DEPENDENCIES) 
+	@rm -f ucdf77$(EXEEXT)
+	$(CXXLINK) $(ucdf77_OBJECTS) $(ucdf77_LDADD) $(LIBS)
+ucdsamp3$(EXEEXT): $(ucdsamp3_OBJECTS) $(ucdsamp3_DEPENDENCIES) 
+	@rm -f ucdsamp3$(EXEEXT)
+	$(CXXLINK) $(ucdsamp3_OBJECTS) $(ucdsamp3_LDADD) $(LIBS)
+version$(EXEEXT): $(version_OBJECTS) $(version_DEPENDENCIES) 
+	@rm -f version$(EXEEXT)
+	$(CXXLINK) $(version_OBJECTS) $(version_LDADD) $(LIBS)
+wave$(EXEEXT): $(wave_OBJECTS) $(wave_DEPENDENCIES) 
+	@rm -f wave$(EXEEXT)
+	$(CXXLINK) $(wave_OBJECTS) $(wave_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestReadMask-TestReadMask.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/TestReadMask-dummy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/alltypes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/arbpoly2d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/compression.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cpz1plt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dir.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dummy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/efcentering.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/extface.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/grab.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/group_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ioperf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/largefile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/listtypes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mat3d_3across.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/merge_block.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mk_nasf_pdb.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mmadjacency.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/multi_file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/multi_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/multispec.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/namescheme.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/obj.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/onehex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/oneprism.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/onepyramid.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/onetet.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/partial_io.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/point.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/polyzl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/quad-dummy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/quad-quad.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/quad-testlib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/readstuff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rocket.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sami.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/simple.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/spec.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/specmix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/subhex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testall.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testlib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testpdb.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/twohex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ucd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ucd1d.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ucdsamp3.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/version.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/wave.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+TestReadMask-TestReadMask.o: TestReadMask.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT TestReadMask-TestReadMask.o -MD -MP -MF $(DEPDIR)/TestReadMask-TestReadMask.Tpo -c -o TestReadMask-TestReadMask.o `test -f 'TestReadMask.c' || echo '$(srcdir)/'`TestReadMask.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/TestReadMask-TestReadMask.Tpo $(DEPDIR)/TestReadMask-TestReadMask.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='TestReadMask.c' object='TestReadMask-TestReadMask.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o TestReadMask-TestReadMask.o `test -f 'TestReadMask.c' || echo '$(srcdir)/'`TestReadMask.c
+
+TestReadMask-TestReadMask.obj: TestReadMask.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT TestReadMask-TestReadMask.obj -MD -MP -MF $(DEPDIR)/TestReadMask-TestReadMask.Tpo -c -o TestReadMask-TestReadMask.obj `if test -f 'TestReadMask.c'; then $(CYGPATH_W) 'TestReadMask.c'; else $(CYGPATH_W) '$(srcdir)/TestReadMask.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/TestReadMask-TestReadMask.Tpo $(DEPDIR)/TestReadMask-TestReadMask.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='TestReadMask.c' object='TestReadMask-TestReadMask.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o TestReadMask-TestReadMask.obj `if test -f 'TestReadMask.c'; then $(CYGPATH_W) 'TestReadMask.c'; else $(CYGPATH_W) '$(srcdir)/TestReadMask.c'; fi`
+
+quad-quad.o: quad.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT quad-quad.o -MD -MP -MF $(DEPDIR)/quad-quad.Tpo -c -o quad-quad.o `test -f 'quad.c' || echo '$(srcdir)/'`quad.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/quad-quad.Tpo $(DEPDIR)/quad-quad.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='quad.c' object='quad-quad.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o quad-quad.o `test -f 'quad.c' || echo '$(srcdir)/'`quad.c
+
+quad-quad.obj: quad.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT quad-quad.obj -MD -MP -MF $(DEPDIR)/quad-quad.Tpo -c -o quad-quad.obj `if test -f 'quad.c'; then $(CYGPATH_W) 'quad.c'; else $(CYGPATH_W) '$(srcdir)/quad.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/quad-quad.Tpo $(DEPDIR)/quad-quad.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='quad.c' object='quad-quad.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o quad-quad.obj `if test -f 'quad.c'; then $(CYGPATH_W) 'quad.c'; else $(CYGPATH_W) '$(srcdir)/quad.c'; fi`
+
+quad-testlib.o: testlib.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT quad-testlib.o -MD -MP -MF $(DEPDIR)/quad-testlib.Tpo -c -o quad-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/quad-testlib.Tpo $(DEPDIR)/quad-testlib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testlib.c' object='quad-testlib.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o quad-testlib.o `test -f 'testlib.c' || echo '$(srcdir)/'`testlib.c
+
+quad-testlib.obj: testlib.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT quad-testlib.obj -MD -MP -MF $(DEPDIR)/quad-testlib.Tpo -c -o quad-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/quad-testlib.Tpo $(DEPDIR)/quad-testlib.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='testlib.c' object='quad-testlib.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o quad-testlib.obj `if test -f 'testlib.c'; then $(CYGPATH_W) 'testlib.c'; else $(CYGPATH_W) '$(srcdir)/testlib.c'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+TestReadMask-dummy.o: dummy.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TestReadMask-dummy.o -MD -MP -MF $(DEPDIR)/TestReadMask-dummy.Tpo -c -o TestReadMask-dummy.o `test -f 'dummy.cxx' || echo '$(srcdir)/'`dummy.cxx
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/TestReadMask-dummy.Tpo $(DEPDIR)/TestReadMask-dummy.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dummy.cxx' object='TestReadMask-dummy.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TestReadMask-dummy.o `test -f 'dummy.cxx' || echo '$(srcdir)/'`dummy.cxx
+
+TestReadMask-dummy.obj: dummy.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TestReadMask-dummy.obj -MD -MP -MF $(DEPDIR)/TestReadMask-dummy.Tpo -c -o TestReadMask-dummy.obj `if test -f 'dummy.cxx'; then $(CYGPATH_W) 'dummy.cxx'; else $(CYGPATH_W) '$(srcdir)/dummy.cxx'; fi`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/TestReadMask-dummy.Tpo $(DEPDIR)/TestReadMask-dummy.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dummy.cxx' object='TestReadMask-dummy.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(TestReadMask_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TestReadMask-dummy.obj `if test -f 'dummy.cxx'; then $(CYGPATH_W) 'dummy.cxx'; else $(CYGPATH_W) '$(srcdir)/dummy.cxx'; fi`
+
+quad-dummy.o: dummy.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT quad-dummy.o -MD -MP -MF $(DEPDIR)/quad-dummy.Tpo -c -o quad-dummy.o `test -f 'dummy.cxx' || echo '$(srcdir)/'`dummy.cxx
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/quad-dummy.Tpo $(DEPDIR)/quad-dummy.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dummy.cxx' object='quad-dummy.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o quad-dummy.o `test -f 'dummy.cxx' || echo '$(srcdir)/'`dummy.cxx
+
+quad-dummy.obj: dummy.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT quad-dummy.obj -MD -MP -MF $(DEPDIR)/quad-dummy.Tpo -c -o quad-dummy.obj `if test -f 'dummy.cxx'; then $(CYGPATH_W) 'dummy.cxx'; else $(CYGPATH_W) '$(srcdir)/dummy.cxx'; fi`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/quad-dummy.Tpo $(DEPDIR)/quad-dummy.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='dummy.cxx' object='quad-dummy.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(quad_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o quad-dummy.obj `if test -f 'dummy.cxx'; then $(CYGPATH_W) 'dummy.cxx'; else $(CYGPATH_W) '$(srcdir)/dummy.cxx'; fi`
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+.f.o:
+	$(F77COMPILE) -c -o $@ $<
+
+.f.obj:
+	$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.f.lo:
+	$(LTF77COMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+	  $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) \
+	  $(check_DATA)
+	$(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(HEADERS) all-local
+installdirs:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
+	clean clean-checkPROGRAMS clean-generic clean-libtool \
+	clean-local ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-includeHEADERS install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-includeHEADERS
+
+
+all-local:
+	@echo
+	@if (fmt</dev/null)>/dev/null 2>&1;then fmt="fmt -70";else fmt=cat;fi;\
+	   echo 'Silo test cases are not compiled by default.  To compile and'\
+	      'test them run "make check" from the silo "tests" directory.'\
+	      'Otherwise you can compile them individually with "make'\
+	      'TESTNAME".  The test names are: $(PROGS:=,) but "testall" is'\
+	      'a good one to start with.' |\
+	   $$fmt | sed 's/^/NOTICE: /'
+	@echo
+
+#
+# Autotest targets.
+# Since we run testsuite multiple times in different 'modes', we
+# need some extra logic to contatentate all the results into a
+# single, final testsuite.log.
+# ATARGS = args to testsuite (autotest) script itself.
+# STARGS = args to silo tests.
+# By default, with no special args, we run the testsuite twice,
+# first on PDB driver and then on HDF5 driver.
+check-local: $(TESTSUITE) $(PROGS)
+	$(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS="$(STARGS)" $(ATARGS)
+	@if test -e testsuite.log; then \
+	    cp testsuite.log testsuite.log.pdb ; \
+	fi
+ at PDBP_DRV_NEEDED_TRUE@	@if test -z "$(STARGS)"; then \
+ at PDBP_DRV_NEEDED_TRUE@	    $(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS=DB_PDBP $(ATARGS); \
+ at PDBP_DRV_NEEDED_TRUE@	    if test -e testsuite.log; then \
+ at PDBP_DRV_NEEDED_TRUE@	        cp testsuite.log testsuite.log.pdbp ; \
+ at PDBP_DRV_NEEDED_TRUE@	    fi \
+ at PDBP_DRV_NEEDED_TRUE@	fi
+ at HDF5_DRV_NEEDED_TRUE@	@if test -z "$(STARGS)"; then \
+ at HDF5_DRV_NEEDED_TRUE@	    $(SHELL) $(srcdir)/testsuite PYTHON="$(PYTHON)" BROWSER="$(BROWSER)" STARGS=DB_HDF5 $(ATARGS); \
+ at HDF5_DRV_NEEDED_TRUE@	    if test -e testsuite.log; then \
+ at HDF5_DRV_NEEDED_TRUE@	        cp testsuite.log testsuite.log.hdf5; \
+ at HDF5_DRV_NEEDED_TRUE@	    fi \
+ at HDF5_DRV_NEEDED_TRUE@	fi
+	@rm -f testsuite.log
+	@if test -e testsuite.log.pdb; then \
+	    cat testsuite.log.pdb >> testsuite.log ; \
+	fi
+	@if test -e testsuite.log.pdbp; then \
+	    cat testsuite.log.pdbp >> testsuite.log ; \
+	fi
+	@if test -e testsuite.log.hdf5; then \
+	    cat testsuite.log.hdf5 >> testsuite.log ; \
+	fi
+
+clean-local:
+	rm -f testsuite.log
+	rm -rf testsuite.dir
+
+testsuite: $(srcdir)/testsuite.at $(top_srcdir)/VERSION
+	$(AUTOTEST) -I $(srcdir) $@.at -o $@.tmp
+	-mv -f $@.tmp $@
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac $(top_srcdir)/VERSION
+	{					\
+	  echo '# Signature of the current package.'; \
+	  echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
+	  echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
+	  echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
+	  echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
+	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+	} >$(srcdir)/package.m4
+
+# deal with the CC=mpicc until I can find a better way
+# Mark C. Miller, Sat May 29 08:15:48 PDT 2010
+#     put CPPFLAGS ahead of AMCPPFLAGS
+resample$(EXEEXT): $(resample_OBJECTS) $(resample_DEPENDENCIES)
+	@rm -f resample$(EXEEXT)
+	$(LIBTOOL) --tag=CC --mode=link $(MPICC) $(AM_CFLAGS) $(CFLAGS) \
+		$(AM_LDFLAGS) $(LDFLAGS) -o $@ $(resample_LDFLAGS) \
+		$(resample_OBJECTS) $(resample_LDADD) $(LIBS)
+resample.o: resample.c
+	$(MPICC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o resample.o `test -f 'resample.c' || echo '$(srcdir)/'`resample.c
+resample.lo: resample.c
+	$(LIBTOOL) --tag=CC --mode=compile $(MPICC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $<
+
+tests: $(PROGS)
+
+# Single rule to capture anything put into check_DATA or check_SCRIPTS
+# this assumes the only action necessary to create is a copy
+checksums: copy_cksd
+copy_cksd:
+	@for f in $(check_SCRIPTS) $(check_DATA); do \
+	    if test ! -e $$f ; then \
+	        cp $(srcdir)/$$f . ;\
+	    fi ;\
+	done
+	touch $@
+# 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/tests/TestReadMask.c b/tests/TestReadMask.c
new file mode 100644
index 0000000..a611ad0
--- /dev/null
+++ b/tests/TestReadMask.c
@@ -0,0 +1,834 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <silo.h>
+#ifndef WIN32
+#include <sys/time.h>
+#else
+#include <string.h>
+#endif
+#include <sys/timeb.h>
+#include <std.c>
+
+/* To compile this program on hyper, here is the command:
+ *
+ *   cc -o ts -I/usr/local/silo/4.2/irix64/n32/include 
+ *      -L/usr/local/silo/4.2/irix64/n32/lib -DNEW_SILO TestSilo.c -lsilo -lm
+ * 
+ * Programmer: Brad Whitlock
+ * Date:       Thu May 17 13:00:50 PST 2001
+ *
+ */
+void    printMask(FILE * fp, long mask);
+int     test_readmat(DBfile * dbfile, const char *testName, long mask);
+int     test_readpointmesh(DBfile * dbfile, long mask);
+int     test_readpointvar(DBfile * dbfile, long mask);
+int     test_readquadmesh(DBfile * dbfile, long mask);
+int     test_readquadvar(DBfile * dbfile, long mask);
+int     test_readucdmesh(DBfile * dbfile, const char *testName, long mask);
+int     test_readucdvar(DBfile * dbfile, long mask);
+int     test_readfacelist(DBfile * dbfile, long mask);
+int     test_readzonelist(DBfile * dbfile, long mask);
+
+void    ResetTime(void);
+int     ElapsedTime(void);
+void    printMaterial(const char *routine, DBmaterial * mat);
+void    printTimes(int *ms);
+
+/* Variables to hold time data. */
+#if !defined(_WIN32)
+struct timeval start_time;
+struct timeval end_time;
+#endif
+
+/*
+ * 
+ * Mark C. Miller, Mon Jan 11 16:24:33 PST 2010
+ * Added missing test reading of zonelist for last mask setting.
+ */
+int
+main(int argc, char *argv[])
+{
+    int i, driver = DB_PDB;
+    DBfile *dbfile = NULL;
+    int     ms[33];
+    char   *pdbfiles[] = { "./rect2d.pdb",
+        "./point2d.pdb",
+        "./globe.pdb"
+    };
+    char   *h5files[] = { "./rect2d.h5",
+        "./point2d.h5",
+        "./globe.h5"
+    };
+    char **files = pdbfiles;
+    int maskindex = 0;
+    int show_all_errors = FALSE;
+
+    /* Set the masks used for the tests. */
+    long    mask[] = {
+        DBAll,
+        DBMatMatnos,
+        DBMatMatlist,
+        DBMatMixList,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBQMCoords,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBQVData,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBPMCoords,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBPVData,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBUMCoords,
+        DBUMFacelist,
+        DBUMZonelist,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBUVData,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBFacelistInfo,
+        DBNone,
+        /* ----- */
+        DBAll,
+        DBZonelistInfo,
+        DBNone,
+    };
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            files = pdbfiles;
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            files = h5files;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    printf("NOTE: The times listed here do not take any caching into\n");
+    printf("account.  Thus, the first time listed in each section may be\n");
+    printf("extraordinarily large.  For an accurate timing test, this cache\n");
+    printf("would have to be disabled.\n\n");
+
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n\n");
+
+    /**************************************************************************
+     *
+     * Test the material read flags.
+     *
+     *************************************************************************/
+    dbfile = DBOpen(files[0], DB_UNKNOWN, DB_READ);
+    if (dbfile == NULL)
+    {
+        fprintf(stderr, "The file %s could not be opened!\n", files[0]);
+        return 1;
+    }
+
+    /* Try reading material. */
+    ms[maskindex] = test_readmat(dbfile, "test_readmatnos", mask[maskindex]);
+    printf("Reading material for %s took %d ms.\n\n", files[0],
+           ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readmat(dbfile, "test_readmatnos", mask[maskindex]);
+    printf("Reading material numbers for %s took %d ms.\n\n", files[0],
+           ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readmat(dbfile, "test_readmatlist", mask[maskindex]);
+    printf("Reading material list for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readmat(dbfile, "test_readmatmixlist", mask[maskindex]);
+    printf("Reading material mix list for %s took %d ms.\n\n", files[0],
+           ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readmat(dbfile, "test_readmatlist", mask[maskindex]);
+    printf("Reading material list for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+
+    /**************************************************************************
+     *
+     * Test the quad mesh read flags.
+     *
+     *************************************************************************/
+    /* Try reading the quad mesh. */
+    ms[maskindex] = test_readquadmesh(dbfile, mask[maskindex]);
+    printf("Reading quad mesh for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readquadmesh(dbfile, mask[maskindex]);
+    printf("Reading quad mesh for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readquadmesh(dbfile, mask[maskindex]);
+    printf("Reading quad mesh for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    /* Try reading a quad var. */
+    ms[maskindex] = test_readquadvar(dbfile, mask[maskindex]);
+    printf("Reading quad var for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readquadvar(dbfile, mask[maskindex]);
+    printf("Reading quad var for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readquadvar(dbfile, mask[maskindex]);
+    printf("Reading quad var for %s took %d ms.\n\n", files[0], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    DBClose(dbfile);
+
+    /**************************************************************************
+     *
+     * Test the point mesh read flags.
+     *
+     *************************************************************************/
+    dbfile = DBOpen(files[1], DB_UNKNOWN, DB_READ);
+    if (dbfile == NULL)
+    {
+        fprintf(stderr, "The file %s could not be opened!\n", files[1]);
+        return 1;
+    }
+
+    /* Try reading the point mesh. */
+    ms[maskindex] = test_readpointmesh(dbfile, mask[maskindex]);
+    printf("Reading point mesh for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readpointmesh(dbfile, mask[maskindex]);
+    printf("Reading point mesh for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readpointmesh(dbfile, mask[maskindex]);
+    printf("Reading point mesh for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    /* Try reading a point var. */
+    ms[maskindex] = test_readpointvar(dbfile, mask[maskindex]);
+    printf("Reading point var for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readpointvar(dbfile, mask[maskindex]);
+    printf("Reading point var for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readpointvar(dbfile, mask[maskindex]);
+    printf("Reading point var for %s took %d ms.\n\n", files[1], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+    DBClose(dbfile);
+
+    /**************************************************************************
+     *
+     * Test the ucd mesh read flags.
+     *
+     *************************************************************************/
+    dbfile = DBOpen(files[2], DB_UNKNOWN, DB_READ);
+    if (dbfile == NULL)
+    {
+        fprintf(stderr, "The file %s could not be opened!\n", files[2]);
+        return 1;
+    }
+
+    /* Try reading the ucd mesh. */
+    ms[maskindex] = test_readucdmesh(dbfile, "test_readucdmeshnone", mask[maskindex]);
+    printf("Reading ucd mesh for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdmesh(dbfile, "test_readucdmeshcoords", mask[maskindex]);
+    printf("Reading ucd mesh for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdmesh(dbfile, "test_readucdmeshfaces", mask[maskindex]);
+    printf("Reading ucd mesh for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdmesh(dbfile, "test_readucdmeshzones", mask[maskindex]);
+    printf("Reading ucd mesh for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdmesh(dbfile, "test_readucdmeshzones", mask[maskindex]);
+    printf("Reading ucd mesh for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    /* Try reading a ucd var. */
+    ms[maskindex] = test_readucdvar(dbfile, mask[maskindex]);
+    printf("Reading ucd var for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdvar(dbfile, mask[maskindex]);
+    printf("Reading ucd var for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readucdvar(dbfile, mask[maskindex]);
+    printf("Reading ucd var for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    /* Try reading a facelist. */
+    ms[maskindex] = test_readfacelist(dbfile, mask[maskindex]);
+    printf("Reading face list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readfacelist(dbfile, mask[maskindex]);
+    printf("Reading face list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readfacelist(dbfile, mask[maskindex]);
+    printf("Reading face list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    printf("-----------------------------\n");
+
+    /* Try reading a zonelist. */
+    ms[maskindex] = test_readzonelist(dbfile, mask[maskindex]);
+    printf("Reading zone list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readzonelist(dbfile, mask[maskindex]);
+    printf("Reading zone list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    ms[maskindex] = test_readzonelist(dbfile, mask[maskindex]);
+    printf("Reading zone list for %s took %d ms.\n\n", files[2], ms[maskindex]);
+    maskindex++;
+    DBClose(dbfile);
+
+    /* Print the times. */
+    printTimes(ms);
+
+    CleanupDriverStuff();
+    return 0;
+}
+
+int
+test_readmat(DBfile * dbfile, const char *testName, long mask)
+{
+    int     ms;
+    DBmaterial *mat = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("%s: ", testName);
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the material list and print the material struct. */
+    mat = DBGetMaterial(dbfile, "mat1");
+    ms = ElapsedTime();
+    printMaterial(testName, mat);
+    DBFreeMaterial(mat);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+void
+printMaterial(const char *routine, DBmaterial * mat)
+{
+    if (mat != NULL)
+    {
+        int     i;
+
+        printf("%s: mat {\n", routine);
+        printf("    nmat=%d\n", mat->nmat);
+        if (mat->matnos != NULL)
+        {
+            printf("    matnos = 0x%p = {", mat->matnos);
+            for (i = 0; i < mat->nmat; ++i)
+                printf("%d, ", mat->matnos[i]);
+            printf("}\n");
+        } else
+        {
+            printf("    matnos = 0x%p\n", mat->matnos);
+        }
+        printf("    matlist = 0x%p\n", mat->matlist);
+        printf("    mix_vf = 0x%p\n", mat->mix_vf);
+        printf("    mix_next = 0x%p\n", mat->mix_next);
+        printf("    mix_mat = 0x%p\n", mat->mix_mat);
+        printf("    mix_zone = 0x%p\n", mat->mix_zone);
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "%s: mat = NULL!\n", routine);
+    }
+}
+
+int
+test_readpointmesh(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBpointmesh *pmesh = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readpointmesh: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the material list and print the material struct. */
+    pmesh = DBGetPointmesh(dbfile, "dir1/pmesh");
+    ms = ElapsedTime();
+    if (pmesh != NULL)
+    {
+        printf("test_readpointmesh: pmesh = {\n");
+        printf("  ...\n");
+        printf("    name = %s\n", pmesh->name);
+        printf("  ...\n");
+        printf("    coords[0] = 0x%p\n", pmesh->coords[0]);
+        printf("    coords[1] = 0x%p\n", pmesh->coords[1]);
+        printf("    coords[2] = 0x%p\n", pmesh->coords[2]);
+        printf("  ...\n");
+        printf("    nels = %d\n", pmesh->nels);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readpointmesh: pmesh = NULL!\n");
+    }
+    DBFreePointmesh(pmesh);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+/*
+ * Mark C. Miller, Mon Jan 11 16:25:45 PST 2010
+ * Removed condition on call to DBFreeMeshvar
+ */
+int
+test_readpointvar(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBmeshvar *mvar = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readpointvar: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the material list and print the material struct. */
+    mvar = DBGetPointvar(dbfile, "dir1/d");
+    ms = ElapsedTime();
+    if (mvar != NULL)
+    {
+        printf("test_readpointvar: mvar = {\n");
+        printf("  ...\n");
+        printf("    vals = 0x%p\n", mvar->vals);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readpointvar: mvar = NULL!\n");
+    }
+
+    DBFreeMeshvar(mvar);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+int
+test_readquadmesh(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBquadmesh *qmesh = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readquadmesh: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the quad mesh and print the quadmesh struct. */
+    qmesh = DBGetQuadmesh(dbfile, "quadmesh2d");
+    ms = ElapsedTime();
+    if (qmesh != NULL)
+    {
+        printf("test_readquadmesh: qmesh = {\n");
+        printf("  ...\n");
+        printf("    name = %s\n", qmesh->name);
+        printf("  ...\n");
+        printf("    coords[0] = 0x%p\n", qmesh->coords[0]);
+        printf("    coords[1] = 0x%p\n", qmesh->coords[1]);
+        printf("    coords[2] = 0x%p\n", qmesh->coords[2]);
+        printf("  ...\n");
+        printf("    nnodes = %d\n", qmesh->nnodes);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readquadmesh: qmesh = NULL!\n");
+    }
+    DBFreeQuadmesh(qmesh);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+/*
+ * Mark C. Miller, Mon Jan 11 16:26:26 PST 2010
+ * Removed condition on DBFreeQuadvar call.
+ */
+int
+test_readquadvar(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBquadvar *qvar = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readquadvar: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the quad var and print the struct. */
+    qvar = DBGetQuadvar(dbfile, "d");
+    ms = ElapsedTime();
+    if (qvar != NULL)
+    {
+        printf("test_readquadvar: qvar = {\n");
+        printf("  ...\n");
+        printf("    vals = 0x%p\n", qvar->vals);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readquadvar: qvar = NULL!\n");
+    }
+
+    /* This check gets us around a crash! */
+    DBFreeQuadvar(qvar);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+int
+test_readucdmesh(DBfile * dbfile, const char *testName, long mask)
+{
+    int     ms;
+    DBucdmesh *umesh = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("%s: ", testName);
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the ucd mesh and print out the struct. */
+    umesh = DBGetUcdmesh(dbfile, "mesh1");
+    ms = ElapsedTime();
+    if (umesh != NULL)
+    {
+        printf("%s: umesh = {\n", testName);
+        printf("  ...\n");
+        printf("    name = %s\n", umesh->name);
+        printf("  ...\n");
+        printf("    coords[0] = 0x%p\n", umesh->coords[0]);
+        printf("    coords[1] = 0x%p\n", umesh->coords[1]);
+        printf("    coords[2] = 0x%p\n", umesh->coords[2]);
+        printf("  ...\n");
+        printf("    faces = 0x%p\n", umesh->faces);
+        printf("    zones = 0x%p\n", umesh->zones);
+        if (umesh->zones != NULL)
+            printf("    zones->nodelist = 0x%p\n", umesh->zones->nodelist);
+        printf("    edges = 0x%p\n", umesh->edges);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "%s: umesh = NULL!\n", testName);
+    }
+    DBFreeUcdmesh(umesh);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+/*
+ * Mark C. Miller, Mon Jan 11 16:26:51 PST 2010
+ * Removed condition on DBFreeUcdvar call.
+ */
+int
+test_readucdvar(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBucdvar *uvar = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readucdvar: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the quad var and print the struct. */
+    uvar = DBGetUcdvar(dbfile, "u");
+    ms = ElapsedTime();
+    if (uvar != NULL)
+    {
+        printf("test_readucdvar: uvar = {\n");
+        printf("  ...\n");
+        printf("    vals = 0x%p\n", uvar->vals);
+        printf("  ...\n");
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readucdvar: uvar = NULL!\n");
+    }
+
+    /* This check gets us around a crash! */
+    DBFreeUcdvar(uvar);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+int
+test_readfacelist(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBfacelist *fl = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readfacelist: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the face list and print the struct. */
+    fl = DBGetFacelist(dbfile, "fl");
+    ms = ElapsedTime();
+    if (fl != NULL)
+    {
+        printf("test_readfacelist: fl = {\n");
+        printf("  ...\n");
+        printf("    nodelist = 0x%p\n", fl->nodelist);
+        printf("  ...\n");
+        printf("    shapecnt = 0x%p\n", fl->shapecnt);
+        printf("    shapesize = 0x%p\n", fl->shapesize);
+        printf("    typelist = 0x%p\n", fl->typelist);
+        printf("    types = 0x%p\n", fl->types);
+        printf("    ntypes = %d\n", fl->ntypes);
+        printf("    nodeno = 0x%p\n", fl->nodeno);
+        printf("    zoneno = 0x%p\n", fl->zoneno);
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readfacelist: fl = NULL!\n");
+    }
+    DBFreeFacelist(fl);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+int
+test_readzonelist(DBfile * dbfile, long mask)
+{
+    int     ms;
+    DBzonelist *zl = NULL;
+
+    /* Reset the timer. */
+    ResetTime();
+
+    DBSetDataReadMask(mask);
+    printf("test_readzonelist: ");
+    printMask(stdout, DBGetDataReadMask());
+    printf("\n");
+    /* Read the face list and print the struct. */
+    zl = DBGetZonelist(dbfile, "zl");
+    ms = ElapsedTime();
+    if (zl != NULL)
+    {
+        printf("test_readzonelist: zl = {\n");
+        printf("  ...\n");
+        printf("    shapecnt = 0x%p\n", zl->shapecnt);
+        printf("    shapesize = 0x%p\n", zl->shapesize);
+        printf("    shapetype = 0x%p\n", zl->shapetype);
+        printf("    nodelist = 0x%p\n", zl->nodelist);
+        printf("  ...\n");
+        printf("    zoneno = 0x%p\n", zl->zoneno);
+        printf("    gzoneno = 0x%p\n", zl->gzoneno);
+        printf("};\n");
+    } else
+    {
+        fprintf(stderr, "test_readzonelist: zl = NULL!\n");
+    }
+    DBFreeZonelist(zl);
+
+    /* Return how many milliseconds since the call to ResetTime. */
+    return ms;
+}
+
+void
+ResetTime(void)
+{
+#if !defined(_WIN32)
+    /* Get the start time */
+    gettimeofday(&start_time,0);
+#endif
+}
+
+int
+ElapsedTime(void)
+{
+#if !defined(_WIN32)
+    int     ms;
+    /* Get the end time */
+    gettimeofday(&end_time,0);
+
+    /* Figure out how many milliseconds the rendering took. */
+    ms = (int)difftime(end_time.tv_sec, start_time.tv_sec);
+    if (ms == 0)
+        ms = end_time.tv_usec - start_time.tv_usec;
+    else
+        ms = ((ms - 1) * 1000000) + (1000000 - start_time.tv_usec) +
+            end_time.tv_usec;
+
+    /* Copy the end time into the start time. */
+    memcpy((void *)&start_time, (void *)&end_time, sizeof(struct timeval));
+
+    /* Return how many milliseconds it took to render. */
+    return ms;
+#else
+    return 1000;
+#endif
+}
+
+void
+printTimes(int *ms)
+{
+    int i = 0;
+    printf("Read material (all):   %d ms.\n", ms[i++]);
+    printf("Read matnos:           %d ms.\n", ms[i++]);
+    printf("Read matlist:          %d ms.\n", ms[i++]);
+    printf("Read mixlist:          %d ms.\n", ms[i++]);
+    printf("Read material (none):  %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read quadmesh (all):   %d ms.\n", ms[i++]);
+    printf("Read quadmesh:         %d ms.\n", ms[i++]);
+    printf("Read quadmesh (none):  %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read quadvar (all):    %d ms.\n", ms[i++]);
+    printf("Read quadvar:          %d ms.\n", ms[i++]);
+    printf("Read quadvar (none):   %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read pointmesh (all):  %d ms.\n", ms[i++]);
+    printf("Read pointmesh:        %d ms.\n", ms[i++]);
+    printf("Read pointmesh (none): %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read pointvar (all):   %d ms.\n", ms[i++]);
+    printf("Read pointvar:         %d ms.\n", ms[i++]);
+    printf("Read pointvar (none):  %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read ucdmesh (all):    %d ms.\n", ms[i++]);
+    printf("Read ucdmesh coords:   %d ms.\n", ms[i++]);
+    printf("Read ucdmesh facelist: %d ms.\n", ms[i++]);
+    printf("Read ucdmesh zonelist: %d ms.\n", ms[i++]);
+    printf("Read ucdmesh (none):   %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read ucdvar (all):     %d ms.\n", ms[i++]);
+    printf("Read ucdvar:           %d ms.\n", ms[i++]);
+    printf("Read ucdvar (none):    %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read facelist (all):   %d ms.\n", ms[i++]);
+    printf("Read facelist info:    %d ms.\n", ms[i++]);
+    printf("Read facelist (none):  %d ms.\n", ms[i++]);
+    printf("-----------------------------\n");
+    printf("Read zonelist (all):   %d ms.\n", ms[i++]);
+    printf("Read zonelist info:    %d ms.\n", ms[i++]);
+    printf("Read zonelist (none):  %d ms.\n", ms[i++]);
+}
+
+void
+printMask(FILE * fp, long mask)
+{
+    fprintf(fp, "readMask={");
+    if (mask == DBAll)
+        fprintf(fp, "DBAll");
+    else if (mask == DBNone)
+        fprintf(fp, "DBNone");
+    else
+    {
+        if (mask & DBCalc)              fprintf(fp, "DBCalc, ");
+        if (mask & DBMatMatnos)         fprintf(fp, "DBMatMatnos, ");
+        if (mask & DBMatMatlist)        fprintf(fp, "DBMatMatlist, ");
+        if (mask & DBMatMixList)        fprintf(fp, "DBMatMixList, ");
+        if (mask & DBCurveArrays)       fprintf(fp, "DBCurveArrays, ");
+        if (mask & DBPMCoords)          fprintf(fp, "DBPMCoords, ");
+        if (mask & DBPVData)            fprintf(fp, "DBPVData, ");
+        if (mask & DBQMCoords)          fprintf(fp, "DBQMCoords, ");
+        if (mask & DBQVData)            fprintf(fp, "DBQVData, ");
+        if (mask & DBUMCoords)          fprintf(fp, "DBUMCoords, ");
+        if (mask & DBUMFacelist)        fprintf(fp, "DBUMFacelist, ");
+        if (mask & DBUMZonelist)        fprintf(fp, "DBUMZonelist, ");
+        if (mask & DBUVData)            fprintf(fp, "DBUVData, ");
+        if (mask & DBFacelistInfo)      fprintf(fp, "DBFacelistInfo, ");
+        if (mask & DBZonelistInfo)      fprintf(fp, "DBZonelistInfo, ");
+    }
+    fprintf(fp, "};");
+}
diff --git a/tests/add_amr_mrgtree.c b/tests/add_amr_mrgtree.c
new file mode 100644
index 0000000..0dbf0da
--- /dev/null
+++ b/tests/add_amr_mrgtree.c
@@ -0,0 +1,679 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/*
+   WARNING, YOU ALSO NEED THE EXPAT XML PARSER LIBRARY TO COMPILE THIS CODE
+   You can find expat here... http://expat.sourceforge.net/
+*/
+
+#include <errno.h>
+#include <math.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+extern int errno;
+
+#include <assert.h>
+#if !defined(NDEBUG) && !defined(DEBUG)
+#undef assert
+#define assert(a)
+#endif
+
+#include <expat.h>
+
+#include <silo.h>
+
+
+typedef enum _xmlParseState_t
+{
+    None = 0,
+    AMRDecomp,
+    Level,
+    Patch
+} xmlParseState_t;
+
+typedef struct patchInfo_t
+{
+    int   idx;
+    int   vid;
+    double rank;
+    int level;
+    int logSize[3];
+    int logExtents[6];
+    double spatExtents[6];
+    int numChildren;
+    int *children;
+} patchInfo_t;
+
+typedef struct amrConfig_t
+{
+    char *meshName;
+    int numDims;
+    int numLevels;
+    int numPatches;
+    double dx, dy, dz; /* all -1 ==> curvilinear */
+
+    xmlParseState_t currentState;
+    int currentLevel;
+    int currentPatchOnLevel;
+    int currentChildForPatch;
+
+    int *numPatchesOnLevel;
+    int **levels;
+    int *ratios;
+
+    patchInfo_t *patches;
+    int currentPatch;
+} amrConfig_t;
+
+#ifdef XML_LARGE_SIZE
+#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
+#define XML_FMT_INT_MOD "I64"
+#else
+#define XML_FMT_INT_MOD "ll"
+#endif
+#else
+#define XML_FMT_INT_MOD "l"
+#endif
+
+#define BUFFSIZE        8192
+char Buff[BUFFSIZE];
+
+#define INT     ((int)'i')
+#define DBL     ((int)'d')
+#define STR     ((int)'s'), 1
+#define EOA     "EOA"
+
+static int
+getAttrVals(const char **attrs, ...)
+{
+    int i, j, nvals;
+    const char *attrName, *p;
+    char *pend;
+    int type;
+    va_list ap;
+
+    va_start(ap, attrs);
+    while (1)
+    {
+        attrName = va_arg(ap, const char *);
+        if (strncmp(attrName, EOA, 3) == 0)
+            break;
+
+        /* find this attr's name in the list of xml attrs */
+        for (i = 0; attrs[i]; i += 2)
+        {
+            if (strcmp(attrs[i], attrName) == 0)
+                break;
+        }
+        if (!attrs[i])
+            break;
+
+        type = va_arg(ap, int);
+        nvals = va_arg(ap, int);
+        p = attrs[i+1];
+        switch (type)
+        {
+            case 'i':
+            {
+                int *ptr = va_arg(ap, int *);
+                for (j = 0; j < nvals; j++)
+                {
+                    ptr[j] = strtol(p,&pend,10);
+                    p = pend;
+                }
+                break;
+            }
+            case 'd':
+            {
+                double *ptr = va_arg(ap, double *);
+                for (j = 0; j < nvals; j++)
+                {
+                    ptr[j] = strtod(p,&pend);
+                    p = pend;
+                }
+                break;
+            }
+            case 's':
+            {
+                char **ptr = va_arg(ap, char **);
+                *ptr = strdup(attrs[i+1]); 
+                break;
+            }
+            default: return -1;
+        }
+    }
+
+    va_end(ap);
+    return 0;
+}
+
+static void XMLCALL
+start(void *data, const char *el, const char **attr)
+{
+    int i;
+    amrConfig_t *ud = (amrConfig_t *) data;
+    
+    if      (strcmp(el, "AMRDecomp") == 0)
+    {
+        getAttrVals(attr, "meshName", STR, &ud->meshName,
+                          "numDims", INT, 1, &ud->numDims,
+                          "numLevels", INT, 1, &ud->numLevels,
+                          "numPatches", INT, 1, &ud->numPatches,
+                    EOA);
+        ud->currentLevel = -1;
+        ud->levels = (int **) malloc(ud->numLevels * sizeof(int*));
+        ud->ratios = (int *) malloc(ud->numLevels * ud->numDims * sizeof(int));
+        ud->numPatchesOnLevel = (int *) malloc(ud->numLevels * sizeof(int));
+        ud->patches = (patchInfo_t *) malloc(ud->numPatches * sizeof(patchInfo_t));
+        ud->currentState = AMRDecomp;
+    }
+    else if (strcmp(el, "Level") == 0)
+    {
+        int cl;
+        ud->currentLevel++;
+        cl = ud->currentLevel;
+        getAttrVals(attr, "numPatches", INT, 1, &(ud->numPatchesOnLevel[cl]),
+                          "ratios", INT, ud->numDims, &(ud->ratios[ud->numDims*cl]),
+                    EOA);
+        ud->levels[cl] = (int *) malloc(ud->numPatchesOnLevel[cl] * sizeof(int));
+        ud->currentPatchOnLevel = 0;
+        ud->currentPatch = -1;
+        ud->currentState = Level;
+    }
+    else if (strcmp(el, "Patch") == 0)
+    {
+        ud->currentPatch++;
+        patchInfo_t *p = &(ud->patches[ud->currentPatch]);
+        getAttrVals(attr, "iDx", INT, 1, &(p->idx),
+                          "vId", INT, 1, &(p->vid),
+                          "level", INT, 1, &(p->level),
+                          "rank", DBL, 1, &(p->rank),
+                          "numChildren", INT, 1, &(p->numChildren),
+                          "logSize", INT, ud->numDims, &(p->logSize),
+                          "logExtents", INT, 2*(ud->numDims), &(p->logExtents),
+                          "spatExtents", DBL, 2*(ud->numDims), &(p->spatExtents),
+                    EOA);
+        if (p->numChildren == 0)
+            p->children = 0;
+        else
+            p->children = (int *) malloc(p->numChildren * sizeof(int));
+        ud->currentChildForPatch = 0;
+        ud->currentState = Patch;
+    } 
+}
+
+static void XMLCALL
+end(void *data, const char *el)
+{
+}
+
+static void XMLCALL
+cdstart(void *userData)
+{
+}
+
+static void XMLCALL
+cdend(void *userData)
+{
+}
+
+static int
+readVals(const char *s, int type, void *pvals)
+{
+    const char *p1;
+    char *p2;
+    int n, done;
+
+    p1 = s;
+    n = 0;
+    done = 0;
+    errno = 0;
+    while (!done)
+    {
+        switch (type)
+        {
+            case 'i':
+            {
+                int *iptr = (int *) pvals;
+                int ival = strtol(p1, &p2, 10);
+                if (ival == 0 && p1 == p2 || errno != 0)
+                {
+                    done = 1;
+                    break;
+                }
+                if (*p2 == '\0')
+                    done = 1;
+                if (iptr) iptr[n] = ival;
+                break;
+            }
+            case 'd':
+            {
+                double *dptr = (double *) pvals;
+                double dval = strtod(p1, &p2);
+                if (dval == 0 && p1 == p2 || errno != 0)
+                {
+                    done = 1;
+                    break;
+                }
+                if (*p2 == '\0')
+                    done = 1;
+                if (dptr) dptr[n] = dval;
+                break;
+            }
+        }
+        p1 = p2;
+        if (!done) n++;
+    }
+    return n;
+}
+
+static void XMLCALL
+chardata(void *userData, const XML_Char *s, int len)
+{
+    amrConfig_t *ud = (amrConfig_t *) userData;
+    int i, val, done;
+    char *s1, *p1, *p2;
+
+    if (len == 0)
+        return;
+
+    s1 = malloc(len+1);
+    strncpy(s1, s, len);
+    s1[len] = '\0';
+
+    /* if its all whitespace, ignore it */
+    if (strspn(s1, " \\\f\\\n\\\r\\\t\\\v") == len)
+    {
+        free(s1);
+        return;
+    }
+
+    switch (ud->currentState)
+    {
+        case Level:
+        {
+            int cl = ud->currentLevel;
+            int cp = ud->currentPatchOnLevel;
+            int *levels = &(ud->levels[cl][cp]);
+            int npatches = readVals(s1, INT, levels);
+            int i;
+            for (i = 0; i < npatches; i++)
+                printf("ud->levels[%d][%d]=%d\n", cl, cp+i, ud->levels[cl][cp+i]);
+            ud->currentPatchOnLevel += npatches;
+            break;
+        }
+        case Patch:
+        {
+            int cp = ud->currentPatch;
+            int cc = ud->currentChildForPatch;
+            int *children = &(ud->patches[cp].children[cc]);
+            int nchildren = readVals(s1, INT, children);
+            int i;
+            for (i = 0; i < nchildren; i++)
+                printf("ud->patches[%d].children[%d]=%d\n", cp, cc+i, ud->patches[cp].children[cc+i]);
+            ud->currentChildForPatch += nchildren;
+            break;
+        }
+    }
+
+    free(s1);
+}
+
+int ProcessXMLAMRConfigFile(const char *xmlFileName, amrConfig_t *amrconfig)
+{
+    FILE *acf = fopen(xmlFileName, "r");
+    XML_Parser p = XML_ParserCreate(NULL);
+    if (!p)
+        return -1;
+
+    XML_SetUserData(p, amrconfig);
+    XML_SetElementHandler(p, start, end);
+    XML_SetCdataSectionHandler(p, cdstart, cdend);
+    XML_SetCharacterDataHandler(p, chardata);
+
+    for (;;) {
+        int done;
+        int len;
+
+      len = (int)fread(Buff, 1, BUFFSIZE, acf);
+      if (ferror(acf))
+          return -1;
+      done = feof(acf);
+
+      if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) {
+        fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n",
+              XML_GetCurrentLineNumber(p),
+              XML_ErrorString(XML_GetErrorCode(p)));
+          return -1;
+      }
+
+      if (done)
+          break;
+    }
+    XML_ParserFree(p);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Add an mrgtree object to an existing silo file containing a
+ * multi-mesh object whose individual pieces form the patches of some AMR
+ * mesh.
+ *
+ * Return:      0
+ *
+ * Programmer:  Mark C. Miller, Wed Aug 27 09:17:38 PDT 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    int i;
+    int copy = 1;
+    DBfile *dbfile = 0;
+    DBmrgtree *mrgTree;
+    DBmultimesh *mm;
+    DBoptlist *optList;
+    char *siloFileName = 0;
+    char *amrconfigFileName = "amr_config.xml";
+    amrConfig_t amrconf;
+    char tmpName[256];
+    char lvlMapsName[256];
+    char chldMapsName[256];
+    int show_all_errors = FALSE;
+
+    assert(copy==0);
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++)
+    {
+        if (!strcmp(argv[i], "-nocp"))
+        {
+            copy = 0;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	}
+        else if (siloFileName == 0)
+        {
+            siloFileName = strdup(argv[i]);
+        }
+        else
+        {
+            amrconfigFileName = strdup(argv[i]);
+        }
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+
+
+    /* by default, we make a copy of the specified file */
+    if (copy)
+    {
+        char syscmd[256];
+
+        /* copy the file in the filesystem */
+        snprintf(syscmd, sizeof(syscmd), "cp -f %s %s_wmrgtree", siloFileName, siloFileName);
+        system(syscmd);
+
+        /* use syscmd as buffer for constructing new filename */
+        snprintf(syscmd, sizeof(syscmd), "%s_wmrgtree", siloFileName);
+        free(siloFileName);
+        siloFileName = strdup(syscmd);
+    }
+
+    /* open and process the amr configuration file */
+    ProcessXMLAMRConfigFile(amrconfigFileName, &amrconf);
+
+    /* open the silo file */
+    dbfile = DBOpen(siloFileName, DB_UNKNOWN, DB_APPEND);
+
+    /* get the specific multi-mesh object we want to add an mrg tree too */
+    mm = DBGetMultimesh(dbfile, amrconf.meshName);
+    sprintf(tmpName, "%s_wmrgtree", amrconf.meshName);
+    optList = DBMakeOptlist(10);
+    DBAddOption(optList, DBOPT_MRGTREE_NAME, "mrgTree");
+    DBPutMultimesh(dbfile, tmpName, mm->nblocks, mm->meshnames, mm->meshtypes, optList);
+    DBClearOptlist(optList);
+
+#if !defined(_WIN32)
+#warning HACK FOR SINGLE VARIABLE
+#endif
+    {
+        DBmultivar *mv = DBGetMultivar(dbfile, "foo");
+        DBoptlist *optList2 = DBMakeOptlist(10);
+        DBAddOption(optList2, DBOPT_MMESH_NAME, tmpName);
+        DBPutMultivar(dbfile, "foo_wmrgtree", mv->nvars, mv->varnames, mv->vartypes, optList2);
+        DBFreeOptlist(optList2);
+    }
+    
+    /* write this multi-mesh object back to the file, with a different name
+       and attache the mrg tree name to it */
+
+    /* Write the groupel maps that specify which blocks of the multi-block mesh
+       belong to which levels */
+    {
+        int *segTypes = (int *) malloc(amrconf.numLevels * sizeof(int));
+        for (i = 0; i < amrconf.numLevels; i++)
+            segTypes[i] = DB_BLOCKCENT;
+        sprintf(lvlMapsName, "%s_wmrgtree_lvlMaps", amrconf.meshName);
+        DBPutGroupelmap(dbfile, lvlMapsName, amrconf.numLevels, segTypes, amrconf.numPatchesOnLevel,
+            0, amrconf.levels, 0, 0, 0); 
+        free(segTypes);
+    }
+
+    /* Write the groupel maps that specify which blocks are children (refinements)
+       of other blocks */
+    {
+        int *segTypes = (int *) malloc(amrconf.numPatches * sizeof(int));
+        int *segLens = (int *) malloc(amrconf.numPatches * sizeof(int));
+        int **segData = (int **) malloc(amrconf.numPatches * sizeof(int*));
+        for (i = 0; i < amrconf.numPatches; i++)
+        {
+            segTypes[i] = DB_BLOCKCENT;
+            segLens[i] = amrconf.patches[i].numChildren;
+            segData[i] = amrconf.patches[i].children;
+        }
+        sprintf(chldMapsName, "%s_wmrgtree_chldMaps", amrconf.meshName);
+        DBPutGroupelmap(dbfile, chldMapsName, amrconf.numPatches, segTypes, segLens,
+            0, segData, 0, 0, 0); 
+        free(segTypes);
+        free(segLens);
+        free(segData);
+    }
+
+    /* Create an mrg tree for inclusion in the file */
+    mrgTree = DBMakeMrgtree(DB_MULTIMESH, 0, 2, 0);
+
+    /* Add a region for AMR configuration */
+    DBAddRegion(mrgTree, "amr_decomp", 0, 2, 0, 0, 0, 0, 0, 0); 
+    DBSetCwr(mrgTree, "amr_decomp");
+    DBAddRegion(mrgTree, "levels", 0, amrconf.numLevels, 0, 0, 0, 0, 0, 0); 
+    DBSetCwr(mrgTree, "levels");
+
+    /* Handle the regions representing each level in the AMR mesh */
+    {
+        char *levelRegnNames[1];
+        int *segTypes = (int *) malloc(amrconf.numLevels * sizeof(int));
+        int *segIds = (int *) malloc(amrconf.numLevels * sizeof(int));
+        for (i = 0; i < amrconf.numLevels; i++)
+        {
+            segIds[i] = i;
+            segTypes[i] = DB_BLOCKCENT;
+        }
+        levelRegnNames[0] = "@level%d at n";
+        DBAddRegionArray(mrgTree, amrconf.numLevels, levelRegnNames, 0, lvlMapsName, 1,
+            segIds, amrconf.numPatchesOnLevel, segTypes, 0);
+    }
+    DBSetCwr(mrgTree, "..");
+
+    DBAddRegion(mrgTree, "patches", 0, amrconf.numPatches, 0, 0, 0, 0, 0, 0); 
+    DBSetCwr(mrgTree, "patches");
+
+    /* Handle the regions representing each patch */
+    {
+        char *patchRegnNames[1];
+        int *segTypes = (int *) malloc(amrconf.numPatches * sizeof(int));
+        int *segIds = (int *) malloc(amrconf.numPatches * sizeof(int));
+        int *segLens = (int *) malloc(amrconf.numPatches * sizeof(int));
+        for (i = 0; i < amrconf.numPatches; i++)
+        {
+            segIds[i] = i;
+            segTypes[i] = DB_BLOCKCENT;
+            segLens[i] = amrconf.patches[i].numChildren;
+        }
+        patchRegnNames[0] = "@patch%d at n";
+        DBAddRegionArray(mrgTree, amrconf.numPatches, patchRegnNames, 0, chldMapsName, 1,
+            segIds, segLens, segTypes, 0);
+    }
+
+    {
+        char *mrgv_onames[5];
+        sprintf(tmpName, "%s_wmrgtree_lvlRatios", amrconf.meshName);
+        mrgv_onames[0] = strdup(tmpName);
+        sprintf(tmpName, "%s_wmrgtree_ijkExts", amrconf.meshName);
+        mrgv_onames[1] = strdup(tmpName);
+        sprintf(tmpName, "%s_wmrgtree_xyzExts", amrconf.meshName);
+        mrgv_onames[2] = strdup(tmpName);
+        mrgv_onames[3] = strdup("rank");
+        mrgv_onames[4] = 0;
+
+        DBAddOption(optList, DBOPT_MRGV_ONAMES, mrgv_onames);
+        DBPutMrgtree(dbfile, "mrgTree", "amr_mesh", mrgTree, optList);
+        DBFreeMrgtree(mrgTree);
+    }
+
+    /* Output level refinement ratios as an mrg variable on the array of regions
+       representing the levels */
+    {
+        char *compnames[3] = {"iRatio","jRatio","kRatio"};
+        char *levelRegnNames[1];
+        int *data[3];
+        for (i = 0; i < amrconf.numDims; i++)
+            data[i] = (int *) malloc(amrconf.numLevels * sizeof(int));
+        for (i = 0; i < amrconf.numLevels; i++)
+        {
+            data[0][i] = amrconf.ratios[i*amrconf.numDims+0];
+            data[1][i] = amrconf.ratios[i*amrconf.numDims+1];
+            if (amrconf.numDims == 3)
+                data[2][i] = amrconf.ratios[i*amrconf.numDims+2];
+        }
+        levelRegnNames[0] = "@level%d at n";
+        sprintf(tmpName, "%s_wmrgtree_lvlRatios", amrconf.meshName);
+        DBPutMrgvar(dbfile, tmpName, "mrgTree", amrconf.numDims,
+            compnames, amrconf.numLevels, levelRegnNames, DB_INT, (void**)data, 0);
+        for (i = 0; i < amrconf.numDims; i++)
+            free(data[i]);
+    }
+
+    /* Output logical extents of the patches as an mrg variable on the
+       array of regions representing the patches */
+    {
+        char *compnames[6] = {"iMin","iMax","jMin","jMax","kMin","kMax"};
+        char *scompnames[6] = {"xMin","xMax","yMin","yMax","zMin","zMax"};
+        char *patchRegnNames[1];
+        int *data[6];
+        float *rdata[1];
+        float *sdata[6];
+        patchRegnNames[0] = "@patch%d at n";
+        for (i = 0; i < 2*amrconf.numDims; i++)
+        {
+            data[i] = (int *) malloc(amrconf.numPatches * sizeof(int));
+            sdata[i] = (float *) malloc(amrconf.numPatches * sizeof(float));
+        }
+        rdata[0] = (float *) malloc(amrconf.numPatches * sizeof(float));
+        for (i = 0; i < amrconf.numPatches; i++)
+        {
+            data[0][i] = amrconf.patches[i].logExtents[0];
+            data[1][i] = amrconf.patches[i].logExtents[1];
+            data[2][i] = amrconf.patches[i].logExtents[2];
+            data[3][i] = amrconf.patches[i].logExtents[3];
+            sdata[0][i] = amrconf.patches[i].spatExtents[0];
+            sdata[1][i] = amrconf.patches[i].spatExtents[1];
+            sdata[2][i] = amrconf.patches[i].spatExtents[2];
+            sdata[3][i] = amrconf.patches[i].spatExtents[3];
+
+            if (amrconf.numDims == 3)
+            {
+                data[4][i] = amrconf.patches[i].logExtents[4];
+                data[5][i] = amrconf.patches[i].logExtents[5];
+                sdata[4][i] = amrconf.patches[i].spatExtents[4];
+                sdata[5][i] = amrconf.patches[i].spatExtents[5];
+            }
+            rdata[0][i] = amrconf.patches[i].rank;
+        }
+        sprintf(tmpName, "%s_wmrgtree_ijkExts", amrconf.meshName);
+        DBPutMrgvar(dbfile, tmpName, "mrgTree", 2*amrconf.numDims,
+            compnames, amrconf.numPatches, patchRegnNames, DB_INT, (void**)data, 0);
+        sprintf(tmpName, "%s_wmrgtree_xyzExts", amrconf.meshName);
+        DBPutMrgvar(dbfile, tmpName, "mrgTree", 2*amrconf.numDims,
+            scompnames, amrconf.numPatches, patchRegnNames, DB_FLOAT, (void**)sdata, 0);
+        for (i = 0; i < 2*amrconf.numDims; i++)
+        {
+            free(data[i]);
+            free(sdata[i]);
+        }
+        DBPutMrgvar(dbfile, "rank", "mrgTree", 1, 0,
+            amrconf.numPatches, patchRegnNames, DB_FLOAT, (void**)rdata, 0);
+        free(rdata[0]);
+    }
+
+    DBClose(dbfile);
+
+    return (0);
+}
diff --git a/tests/alltypes.c b/tests/alltypes.c
new file mode 100644
index 0000000..e67f7a8
--- /dev/null
+++ b/tests/alltypes.c
@@ -0,0 +1,282 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define NDIMS 3
+#define NZONES 4
+#define NNODES 13
+
+/***************************************************************
+ *
+ * Modifications:
+ *    Jeremy Meredith, Thu Jul  6 10:08:15 PDT 2000
+ *    Added ability to change origin of objects.
+ *
+ ***************************************************************/
+
+#include <std.c>
+
+int
+main(int argc, char *argv[])
+{
+    int             nnodes = NNODES;
+    int             nzones = NZONES;
+    int             nodelist[23];
+    int             shapesize[] = {8, 4, 5, 6};
+    int             shapecnt[] = {1, 1, 1, 1};
+    char            mesh_command[256];
+    int             len;
+    char           *filename = "alltypes.silo";
+    int		    driver = DB_PDB;
+
+    DBfile         *dbfile = NULL;
+    int             ndims = NDIMS;
+    int             dims[NDIMS];
+    double         *coords[NDIMS];
+    double          x[NNODES];
+    double          y[NNODES];
+    double          z[NNODES];
+
+    DBfacelist     *facelist = NULL;
+
+    double          nodal[NNODES];
+    double          zonal[NZONES];
+    int             matlist[NZONES];
+    int             mats[] = {1,2,3,4};
+
+    int             i,j;
+
+    const int       origin = 0;
+    int             show_all_errors = FALSE;
+
+    /* Parse command-line options */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB",6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "alltypes.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "alltypes.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "unknown option: %s\n", argv[i]);
+	    exit(1);
+	}
+    }
+
+    /* Turn on error handling */
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    DBSetFriendlyHDF5Names(2);
+
+    /* Create file */
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd", driver);
+
+    i = 0;
+
+    /* 0 */
+    x[i] = 0.5;
+    y[i] = 1.0;
+    z[i++] = 0.0;
+
+    /* 1 */
+    x[i] = 1.5;
+    y[i] = 1.0;
+    z[i++] = 0.0;
+
+    /* 2 */
+    x[i] = 1.5;
+    y[i] = 1.0;
+    z[i++] = 1.0;
+
+    /* 3 */
+    x[i] = 0.5;
+    y[i] = 1.0;
+    z[i++] = 1.0;
+
+    /* 4 */
+    x[i] = 0.5;
+    y[i] = 2.0;
+    z[i++] = 0.0;
+
+    /* 5 */
+    x[i] = 1.5;
+    y[i] = 2.0;
+    z[i++] = 0.0;
+
+    /* 6 */
+    x[i] = 2.5;
+    y[i] = 2.0;
+    z[i++] = 0.0;
+
+    /* 7 */
+    x[i] = 2.5;
+    y[i] = 2.0;
+    z[i++] = 1.0;
+
+    /* 8 */
+    x[i] = 1.5;
+    y[i] = 2.0;
+    z[i++] = 1.0;
+
+    /* 9 */
+    x[i] = 0.5;
+    y[i] = 2.0;
+    z[i++] = 1.0;
+
+    /* 10 */
+    x[i] = 0.0;
+    y[i] = 3.0;
+    z[i++] = 0.5;
+
+    /* 11 */
+    x[i] = 1.0;
+    y[i] = 3.0;
+    z[i++] = 0.5;
+
+    /* 12 */
+    x[i] = 2.0;
+    y[i] = 3.0;
+    z[i++] = 0.5;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    DBPutUcdmesh(dbfile, "mesh", 3, NULL, (void *)coords, nnodes, nzones, "zonelist",
+                 "facelist", DB_DOUBLE, NULL);
+
+    i = 0;
+    /* Hex */
+    nodelist[i++] = 4;
+    nodelist[i++] = 5;
+    nodelist[i++] = 8;
+    nodelist[i++] = 9;
+    nodelist[i++] = 0;
+    nodelist[i++] = 1;
+    nodelist[i++] = 2;
+    nodelist[i++] = 3;
+
+    /* Tet */
+    nodelist[i++] = 10;
+    nodelist[i++] = 4;
+    nodelist[i++] = 11;
+    nodelist[i++] = 9;
+
+    /* Pyramid */
+    nodelist[i++] = 4;
+    nodelist[i++] = 5;
+    nodelist[i++] = 8;
+    nodelist[i++] = 9;
+    nodelist[i++] = 11;
+
+    /* Prism */
+    nodelist[i++] = 5;
+    nodelist[i++] = 6;
+    nodelist[i++] = 7;
+    nodelist[i++] = 8;
+    nodelist[i++] = 11;
+    nodelist[i++] = 12;
+
+    for (j=0; j<i; j++)
+        nodelist[j] += origin;
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", nzones, ndims, nodelist, 23, origin,
+                  shapesize, shapecnt, 4);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, nnodes, origin,
+                                      shapesize, shapecnt, 4, NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+               facelist->nodelist, facelist->lnodelist, facelist->origin,
+               facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    for(i=0;i<nnodes;i++)
+        nodal[i] = x[i];
+
+    zonal[0] = 4.0;
+    zonal[1] = 2.0;
+    zonal[2] = 0.0;
+    zonal[3] = 7.0;
+
+    DBPutUcdvar1(dbfile, "nodal", "mesh", (void*)nodal, nnodes, NULL, 0,
+                 DB_DOUBLE, DB_NODECENT, NULL);
+
+    DBPutUcdvar1(dbfile, "zonal", "mesh", (void*)zonal, nzones, NULL, 0,
+                 DB_DOUBLE, DB_ZONECENT, NULL);
+
+    matlist[0] = 1;
+    matlist[1] = 2;
+    matlist[2] = 3;
+    matlist[3] = 4;
+
+    dims[0] = nzones;
+    DBPutMaterial(dbfile, "mat", "mesh", 4, mats, matlist, dims, 1, NULL, NULL,
+                  NULL, NULL, 0, DB_DOUBLE, NULL);
+
+    sprintf(mesh_command, "mesh mesh");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/amr2d.silo b/tests/amr2d.silo
new file mode 100644
index 0000000..6b9f648
Binary files /dev/null and b/tests/amr2d.silo differ
diff --git a/tests/amr2d_mesh_config.xml b/tests/amr2d_mesh_config.xml
new file mode 100644
index 0000000..81e5492
--- /dev/null
+++ b/tests/amr2d_mesh_config.xml
@@ -0,0 +1,117 @@
+<AMRDecomp meshName="amr_mesh" numDims="2" numLevels="3" numPatches="35" >
+    <Level level="0" numPatches="4" ratios="1 1" >
+        0 1 2 3 
+    </Level>
+    <Level level="1" numPatches="4" ratios="4 4" >
+        4 5 6 7 
+    </Level>
+    <Level level="2" numPatches="27" ratios="4 4" >
+        8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 
+        28 29 30 31 32 33 34 
+    </Level>
+    <Patch iDx="0" vId="1" level="0" rank="0.062497" numChildren="1" logSize="30 30" logExtents="0 29 0 29" spatExtents="0.000000 0.500000 0.000000 0.239713" >
+        4 
+    </Patch>
+    <Patch iDx="1" vId="2" level="0" rank="0.062497" numChildren="1" logSize="30 30" logExtents="0 29 30 59" spatExtents="0.000000 0.438791 0.000000 0.420735" >
+        5 
+    </Patch>
+    <Patch iDx="2" vId="3" level="0" rank="0.187491" numChildren="1" logSize="30 30" logExtents="30 59 0 29" spatExtents="0.438791 1.000000 0.000000 0.479426" >
+        6 
+    </Patch>
+    <Patch iDx="3" vId="4" level="0" rank="0.187491" numChildren="1" logSize="30 30" logExtents="30 59 30 59" spatExtents="0.270151 0.877583 0.239713 0.841471" >
+        7 
+    </Patch>
+    <Patch iDx="4" vId="5" level="1" rank="0.011574" numChildren="7" logSize="40 40" logExtents="80 119 80 119" spatExtents="0.292528 0.472478 0.109065 0.239713" >
+        14 9 12 8 10 11 13 
+    </Patch>
+    <Patch iDx="5" vId="6" level="1" rank="0.011574" numChildren="8" logSize="40 40" logExtents="80 119 120 159" spatExtents="0.261962 0.438791 0.159809 0.309185" >
+        22 15 16 21 19 17 20 18 
+    </Patch>
+    <Patch iDx="6" vId="7" level="1" rank="0.016204" numChildren="8" logSize="40 40" logExtents="120 159 80 119" spatExtents="0.438791 0.629971 0.163597 0.319617" >
+        29 28 25 14 23 24 26 27 
+    </Patch>
+    <Patch iDx="7" vId="8" level="1" rank="0.016204" numChildren="7" logSize="40 40" logExtents="120 159 120 159" spatExtents="0.392944 0.585055 0.239713 0.412247" >
+        32 29 22 33 34 31 30 
+    </Patch>
+    <Patch iDx="8" vId="9" level="2" rank="0.000842" numChildren="0" logSize="40 48" logExtents="368 407 384 431" spatExtents="0.345171 0.391451 0.149277 0.184860" >
+        
+    </Patch>
+    <Patch iDx="9" vId="10" level="2" rank="0.000855" numChildren="0" logSize="44 40" logExtents="408 451 368 407" spatExtents="0.387191 0.436662 0.158956 0.194134" >
+        
+    </Patch>
+    <Patch iDx="10" vId="11" level="2" rank="0.000361" numChildren="0" logSize="16 48" logExtents="408 423 408 455" spatExtents="0.377949 0.402375 0.175236 0.201991" >
+        
+    </Patch>
+    <Patch iDx="11" vId="12" level="2" rank="0.000187" numChildren="0" logSize="16 24" logExtents="424 439 408 431" spatExtents="0.397697 0.417559 0.182108 0.199359" >
+        
+    </Patch>
+    <Patch iDx="12" vId="13" level="2" rank="0.000842" numChildren="0" logSize="40 48" logExtents="368 407 432 479" spatExtents="0.336407 0.382690 0.166737 0.203756" >
+        
+    </Patch>
+    <Patch iDx="13" vId="14" level="2" rank="0.000130" numChildren="0" logSize="16 16" logExtents="440 455 408 423" spatExtents="0.414352 0.432743 0.188980 0.203037" >
+        
+    </Patch>
+    <Patch iDx="14" vId="15" level="2" rank="0.000943" numChildren="0" logSize="44 40" logExtents="480 495 368 407" spatExtents="0.428947 0.479169 0.176098 0.213032" >
+        
+    </Patch>
+    <Patch iDx="15" vId="16" level="2" rank="0.000842" numChildren="0" logSize="40 48" logExtents="368 407 480 527" spatExtents="0.326801 0.372973 0.183780 0.222142" >
+        
+    </Patch>
+    <Patch iDx="16" vId="17" level="2" rank="0.000842" numChildren="0" logSize="40 48" logExtents="368 407 528 575" spatExtents="0.316379 0.362323 0.200363 0.239973" >
+        
+    </Patch>
+    <Patch iDx="17" vId="18" level="2" rank="0.000301" numChildren="0" logSize="16 40" logExtents="408 423 504 543" spatExtents="0.358570 0.382185 0.213016 0.237097" >
+        
+    </Patch>
+    <Patch iDx="18" vId="19" level="2" rank="0.000250" numChildren="0" logSize="16 32" logExtents="424 439 528 559" spatExtents="0.368629 0.390740 0.230854 0.252454" >
+        
+    </Patch>
+    <Patch iDx="19" vId="20" level="2" rank="0.000301" numChildren="0" logSize="16 40" logExtents="408 423 544 583" spatExtents="0.348756 0.372632 0.228150 0.252413" >
+        
+    </Patch>
+    <Patch iDx="20" vId="21" level="2" rank="0.000250" numChildren="0" logSize="16 32" logExtents="424 439 560 591" spatExtents="0.360316 0.382539 0.243274 0.265063" >
+        
+    </Patch>
+    <Patch iDx="21" vId="22" level="2" rank="0.000389" numChildren="0" logSize="16 48" logExtents="440 455 544 591" spatExtents="0.373913 0.400755 0.246044 0.274702" >
+        
+    </Patch>
+    <Patch iDx="22" vId="23" level="2" rank="0.001042" numChildren="0" logSize="48 40" logExtents="480 503 552 591" spatExtents="0.387510 0.440576 0.258322 0.303617" >
+        
+    </Patch>
+    <Patch iDx="23" vId="24" level="2" rank="0.000933" numChildren="0" logSize="40 40" logExtents="496 535 368 407" spatExtents="0.470703 0.517811 0.193241 0.230212" >
+        
+    </Patch>
+    <Patch iDx="24" vId="25" level="2" rank="0.000458" numChildren="0" logSize="48 16" logExtents="504 551 408 423" spatExtents="0.474621 0.523847 0.216468 0.245782" >
+        
+    </Patch>
+    <Patch iDx="25" vId="26" level="2" rank="0.001005" numChildren="0" logSize="40 40" logExtents="536 575 368 407" spatExtents="0.508663 0.556454 0.208824 0.247392" >
+        
+    </Patch>
+    <Patch iDx="26" vId="27" level="2" rank="0.000234" numChildren="0" logSize="24 16" logExtents="528 551 424 439" spatExtents="0.493235 0.519823 0.235096 0.254411" >
+        
+    </Patch>
+    <Patch iDx="27" vId="28" level="2" rank="0.000157" numChildren="0" logSize="16 16" logExtents="536 551 440 455" spatExtents="0.496522 0.515655 0.247037 0.262970" >
+        
+    </Patch>
+    <Patch iDx="28" vId="29" level="2" rank="0.001138" numChildren="0" logSize="40 44" logExtents="552 591 408 451" spatExtents="0.512435 0.561807 0.237084 0.279738" >
+        
+    </Patch>
+    <Patch iDx="29" vId="30" level="2" rank="0.001138" numChildren="0" logSize="40 44" logExtents="552 591 480 495" spatExtents="0.499946 0.549568 0.260837 0.304624" >
+        
+    </Patch>
+    <Patch iDx="30" vId="31" level="2" rank="0.000157" numChildren="0" logSize="16 16" logExtents="536 551 504 519" spatExtents="0.478408 0.497561 0.279844 0.296450" >
+        
+    </Patch>
+    <Patch iDx="31" vId="32" level="2" rank="0.000465" numChildren="0" logSize="32 24" logExtents="520 551 520 543" spatExtents="0.457002 0.492689 0.279264 0.308673" >
+        
+    </Patch>
+    <Patch iDx="32" vId="33" level="2" rank="0.001375" numChildren="0" logSize="48 48" logExtents="504 551 544 591" spatExtents="0.428301 0.485125 0.281832 0.332533" >
+        
+    </Patch>
+    <Patch iDx="33" vId="34" level="2" rank="0.001034" numChildren="0" logSize="40 40" logExtents="552 591 496 535" spatExtents="0.487680 0.536174 0.284041 0.326694" >
+        
+    </Patch>
+    <Patch iDx="34" vId="35" level="2" rank="0.001034" numChildren="0" logSize="40 40" logExtents="552 591 536 575" spatExtents="0.474568 0.523019 0.304620 0.348196" >
+        
+    </Patch>
+</AMRDecomp>
diff --git a/tests/amr3d.silo b/tests/amr3d.silo
new file mode 100644
index 0000000..1194473
Binary files /dev/null and b/tests/amr3d.silo differ
diff --git a/tests/amr3d_mesh_config.xml b/tests/amr3d_mesh_config.xml
new file mode 100644
index 0000000..9522243
--- /dev/null
+++ b/tests/amr3d_mesh_config.xml
@@ -0,0 +1,20 @@
+<AMRDecomp meshName="amr_mesh" numDims="3" numLevels="3" numPatches="3" >
+    <Level level="0" numPatches="1" ratios="1 1 1" >
+        0 
+    </Level>
+    <Level level="1" numPatches="1" ratios="2 2 2" >
+        1 
+    </Level>
+    <Level level="2" numPatches="1" ratios="2 2 2" >
+        2 
+    </Level>
+    <Patch iDx="0" vId="1" level="0" rank="8.000000" numChildren="1" logSize="15 10 10" logExtents="0 14 0 9 0 9" spatExtents="0.000000 30.000000 0.000000 20.000000 0.000000 20.000000" >
+        1 
+    </Patch>
+    <Patch iDx="1" vId="2" level="1" rank="1.000000" numChildren="1" logSize="12 12 12" logExtents="0 11 0 11 0 11" spatExtents="0.000000 12.000000 0.000000 12.000000 0.000000 12.000000" >
+        2 
+    </Patch>
+    <Patch iDx="2" vId="3" level="2" rank="0.125000" numChildren="0" logSize="18 18 18" logExtents="2 19 2 19 2 19" spatExtents="1.000000 10.000000 1.000000 10.000000 1.000000 10.000000" >
+        
+    </Patch>
+</AMRDecomp>
diff --git a/tests/arbpoly2d.c b/tests/arbpoly2d.c
new file mode 100644
index 0000000..5708a75
--- /dev/null
+++ b/tests/arbpoly2d.c
@@ -0,0 +1,214 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define LEN(A)	(sizeof(A)/sizeof(A[0]))
+
+int
+main(int argc, char *argv[])
+{
+    int             i;
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    float           x[8] = {0, 1, 2, 3, 4, 3, 2, 1};
+    float           y[8] = {.5,0, 0, 0,.5, 1, 1, 1};
+    float           z[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+    int             nl[12]  = {  0,1,7,     1,2,6,7,      2,3,4,5,6};
+    int             nl2[13] = {  0,1,7,     1,2,6,7,    5,2,3,4,5,6};
+    int             nl3[15] = {3,0,1,7,   4,1,2,6,7,    5,2,3,4,5,6};
+    int             shapetype[8];
+    int             shapesize[8];
+    int             shapecnt[8] = {1,1,1,1,1,1,1,1};
+    DBfacelist     *facelist = NULL;
+    float           angle;
+    float           var[8] = {4, 3, 2, 1, 0, 1, 2, 3};
+    int		    driver=DB_PDB;
+    char            *filename = "arbpoly2d.silo";
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB",6)) {
+	    driver = StringToDriver(argv[i]);
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    DBShowErrors(DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "2D arbitrary polyon tests", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    /* typical 2D mesh with normal zonelist */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 5;
+    DBPutUcdmesh(dbfile, "mesh_zl", 2, coordnames, coords, 8, 1, "zl",
+                 NULL, DB_FLOAT, NULL);
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zl", 3, 2, nl, LEN(nl), 0, shapesize,
+                  shapecnt, 3);
+    DBSetDeprecateWarnings(3);
+    DBPutUcdvar1(dbfile, "v_zl", "mesh_zl", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same as above except using convention where shapesize is zero and
+       vertex count is encoded as first entry in each shape */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 0;
+    DBPutUcdmesh(dbfile, "mesh_zl0", 2, coordnames, coords, 8, 1, "zl0",
+                 NULL, DB_FLOAT, NULL);
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zl0", 3, 2, nl2, LEN(nl2), 0, shapesize,
+                  shapecnt, 3);
+    DBSetDeprecateWarnings(3);
+    DBPutUcdvar1(dbfile, "v_zl0", "mesh_zl0", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using PutZonelist2 */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 5;
+    shapetype[0] = DB_ZONETYPE_TRIANGLE;
+    shapetype[1] = DB_ZONETYPE_QUAD;
+    shapetype[2] = DB_ZONETYPE_POLYGON;
+    DBPutUcdmesh(dbfile, "mesh_zl2", 2, coordnames, coords, 8, 1, "zl2",
+                 NULL, DB_FLOAT, NULL);
+    DBPutZonelist2(dbfile, "zl2", 3, 2, nl, LEN(nl), 0, 0, 0, shapetype,
+        shapesize, shapecnt, 3, NULL);
+    DBPutUcdvar1(dbfile, "v_zl2", "mesh_zl2", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using PutZonelist2 */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 0;
+    shapetype[0] = DB_ZONETYPE_TRIANGLE;
+    shapetype[1] = DB_ZONETYPE_QUAD;
+    shapetype[2] = DB_ZONETYPE_POLYGON;
+    DBPutUcdmesh(dbfile, "mesh_zl20", 2, coordnames, coords, 8, 1, "zl20",
+                 NULL, DB_FLOAT, NULL);
+    DBPutZonelist2(dbfile, "zl20", 3, 2, nl2, LEN(nl2), 0, 0, 0, shapetype,
+        shapesize, shapecnt, 3, NULL);
+    DBPutUcdvar1(dbfile, "v_zl20", "mesh_zl20", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using PutZonelist2 with every zone set to type polygon */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 5;
+    shapetype[0] = DB_ZONETYPE_POLYGON;
+    shapetype[1] = DB_ZONETYPE_POLYGON;
+    shapetype[2] = DB_ZONETYPE_POLYGON;
+    DBPutUcdmesh(dbfile, "mesh_zl2p", 2, coordnames, coords, 8, 1, "zl2p",
+                 NULL, DB_FLOAT, NULL);
+    DBPutZonelist2(dbfile, "zl2p", 3, 2, nl, LEN(nl), 0, 0, 0, shapetype,
+        shapesize, shapecnt, 3, NULL);
+    DBPutUcdvar1(dbfile, "v_zl2p", "mesh_zl2p", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using PutZonelist2 with every zone set to type polygon and sizes zero */
+    shapesize[0] = 0;
+    shapesize[1] = 0;
+    shapesize[2] = 0;
+    shapetype[0] = DB_ZONETYPE_POLYGON;
+    shapetype[1] = DB_ZONETYPE_POLYGON;
+    shapetype[2] = DB_ZONETYPE_POLYGON;
+    DBPutUcdmesh(dbfile, "mesh_zl2p0", 2, coordnames, coords, 8, 1, "zl2p0",
+                 NULL, DB_FLOAT, NULL);
+    DBPutZonelist2(dbfile, "zl2p0", 3, 2, nl3, LEN(nl3), 0, 0, 0, shapetype,
+        shapesize, shapecnt, 3, NULL);
+    DBPutUcdvar1(dbfile, "v_zl2p0", "mesh_zl2p0", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using facelist */
+    shapetype[0] = DB_ZONETYPE_TRIANGLE;
+    shapetype[1] = DB_ZONETYPE_QUAD;
+    shapetype[2] = DB_ZONETYPE_POLYGON;
+    DBPutUcdmesh(dbfile, "mesh_fl", 2, coordnames, coords, 8, 1, "fl",
+                 NULL, DB_FLOAT, NULL);
+    /* note that we need to say ndims==3 to get this call to write shapesize/shapecnt */
+    DBPutFacelist(dbfile, "fl", 3, 3, nl, LEN(nl), 0, NULL,
+        shapesize, shapecnt, 3, shapetype, NULL, 3);
+    DBPutUcdvar1(dbfile, "v_fl", "mesh_fl", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    /* same using ph-zonelist */
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+    shapesize[2] = 5;
+    DBPutUcdmesh(dbfile, "mesh_phzl", 2, coordnames, coords, 8, 1, "phzl",
+                 NULL, DB_FLOAT, NULL);
+    DBPutPHZonelist(dbfile, "phzl", 3, shapesize, LEN(nl), nl, 0,0,0,0,0,0,0,0,0);
+    DBPutUcdvar1(dbfile, "v_phzl", "mesh_phzl", var, 8, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+
+    return (0);
+}
diff --git a/tests/array.c b/tests/array.c
new file mode 100644
index 0000000..937066a
--- /dev/null
+++ b/tests/array.c
@@ -0,0 +1,193 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo  */
+
+#include <math.h>
+#include <string.h>
+#ifndef _WIN32
+  #include <unistd.h>
+#endif
+
+#include <std.c>
+
+
+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *    Kathleen Bonnell, Thu Jul 29 09:58:47 PDT 2010
+ *    Added correct Sleep function for Windows.
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    char          *ename[3];
+    int            esize[3], i;
+    float          val[18], *show;
+    DBcompoundarray *ca;
+    int		   driver = DB_PDB;
+    char	  *filename = "carray.pdb";
+    int            show_all_errors = FALSE;
+    int            sleepsecs = 0;
+    
+
+    DBShowErrors(DB_TOP, NULL);
+    DBForceSingle(1);
+
+    /* Parse commandline */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB",6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "carray.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "carray.h5";
+        } else if (!strcmp(argv[i], "sleep")) {
+            sleepsecs = 10;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    /*
+     * Create a file that contains a Compound Array object.
+     * The Compoundarray consists of three simple arrays
+     * of floating point data.  The simple arrays are
+     *  "a" 4 elements
+     *  "b" 6 elements
+     *  "c" 8 elements
+     */
+    printf("Creating file: `%s'\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "Compound Array Test", driver);
+
+    /*
+     * Build the compound array.
+     */
+    ename[0] = "a";
+    esize[0] = 4;
+    ename[1] = "b";
+    esize[1] = 6;
+    ename[2] = "c";
+    esize[2] = 8;
+    for (i = 0; i < 18; i++) {
+        val[i] = sin(6.28 * i / 18.0);
+        printf(" value %d is %g\n", i, val[i]);
+    }
+
+    DBPutCompoundarray(dbfile, "carray",  /*array */
+                       ename, esize, 3,  /*simple arrays */
+                       val, 18, DB_FLOAT,  /*values */
+                       NULL);   /*options */
+    i = 1;
+    if (sleepsecs)
+        DBWrite (dbfile, "sleepsecs", &sleepsecs, &i, 1, DB_INT);
+
+    DBClose(dbfile);
+
+    /*
+     * Now try opening the file again and reading the
+     * compound array object.
+     */
+    printf("Reopening `%s'\n", filename);
+    dbfile = DBOpen(filename, driver, DB_READ);
+    ca = DBGetCompoundarray(dbfile, "carray");
+#ifdef _WIN32
+    /* Windows Sleep is specified in milliseconds */
+    Sleep(sleepsecs*1000);
+#else
+    sleep(sleepsecs);
+#endif
+
+    /*
+     * Print the information we found.
+     */
+    if (ca) {
+        printf("\nCompound array information (DBGetCompoundarray):\n");
+        printf("   id................................%d\n", ca->id);
+        printf("   name..............................%s\n", ca->name);
+        printf("   number of elements................%d\n", ca->nelems);
+        printf("   number of values..................%d\n", ca->nvalues);
+        printf("   data type.........................%d\n", ca->datatype);
+        for (i = 0; i < ca->nelems; i++) {
+            printf("   simple array %d (`%s' has %d elements)\n",
+                   i, ca->elemnames[i], ca->elemlengths[i]);
+        }
+
+        printf("   values... (float)\n");
+        for (show = ca->values, i = 0; i < ca->nvalues; i++) {
+            printf(" value %d is %g\n", i, show[i]);
+        }
+    }
+    DBFreeCompoundarray(ca);
+
+    DBClose(dbfile);
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/arrayf77.f b/tests/arrayf77.f
new file mode 100644
index 0000000..e019707
--- /dev/null
+++ b/tests/arrayf77.f
@@ -0,0 +1,148 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+c-------------------------------------------------------------------------
+c Purpose
+c
+c   Demonstrate use of SILO for creating compound array objects.
+c
+c-------------------------------------------------------------------------
+
+      program main
+
+      implicit none
+      include "silo.inc"
+      integer dbid, err
+
+      character*32 elemnames(3)
+      integer elemlengths(3), array_id, i
+      real values(18)
+
+      character*32 g_enames(10)
+      integer g_elengths(10), g_nelems, g_nvalues, g_datatype,
+     $     g_maxwidth
+
+      real g_values(100)
+
+      data elemnames/"x","y","z"/
+      data elemlengths/4,6,8/
+
+      err = dbshowerrors(DB_ABORT)
+
+c...Create file named "robb.pdb".  Database ID is returned in 'dbid'.
+
+      err = dbcreate("arrayf77.pdb", 12, 0, DB_LOCAL, "file info",
+     $     9, DB_PDB, dbid)
+
+
+      do i=1, 18
+         values(i) = i/100.0
+      enddo
+
+      err = dbputca (dbid, "carray", 6, elemnames, 32,
+     $ elemlengths, 3, values, DB_FLOAT, DB_F77NULL, array_id)
+
+      err = dbclose (dbid)
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C  Now try to read from the file...
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+
+      err = dbopen ("arrayf77.pdb", 12, DB_PDB, DB_READ, dbid)
+
+      err = dbgetca (dbid, "carray", 6, 32, g_enames, g_elengths,
+     $     g_nelems, g_values, g_nvalues, g_datatype)
+
+      write (*,*) "reading via dbgetca"
+      write (*,*) "number of elements..........", g_nelems
+      write (*,*) "number of values............", g_nvalues
+      write (*,*) "data type...................", g_datatype
+      do i=1, g_nelems
+         write (*,*) "simple array ", i, " name is ", g_enames(i)
+      enddo
+      do i=1, g_nvalues
+         write (*,*) "value ", i, " is ", g_values(i)
+      enddo
+
+
+      g_nvalues = 0
+      do i=1,100
+         g_values(i) = 0
+      enddo
+      err = dbfgetca (dbid, "carray", 6, g_values, g_nvalues)
+
+      write (*,*) "reading via dbfgetca"
+      write (*,*) "number of values............", g_nvalues
+      do i=1, g_nvalues
+         write (*,*) "value ", i, " is ", g_values(i)
+      enddo
+
+
+      g_nelems = 0
+      g_nvalues = 0
+      g_datatype = 0
+      err = dbinqca (dbid, "carray", 6, g_maxwidth, g_nelems, g_nvalues,
+     $     g_datatype)
+
+      write (*,*) "reading via dbinqca"
+      write (*,*) "number of elements..........", g_nelems
+      write (*,*) "number of values............", g_nvalues
+      write (*,*) "data type...................", g_datatype
+      write (*,*) "longest name................", g_maxwidth
+
+      err = dbclose (dbid)
+
+      stop
+      end
diff --git a/tests/checksums b/tests/checksums
new file mode 100755
index 0000000..77011f7
--- /dev/null
+++ b/tests/checksums
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+# -----------------------------------------------------------------------------
+# Test checksumming capability in silo by generating checksummed data
+# file, copying it, corrupting the copy and then diffing it with browser
+# against the original with and without checksumming turned on during
+# the diff
+#
+# Programmer: Mark C. Miller
+# Creation:   February 20, 2007
+#
+# -----------------------------------------------------------------------------
+
+# Diddle the the directory because Autotest is not at all designed to handle
+# tests the way this one was written
+if test -n "$1"; then
+    topDir=$1
+    if test -e $topDir/../../multi_test; then
+        topDir=$1/../..
+    fi
+else
+    topDir=.
+fi
+
+#
+# Create data with checksums (only on HDF5 driver) and save files
+#
+$topDir/multi_test DB_HDF5 check 1>/dev/null 2>&1
+rm -rf h5_check_files
+mkdir h5_check_files
+mv *.h5 h5_check_files/.
+
+#
+# Create data without checksums
+#
+$topDir/multi_test DB_HDF5 1>/dev/null 2>&1
+
+#
+# Determine the offset of an hdf5 dataset in the silo file.
+# We do this because we can't indescriminently corrupt the file.
+# Silo's checksumming is done only on the dataset objects in
+# the file. So, we have to make sure that we corrupt a dataset.
+# We do this using octal dump (od) and looking for some numbers
+# we expect in a silo object (domain_23/fl)
+#
+offset=`od -A d4 -t d4 h5_check_files/multi_ucd3d.h5 | grep '167         179         323         311' | cut -d' ' -f1`
+offset=`echo $offset | cut -d' ' -f1`
+size=`ls -l h5_check_files/multi_ucd3d.h5 | tr -s ' ' | cut -d' ' -f5`
+
+#
+# Make a file of 4 integer zeros
+#
+rm -f zeros
+i=0
+/bin/echo -n -e '\000' > zeros
+while test $i -lt 15; do
+    /bin/echo -n -e '\000' >> zeros
+    i=`expr $i + 1`
+done
+
+#
+# Corrupt a checksumed file by splicing together the first
+# part of the original file with the 4 integer zeros (above)
+# and the last part of the file (minus the part we've zeroed)
+#
+rm -f multi_ucd3d_corrupt.h5
+head -c $offset h5_check_files/multi_ucd3d.h5 > multi_ucd3d_corrupt.h5
+cat zeros >> multi_ucd3d_corrupt.h5
+leftover=`expr $size - $offset - 16`
+tail -c $leftover h5_check_files/multi_ucd3d.h5 >> multi_ucd3d_corrupt.h5
+
+#
+# Now, run browser with checksumming turned on and make sure we
+# detect a checksumming error
+#
+result=0
+brOut=`$topDir/../tools/browser/browser -q -c -e diff multi_ucd3d.h5 multi_ucd3d_corrupt.h5 2>&1`
+if test -z "`echo $brOut | grep 'Checksum failure'`"; then
+    result=1
+fi
+
+#
+# Now, run browser with checksumming not turned on and make sure
+# we just see a diff in the file
+#
+brOut=`$topDir/../tools/browser/browser -q -e diff multi_ucd3d.h5 multi_ucd3d_corrupt.h5`
+# Just look for a large output of characters
+if test ${#brOut} -lt 250; then
+    result=1
+fi
+
+#
+# Cleanup
+#
+rm -rf h5_check_files
+rm -f zeros
+rm -f multi_ucd3d_corrupt.h5
+
+exit $result 
diff --git a/tests/compression.c b/tests/compression.c
new file mode 100644
index 0000000..da721c9
--- /dev/null
+++ b/tests/compression.c
@@ -0,0 +1,350 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo           */
+
+#include <math.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if !defined(_WIN32)
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+
+#define ONE_MEG 1048576
+#define INTERATE 50
+
+#include <std.c>
+
+/*-------------------------------------------------------------------------
+ * Function:        main
+ *
+ * Purpose:        
+ *
+ * Return:        0
+ *
+ * Programmer:        
+ *      Thomas R. Treadway, Mon Mar 12 14:13:51 PDT 2007
+ *      Test of HDF5 compression.
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    
+    int            nerrors = 0;
+    int            verbose = 0;
+    int            usefloat = 0;
+    int            readonly = 0;
+    int            i, j, ndims=1;
+    int            fdims[]={ONE_MEG/sizeof(float)};
+    int            ddims[]={ONE_MEG/sizeof(double)};
+    float          *fval;
+    float          *frval;
+    double         *dval;
+    double         *drval;
+    int            driver=DB_HDF5;
+    char          *filename="compression.h5";
+    char          *ptr;
+    char           tmpname[64];
+    DBfile        *dbfile;
+#if !defined(_WIN32)
+    struct         timeval tim;
+    double         t1, t2;
+#endif
+    struct stat    buffer;
+    off_t          fsize;
+    int            has_loss = 0;
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+       if (!strncmp(argv[i], "DB_PDB",6)) {
+          fprintf(stderr, "This test only supported on HDF5 driver\n");
+          exit(1);
+       } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+          driver = StringToDriver(argv[i]);
+          filename = "compression.h5";
+       } else if (!strcmp(argv[i], "compress")) {
+          if ((i+1<argc) && ((ptr=strstr(argv[i+1], "METHOD=")) != NULL))
+          {
+            DBSetCompression(argv[i+1]);
+            i++;
+          }
+          else
+            DBSetCompression("METHOD=GZIP");
+       } else if (!strcmp(argv[i], "szip")) {
+          DBSetCompression("METHOD=SZIP");
+       } else if (!strcmp(argv[i], "gzip")) {
+          DBSetCompression("METHOD=GZIP");
+       } else if (!strcmp(argv[i], "fpzip")) {
+          DBSetCompression("METHOD=FPZIP");
+       } else if (!strcmp(argv[i], "single")) {
+          usefloat = 1;
+       } else if (!strcmp(argv[i], "verbose")) {
+          verbose = 1;
+       } else if (!strcmp(argv[i], "lossy1")) {
+          DBSetCompression("METHOD=FPZIP LOSS=1");
+          has_loss = 1;
+       } else if (!strcmp(argv[i], "lossy2")) {
+          DBSetCompression("METHOD=FPZIP LOSS=2");
+          has_loss = 1;
+       } else if (!strcmp(argv[i], "lossy3")) {
+          DBSetCompression("METHOD=FPZIP LOSS=3");
+          has_loss = 1;
+       } else if (!strcmp(argv[i], "minratio1000")) {
+          DBSetCompression("ERRMODE=FAIL MINRATIO=1000 METHOD=FPZIP");
+       } else if (!strcmp(argv[i], "minratio1001")) {
+          DBSetCompression("ERRMODE=FALLBACK MINRATIO=1000 METHOD=FPZIP");
+       } else if (!strcmp(argv[i], "readonly")) {
+          readonly = 1;
+       } else if (!strcmp(argv[i], "help")) {
+          printf("Usage: %s [compress [\"METHOD=...\"]|single|verbose|readonly]\n",argv[0]);
+          printf("Where: compress - enables compression, followed by compression information string\n");
+          printf("                  default is compress \"METHOD=GZIP LEVEL=1\"\n");
+          printf("       single   - writes data as floats not doubles\n");
+          printf("       verbose  - displays more feedback\n");
+          printf("       readonly - checks an existing file (used for cross platform test)\n");
+          printf("       DB_HDF5  - enable HDF5 driver, the default\n");
+          return (0);
+       } else if (!strcmp(argv[i], "show-all-errors")) {
+          show_all_errors = 1;
+       } else if (argv[i][0] != '\0') {
+          fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+       }
+    }
+
+    /* get some temporary memory */
+    fval = (float*) malloc(ONE_MEG);
+    frval = (float*) malloc(ONE_MEG);
+    dval = (double*) malloc(ONE_MEG);
+    drval = (double*) malloc(ONE_MEG);
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    if (!readonly)
+    {
+      /*
+       * Create a file that contains a simple variables.
+       */
+      if (verbose)
+         printf("Creating file: `%s'\n", filename);
+      dbfile = DBCreate(filename, 0, DB_LOCAL, "Compression Test", driver);
+
+#if !defined(_WIN32)
+      gettimeofday(&tim, NULL);
+      t1=tim.tv_sec+(tim.tv_usec/1000000.0);
+#endif
+      if (usefloat)
+      {
+         for (j = 0; j < INTERATE; j++)
+         {
+            if (verbose)
+             if (j % 100 == 0)
+               printf("Iterations %04d to %04d of %04d\n", j,j+100-1,INTERATE);
+
+            sprintf(tmpname, "compression_%04d", j);
+
+            for (i = 0; i < fdims[0]; i++)
+               fval[i] = (float) fdims[0] * j + i;
+
+            if (DBWrite(dbfile, tmpname, fval, fdims, ndims, DB_FLOAT) < 0)
+            {
+                nerrors++;
+                break;
+            }
+         }
+      }
+      else
+      {
+         for (j = 0; j < INTERATE; j++)
+         {
+            if (verbose)
+               if (j % 100 == 0)
+                 printf("Iterations %04d to %04d of %04d\n",j,j+100-1,INTERATE);
+
+            sprintf(tmpname, "compression_%04d", j);
+
+            for (i = 0; i < ddims[0]; i++)
+               dval[i] = (double) ddims[0] * j + i;
+
+            if (DBWrite(dbfile, tmpname, dval, ddims, ndims, DB_DOUBLE) < 0)
+            {
+                nerrors++;
+                break;
+            }
+         }
+      }
+#if !defined(_WIN32)
+      gettimeofday(&tim, NULL);
+      t2=tim.tv_sec+(tim.tv_usec/1000000.0);
+      stat(filename, &buffer);
+      fsize = buffer.st_size;
+      printf("Write took %.6lf seconds and %.6g bytes/second\n", 
+         t2-t1,fsize/(t2-t1));
+#endif
+
+      DBClose(dbfile);
+    }
+    else
+    {
+      stat(filename, &buffer);
+      fsize = buffer.st_size;
+    }
+
+    if (nerrors)
+        return nerrors;
+
+    /*
+     * Now try opening the file again and verify the simple
+     * variable.
+     */
+    if (verbose)
+        printf("Reopening `%s'\n", filename);
+    dbfile = DBOpen(filename, driver, DB_READ);
+
+    if (dbfile == 0)
+    {
+        printf("Unable to Open file for reading\n");
+        exit(1);
+    }
+
+#if !defined(_WIN32)
+    gettimeofday(&tim, NULL);
+    t1=tim.tv_sec+(tim.tv_usec/1000000.0);
+#endif
+    if (usefloat)
+    {
+       for (j = 0; j < INTERATE; j++)
+       {
+          if (verbose)
+             if (j % 100 == 0)
+                printf("Iterations %04d to %04d of %04d\n", j,j+100-1,INTERATE);
+
+          sprintf(tmpname, "compression_%04d", j);
+
+          if (DBReadVar(dbfile, tmpname, frval) < 0)
+          {
+             if (!has_loss) nerrors++;
+             if (!has_loss && nerrors <= 10) printf("DBReadVar for \"%s\" failed\n", tmpname);
+             if (!has_loss && nerrors == 10) printf("Further errors will be suppressed\n");
+          }
+          for (i = 0; i < fdims[0]; i++)
+          {
+             fval[i] = (float) fdims[0] * j + i;
+             if (fval[i] != frval[i])
+             {
+                if (!has_loss) nerrors++;
+                if (!has_loss && nerrors <= 10) 
+                    printf("Read error in \"%s\" at position %04d. Expected %f, got %f\n",
+                    tmpname, i, fval[i], frval[i]);
+                if (!has_loss && nerrors == 10) printf("Further errors will be suppressed\n");
+                break;
+             }
+          }
+       }
+    }
+    else
+    {
+       for (j = 0; j < INTERATE; j++)
+       {
+          if (verbose)
+             if (j % 100 == 0)
+                printf("Iterations %04d to %04d of %04d\n",j,j+100-1,INTERATE);
+
+          sprintf(tmpname, "compression_%04d", j);
+
+          if (DBReadVar(dbfile, tmpname, drval) < 0)
+          {
+             if (!has_loss) nerrors++;
+             if (!has_loss && nerrors <= 10) printf("DBReadVar for \"%s\" failed\n", tmpname);
+             if (!has_loss && nerrors == 10) printf("Further errors will be suppressed\n");
+          }
+          for (i = 0; i < ddims[0]; i++)
+          {
+             dval[i] = (double) ddims[0] * j + i;
+             if (dval[i] != drval[i])
+             {
+                if (!has_loss) nerrors++;
+                if (!has_loss && nerrors <= 10) 
+                    printf("Read error in \"%s\" at position %04d. Expected %f, got %f\n",
+                    tmpname, i, dval[i], drval[i]);
+                if (!has_loss && nerrors == 10) printf("Further errors will be suppressed\n");
+                break;
+             }
+          }
+       }
+    }
+#if !defined(_WIN32)
+    gettimeofday(&tim, NULL);
+    t2=tim.tv_sec+(tim.tv_usec/1000000.0);
+    printf("Read took %.6lf seconds and %.6g bytes/second\n", 
+       t2-t1,fsize/(t2-t1));
+#endif
+    DBClose(dbfile);
+
+    free(fval);
+    free(frval);
+    free(dval);
+    free(drval);
+
+    CleanupDriverStuff();
+    return nerrors;
+}
diff --git a/tests/cpz1plt.c b/tests/cpz1plt.c
new file mode 100644
index 0000000..ae074dc
--- /dev/null
+++ b/tests/cpz1plt.c
@@ -0,0 +1,496 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <silo.h>
+
+/*
+ *  Modifications:
+ *
+ *    Hank Childs, Tue Apr 11 09:36:38 PDT 2000
+ *    Changed error handling mode since z1plt is often missing.  Also
+ *    added a return value to remove compiler warning. [HYPer01683]
+ */
+
+#include <std.c>
+
+int
+main(int argc, char **argv)
+{
+     int       i, j;
+     int       ndir;
+     char      **dirs;
+     int       nzones;
+     float     time;
+     char      tmpstr [256];
+
+     DBfile    *dbfile1, *dbfile2;
+     DBtoc     *toc;
+     DBucdmesh *um;
+     DBucdvar  *uv;
+     DBmaterial *mat;
+     DBobject  *obj;
+
+     int       ione = 1;
+     int       ithree = 3;
+     int       ithirtyfour = 34;
+
+     int            driver = DB_PDB;
+     char          *filename = "z1plt.pdb";
+     int            show_all_errors = FALSE;
+
+     for (i=1; i<argc; i++) {
+         if (!strncmp(argv[i], "DB_PDB",6)) {
+             driver = StringToDriver(argv[i]);
+             filename = "z1plt.pdb";
+         } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+             driver = StringToDriver(argv[i]);
+             filename = "z1plt.h5";
+         } else if (!strcmp(argv[i], "show-all-errors")) {
+             show_all_errors = 1;
+	 } else if (argv[i][0] != '\0') {
+             fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+         }
+     }
+
+     /*
+      * Don't abort if the input file is not found.
+      */
+     DBShowErrors (show_all_errors?DB_ALL_AND_DRVR:DB_NONE, NULL);
+
+     /*
+      * Open the old file.
+      */
+     dbfile1 = DBOpen ("z1plt", DB_UNKNOWN, DB_READ);
+     if (dbfile1 == NULL)
+     {
+         fprintf(stderr, "Missing input file \"z1plt\", cannot continue.\n");
+         exit(EXIT_FAILURE);
+     }
+
+     /*
+      * Now that we have the input file, abort if there is a Silo error.
+      */
+     DBShowErrors(DB_ABORT, NULL);
+
+     /*
+      * Get the toc and copy the directory names to some
+      * local storage.
+      */
+     toc = DBGetToc (dbfile1);
+
+     ndir = toc->ndir;
+     dirs = (char **) calloc (ndir, sizeof (char *));
+     for (i = 0; i < ndir; i++) {
+          dirs [i] = (char *) calloc(strlen(toc->dir_names[i])+1,sizeof(char));
+          strcpy (dirs[i], toc->dir_names [i]);
+     }
+
+     /*
+      * Open the new file.
+      */
+     dbfile2 = DBCreate (filename, DB_CLOBBER, DB_LOCAL,
+                         "ball impacting plate", driver);
+
+     /*
+      * Read the hex mesh.
+      */
+     DBSetDir (dbfile1, dirs[0]);
+
+     um = DBGetUcdmesh (dbfile1, "hex_mesh");
+
+     nzones = um->zones->nzones;
+
+     /*
+      * Write out the zonelist.
+      */
+     DBWrite (dbfile2, "zl_nodelist", um->zones->nodelist,
+              &(um->zones->lnodelist), 1, DB_INT);
+
+     DBWrite (dbfile2, "zl_shapecnt", um->zones->shapecnt,
+              &(um->zones->nshapes), 1, DB_INT);
+
+     DBWrite (dbfile2, "zl_shapesize", um->zones->shapesize,
+              &(um->zones->nshapes), 1, DB_INT);
+
+     obj = DBMakeObject ("zl", DB_ZONELIST, 15);
+          
+     DBAddIntComponent (obj, "ndims", um->ndims);
+     DBAddIntComponent (obj, "nzones", um->zones->nzones);
+     DBAddIntComponent (obj, "nshapes", um->zones->nshapes);
+     DBAddIntComponent (obj, "lnodelist", um->zones->lnodelist);
+     DBAddIntComponent (obj, "origin", um->zones->origin);
+     DBAddVarComponent (obj, "nodelist", "/zl_nodelist");
+     DBAddVarComponent (obj, "shapecnt", "/zl_shapecnt");
+     DBAddVarComponent (obj, "shapesize", "/zl_shapesize");
+
+     DBWriteObject(dbfile2, obj, 1);
+     DBFreeObject(obj);
+
+     /*
+      * Write out the facelist.
+      */
+     DBWrite (dbfile2, "fl_nodelist", um->faces->nodelist,
+              &(um->faces->lnodelist), 1, DB_INT);
+
+     DBWrite (dbfile2, "fl_shapecnt", um->faces->shapecnt,
+              &(um->faces->nshapes), 1, DB_INT);
+
+     DBWrite (dbfile2, "fl_shapesize", um->faces->shapesize,
+              &(um->faces->nshapes), 1, DB_INT);
+
+     if (um->faces->zoneno != NULL)
+          DBWrite (dbfile2, "fl_zoneno", um->faces->zoneno,
+                   &(um->faces->nfaces), 1, DB_INT);
+
+     obj = DBMakeObject ("fl", DB_FACELIST, 15);
+          
+     DBAddIntComponent (obj, "ndims", um->faces->ndims);
+     DBAddIntComponent (obj, "nfaces", um->faces->nfaces);
+     DBAddIntComponent (obj, "nshapes", um->faces->nshapes);
+     DBAddIntComponent (obj, "ntypes", um->faces->ntypes);
+     DBAddIntComponent (obj, "lnodelist", um->faces->lnodelist);
+     DBAddIntComponent (obj, "origin", um->faces->origin);
+     DBAddVarComponent (obj, "nodelist", "/fl_nodelist");
+     DBAddVarComponent (obj, "shapecnt", "/fl_shapecnt");
+     DBAddVarComponent (obj, "shapesize", "/fl_shapesize");
+     if (um->faces->zoneno != NULL)
+          DBAddVarComponent (obj, "zoneno", "/fl_zoneno");
+
+     DBWriteObject(dbfile2, obj, 1);
+     DBFreeObject(obj);
+
+     DBFreeUcdmesh (um);
+
+     /*
+      * Write out the data arrays associated with the materials.
+      */
+     mat = DBGetMaterial (dbfile1, "mat1");
+
+     DBWrite (dbfile2, "mat1_dims", mat->dims, &ithree, 1, DB_INT);
+     DBWrite (dbfile2, "mat1_matlist", mat->matlist, &nzones, 1, DB_INT);
+     DBWrite (dbfile2, "mat1_matnos", mat->matnos, &(mat->nmat), 1, DB_INT);
+
+     DBFreeMaterial (mat);
+
+     DBSetDir (dbfile1, "..");
+
+     /*
+      * Loop over the directories in the old file and copy select
+      * contents to the new file.
+      */
+     for (i = 1, j = 0; i < ndir; i += 2, j++) {
+          DBSetDir (dbfile1, dirs[i]);
+
+          sprintf (tmpstr, "state%.2d", j); 
+          DBMkDir (dbfile2, tmpstr);
+          DBSetDir (dbfile2, tmpstr);
+
+          /*
+           * Write out _meshtvinfo.
+           */
+          DBWrite (dbfile2, "_meshtvinfo", "mesh mesh1;pseudocolor stress_eps",
+                   &ithirtyfour, 1, DB_CHAR);
+
+          /*
+           * Write out the mesh.
+           */
+          um = DBGetUcdmesh (dbfile1, "hex_mesh");
+
+          time = um->time;
+
+          DBWrite (dbfile2, "mesh1_coord0", um->coords[0],
+                   &(um->nnodes), 1, DB_FLOAT);
+
+          DBWrite (dbfile2, "mesh1_coord1", um->coords[1],
+                   &(um->nnodes), 1, DB_FLOAT);
+
+          DBWrite (dbfile2, "mesh1_coord2", um->coords[2],
+                   &(um->nnodes), 1, DB_FLOAT);
+
+          DBWrite (dbfile2, "mesh1_min_extents", um->min_extents,
+                   &ithree, 1, DB_FLOAT);
+
+          DBWrite (dbfile2, "mesh1_max_extents", um->max_extents,
+                   &ithree, 1, DB_FLOAT);
+
+          DBWrite (dbfile2, "time", &time, &ione, 1, DB_FLOAT);
+          DBWrite (dbfile2, "cycle", &j, &ione, 1, DB_INT);
+
+          obj = DBMakeObject ("mesh1", DB_UCDMESH, 25);
+          
+          DBAddVarComponent (obj, "coord0", "mesh1_coord0");
+          DBAddVarComponent (obj, "coord1", "mesh1_coord1");
+          DBAddVarComponent (obj, "coord2", "mesh1_coord2");
+          DBAddVarComponent (obj, "min_extents", "mesh1_min_extents");
+          DBAddVarComponent (obj, "max_extents", "mesh1_max_extents");
+          DBAddStrComponent (obj, "zonelist", "/zl");
+          DBAddStrComponent (obj, "facelist", "/fl");
+          DBAddIntComponent (obj, "ndims", um->ndims);
+          DBAddIntComponent (obj, "nnodes", um->nnodes);
+          DBAddIntComponent (obj, "nzones", um->zones->nzones);
+          DBAddIntComponent (obj, "origin", um->origin);
+          DBAddIntComponent (obj, "datatype", DB_FLOAT);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+          DBAddStrComponent (obj, "label0", um->labels[0]);
+          DBAddStrComponent (obj, "label1", um->labels[1]);
+          DBAddStrComponent (obj, "label2", um->labels[2]);
+          DBAddStrComponent (obj, "units0", um->units[0]);
+          DBAddStrComponent (obj, "units1", um->units[1]);
+          DBAddStrComponent (obj, "units2", um->units[2]);
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdmesh (um);
+
+          /*
+           * Write out the material arrays.
+           */
+          mat = DBGetMaterial (dbfile1, "mat1");
+
+          obj = DBMakeObject ("mat1", DB_MATERIAL, 15);
+          
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", mat->ndims);
+          DBAddIntComponent (obj, "nmat", mat->nmat);
+          DBAddIntComponent (obj, "mixlen", mat->mixlen);
+          DBAddIntComponent (obj, "origin", mat->origin);
+          DBAddIntComponent (obj, "major_order", mat->major_order);
+          DBAddVarComponent (obj, "dims", "/mat1_dims");
+          DBAddVarComponent (obj, "matlist", "/mat1_matlist");
+          DBAddVarComponent (obj, "matnos", "/mat1_matnos");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeMaterial (mat);
+
+          /*
+           * Write out pressure.
+           */
+          uv = DBGetUcdvar (dbfile1, "stress/pressure");
+
+          obj = DBMakeObject ("pressure", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "pressure_data", uv->vals[0],
+                   &nzones, 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "pressure_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", nzones);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          /*
+           * Write out stress_eff.
+           */
+          uv = DBGetUcdvar (dbfile1, "stress/stress_eff");
+
+          obj = DBMakeObject ("stress_eff", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "stress_eff_data", uv->vals[0],
+                   &nzones, 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "stress_eff_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", nzones);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          /*
+           * Write out stress_eps.
+           */
+          uv = DBGetUcdvar (dbfile1, "stress/stress_eps");
+
+          obj = DBMakeObject ("stress_eps", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "stress_eps_data", uv->vals[0],
+                   &nzones, 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "stress_eps_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", nzones);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          /*
+           * Write out acc_mag.
+           */
+          uv = DBGetUcdvar (dbfile1, "nodal/acc_mag");
+
+          obj = DBMakeObject ("acc_mag", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "acc_mag_data", uv->vals[0],
+                   &(uv->nels), 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "acc_mag_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", uv->nels);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          /*
+           * Write out disp_mag.
+           */
+          uv = DBGetUcdvar (dbfile1, "nodal/disp_mag");
+
+          obj = DBMakeObject ("disp_mag", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "disp_mag_data", uv->vals[0],
+                   &(uv->nels), 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "disp_mag_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", uv->nels);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          /*
+           * Write out vel_mag.
+           */
+          uv = DBGetUcdvar (dbfile1, "nodal/vel_mag");
+
+          obj = DBMakeObject ("vel_mag", DB_UCDVAR, 15);
+
+          DBWrite (dbfile2, "vel_mag_data", uv->vals[0],
+                   &(uv->nels), 1, DB_FLOAT);
+      
+          DBAddVarComponent (obj, "value0", "vel_mag_data");
+          DBAddStrComponent (obj, "meshid", "mesh1");
+          DBAddIntComponent (obj, "ndims", uv->ndims);
+          DBAddIntComponent (obj, "nvals", uv->nvals);
+          DBAddIntComponent (obj, "nels", uv->nels);
+          DBAddIntComponent (obj, "centering", uv->centering);
+          DBAddIntComponent (obj, "origin", uv->origin);
+          DBAddIntComponent (obj, "mixlen", 0);
+          DBAddIntComponent (obj, "datatype", uv->datatype);
+          DBAddVarComponent (obj, "time", "time");
+          DBAddVarComponent (obj, "cycle", "cycle");
+
+          DBWriteObject(dbfile2, obj, 1);
+          DBFreeObject(obj);
+
+          DBFreeUcdvar (uv);
+
+          DBSetDir (dbfile1, "..");
+          DBSetDir (dbfile2, "..");
+     }
+
+     /*
+      * Close both the old and new files.
+      */
+     DBClose (dbfile1);
+
+     DBClose (dbfile2);
+
+     CleanupDriverStuff();
+     return 0;
+}
diff --git a/tests/csg.c b/tests/csg.c
new file mode 100644
index 0000000..e92e177
--- /dev/null
+++ b/tests/csg.c
@@ -0,0 +1,199 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>     /* For exit()   */
+#include <string.h>     /* For strcmp() */
+#include "silo.h"
+#include <std.c>
+
+static void build_csg(DBfile *dbfile, char *name);
+static int hadError = 0;
+
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    int            i, driver = DB_PDB;
+    char          *filename = "csg.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB",6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "csg.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "csg.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "csg test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+    build_csg(dbfile, "csgmesh");
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return hadError;
+}
+
+static void
+build_csg(DBfile *dbfile, char *name)
+{
+    /* build and output the csg mesh (boundaries) */
+    {
+        int typeflags[] =
+        {
+            DBCSG_SPHERE_PR,
+            DBCSG_PLANE_X,
+            DBCSG_PLANE_X,
+            DBCSG_CYLINDER_PNLR,
+            DBCSG_SPHERE_PR,
+            DBCSG_SPHERE_PR
+        };
+
+        float coeffs[] =
+        {
+            0.0, 0.0, 0.0, 5.0,                /* point-radius form of sphere */
+           -2.5,                               /* x-intercept form of plane */
+            2.5,                               /* x-intercept form of plane */
+          -10.0, 0.0, 0.0, 1.0, 0.0, 0.0, 10.0, 3.0, /* point-normal-length-radius form of cylinder */
+            0.0, 0.0, 49.5, 50.0,              /* point-radius form of sphere */
+            0.0, 0.0, -49.5, 50.0              /* point radius form of sphere */
+        };
+
+        int nbounds = sizeof(typeflags) / sizeof(typeflags[0]);
+        int lcoeffs = sizeof(coeffs) / sizeof(coeffs[0]);
+
+        double extents[] = {-5.0, -5.0, -5.0, 5.0, 5.0, 5.0};
+
+        DBPutCsgmesh(dbfile, name, 3, nbounds, typeflags,
+            NULL, coeffs, lcoeffs, DB_FLOAT, extents, "csgzl", NULL);
+    }
+
+    /* build and output the csg zonelist */
+    {
+        int typeflags[] =
+        {
+            DBCSG_INNER,
+            DBCSG_INNER,
+            DBCSG_OUTER,
+            DBCSG_INNER,
+            DBCSG_INTERSECT,
+            DBCSG_INTERSECT,
+            DBCSG_DIFF,
+            DBCSG_INNER,
+            DBCSG_INNER,
+            DBCSG_INTERSECT,
+            DBCSG_INTERSECT
+        };
+        int leftids[] =  { 0,  1,  2,  3,  0,  4,  5,  4,  5,  7,  9};
+        int rightids[] = {-1, -1, -1, -1,  1,  2,  3, -1, -1,  8,  0}; 
+        int zonelist[] = {6, 10};
+
+        int nregs = sizeof(typeflags) / sizeof(typeflags[0]);
+        int nzones = sizeof(zonelist) / sizeof(zonelist[0]);
+
+        char *zonenames[] = {"ring housing", "lens-shaped fin"};
+
+        DBoptlist *optlist = DBMakeOptlist(1);
+        DBAddOption(optlist, DBOPT_ZONENAMES, zonenames);
+
+        DBPutCSGZonelist(dbfile, "csgzl", nregs, typeflags, leftids, rightids,
+                         NULL, 0, DB_INT, nzones, zonelist, optlist);
+    }
+
+    /* output a csg variable */
+    {
+        void *pv[1];
+        double var1_data[] = {3.14159267, 2.0};
+        char *pname[1];
+        char name1[] = "var1";
+
+        pv[0] = (void*) var1_data;
+        pname[0] = name1;
+
+        DBPutCsgvar(dbfile, "var1", "csgmesh", 1, pname, pv, 2, DB_DOUBLE,
+            DB_ZONECENT, 0);
+
+        DBGetCsgvar(dbfile, "var1");
+    }
+
+    /* test DBInqMeshname */
+    {
+        char meshName[256];
+        if (DBInqMeshname(dbfile, "var1", meshName) != 0)
+        {
+            printf("Error inquiring mesh name\n");
+            hadError = 1;
+        }
+        else
+        {
+            printf("Got \"%s\" as name of mesh for variable \"var1\"\n", meshName);
+        }
+    }
+
+    /* test pathname utility */
+    {
+        const char *parent = "/";
+        const char *child = "/facelist";
+        char *result = DBJoinPath(parent, child);
+        printf("Got \"%s\" for result\n", result);
+    }
+}
diff --git a/tests/curvef77.f b/tests/curvef77.f
new file mode 100644
index 0000000..e2a0d00
--- /dev/null
+++ b/tests/curvef77.f
@@ -0,0 +1,118 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+c-------------------------------------------------------------------------
+c Purpose
+c
+c   Demonstrate use of SILO for creating curve objects.
+c
+c-------------------------------------------------------------------------
+
+      program main
+      implicit none
+      include "silo.inc"
+      integer dbid, curveid, err, i, curve_id, dtype, npts
+      real x(20), y1(20), y2(20), xin(20), yin1(20), yin2(20)
+
+c     Create the curve x and y values...
+
+      do i=1, 20
+         x(i) = (i-1) * 3.1415927 / 20.0
+         y1(i) = sin (x(i))
+         y2(i) = cos (x(i))
+      enddo
+
+c     Write curve data to a PDB file...
+
+      err = dbcreate ("curvef77.pdb", 12, 0, DB_LOCAL,
+     $     "Curve Data", 10, DB_PDB, dbid)
+
+      err = dbputcurve (dbid, "sincurve", 8, x, y1, DB_FLOAT,
+     $     20, DB_F77NULL, curve_id)
+
+      err = dbputcurve (dbid, "coscurve", 8, x, y2, DB_FLOAT,
+     $     20, DB_F77NULL, curve_id)
+
+      err = dbclose (dbid)
+
+c     Read the pdb file...
+
+      err = dbopen ("curvef77.pdb", 12, DB_PDB, DB_READ, dbid)
+      err = dbgetcurve (dbid, "sincurve", 8, 20, xin, yin1,
+     $     dtype, npts)
+      err = dbgetcurve (dbid, "coscurve", 8, 20, xin, yin2,
+     $     dtype, npts)
+      err = dbclose (dbid)
+
+c     Check for errors...
+
+      do i=1,20
+         if (x(i) .ne. xin(i)) then
+            write (*,*) "x mismatch error at index ", i
+            stop
+         endif
+         if (yin1(i) .ne. y1(i)) then
+            write (*,*) "y1 mismatch error at index ", i
+            stop
+         endif
+         if (yin2(i) .ne. y2(i)) then
+            write (*,*) "y2 mismatch error at index ", i
+            stop
+         endif
+      enddo
+
+      write (*,*) "Test successful."
+
+      stop
+      end
diff --git a/tests/dir.c b/tests/dir.c
new file mode 100644
index 0000000..b8838e9
--- /dev/null
+++ b/tests/dir.c
@@ -0,0 +1,221 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifndef WIN32
+#include <unistd.h>
+#else
+#include <direct.h>
+#include <stdlib.h>
+#include <string.h>
+#endif
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "silo.h"
+#include <std.c>
+extern int build_quad(DBfile *dbfile, char *name);
+extern int build_ucd(DBfile *dbfile, char *name);
+extern int build_ucd_tri(DBfile *dbfile, char *name);
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     
+ *
+ * Return:      0
+ *
+ * Programmer:  
+ *
+ * Modifications:
+ *      Robb Matzke, 1999-04-09
+ *      Added argument parsing to control the driver which is used.
+ *
+ *-------------------------------------------------------------------------
+ */
+main(int argc, char *argv[])
+{
+    
+    int            meshid, diridq, diridu, diridt;
+    int            meshtypes[3], mmid, nmesh;
+    char          *meshnames[3], original_dir[128];
+    DBfile        *dbfile, *dbfile2, *dbfile3, *dbfile4, *dbfile5;
+    char          *filename = "dir.pdb";
+    char          *filename2 = "dir2.pdb";
+    int            i, driver = DB_PDB;
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB",6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "dir.pdb";
+            filename2 = "dir2.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "dir.h5";
+            filename2 = "dir2.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "dir test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+
+    diridq = DBMkdir(dbfile, "quad_dir");
+    diridu = DBMkdir(dbfile, "ucd_dir");
+    diridt = DBMkdir(dbfile, "tri_dir");
+
+    DBGetDir(dbfile, original_dir);
+
+    DBSetDir(dbfile, "/quad_dir");
+    meshid = build_quad(dbfile, "quadmesh");
+    DBMkdir(dbfile, "quad_subdir1");
+    DBSetDir(dbfile, "quad_subdir1");
+    build_quad(dbfile, "quadmesh");
+    DBMkdir(dbfile, "quad_subdir2");
+    DBSetDir(dbfile, "quad_subdir2");
+    build_quad(dbfile, "quadmesh");
+    DBSetDir(dbfile, "../..");
+    DBMkdir(dbfile, "quad_subdir3");
+    DBSetDir(dbfile, "quad_subdir3");
+    build_quad(dbfile, "quadmesh");
+
+    meshtypes[0] = DB_QUAD_RECT;
+    meshnames[0] = "/quad_dir/quadmesh";
+    nmesh = 1;
+
+    DBSetDir(dbfile, "/ucd_dir");
+    meshid = build_ucd(dbfile, "ucdmesh");
+
+    meshtypes[1] = DB_UCDMESH;
+    meshnames[1] = "/ucd_dir/ucdmesh";
+    nmesh++;
+
+    DBSetDir(dbfile, "/tri_dir");
+    meshid = build_ucd_tri(dbfile, "trimesh");
+
+    meshtypes[2] = DB_UCDMESH;
+    meshnames[2] = "/tri_dir/trimesh";
+    nmesh++;
+
+#if 0
+    DBSetDir(dbfile, original_dir);
+    mmid = DBPutMultimesh(dbfile, "mmesh", nmesh, meshnames,
+                          meshtypes, NULL);
+#endif
+
+    DBClose(dbfile);
+
+    dbfile = DBOpen(filename, driver, DB_READ);
+    dbfile2 = DBCreate(filename2, 0, DB_LOCAL, "dir test file", driver);
+
+    if ((driver&0xF) == DB_HDF5)
+        DBCpDir(dbfile, "quad_dir/quad_subdir1", dbfile2, "gorfo");
+
+    DBClose(dbfile);
+    DBClose(dbfile2);
+
+    dbfile = DBOpen(filename, driver, DB_READ);
+    dbfile2 = DBOpen(filename2, driver, DB_APPEND);
+
+    if ((driver&0xF) == DB_HDF5)
+        DBCpDir(dbfile, "ucd_dir", dbfile2, "gorfo/foobar");
+
+    /* this should be ok becase we're opening for read */
+    dbfile3 = DBOpen(filename, driver, DB_READ);
+    DBClose(dbfile3);
+
+    /* this should fail because file is open for write */
+    dbfile4 = DBOpen(filename2, driver, DB_READ);
+    if (dbfile4 != 0 || db_errno != E_CONCURRENT)
+        exit(1);
+
+    /* this should fail because filename is already open */
+    dbfile5 = DBOpen(filename, driver, DB_APPEND);
+    if (dbfile5 != 0 || db_errno != E_CONCURRENT)
+        exit(1);
+
+    DBClose(dbfile);
+    DBClose(dbfile2);
+
+    /* test attempt to DBCreate a file without clobbering it and
+       for which the path is really a dir in the host filesystem */
+    unlink("dir-test-foo");
+#ifndef WIN32
+    mkdir("dir-test-foo", 0777);
+#else
+    mkdir("dir-test-foo");
+#endif
+    dbfile2 = DBCreate("dir-test-foo", DB_NOCLOBBER, DB_LOCAL, "dir test file", driver);
+    unlink("dir-test-foo");
+    if (dbfile2 != 0)
+        exit(1);
+#ifndef WIN32
+    mkdir("dir-test-foo", 0777);
+#else
+    mkdir("dir-test-foo");
+#endif
+    dbfile2 = DBCreate("dir-test-foo", DB_CLOBBER, DB_LOCAL, "dir test file", driver);
+    unlink("dir-test-foo");
+    if (dbfile2 != 0)
+        exit(1);
+
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/efcentering.c b/tests/efcentering.c
new file mode 100644
index 0000000..6e8652e
--- /dev/null
+++ b/tests/efcentering.c
@@ -0,0 +1,364 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <std.c>
+
+void
+add_edge(int nid1, int nid2, int *nedges, int *maxedges, int **edges)
+{
+    if (*nedges == *maxedges)
+    {
+        *maxedges = (*maxedges) * 2 + 1;
+        *edges = (int *) realloc(*edges, *maxedges * 2 * sizeof(int));
+    }
+    (*edges)[2*(*nedges)+0] = nid1;
+    (*edges)[2*(*nedges)+1] = nid2;
+    *nedges = (*nedges) + 1;
+}
+
+int
+have_edge(int nid1, int nid2, int nedges, const int *edges)
+{
+    int i;
+    for (i = 0; i < nedges; i++)
+    {
+        if ((edges[2*i+0] == nid1 &&
+             edges[2*i+1] == nid2) ||
+            (edges[2*i+0] == nid2 &&
+             edges[2*i+1] == nid1))
+            return 1;
+    }
+    return 0;
+}
+
+#define HANDLE_EDGE(A,B)						\
+    if (!have_edge(nodelist[nlidx+A],nodelist[nlidx+B],*nedges,*edges))	\
+        add_edge(nodelist[nlidx+A],nodelist[nlidx+B],nedges,&maxedges,edges)
+
+void
+build_edgelist(int nzones, int ndims, const int *nodelist,
+    int lnodelist, int origin, int lo_off, int hi_off,
+    const int *st, const int *sz, const int *sc, int nshapes,
+    int *nedges, int **edges)
+{
+    int nlidx = 0;
+    int maxedges = 0;
+    int shape;
+
+    *nedges = 0;
+    *edges = 0;
+    for (shape = 0; shape < nshapes; shape++)
+    {
+        int zonetype = st[shape];
+        int zonesize = sz[shape];
+        int zone;
+        for (zone = 0; zone < sc[shape]; zone++)
+        {
+            switch (zonetype)
+            {
+                case DB_ZONETYPE_HEX:
+                {
+                    HANDLE_EDGE(0,1);
+                    HANDLE_EDGE(0,3);
+                    HANDLE_EDGE(0,4);
+                    HANDLE_EDGE(1,2);
+                    HANDLE_EDGE(1,5);
+                    HANDLE_EDGE(2,3);
+                    HANDLE_EDGE(2,6);
+                    HANDLE_EDGE(3,7);
+                    HANDLE_EDGE(4,5);
+                    HANDLE_EDGE(4,7);
+                    HANDLE_EDGE(5,6);
+                    HANDLE_EDGE(6,7);
+                    break;
+                }
+            }
+            nlidx += zonesize;
+        }
+    }
+}
+
+int compare_nodes(const void *nap, const void *nbp)
+{
+    int na = *((int*)nap);
+    int nb = *((int*)nbp);
+    if (na < nb) return -1;
+    else if (na > nb) return 1;
+    return 0;
+}
+
+void
+add_face(int nid1, int nid2, int nid3, int nid4, int *nfaces, int *maxfaces, int **faces)
+{
+    int i;
+    int fnid[4];
+    fnid[0] = nid1; 
+    fnid[1] = nid2; 
+    fnid[2] = nid3; 
+    fnid[3] = nid4; 
+    qsort(fnid, sizeof(int), 4, compare_nodes);
+    if (*nfaces == *maxfaces)
+    {
+        *maxfaces = (*maxfaces) * 2 + 1;
+        *faces = (int *) realloc(*faces, *maxfaces * 4 * sizeof(int));
+    }
+    for (i = 0; i < 4; i++)
+        (*faces)[4*(*nfaces)+i] = fnid[i];
+    *nfaces = (*nfaces) + 1;
+}
+
+int
+have_face(int nid1, int nid2, int nid3, int nid4, int nfaces, const int *faces)
+{
+    int i,j;
+    int fnid[4];
+    fnid[0] = nid1; 
+    fnid[1] = nid2; 
+    fnid[2] = nid3; 
+    fnid[3] = nid4; 
+    qsort(fnid, sizeof(int), 4, compare_nodes);
+    for (i = 0; i < nfaces; i++)
+    {
+        int allmatch = 1;
+        for (j = 0; j < 4; j++)
+        {
+            if (faces[4*i+j] != fnid[j])
+            {
+                allmatch = 0;
+                break;
+            }
+        }
+        if (allmatch) return 1;
+    }
+    return 0;
+}
+
+#define HANDLE_FACE(A,B,C,D)						\
+    if (!have_face(nodelist[nlidx+A],nodelist[nlidx+B],			\
+                   nodelist[nlidx+C],nodelist[nlidx+D],*nfaces,*faces))	\
+        add_face(nodelist[nlidx+A],nodelist[nlidx+B],			\
+                 nodelist[nlidx+C],nodelist[nlidx+D],nfaces,&maxfaces,faces)
+
+void
+build_facelist(int nzones, int ndims, const int *nodelist,
+    int lnodelist, int origin, int lo_off, int hi_off,
+    const int *st, const int *sz, const int *sc, int nshapes,
+    int *nfaces, int **faces)
+{
+    int nlidx = 0;
+    int maxfaces = 0;
+    int shape;
+
+    *nfaces = 0;
+    *faces = 0;
+    for (shape = 0; shape < nshapes; shape++)
+    {
+        int zonetype = st[shape];
+        int zonesize = sz[shape];
+        int zone;
+        for (zone = 0; zone < sc[shape]; zone++)
+        {
+            switch (zonetype)
+            {
+                case DB_ZONETYPE_HEX:
+                {
+                    HANDLE_FACE(0,1,5,4);
+                    HANDLE_FACE(0,3,2,1);
+                    HANDLE_FACE(0,4,7,3);
+                    HANDLE_FACE(1,2,6,5);
+                    HANDLE_FACE(2,3,7,6);
+                    HANDLE_FACE(4,5,6,7);
+                    break;
+                }
+            }
+            nlidx += zonesize;
+        }
+    }
+}
+
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    float           x[64], y[64], z[64];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             matnos[1], matlist[1], dims[3];
+    int             i, j, k, len;
+    float           evar2d[2*16], evar3d[3*64], fvar3d[3*64];
+    int		    driver = DB_PDB;
+    char 	    *filename = "efcentering.silo";
+    int             layer, zone;
+    int             nodelist2[9*4] = {0,1,5,4,    1,2,6,5,    2,3,7,6,
+                                      4,5,9,8,    5,6,10,9,   6,7,11,10,
+                                      8,9,13,12,  9,10,14,13, 10,11,15,14};
+    int st2 = DB_ZONETYPE_QUAD;
+    int ss2 = 4;
+    int sc2 = 9;
+    int nodelist3[27*8];
+    int st3 = DB_ZONETYPE_HEX;
+    int ss3 = 8;
+    int sc3 = 27;
+
+    int nedges;
+    int *edges;
+    int nfaces;
+    int *faces;
+    int ndims;
+    int show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB",6)) {
+	    driver = StringToDriver(argv[i]);
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+	    driver = StringToDriver(argv[i]);
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "edge and face centered data", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    dims[0] = 4;
+    dims[1] = 4;
+    dims[2] = 4;
+    for (k = 0; k < 4; k++)
+    {
+        for (j = 0; j < 4; j++)
+        {
+            for (i = 0; i < 4; i++)
+            {
+                x[k*4*4+j*4+i] = (float) i;
+                y[k*4*4+j*4+i] = (float) j;
+                z[k*4*4+j*4+i] = (float) k;
+                evar2d[0*16+j*4+i] = (float) i;
+                evar2d[1*16+j*4+i] = (float) j;
+                evar3d[0*64+k*4*4+j*4+i] = (float) i;
+                evar3d[1*64+k*4*4+j*4+i] = (float) j;
+                evar3d[2*64+k*4*4+j*4+i] = (float) k;
+                fvar3d[0*64+k*4*4+j*4+i] = (float) 10*i;
+                fvar3d[1*64+k*4*4+j*4+i] = (float) 100*j;
+                fvar3d[2*64+k*4*4+j*4+i] = (float) 1000*k;
+            }
+        }
+    }
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    /* build 3d zonelist by layering 2d zonelist */
+    for (layer = 0; layer < 3; layer++)
+    {
+        for (zone = 0; zone < 9; zone++)
+        {
+            nodelist3[layer*9*8+zone*8+0] = nodelist2[zone*4+0]+(layer+1)*16;
+            nodelist3[layer*9*8+zone*8+1] = nodelist2[zone*4+0]+layer*16;
+            nodelist3[layer*9*8+zone*8+2] = nodelist2[zone*4+1]+layer*16;
+            nodelist3[layer*9*8+zone*8+3] = nodelist2[zone*4+1]+(layer+1)*16;
+            nodelist3[layer*9*8+zone*8+4] = nodelist2[zone*4+3]+(layer+1)*16;
+            nodelist3[layer*9*8+zone*8+5] = nodelist2[zone*4+3]+layer*16;
+            nodelist3[layer*9*8+zone*8+6] = nodelist2[zone*4+2]+layer*16;
+            nodelist3[layer*9*8+zone*8+7] = nodelist2[zone*4+2]+(layer+1)*16;
+        }
+    }
+
+    DBPutQuadmesh(dbfile, "qmesh2", coordnames, coords, dims, 2, DB_FLOAT, DB_NONCOLLINEAR, 0);
+    DBPutQuadmesh(dbfile, "qmesh3", coordnames, coords, dims, 3, DB_FLOAT, DB_NONCOLLINEAR, 0);
+    DBPutQuadvar1(dbfile, "qevar2", "qmesh2", evar2d, dims, 2, 0, 0, DB_FLOAT, DB_EDGECENT, 0);
+    DBPutQuadvar1(dbfile, "qevar3", "qmesh3", evar3d, dims, 3, 0, 0, DB_FLOAT, DB_EDGECENT, 0);
+    DBPutQuadvar1(dbfile, "qfvar3", "qmesh3", fvar3d, dims, 3, 0, 0, DB_FLOAT, DB_FACECENT, 0);
+
+    DBPutUcdmesh(dbfile, "umesh2", 2, coordnames, coords, 16, 9,  "um2zl", 0, DB_FLOAT, 0);
+    DBPutUcdmesh(dbfile, "umesh3", 3, coordnames, coords, 64, 27, "um3zl", 0, DB_FLOAT, 0);
+    DBPutZonelist2(dbfile, "um2zl", 9, 2, nodelist2, ss2*sc2, 0, 0, 0, &st2, &ss2, &sc2, 1, 0);
+    DBPutZonelist2(dbfile, "um3zl", 27, 3, nodelist3, ss3*sc3, 0, 0, 0, &st3, &ss3, &sc3, 1, 0);
+
+    /* Only reason we build an edgelist is so we know the number of unique edges in the mesh */
+    build_edgelist(27, 3, nodelist3, ss3*sc3, 0, 0, 0, &st3, &ss3, &sc3, 1, &nedges, &edges);
+    for (i = 0; i < nedges; i++)
+        evar3d[i] = i;
+    DBPutUcdvar1(dbfile, "uevar3", "umesh3", evar3d, nedges, 0, 0, DB_FLOAT, DB_EDGECENT, 0);
+    ndims = 2;
+    dims[0] = nedges;
+    dims[1] = 2;
+    DBWrite(dbfile, "edges", edges, dims, ndims, DB_INT);
+    free(edges);
+
+    /* Only reason we build a facelist is so we know the number of unique faces in the mesh */
+    build_facelist(27, 3, nodelist3, ss3*sc3, 0, 0, 0, &st3, &ss3, &sc3, 1, &nfaces, &faces);
+    for (i = 0; i < nfaces; i++)
+        fvar3d[i] = i;
+    DBPutUcdvar1(dbfile, "ufvar3", "umesh3", fvar3d, nfaces, 0, 0, DB_FLOAT, DB_FACECENT, 0);
+    dims[0] = nfaces;
+    dims[1] = 4;
+    DBWrite(dbfile, "faces", faces, dims, ndims, DB_INT);
+    free(faces);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/extface.c b/tests/extface.c
new file mode 100644
index 0000000..a1095d2
--- /dev/null
+++ b/tests/extface.c
@@ -0,0 +1,1963 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <silo.h>
+#include <stdlib.h>     /* For exit() */
+#include <std.c>
+
+/*
+ * Data describing the coordinates and zonelist to define a sphere
+ * that approximates a globe.
+ * 
+ * Modifications:
+ *    Hank Childs, Wed Feb 16 15:35:56 PST 2005
+ *    Prisms and tets are inside out.  Correct them.
+ *
+ *    Mark C. Miller, Wed Sep  2 16:50:06 PDT 2009
+ *    Added logic to free optlist and matnames to satisfy valgrind.
+ */
+double    coord0 [1093] = {
+ -7.27139e-22,  -2.12868e-32,   3.90084e-21,   2.03636e-31,  -4.22923e-21, 
+ -5.61463e-32,  -8.94688e-22,    2.3989e-31,   1.32639e-21,  -3.53601e-33, 
+  1.82244e-21,             0,             0,      0.515028,      0.979642, 
+      1.34836,       1.58509,       1.66667,       1.58509,       1.34836, 
+     0.979642,      0.515028,       1.03006,       1.95928,       2.69672, 
+      3.17019,       3.33333,       3.17019,       2.69672,       1.95928, 
+      1.03006,       1.54508,       2.93893,       4.04508,       4.75528, 
+            5,       4.75528,       4.04508,       2.93893,       1.54508, 
+      2.06011,       3.91857,       5.39345,       6.34038,       6.66667, 
+      6.34038,       5.39345,       3.91857,       2.06011,       2.57514, 
+      4.89821,       6.74181,       7.92547,       8.33333,       7.92547, 
+      6.74181,       4.89821,       2.57514,       3.09017,       5.87785, 
+      8.09017,       9.51057,            10,       9.51057,       8.09017, 
+      5.87785,       3.09017,      0.489821,      0.931695,       1.28237, 
+      1.50751,       1.58509,       1.50751,       1.28237,      0.931695, 
+     0.489821,      0.979642,       1.86339,       2.56474,       3.01503, 
+      3.17019,       3.01503,       2.56474,       1.86339,      0.979642, 
+      1.46946,       2.79508,        3.8471,       4.52254,       4.75528, 
+      4.52254,        3.8471,       2.79508,       1.46946,       1.95928, 
+      3.72678,       5.12947,       6.03006,       6.34038,       6.03006, 
+      5.12947,       3.72678,       1.95928,       2.44911,       4.65847, 
+      6.41184,       7.53757,       7.92547,       7.53757,       6.41184, 
+      4.65847,       2.44911,       2.93893,       5.59017,       7.69421, 
+      9.04508,       9.51057,       9.04508,       7.69421,       5.59017, 
+      2.93893,      0.416667,      0.792547,       1.09085,       1.28237, 
+      1.34836,       1.28237,       1.09085,      0.792547,      0.416667, 
+     0.833333,       1.58509,       2.18169,       2.56474,       2.69672, 
+      2.56474,       2.18169,       1.58509,      0.833333,          1.25, 
+      2.37764,       3.27254,        3.8471,       4.04508,        3.8471, 
+      3.27254,       2.37764,          1.25,       1.66667,       3.17019, 
+      4.36339,       5.12947,       5.39345,       5.12947,       4.36339, 
+      3.17019,       1.66667,       2.08333,       3.96274,       5.45424, 
+      6.41184,       6.74181,       6.41184,       5.45424,       3.96274, 
+      2.08333,           2.5,       4.75528,       6.54508,       7.69421, 
+      8.09017,       7.69421,       6.54508,       4.75528,           2.5, 
+     0.302726,      0.575819,      0.792547,      0.931695,      0.979642, 
+     0.931695,      0.792547,      0.575819,      0.302726,      0.605452, 
+      1.15164,       1.58509,       1.86339,       1.95928,       1.86339, 
+      1.58509,       1.15164,      0.605452,      0.908178,       1.72746, 
+      2.37764,       2.79508,       2.93893,       2.79508,       2.37764, 
+      1.72746,      0.908178,        1.2109,       2.30328,       3.17019, 
+      3.72678,       3.91857,       3.72678,       3.17019,       2.30328, 
+       1.2109,       1.51363,        2.8791,       3.96274,       4.65847, 
+      4.89821,       4.65847,       3.96274,        2.8791,       1.51363, 
+      1.81636,       3.45492,       4.75528,       5.59017,       5.87785, 
+      5.59017,       4.75528,       3.45492,       1.81636,      0.159153, 
+     0.302726,      0.416667,      0.489821,      0.515028,      0.489821, 
+     0.416667,      0.302726,      0.159153,      0.318305,      0.605452, 
+     0.833333,      0.979642,       1.03006,      0.979642,      0.833333, 
+     0.605452,      0.318305,      0.477458,      0.908178,          1.25, 
+      1.46946,       1.54508,       1.46946,          1.25,      0.908178, 
+     0.477458,       0.63661,        1.2109,       1.66667,       1.95928, 
+      2.06011,       1.95928,       1.66667,        1.2109,       0.63661, 
+     0.795763,       1.51363,       2.08333,       2.44911,       2.57514, 
+      2.44911,       2.08333,       1.51363,      0.795763,      0.954915, 
+      1.81636,           2.5,       2.93893,       3.09017,       2.93893, 
+          2.5,       1.81636,      0.954915,             0,  -9.06379e-31, 
+ -1.09754e-30,  -1.86724e-31,             0,   -4.2772e-21,             0, 
+ -3.46033e-21,   6.87181e-21,   6.12232e-31,  -9.24877e-31,  -3.35981e-31, 
+ -2.85803e-31,  -3.11316e-21,   1.09112e-21,   5.13077e-21,   1.76547e-21, 
+ -7.01205e-21,  -2.75224e-31,  -6.92951e-31,   4.02766e-31,  -1.71307e-31, 
+            0,   9.81009e-22,   5.76623e-21,   1.58731e-21,   6.30441e-21, 
+  6.21749e-31,  -3.13084e-31,   5.68673e-32,   -5.8049e-31,  -3.95194e-21, 
+ -1.10808e-21,   3.25657e-21,  -1.79292e-21,   8.90131e-21,   1.99331e-31, 
+ -4.01497e-31,             0,  -3.10173e-31,   1.01359e-21,             0, 
+ -8.35241e-22,  -1.14961e-21,  -6.84898e-21,             0,             0, 
+            0,             0,             0,             0,             0, 
+            0,             0,     -0.159153,     -0.302726,     -0.416667, 
+    -0.489821,     -0.515028,     -0.489821,     -0.416667,     -0.302726, 
+    -0.159153,     -0.318305,     -0.605452,     -0.833333,     -0.979642, 
+     -1.03006,     -0.979642,     -0.833333,     -0.605452,     -0.318305, 
+    -0.477458,     -0.908178,         -1.25,      -1.46946,      -1.54508, 
+     -1.46946,         -1.25,     -0.908178,     -0.477458,      -0.63661, 
+      -1.2109,      -1.66667,      -1.95928,      -2.06011,      -1.95928, 
+     -1.66667,       -1.2109,      -0.63661,     -0.795763,      -1.51363, 
+     -2.08333,      -2.44911,      -2.57514,      -2.44911,      -2.08333, 
+     -1.51363,     -0.795763,     -0.954915,      -1.81636,          -2.5, 
+     -2.93893,      -3.09017,      -2.93893,          -2.5,      -1.81636, 
+    -0.954915,     -0.302726,     -0.575819,     -0.792547,     -0.931695, 
+    -0.979642,     -0.931695,     -0.792547,     -0.575819,     -0.302726, 
+    -0.605452,      -1.15164,      -1.58509,      -1.86339,      -1.95928, 
+     -1.86339,      -1.58509,      -1.15164,     -0.605452,     -0.908178, 
+     -1.72746,      -2.37764,      -2.79508,      -2.93893,      -2.79508, 
+     -2.37764,      -1.72746,     -0.908178,       -1.2109,      -2.30328, 
+     -3.17019,      -3.72678,      -3.91857,      -3.72678,      -3.17019, 
+     -2.30328,       -1.2109,      -1.51363,       -2.8791,      -3.96274, 
+     -4.65847,      -4.89821,      -4.65847,      -3.96274,       -2.8791, 
+     -1.51363,      -1.81636,      -3.45492,      -4.75528,      -5.59017, 
+     -5.87785,      -5.59017,      -4.75528,      -3.45492,      -1.81636, 
+    -0.416667,     -0.792547,      -1.09085,      -1.28237,      -1.34836, 
+     -1.28237,      -1.09085,     -0.792547,     -0.416667,     -0.833333, 
+     -1.58509,      -2.18169,      -2.56474,      -2.69672,      -2.56474, 
+     -2.18169,      -1.58509,     -0.833333,         -1.25,      -2.37764, 
+     -3.27254,       -3.8471,      -4.04508,       -3.8471,      -3.27254, 
+     -2.37764,         -1.25,      -1.66667,      -3.17019,      -4.36339, 
+     -5.12947,      -5.39345,      -5.12947,      -4.36339,      -3.17019, 
+     -1.66667,      -2.08333,      -3.96274,      -5.45424,      -6.41184, 
+     -6.74181,      -6.41184,      -5.45424,      -3.96274,      -2.08333, 
+         -2.5,      -4.75528,      -6.54508,      -7.69421,      -8.09017, 
+     -7.69421,      -6.54508,      -4.75528,          -2.5,     -0.489821, 
+    -0.931695,      -1.28237,      -1.50751,      -1.58509,      -1.50751, 
+     -1.28237,     -0.931695,     -0.489821,     -0.979642,      -1.86339, 
+     -2.56474,      -3.01503,      -3.17019,      -3.01503,      -2.56474, 
+     -1.86339,     -0.979642,      -1.46946,      -2.79508,       -3.8471, 
+     -4.52254,      -4.75528,      -4.52254,       -3.8471,      -2.79508, 
+     -1.46946,      -1.95928,      -3.72678,      -5.12947,      -6.03006, 
+     -6.34038,      -6.03006,      -5.12947,      -3.72678,      -1.95928, 
+     -2.44911,      -4.65847,      -6.41184,      -7.53757,      -7.92547, 
+     -7.53757,      -6.41184,      -4.65847,      -2.44911,      -2.93893, 
+     -5.59017,      -7.69421,      -9.04508,      -9.51057,      -9.04508, 
+     -7.69421,      -5.59017,      -2.93893,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,      -1.66667,      -1.58509,      -1.34836, 
+    -0.979642,     -0.515028,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,      -3.33333,      -3.17019,      -2.69672,      -1.95928, 
+     -1.03006,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+           -5,      -4.75528,      -4.04508,      -2.93893,      -1.54508, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,      -6.66667, 
+     -6.34038,      -5.39345,      -3.91857,      -2.06011,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,      -8.33333,      -7.92547, 
+     -6.74181,      -4.89821,      -2.57514,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,           -10,      -9.51057,      -8.09017, 
+     -5.87785,      -3.09017,     -0.489821,     -0.931695,      -1.28237, 
+     -1.50751,      -1.58509,      -1.50751,      -1.28237,     -0.931695, 
+    -0.489821,     -0.979642,      -1.86339,      -2.56474,      -3.01503, 
+     -3.17019,      -3.01503,      -2.56474,      -1.86339,     -0.979642, 
+     -1.46946,      -2.79508,       -3.8471,      -4.52254,      -4.75528, 
+     -4.52254,       -3.8471,      -2.79508,      -1.46946,      -1.95928, 
+     -3.72678,      -5.12947,      -6.03006,      -6.34038,      -6.03006, 
+     -5.12947,      -3.72678,      -1.95928,      -2.44911,      -4.65847, 
+     -6.41184,      -7.53757,      -7.92547,      -7.53757,      -6.41184, 
+     -4.65847,      -2.44911,      -2.93893,      -5.59017,      -7.69421, 
+     -9.04508,      -9.51057,      -9.04508,      -7.69421,      -5.59017, 
+     -2.93893,     -0.416667,     -0.792547,      -1.09085,      -1.28237, 
+     -1.34836,      -1.28237,      -1.09085,     -0.792547,     -0.416667, 
+    -0.833333,      -1.58509,      -2.18169,      -2.56474,      -2.69672, 
+     -2.56474,      -2.18169,      -1.58509,     -0.833333,         -1.25, 
+     -2.37764,      -3.27254,       -3.8471,      -4.04508,       -3.8471, 
+     -3.27254,      -2.37764,         -1.25,      -1.66667,      -3.17019, 
+     -4.36339,      -5.12947,      -5.39345,      -5.12947,      -4.36339, 
+     -3.17019,      -1.66667,      -2.08333,      -3.96274,      -5.45424, 
+     -6.41184,      -6.74181,      -6.41184,      -5.45424,      -3.96274, 
+     -2.08333,          -2.5,      -4.75528,      -6.54508,      -7.69421, 
+     -8.09017,      -7.69421,      -6.54508,      -4.75528,          -2.5, 
+    -0.302726,     -0.575819,     -0.792547,     -0.931695,     -0.979642, 
+    -0.931695,     -0.792547,     -0.575819,     -0.302726,     -0.605452, 
+     -1.15164,      -1.58509,      -1.86339,      -1.95928,      -1.86339, 
+     -1.58509,      -1.15164,     -0.605452,     -0.908178,      -1.72746, 
+     -2.37764,      -2.79508,      -2.93893,      -2.79508,      -2.37764, 
+     -1.72746,     -0.908178,       -1.2109,      -2.30328,      -3.17019, 
+     -3.72678,      -3.91857,      -3.72678,      -3.17019,      -2.30328, 
+      -1.2109,      -1.51363,       -2.8791,      -3.96274,      -4.65847, 
+     -4.89821,      -4.65847,      -3.96274,       -2.8791,      -1.51363, 
+     -1.81636,      -3.45492,      -4.75528,      -5.59017,      -5.87785, 
+     -5.59017,      -4.75528,      -3.45492,      -1.81636,     -0.159153, 
+    -0.302726,     -0.416667,     -0.489821,     -0.515028,     -0.489821, 
+    -0.416667,     -0.302726,     -0.159153,     -0.318305,     -0.605452, 
+    -0.833333,     -0.979642,      -1.03006,     -0.979642,     -0.833333, 
+    -0.605452,     -0.318305,     -0.477458,     -0.908178,         -1.25, 
+     -1.46946,      -1.54508,      -1.46946,         -1.25,     -0.908178, 
+    -0.477458,      -0.63661,       -1.2109,      -1.66667,      -1.95928, 
+     -2.06011,      -1.95928,      -1.66667,       -1.2109,      -0.63661, 
+    -0.795763,      -1.51363,      -2.08333,      -2.44911,      -2.57514, 
+     -2.44911,      -2.08333,      -1.51363,     -0.795763,     -0.954915, 
+     -1.81636,          -2.5,      -2.93893,      -3.09017,      -2.93893, 
+         -2.5,      -1.81636,     -0.954915,             0,   9.06379e-31, 
+  1.09754e-30,   1.86724e-31,             0,    4.2772e-21,             0, 
+  3.46033e-21,  -6.87181e-21,  -6.12232e-31,   9.24877e-31,   3.35981e-31, 
+  2.85803e-31,   3.11316e-21,  -1.09112e-21,  -5.13077e-21,  -1.76547e-21, 
+  7.01205e-21,   2.75224e-31,   6.92951e-31,  -4.02766e-31,   1.71307e-31, 
+            0,  -9.81009e-22,  -5.76623e-21,  -1.58731e-21,  -6.30441e-21, 
+ -6.21749e-31,   3.13084e-31,  -5.68673e-32,    5.8049e-31,   3.95194e-21, 
+  1.10808e-21,  -3.25657e-21,   1.79292e-21,  -8.90131e-21,  -1.99331e-31, 
+  4.01497e-31,             0,   3.10173e-31,  -1.01359e-21,             0, 
+  8.35241e-22,   1.14961e-21,   6.84898e-21,             0,             0, 
+            0,             0,             0,             0,             0, 
+            0,             0,      0.159153,      0.302726,      0.416667, 
+     0.489821,      0.515028,      0.489821,      0.416667,      0.302726, 
+     0.159153,      0.318305,      0.605452,      0.833333,      0.979642, 
+      1.03006,      0.979642,      0.833333,      0.605452,      0.318305, 
+     0.477458,      0.908178,          1.25,       1.46946,       1.54508, 
+      1.46946,          1.25,      0.908178,      0.477458,       0.63661, 
+       1.2109,       1.66667,       1.95928,       2.06011,       1.95928, 
+      1.66667,        1.2109,       0.63661,      0.795763,       1.51363, 
+      2.08333,       2.44911,       2.57514,       2.44911,       2.08333, 
+      1.51363,      0.795763,      0.954915,       1.81636,           2.5, 
+      2.93893,       3.09017,       2.93893,           2.5,       1.81636, 
+     0.954915,      0.302726,      0.575819,      0.792547,      0.931695, 
+     0.979642,      0.931695,      0.792547,      0.575819,      0.302726, 
+     0.605452,       1.15164,       1.58509,       1.86339,       1.95928, 
+      1.86339,       1.58509,       1.15164,      0.605452,      0.908178, 
+      1.72746,       2.37764,       2.79508,       2.93893,       2.79508, 
+      2.37764,       1.72746,      0.908178,        1.2109,       2.30328, 
+      3.17019,       3.72678,       3.91857,       3.72678,       3.17019, 
+      2.30328,        1.2109,       1.51363,        2.8791,       3.96274, 
+      4.65847,       4.89821,       4.65847,       3.96274,        2.8791, 
+      1.51363,       1.81636,       3.45492,       4.75528,       5.59017, 
+      5.87785,       5.59017,       4.75528,       3.45492,       1.81636, 
+     0.416667,      0.792547,       1.09085,       1.28237,       1.34836, 
+      1.28237,       1.09085,      0.792547,      0.416667,      0.833333, 
+      1.58509,       2.18169,       2.56474,       2.69672,       2.56474, 
+      2.18169,       1.58509,      0.833333,          1.25,       2.37764, 
+      3.27254,        3.8471,       4.04508,        3.8471,       3.27254, 
+      2.37764,          1.25,       1.66667,       3.17019,       4.36339, 
+      5.12947,       5.39345,       5.12947,       4.36339,       3.17019, 
+      1.66667,       2.08333,       3.96274,       5.45424,       6.41184, 
+      6.74181,       6.41184,       5.45424,       3.96274,       2.08333, 
+          2.5,       4.75528,       6.54508,       7.69421,       8.09017, 
+      7.69421,       6.54508,       4.75528,           2.5,      0.489821, 
+     0.931695,       1.28237,       1.50751,       1.58509,       1.50751, 
+      1.28237,      0.931695,      0.489821,      0.979642,       1.86339, 
+      2.56474,       3.01503,       3.17019,       3.01503,       2.56474, 
+      1.86339,      0.979642,       1.46946,       2.79508,        3.8471, 
+      4.52254,       4.75528,       4.52254,        3.8471,       2.79508, 
+      1.46946,       1.95928,       3.72678,       5.12947,       6.03006, 
+      6.34038,       6.03006,       5.12947,       3.72678,       1.95928, 
+      2.44911,       4.65847,       6.41184,       7.53757,       7.92547, 
+      7.53757,       6.41184,       4.65847,       2.44911,       2.93893, 
+      5.59017,       7.69421,       9.04508,       9.51057,       9.04508, 
+      7.69421,       5.59017,       2.93893, 
+};
+
+double    coord1 [1093] = {
+  4.02723e-21,  -2.63823e-30,  -1.36529e-20,  -3.64509e-31,  -3.48289e-21, 
+  9.21531e-32,  -5.81547e-21,   3.51562e-32,  -8.58993e-21,   5.11837e-31, 
+  2.42993e-21,             0,             0,   9.56231e-31,   2.26595e-31, 
+  1.23473e-30,   9.33622e-32,  -3.81362e-21,   6.14848e-21,  -7.85649e-22, 
+  6.37998e-21,   2.47224e-20,    1.2149e-30,   7.70731e-31,   5.03972e-31, 
+  5.71605e-31,  -2.33487e-21,   4.09171e-21,   2.40505e-21,   1.04825e-21, 
+  3.30059e-20,   2.58022e-31,   3.46475e-32,   2.76902e-31,  -1.71307e-31, 
+            0,   9.81009e-22,   3.17143e-21,   5.55557e-21,  -2.95519e-22, 
+  3.40019e-31,   7.82711e-32,   2.55903e-31,   6.77239e-31,   7.90387e-22, 
+  8.31062e-22,  -5.69901e-22,   2.63335e-21,   6.74552e-21,  -4.98329e-32, 
+            0,   7.29261e-32,   2.17121e-31,   1.26698e-21,   7.10499e-22, 
+ -1.04405e-21,  -2.87403e-22,   2.72889e-21,             0,             0, 
+            0,             0,             0,             0,             0, 
+            0,             0,      0.159153,      0.302726,      0.416667, 
+     0.489821,      0.515028,      0.489821,      0.416667,      0.302726, 
+     0.159153,      0.318305,      0.605452,      0.833333,      0.979642, 
+      1.03006,      0.979642,      0.833333,      0.605452,      0.318305, 
+     0.477458,      0.908178,          1.25,       1.46946,       1.54508, 
+      1.46946,          1.25,      0.908178,      0.477458,       0.63661, 
+       1.2109,       1.66667,       1.95928,       2.06011,       1.95928, 
+      1.66667,        1.2109,       0.63661,      0.795763,       1.51363, 
+      2.08333,       2.44911,       2.57514,       2.44911,       2.08333, 
+      1.51363,      0.795763,      0.954915,       1.81636,           2.5, 
+      2.93893,       3.09017,       2.93893,           2.5,       1.81636, 
+     0.954915,      0.302726,      0.575819,      0.792547,      0.931695, 
+     0.979642,      0.931695,      0.792547,      0.575819,      0.302726, 
+     0.605452,       1.15164,       1.58509,       1.86339,       1.95928, 
+      1.86339,       1.58509,       1.15164,      0.605452,      0.908178, 
+      1.72746,       2.37764,       2.79508,       2.93893,       2.79508, 
+      2.37764,       1.72746,      0.908178,        1.2109,       2.30328, 
+      3.17019,       3.72678,       3.91857,       3.72678,       3.17019, 
+      2.30328,        1.2109,       1.51363,        2.8791,       3.96274, 
+      4.65847,       4.89821,       4.65847,       3.96274,        2.8791, 
+      1.51363,       1.81636,       3.45492,       4.75528,       5.59017, 
+      5.87785,       5.59017,       4.75528,       3.45492,       1.81636, 
+     0.416667,      0.792547,       1.09085,       1.28237,       1.34836, 
+      1.28237,       1.09085,      0.792547,      0.416667,      0.833333, 
+      1.58509,       2.18169,       2.56474,       2.69672,       2.56474, 
+      2.18169,       1.58509,      0.833333,          1.25,       2.37764, 
+      3.27254,        3.8471,       4.04508,        3.8471,       3.27254, 
+      2.37764,          1.25,       1.66667,       3.17019,       4.36339, 
+      5.12947,       5.39345,       5.12947,       4.36339,       3.17019, 
+      1.66667,       2.08333,       3.96274,       5.45424,       6.41184, 
+      6.74181,       6.41184,       5.45424,       3.96274,       2.08333, 
+          2.5,       4.75528,       6.54508,       7.69421,       8.09017, 
+      7.69421,       6.54508,       4.75528,           2.5,      0.489821, 
+     0.931695,       1.28237,       1.50751,       1.58509,       1.50751, 
+      1.28237,      0.931695,      0.489821,      0.979642,       1.86339, 
+      2.56474,       3.01503,       3.17019,       3.01503,       2.56474, 
+      1.86339,      0.979642,       1.46946,       2.79508,        3.8471, 
+      4.52254,       4.75528,       4.52254,        3.8471,       2.79508, 
+      1.46946,       1.95928,       3.72678,       5.12947,       6.03006, 
+      6.34038,       6.03006,       5.12947,       3.72678,       1.95928, 
+      2.44911,       4.65847,       6.41184,       7.53757,       7.92547, 
+      7.53757,       6.41184,       4.65847,       2.44911,       2.93893, 
+      5.59017,       7.69421,       9.04508,       9.51057,       9.04508, 
+      7.69421,       5.59017,       2.93893,      0.515028,      0.979642, 
+      1.34836,       1.58509,       1.66667,       1.58509,       1.34836, 
+     0.979642,      0.515028,       1.03006,       1.95928,       2.69672, 
+      3.17019,       3.33333,       3.17019,       2.69672,       1.95928, 
+      1.03006,       1.54508,       2.93893,       4.04508,       4.75528, 
+            5,       4.75528,       4.04508,       2.93893,       1.54508, 
+      2.06011,       3.91857,       5.39345,       6.34038,       6.66667, 
+      6.34038,       5.39345,       3.91857,       2.06011,       2.57514, 
+      4.89821,       6.74181,       7.92547,       8.33333,       7.92547, 
+      6.74181,       4.89821,       2.57514,       3.09017,       5.87785, 
+      8.09017,       9.51057,            10,       9.51057,       8.09017, 
+      5.87785,       3.09017,      0.489821,      0.931695,       1.28237, 
+      1.50751,       1.58509,       1.50751,       1.28237,      0.931695, 
+     0.489821,      0.979642,       1.86339,       2.56474,       3.01503, 
+      3.17019,       3.01503,       2.56474,       1.86339,      0.979642, 
+      1.46946,       2.79508,        3.8471,       4.52254,       4.75528, 
+      4.52254,        3.8471,       2.79508,       1.46946,       1.95928, 
+      3.72678,       5.12947,       6.03006,       6.34038,       6.03006, 
+      5.12947,       3.72678,       1.95928,       2.44911,       4.65847, 
+      6.41184,       7.53757,       7.92547,       7.53757,       6.41184, 
+      4.65847,       2.44911,       2.93893,       5.59017,       7.69421, 
+      9.04508,       9.51057,       9.04508,       7.69421,       5.59017, 
+      2.93893,      0.416667,      0.792547,       1.09085,       1.28237, 
+      1.34836,       1.28237,       1.09085,      0.792547,      0.416667, 
+     0.833333,       1.58509,       2.18169,       2.56474,       2.69672, 
+      2.56474,       2.18169,       1.58509,      0.833333,          1.25, 
+      2.37764,       3.27254,        3.8471,       4.04508,        3.8471, 
+      3.27254,       2.37764,          1.25,       1.66667,       3.17019, 
+      4.36339,       5.12947,       5.39345,       5.12947,       4.36339, 
+      3.17019,       1.66667,       2.08333,       3.96274,       5.45424, 
+      6.41184,       6.74181,       6.41184,       5.45424,       3.96274, 
+      2.08333,           2.5,       4.75528,       6.54508,       7.69421, 
+      8.09017,       7.69421,       6.54508,       4.75528,           2.5, 
+     0.302726,      0.575819,      0.792547,      0.931695,      0.979642, 
+     0.931695,      0.792547,      0.575819,      0.302726,      0.605452, 
+      1.15164,       1.58509,       1.86339,       1.95928,       1.86339, 
+      1.58509,       1.15164,      0.605452,      0.908178,       1.72746, 
+      2.37764,       2.79508,       2.93893,       2.79508,       2.37764, 
+      1.72746,      0.908178,        1.2109,       2.30328,       3.17019, 
+      3.72678,       3.91857,       3.72678,       3.17019,       2.30328, 
+       1.2109,       1.51363,        2.8791,       3.96274,       4.65847, 
+      4.89821,       4.65847,       3.96274,        2.8791,       1.51363, 
+      1.81636,       3.45492,       4.75528,       5.59017,       5.87785, 
+      5.59017,       4.75528,       3.45492,       1.81636,      0.159153, 
+     0.302726,      0.416667,      0.489821,      0.515028,      0.489821, 
+     0.416667,      0.302726,      0.159153,      0.318305,      0.605452, 
+     0.833333,      0.979642,       1.03006,      0.979642,      0.833333, 
+     0.605452,      0.318305,      0.477458,      0.908178,          1.25, 
+      1.46946,       1.54508,       1.46946,          1.25,      0.908178, 
+     0.477458,       0.63661,        1.2109,       1.66667,       1.95928, 
+      2.06011,       1.95928,       1.66667,        1.2109,       0.63661, 
+     0.795763,       1.51363,       2.08333,       2.44911,       2.57514, 
+      2.44911,       2.08333,       1.51363,      0.795763,      0.954915, 
+      1.81636,           2.5,       2.93893,       3.09017,       2.93893, 
+          2.5,       1.81636,      0.954915,  -4.19991e-30,             0, 
+  8.78031e-31,   9.33622e-31,   3.05089e-21,   1.92474e-20,  -1.00563e-20, 
+   2.0762e-20,  -2.06154e-20,   3.06116e-31,  -1.07902e-30,  -7.83956e-31, 
+  1.90535e-31,  -4.66974e-21,   5.45561e-21,  -5.13077e-21,   1.76547e-21, 
+            0,   5.50448e-31,  -6.92951e-31,  -1.00692e-31,   8.56534e-32, 
+            0,   1.96202e-21,   1.15325e-20,  -3.17461e-21,    1.5761e-21, 
+ -3.10874e-31,  -6.26169e-31,  -3.98071e-31,  -2.90245e-31,   1.58077e-21, 
+ -4.98637e-21,   3.25657e-21,             0,             0,   5.97994e-31, 
+ -5.01871e-31,   1.45852e-31,  -1.86104e-31,             0,             0, 
+  8.35241e-22,             0,  -6.84898e-21,             0,             0, 
+            0,             0,             0,             0,             0, 
+            0,             0,     -0.159153,     -0.302726,     -0.416667, 
+    -0.489821,     -0.515028,     -0.489821,     -0.416667,     -0.302726, 
+    -0.159153,     -0.318305,     -0.605452,     -0.833333,     -0.979642, 
+     -1.03006,     -0.979642,     -0.833333,     -0.605452,     -0.318305, 
+    -0.477458,     -0.908178,         -1.25,      -1.46946,      -1.54508, 
+     -1.46946,         -1.25,     -0.908178,     -0.477458,      -0.63661, 
+      -1.2109,      -1.66667,      -1.95928,      -2.06011,      -1.95928, 
+     -1.66667,       -1.2109,      -0.63661,     -0.795763,      -1.51363, 
+     -2.08333,      -2.44911,      -2.57514,      -2.44911,      -2.08333, 
+     -1.51363,     -0.795763,     -0.954915,      -1.81636,          -2.5, 
+     -2.93893,      -3.09017,      -2.93893,          -2.5,      -1.81636, 
+    -0.954915,     -0.302726,     -0.575819,     -0.792547,     -0.931695, 
+    -0.979642,     -0.931695,     -0.792547,     -0.575819,     -0.302726, 
+    -0.605452,      -1.15164,      -1.58509,      -1.86339,      -1.95928, 
+     -1.86339,      -1.58509,      -1.15164,     -0.605452,     -0.908178, 
+     -1.72746,      -2.37764,      -2.79508,      -2.93893,      -2.79508, 
+     -2.37764,      -1.72746,     -0.908178,       -1.2109,      -2.30328, 
+     -3.17019,      -3.72678,      -3.91857,      -3.72678,      -3.17019, 
+     -2.30328,       -1.2109,      -1.51363,       -2.8791,      -3.96274, 
+     -4.65847,      -4.89821,      -4.65847,      -3.96274,       -2.8791, 
+     -1.51363,      -1.81636,      -3.45492,      -4.75528,      -5.59017, 
+     -5.87785,      -5.59017,      -4.75528,      -3.45492,      -1.81636, 
+    -0.416667,     -0.792547,      -1.09085,      -1.28237,      -1.34836, 
+     -1.28237,      -1.09085,     -0.792547,     -0.416667,     -0.833333, 
+     -1.58509,      -2.18169,      -2.56474,      -2.69672,      -2.56474, 
+     -2.18169,      -1.58509,     -0.833333,         -1.25,      -2.37764, 
+     -3.27254,       -3.8471,      -4.04508,       -3.8471,      -3.27254, 
+     -2.37764,         -1.25,      -1.66667,      -3.17019,      -4.36339, 
+     -5.12947,      -5.39345,      -5.12947,      -4.36339,      -3.17019, 
+     -1.66667,      -2.08333,      -3.96274,      -5.45424,      -6.41184, 
+     -6.74181,      -6.41184,      -5.45424,      -3.96274,      -2.08333, 
+         -2.5,      -4.75528,      -6.54508,      -7.69421,      -8.09017, 
+     -7.69421,      -6.54508,      -4.75528,          -2.5,     -0.489821, 
+    -0.931695,      -1.28237,      -1.50751,      -1.58509,      -1.50751, 
+     -1.28237,     -0.931695,     -0.489821,     -0.979642,      -1.86339, 
+     -2.56474,      -3.01503,      -3.17019,      -3.01503,      -2.56474, 
+     -1.86339,     -0.979642,      -1.46946,      -2.79508,       -3.8471, 
+     -4.52254,      -4.75528,      -4.52254,       -3.8471,      -2.79508, 
+     -1.46946,      -1.95928,      -3.72678,      -5.12947,      -6.03006, 
+     -6.34038,      -6.03006,      -5.12947,      -3.72678,      -1.95928, 
+     -2.44911,      -4.65847,      -6.41184,      -7.53757,      -7.92547, 
+     -7.53757,      -6.41184,      -4.65847,      -2.44911,      -2.93893, 
+     -5.59017,      -7.69421,      -9.04508,      -9.51057,      -9.04508, 
+     -7.69421,      -5.59017,      -2.93893,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,      -1.66667,      -1.58509,      -1.34836, 
+    -0.979642,     -0.515028,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,      -3.33333,      -3.17019,      -2.69672,      -1.95928, 
+     -1.03006,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+           -5,      -4.75528,      -4.04508,      -2.93893,      -1.54508, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,      -6.66667, 
+     -6.34038,      -5.39345,      -3.91857,      -2.06011,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,      -8.33333,      -7.92547, 
+     -6.74181,      -4.89821,      -2.57514,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,           -10,      -9.51057,      -8.09017, 
+     -5.87785,      -3.09017,     -0.489821,     -0.931695,      -1.28237, 
+     -1.50751,      -1.58509,      -1.50751,      -1.28237,     -0.931695, 
+    -0.489821,     -0.979642,      -1.86339,      -2.56474,      -3.01503, 
+     -3.17019,      -3.01503,      -2.56474,      -1.86339,     -0.979642, 
+     -1.46946,      -2.79508,       -3.8471,      -4.52254,      -4.75528, 
+     -4.52254,       -3.8471,      -2.79508,      -1.46946,      -1.95928, 
+     -3.72678,      -5.12947,      -6.03006,      -6.34038,      -6.03006, 
+     -5.12947,      -3.72678,      -1.95928,      -2.44911,      -4.65847, 
+     -6.41184,      -7.53757,      -7.92547,      -7.53757,      -6.41184, 
+     -4.65847,      -2.44911,      -2.93893,      -5.59017,      -7.69421, 
+     -9.04508,      -9.51057,      -9.04508,      -7.69421,      -5.59017, 
+     -2.93893,     -0.416667,     -0.792547,      -1.09085,      -1.28237, 
+     -1.34836,      -1.28237,      -1.09085,     -0.792547,     -0.416667, 
+    -0.833333,      -1.58509,      -2.18169,      -2.56474,      -2.69672, 
+     -2.56474,      -2.18169,      -1.58509,     -0.833333,         -1.25, 
+     -2.37764,      -3.27254,       -3.8471,      -4.04508,       -3.8471, 
+     -3.27254,      -2.37764,         -1.25,      -1.66667,      -3.17019, 
+     -4.36339,      -5.12947,      -5.39345,      -5.12947,      -4.36339, 
+     -3.17019,      -1.66667,      -2.08333,      -3.96274,      -5.45424, 
+     -6.41184,      -6.74181,      -6.41184,      -5.45424,      -3.96274, 
+     -2.08333,          -2.5,      -4.75528,      -6.54508,      -7.69421, 
+     -8.09017,      -7.69421,      -6.54508,      -4.75528,          -2.5, 
+    -0.302726,     -0.575819,     -0.792547,     -0.931695,     -0.979642, 
+    -0.931695,     -0.792547,     -0.575819,     -0.302726,     -0.605452, 
+     -1.15164,      -1.58509,      -1.86339,      -1.95928,      -1.86339, 
+     -1.58509,      -1.15164,     -0.605452,     -0.908178,      -1.72746, 
+     -2.37764,      -2.79508,      -2.93893,      -2.79508,      -2.37764, 
+     -1.72746,     -0.908178,       -1.2109,      -2.30328,      -3.17019, 
+     -3.72678,      -3.91857,      -3.72678,      -3.17019,      -2.30328, 
+      -1.2109,      -1.51363,       -2.8791,      -3.96274,      -4.65847, 
+     -4.89821,      -4.65847,      -3.96274,       -2.8791,      -1.51363, 
+     -1.81636,      -3.45492,      -4.75528,      -5.59017,      -5.87785, 
+     -5.59017,      -4.75528,      -3.45492,      -1.81636,     -0.159153, 
+    -0.302726,     -0.416667,     -0.489821,     -0.515028,     -0.489821, 
+    -0.416667,     -0.302726,     -0.159153,     -0.318305,     -0.605452, 
+    -0.833333,     -0.979642,      -1.03006,     -0.979642,     -0.833333, 
+    -0.605452,     -0.318305,     -0.477458,     -0.908178,         -1.25, 
+     -1.46946,      -1.54508,      -1.46946,         -1.25,     -0.908178, 
+    -0.477458,      -0.63661,       -1.2109,      -1.66667,      -1.95928, 
+     -2.06011,      -1.95928,      -1.66667,       -1.2109,      -0.63661, 
+    -0.795763,      -1.51363,      -2.08333,      -2.44911,      -2.57514, 
+     -2.44911,      -2.08333,      -1.51363,     -0.795763,     -0.954915, 
+     -1.81636,          -2.5,      -2.93893,      -3.09017,      -2.93893, 
+         -2.5,      -1.81636,     -0.954915, 
+};
+
+double    coord2 [1093] = {
+  6.15051e-05,       1.66667,      -1.66667,       3.33333,      -3.33333, 
+            5,            -5,       6.66667,      -6.66667,       8.33333, 
+     -8.33333,            10,           -10,       1.58509,       1.34836, 
+     0.979642,      0.515028,   0.000180844,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,       3.17019,       2.69672,       1.95928, 
+      1.03006,   9.62788e-05,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,       4.75528,       4.04508,       2.93893,       1.54508, 
+   6.4922e-05,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+      6.34038,       5.39345,       3.91857,       2.06011,   4.88877e-05, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,       7.92547, 
+      6.74181,       4.89821,       2.57514,   3.91832e-05,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,       9.51057,       8.09017, 
+      5.87785,       3.09017,   7.10543e-14,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,       1.58509,       1.34836,      0.979642, 
+     0.515028,   0.000180844,     -0.515028,     -0.979642,      -1.34836, 
+     -1.58509,       3.17019,       2.69672,       1.95928,       1.03006, 
+  9.62788e-05,      -1.03006,      -1.95928,      -2.69672,      -3.17019, 
+      4.75528,       4.04508,       2.93893,       1.54508,    6.4922e-05, 
+     -1.54508,      -2.93893,      -4.04508,      -4.75528,       6.34038, 
+      5.39345,       3.91857,       2.06011,   4.88877e-05,      -2.06011, 
+     -3.91857,      -5.39345,      -6.34038,       7.92547,       6.74181, 
+      4.89821,       2.57514,   3.91832e-05,      -2.57514,      -4.89821, 
+     -6.74181,      -7.92547,       9.51057,       8.09017,       5.87785, 
+      3.09017,   7.10543e-14,      -3.09017,      -5.87785,      -8.09017, 
+     -9.51057,       1.58509,       1.34836,      0.979642,      0.515028, 
+  0.000180844,     -0.515028,     -0.979642,      -1.34836,      -1.58509, 
+      3.17019,       2.69672,       1.95928,       1.03006,   9.62788e-05, 
+     -1.03006,      -1.95928,      -2.69672,      -3.17019,       4.75528, 
+      4.04508,       2.93893,       1.54508,    6.4922e-05,      -1.54508, 
+     -2.93893,      -4.04508,      -4.75528,       6.34038,       5.39345, 
+      3.91857,       2.06011,   4.88877e-05,      -2.06011,      -3.91857, 
+     -5.39345,      -6.34038,       7.92547,       6.74181,       4.89821, 
+      2.57514,   3.91832e-05,      -2.57514,      -4.89821,      -6.74181, 
+     -7.92547,       9.51057,       8.09017,       5.87785,       3.09017, 
+  7.10543e-14,      -3.09017,      -5.87785,      -8.09017,      -9.51057, 
+      1.58509,       1.34836,      0.979642,      0.515028,   0.000180844, 
+    -0.515028,     -0.979642,      -1.34836,      -1.58509,       3.17019, 
+      2.69672,       1.95928,       1.03006,   9.62788e-05,      -1.03006, 
+     -1.95928,      -2.69672,      -3.17019,       4.75528,       4.04508, 
+      2.93893,       1.54508,    6.4922e-05,      -1.54508,      -2.93893, 
+     -4.04508,      -4.75528,       6.34038,       5.39345,       3.91857, 
+      2.06011,   4.88877e-05,      -2.06011,      -3.91857,      -5.39345, 
+     -6.34038,       7.92547,       6.74181,       4.89821,       2.57514, 
+  3.91832e-05,      -2.57514,      -4.89821,      -6.74181,      -7.92547, 
+      9.51057,       8.09017,       5.87785,       3.09017,   7.10543e-14, 
+     -3.09017,      -5.87785,      -8.09017,      -9.51057,       1.58509, 
+      1.34836,      0.979642,      0.515028,   0.000180844,     -0.515028, 
+    -0.979642,      -1.34836,      -1.58509,       3.17019,       2.69672, 
+      1.95928,       1.03006,   9.62788e-05,      -1.03006,      -1.95928, 
+     -2.69672,      -3.17019,       4.75528,       4.04508,       2.93893, 
+      1.54508,    6.4922e-05,      -1.54508,      -2.93893,      -4.04508, 
+     -4.75528,       6.34038,       5.39345,       3.91857,       2.06011, 
+  4.88877e-05,      -2.06011,      -3.91857,      -5.39345,      -6.34038, 
+      7.92547,       6.74181,       4.89821,       2.57514,   3.91832e-05, 
+     -2.57514,      -4.89821,      -6.74181,      -7.92547,       9.51057, 
+      8.09017,       5.87785,       3.09017,   7.10543e-14,      -3.09017, 
+     -5.87785,      -8.09017,      -9.51057,       1.58509,       1.34836, 
+     0.979642,      0.515028,   0.000180844,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,       3.17019,       2.69672,       1.95928, 
+      1.03006,   9.62788e-05,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,       4.75528,       4.04508,       2.93893,       1.54508, 
+   6.4922e-05,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+      6.34038,       5.39345,       3.91857,       2.06011,   4.88877e-05, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,       7.92547, 
+      6.74181,       4.89821,       2.57514,   3.91832e-05,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,       9.51057,       8.09017, 
+      5.87785,       3.09017,   7.10543e-14,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,       1.58509,       1.34836,      0.979642, 
+     0.515028,   0.000180844,     -0.515028,     -0.979642,      -1.34836, 
+     -1.58509,       3.17019,       2.69672,       1.95928,       1.03006, 
+  9.62788e-05,      -1.03006,      -1.95928,      -2.69672,      -3.17019, 
+      4.75528,       4.04508,       2.93893,       1.54508,    6.4922e-05, 
+     -1.54508,      -2.93893,      -4.04508,      -4.75528,       6.34038, 
+      5.39345,       3.91857,       2.06011,   4.88877e-05,      -2.06011, 
+     -3.91857,      -5.39345,      -6.34038,       7.92547,       6.74181, 
+      4.89821,       2.57514,   3.91832e-05,      -2.57514,      -4.89821, 
+     -6.74181,      -7.92547,       9.51057,       8.09017,       5.87785, 
+      3.09017,   7.10543e-14,      -3.09017,      -5.87785,      -8.09017, 
+     -9.51057,       1.58509,       1.34836,      0.979642,      0.515028, 
+  0.000180844,     -0.515028,     -0.979642,      -1.34836,      -1.58509, 
+      3.17019,       2.69672,       1.95928,       1.03006,   9.62788e-05, 
+     -1.03006,      -1.95928,      -2.69672,      -3.17019,       4.75528, 
+      4.04508,       2.93893,       1.54508,    6.4922e-05,      -1.54508, 
+     -2.93893,      -4.04508,      -4.75528,       6.34038,       5.39345, 
+      3.91857,       2.06011,   4.88877e-05,      -2.06011,      -3.91857, 
+     -5.39345,      -6.34038,       7.92547,       6.74181,       4.89821, 
+      2.57514,   3.91832e-05,      -2.57514,      -4.89821,      -6.74181, 
+     -7.92547,       9.51057,       8.09017,       5.87785,       3.09017, 
+  7.10543e-14,      -3.09017,      -5.87785,      -8.09017,      -9.51057, 
+      1.58509,       1.34836,      0.979642,      0.515028,   0.000180844, 
+    -0.515028,     -0.979642,      -1.34836,      -1.58509,       3.17019, 
+      2.69672,       1.95928,       1.03006,   9.62788e-05,      -1.03006, 
+     -1.95928,      -2.69672,      -3.17019,       4.75528,       4.04508, 
+      2.93893,       1.54508,    6.4922e-05,      -1.54508,      -2.93893, 
+     -4.04508,      -4.75528,       6.34038,       5.39345,       3.91857, 
+      2.06011,   4.88877e-05,      -2.06011,      -3.91857,      -5.39345, 
+     -6.34038,       7.92547,       6.74181,       4.89821,       2.57514, 
+  3.91832e-05,      -2.57514,      -4.89821,      -6.74181,      -7.92547, 
+      9.51057,       8.09017,       5.87785,       3.09017,   7.10543e-14, 
+     -3.09017,      -5.87785,      -8.09017,      -9.51057,       1.58509, 
+      1.34836,      0.979642,      0.515028,   0.000180844,     -0.515028, 
+    -0.979642,      -1.34836,      -1.58509,       3.17019,       2.69672, 
+      1.95928,       1.03006,   9.62788e-05,      -1.03006,      -1.95928, 
+     -2.69672,      -3.17019,       4.75528,       4.04508,       2.93893, 
+      1.54508,    6.4922e-05,      -1.54508,      -2.93893,      -4.04508, 
+     -4.75528,       6.34038,       5.39345,       3.91857,       2.06011, 
+  4.88877e-05,      -2.06011,      -3.91857,      -5.39345,      -6.34038, 
+      7.92547,       6.74181,       4.89821,       2.57514,   3.91832e-05, 
+     -2.57514,      -4.89821,      -6.74181,      -7.92547,       9.51057, 
+      8.09017,       5.87785,       3.09017,   7.10543e-14,      -3.09017, 
+     -5.87785,      -8.09017,      -9.51057,       1.58509,       1.34836, 
+     0.979642,      0.515028,   0.000180844,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,       3.17019,       2.69672,       1.95928, 
+      1.03006,   9.62788e-05,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,       4.75528,       4.04508,       2.93893,       1.54508, 
+   6.4922e-05,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+      6.34038,       5.39345,       3.91857,       2.06011,   4.88877e-05, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,       7.92547, 
+      6.74181,       4.89821,       2.57514,   3.91832e-05,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,       9.51057,       8.09017, 
+      5.87785,       3.09017,   7.10543e-14,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,       1.58509,       1.34836,      0.979642, 
+     0.515028,   0.000180844,     -0.515028,     -0.979642,      -1.34836, 
+     -1.58509,       3.17019,       2.69672,       1.95928,       1.03006, 
+  9.62788e-05,      -1.03006,      -1.95928,      -2.69672,      -3.17019, 
+      4.75528,       4.04508,       2.93893,       1.54508,    6.4922e-05, 
+     -1.54508,      -2.93893,      -4.04508,      -4.75528,       6.34038, 
+      5.39345,       3.91857,       2.06011,   4.88877e-05,      -2.06011, 
+     -3.91857,      -5.39345,      -6.34038,       7.92547,       6.74181, 
+      4.89821,       2.57514,   3.91832e-05,      -2.57514,      -4.89821, 
+     -6.74181,      -7.92547,       9.51057,       8.09017,       5.87785, 
+      3.09017,   7.10543e-14,      -3.09017,      -5.87785,      -8.09017, 
+     -9.51057,       1.58509,       1.34836,      0.979642,      0.515028, 
+  0.000180844,     -0.515028,     -0.979642,      -1.34836,      -1.58509, 
+      3.17019,       2.69672,       1.95928,       1.03006,   9.62788e-05, 
+     -1.03006,      -1.95928,      -2.69672,      -3.17019,       4.75528, 
+      4.04508,       2.93893,       1.54508,    6.4922e-05,      -1.54508, 
+     -2.93893,      -4.04508,      -4.75528,       6.34038,       5.39345, 
+      3.91857,       2.06011,   4.88877e-05,      -2.06011,      -3.91857, 
+     -5.39345,      -6.34038,       7.92547,       6.74181,       4.89821, 
+      2.57514,   3.91832e-05,      -2.57514,      -4.89821,      -6.74181, 
+     -7.92547,       9.51057,       8.09017,       5.87785,       3.09017, 
+  7.10543e-14,      -3.09017,      -5.87785,      -8.09017,      -9.51057, 
+      1.58509,       1.34836,      0.979642,      0.515028,   0.000180844, 
+    -0.515028,     -0.979642,      -1.34836,      -1.58509,       3.17019, 
+      2.69672,       1.95928,       1.03006,   9.62788e-05,      -1.03006, 
+     -1.95928,      -2.69672,      -3.17019,       4.75528,       4.04508, 
+      2.93893,       1.54508,    6.4922e-05,      -1.54508,      -2.93893, 
+     -4.04508,      -4.75528,       6.34038,       5.39345,       3.91857, 
+      2.06011,   4.88877e-05,      -2.06011,      -3.91857,      -5.39345, 
+     -6.34038,       7.92547,       6.74181,       4.89821,       2.57514, 
+  3.91832e-05,      -2.57514,      -4.89821,      -6.74181,      -7.92547, 
+      9.51057,       8.09017,       5.87785,       3.09017,   7.10543e-14, 
+     -3.09017,      -5.87785,      -8.09017,      -9.51057,       1.58509, 
+      1.34836,      0.979642,      0.515028,   0.000180844,     -0.515028, 
+    -0.979642,      -1.34836,      -1.58509,       3.17019,       2.69672, 
+      1.95928,       1.03006,   9.62788e-05,      -1.03006,      -1.95928, 
+     -2.69672,      -3.17019,       4.75528,       4.04508,       2.93893, 
+      1.54508,    6.4922e-05,      -1.54508,      -2.93893,      -4.04508, 
+     -4.75528,       6.34038,       5.39345,       3.91857,       2.06011, 
+  4.88877e-05,      -2.06011,      -3.91857,      -5.39345,      -6.34038, 
+      7.92547,       6.74181,       4.89821,       2.57514,   3.91832e-05, 
+     -2.57514,      -4.89821,      -6.74181,      -7.92547,       9.51057, 
+      8.09017,       5.87785,       3.09017,   7.10543e-14,      -3.09017, 
+     -5.87785,      -8.09017,      -9.51057,       1.58509,       1.34836, 
+     0.979642,      0.515028,   0.000180844,     -0.515028,     -0.979642, 
+     -1.34836,      -1.58509,       3.17019,       2.69672,       1.95928, 
+      1.03006,   9.62788e-05,      -1.03006,      -1.95928,      -2.69672, 
+     -3.17019,       4.75528,       4.04508,       2.93893,       1.54508, 
+   6.4922e-05,      -1.54508,      -2.93893,      -4.04508,      -4.75528, 
+      6.34038,       5.39345,       3.91857,       2.06011,   4.88877e-05, 
+     -2.06011,      -3.91857,      -5.39345,      -6.34038,       7.92547, 
+      6.74181,       4.89821,       2.57514,   3.91832e-05,      -2.57514, 
+     -4.89821,      -6.74181,      -7.92547,       9.51057,       8.09017, 
+      5.87785,       3.09017,   7.10543e-14,      -3.09017,      -5.87785, 
+     -8.09017,      -9.51057,       1.58509,       1.34836,      0.979642, 
+     0.515028,   0.000180844,     -0.515028,     -0.979642,      -1.34836, 
+     -1.58509,       3.17019,       2.69672,       1.95928,       1.03006, 
+  9.62788e-05,      -1.03006,      -1.95928,      -2.69672,      -3.17019, 
+      4.75528,       4.04508,       2.93893,       1.54508,    6.4922e-05, 
+     -1.54508,      -2.93893,      -4.04508,      -4.75528,       6.34038, 
+      5.39345,       3.91857,       2.06011,   4.88877e-05,      -2.06011, 
+     -3.91857,      -5.39345,      -6.34038,       7.92547,       6.74181, 
+      4.89821,       2.57514,   3.91832e-05,      -2.57514,      -4.89821, 
+     -6.74181,      -7.92547,       9.51057,       8.09017,       5.87785, 
+      3.09017,   7.10543e-14,      -3.09017,      -5.87785,      -8.09017, 
+     -9.51057,       1.58509,       1.34836,      0.979642,      0.515028, 
+  0.000180844,     -0.515028,     -0.979642,      -1.34836,      -1.58509, 
+      3.17019,       2.69672,       1.95928,       1.03006,   9.62788e-05, 
+     -1.03006,      -1.95928,      -2.69672,      -3.17019,       4.75528, 
+      4.04508,       2.93893,       1.54508,    6.4922e-05,      -1.54508, 
+     -2.93893,      -4.04508,      -4.75528,       6.34038,       5.39345, 
+      3.91857,       2.06011,   4.88877e-05,      -2.06011,      -3.91857, 
+     -5.39345,      -6.34038,       7.92547,       6.74181,       4.89821, 
+      2.57514,   3.91832e-05,      -2.57514,      -4.89821,      -6.74181, 
+     -7.92547,       9.51057,       8.09017,       5.87785,       3.09017, 
+  7.10543e-14,      -3.09017,      -5.87785,      -8.09017,      -9.51057, 
+      1.58509,       1.34836,      0.979642,      0.515028,   0.000180844, 
+    -0.515028,     -0.979642,      -1.34836,      -1.58509,       3.17019, 
+      2.69672,       1.95928,       1.03006,   9.62788e-05,      -1.03006, 
+     -1.95928,      -2.69672,      -3.17019,       4.75528,       4.04508, 
+      2.93893,       1.54508,    6.4922e-05,      -1.54508,      -2.93893, 
+     -4.04508,      -4.75528,       6.34038,       5.39345,       3.91857, 
+      2.06011,   4.88877e-05,      -2.06011,      -3.91857,      -5.39345, 
+     -6.34038,       7.92547,       6.74181,       4.89821,       2.57514, 
+  3.91832e-05,      -2.57514,      -4.89821,      -6.74181,      -7.92547, 
+      9.51057,       8.09017,       5.87785,       3.09017,   7.10543e-14, 
+     -3.09017,      -5.87785,      -8.09017,      -9.51057,       1.58509, 
+      1.34836,      0.979642,      0.515028,   0.000180844,     -0.515028, 
+    -0.979642,      -1.34836,      -1.58509,       3.17019,       2.69672, 
+      1.95928,       1.03006,   9.62788e-05,      -1.03006,      -1.95928, 
+     -2.69672,      -3.17019,       4.75528,       4.04508,       2.93893, 
+      1.54508,    6.4922e-05,      -1.54508,      -2.93893,      -4.04508, 
+     -4.75528,       6.34038,       5.39345,       3.91857,       2.06011, 
+  4.88877e-05,      -2.06011,      -3.91857,      -5.39345,      -6.34038, 
+      7.92547,       6.74181,       4.89821,       2.57514,   3.91832e-05, 
+     -2.57514,      -4.89821,      -6.74181,      -7.92547,       9.51057, 
+      8.09017,       5.87785,       3.09017,   7.10543e-14,      -3.09017, 
+     -5.87785,      -8.09017,      -9.51057, 
+};
+
+int       znodelist [8560] = {
+   /* --------------------- Size 4 ------------------- */
+
+   /* 10 */
+   1,    0,   13,   67,
+   1,    0,   67,  121,
+   1,    0,  121,  175,
+   1,    0,  175,  229,
+   1,    0,  229,  283,
+   1,    0,  283,  337,
+   1,    0,  337,  391,
+   1,    0,  391,  445,
+   1,    0,  445,  499,
+   1,    0,  499,  553,
+
+   /* 20 */
+   1,    0,  553,  607,
+   1,    0,  607,  661,
+   1,    0,  661,  715,
+   1,    0,  715,  769,
+   1,    0,  769,  823,
+   1,    0,  823,  877,
+   1,    0,  877,  931,
+   1,    0,  931,  985,
+   1,    0,  985, 1039,
+   1,    0, 1039,   13,
+
+   /* 30 */
+   0,    2,   21,   75,
+   0,    2,   75,  129,
+   0,    2,  129,  183,
+   0,    2,  183,  237,
+   0,    2,  237,  291,
+   0,    2,  291,  345,
+   0,    2,  345,  399,
+   0,    2,  399,  453,
+   0,    2,  453,  507,
+   0,    2,  507,  561,
+
+   /* 40 */
+   0,    2,  561,  615,
+   0,    2,  615,  669,
+   0,    2,  669,  723,
+   0,    2,  723,  777,
+   0,    2,  777,  831,
+   0,    2,  831,  885,
+   0,    2,  885,  939,
+   0,    2,  939,  993,
+   0,    2,  993, 1047,
+   0,    2, 1047,   21,
+
+   /* --------------------- Size 6 ------------------- */
+
+   /* 10 */
+    13,   22,    3,    1,   67,   76,
+    67,   76,    3,    1,  121,  130,
+   121,  130,    3,    1,  175,  184,
+   175,  184,    3,    1,  229,  238,
+   229,  238,    3,    1,  283,  292,
+   283,  292,    3,    1,  337,  346,
+   337,  346,    3,    1,  391,  400,
+   391,  400,    3,    1,  445,  454,
+   445,  454,    3,    1,  499,  508,
+   499,  508,    3,    1,  553,  562,
+
+   /* 20 */
+   553,  562,    3,    1,  607,  616,
+   607,  616,    3,    1,  661,  670,
+   661,  670,    3,    1,  715,  724,
+   715,  724,    3,    1,  769,  778,
+   769,  778,    3,    1,  823,  832,
+   823,  832,    3,    1,  877,  886,
+   877,  886,    3,    1,  931,  940,
+   931,  940,    3,    1,  985,  994,
+   985,  994,    3,    1, 1039, 1048,
+  1039, 1048,    3,    1,   13,   22,
+
+   /* 30 */
+    22,   31,    5,    3,   76,   85,
+    76,   85,    5,    3,  130,  139,
+   130,  139,    5,    3,  184,  193,
+   184,  193,    5,    3,  238,  247,
+   238,  247,    5,    3,  292,  301,
+   292,  301,    5,    3,  346,  355,
+   346,  355,    5,    3,  400,  409,
+   400,  409,    5,    3,  454,  463,
+   454,  463,    5,    3,  508,  517,
+   508,  517,    5,    3,  562,  571,
+
+   /* 40 */
+   562,  571,    5,    3,  616,  625,
+   616,  625,    5,    3,  670,  679,
+   670,  679,    5,    3,  724,  733,
+   724,  733,    5,    3,  778,  787,
+   778,  787,    5,    3,  832,  841,
+   832,  841,    5,    3,  886,  895,
+   886,  895,    5,    3,  940,  949,
+   940,  949,    5,    3,  994, 1003,
+   994, 1003,    5,    3, 1048, 1057,
+  1048, 1057,    5,    3,   22,   31,
+
+   /* 50 */
+    31,   40,    7,    5,   85,   94,
+    85,   94,    7,    5,  139,  148,
+   139,  148,    7,    5,  193,  202,
+   193,  202,    7,    5,  247,  256,
+   247,  256,    7,    5,  301,  310,
+   301,  310,    7,    5,  355,  364,
+   355,  364,    7,    5,  409,  418,
+   409,  418,    7,    5,  463,  472,
+   463,  472,    7,    5,  517,  526,
+   517,  526,    7,    5,  571,  580,
+
+   /* 60 */
+   571,  580,    7,    5,  625,  634,
+   625,  634,    7,    5,  679,  688,
+   679,  688,    7,    5,  733,  742,
+   733,  742,    7,    5,  787,  796,
+   787,  796,    7,    5,  841,  850,
+   841,  850,    7,    5,  895,  904,
+   895,  904,    7,    5,  949,  958,
+   949,  958,    7,    5, 1003, 1012,
+  1003, 1012,    7,    5, 1057, 1066,
+  1057, 1066,    7,    5,   31,   40,
+
+   /* 70 */
+    40,   49,    9,    7,   94,  103,
+    94,  103,    9,    7,  148,  157,
+   148,  157,    9,    7,  202,  211,
+   202,  211,    9,    7,  256,  265,
+   256,  265,    9,    7,  310,  319,
+   310,  319,    9,    7,  364,  373,
+   364,  373,    9,    7,  418,  427,
+   418,  427,    9,    7,  472,  481,
+   472,  481,    9,    7,  526,  535,
+   526,  535,    9,    7,  580,  589,
+
+   /* 80 */
+   580,  589,    9,    7,  634,  643,
+   634,  643,    9,    7,  688,  697,
+   688,  697,    9,    7,  742,  751,
+   742,  751,    9,    7,  796,  805,
+   796,  805,    9,    7,  850,  859,
+   850,  859,    9,    7,  904,  913,
+   904,  913,    9,    7,  958,  967,
+   958,  967,    9,    7, 1012, 1021,
+  1012, 1021,    9,    7, 1066, 1075,
+  1066, 1075,    9,    7,   40,   49,
+
+   /* 90 */
+    49,   58,   11,    9,  103,  112,
+   103,  112,   11,    9,  157,  166,
+   157,  166,   11,    9,  211,  220,
+   211,  220,   11,    9,  265,  274,
+   265,  274,   11,    9,  319,  328,
+   319,  328,   11,    9,  373,  382,
+   373,  382,   11,    9,  427,  436,
+   427,  436,   11,    9,  481,  490,
+   481,  490,   11,    9,  535,  544,
+   535,  544,   11,    9,  589,  598,
+
+   /* 100 */
+   589,  598,   11,    9,  643,  652,
+   643,  652,   11,    9,  697,  706,
+   697,  706,   11,    9,  751,  760,
+   751,  760,   11,    9,  805,  814,
+   805,  814,   11,    9,  859,  868,
+   859,  868,   11,    9,  913,  922,
+   913,  922,   11,    9,  967,  976,
+   967,  976,   11,    9, 1021, 1030,
+  1021, 1030,   11,    9, 1075, 1084,
+  1075, 1084,   11,    9,   49,   58,
+
+   /* 110 */
+    30,   21,    2,    4,   84,   75,
+    84,   75,    2,    4,  138,  129,
+   138,  129,    2,    4,  192,  183,
+   192,  183,    2,    4,  246,  237,
+   246,  237,    2,    4,  300,  291,
+   300,  291,    2,    4,  354,  345,
+   354,  345,    2,    4,  408,  399,
+   408,  399,    2,    4,  462,  453,
+   462,  453,    2,    4,  516,  507,
+   516,  507,    2,    4,  570,  561,
+
+   /* 120 */
+   570,  561,    2,    4,  624,  615,
+   624,  615,    2,    4,  678,  669,
+   678,  669,    2,    4,  732,  723,
+   732,  723,    2,    4,  786,  777,
+   786,  777,    2,    4,  840,  831,
+   840,  831,    2,    4,  894,  885,
+   894,  885,    2,    4,  948,  939,
+   948,  939,    2,    4, 1002,  993,
+  1002,  993,    2,    4, 1056, 1047,
+  1056, 1047,    2,    4,   30,   21,
+
+   /* 130 */
+    39,   30,    4,    6,   93,   84,
+    93,   84,    4,    6,  147,  138,
+   147,  138,    4,    6,  201,  192,
+   201,  192,    4,    6,  255,  246,
+   255,  246,    4,    6,  309,  300,
+   309,  300,    4,    6,  363,  354,
+   363,  354,    4,    6,  417,  408,
+   417,  408,    4,    6,  471,  462,
+   471,  462,    4,    6,  525,  516,
+   525,  516,    4,    6,  579,  570,
+
+   /* 140 */
+   579,  570,    4,    6,  633,  624,
+   633,  624,    4,    6,  687,  678,
+   687,  678,    4,    6,  741,  732,
+   741,  732,    4,    6,  795,  786,
+   795,  786,    4,    6,  849,  840,
+   849,  840,    4,    6,  903,  894,
+   903,  894,    4,    6,  957,  948,
+   957,  948,    4,    6, 1011, 1002,
+  1011, 1002,    4,    6, 1065, 1056,
+  1065, 1056,    4,    6,   39,   30,
+
+   /* 150 */
+    48,   39,    6,    8,  102,   93,
+   102,   93,    6,    8,  156,  147,
+   156,  147,    6,    8,  210,  201,
+   210,  201,    6,    8,  264,  255,
+   264,  255,    6,    8,  318,  309,
+   318,  309,    6,    8,  372,  363,
+   372,  363,    6,    8,  426,  417,
+   426,  417,    6,    8,  480,  471,
+   480,  471,    6,    8,  534,  525,
+   534,  525,    6,    8,  588,  579,
+
+   /* 160 */
+   588,  579,    6,    8,  642,  633,
+   642,  633,    6,    8,  696,  687,
+   696,  687,    6,    8,  750,  741,
+   750,  741,    6,    8,  804,  795,
+   804,  795,    6,    8,  858,  849,
+   858,  849,    6,    8,  912,  903,
+   912,  903,    6,    8,  966,  957,
+   966,  957,    6,    8, 1020, 1011,
+  1020, 1011,    6,    8, 1074, 1065,
+  1074, 1065,    6,    8,   48,   39,
+
+   /* 170 */
+    57,   48,    8,   10,  111,  102,
+   111,  102,    8,   10,  165,  156,
+   165,  156,    8,   10,  219,  210,
+   219,  210,    8,   10,  273,  264,
+   273,  264,    8,   10,  327,  318,
+   327,  318,    8,   10,  381,  372,
+   381,  372,    8,   10,  435,  426,
+   435,  426,    8,   10,  489,  480,
+   489,  480,    8,   10,  543,  534,
+   543,  534,    8,   10,  597,  588,
+
+   /* 180 */
+   597,  588,    8,   10,  651,  642,
+   651,  642,    8,   10,  705,  696,
+   705,  696,    8,   10,  759,  750,
+   759,  750,    8,   10,  813,  804,
+   813,  804,    8,   10,  867,  858,
+   867,  858,    8,   10,  921,  912,
+   921,  912,    8,   10,  975,  966,
+   975,  966,    8,   10, 1029, 1020,
+  1029, 1020,    8,   10, 1083, 1074,
+  1083, 1074,    8,   10,   57,   48,
+
+   /* 190 */
+    66,   57,   10,   12,  120,  111,
+   120,  111,   10,   12,  174,  165,
+   174,  165,   10,   12,  228,  219,
+   228,  219,   10,   12,  282,  273,
+   282,  273,   10,   12,  336,  327,
+   336,  327,   10,   12,  390,  381,
+   390,  381,   10,   12,  444,  435,
+   444,  435,   10,   12,  498,  489,
+   498,  489,   10,   12,  552,  543,
+   552,  543,   10,   12,  606,  597,
+
+   /* 200 */
+   606,  597,   10,   12,  660,  651,
+   660,  651,   10,   12,  714,  705,
+   714,  705,   10,   12,  768,  759,
+   768,  759,   10,   12,  822,  813,
+   822,  813,   10,   12,  876,  867,
+   876,  867,   10,   12,  930,  921,
+   930,  921,   10,   12,  984,  975,
+   984,  975,   10,   12, 1038, 1029,
+  1038, 1029,   10,   12, 1092, 1083,
+  1092, 1083,   10,   12,   66,   57,
+
+   /* --------------------- Size 5 ------------------- */
+
+   /* 10 */
+    67,   13,   14,   68,    0,
+   121,   67,   68,  122,    0,
+   175,  121,  122,  176,    0,
+   229,  175,  176,  230,    0,
+   283,  229,  230,  284,    0,
+   337,  283,  284,  338,    0,
+   391,  337,  338,  392,    0,
+   445,  391,  392,  446,    0,
+   499,  445,  446,  500,    0,
+   553,  499,  500,  554,    0,
+
+   /* 20 */
+   607,  553,  554,  608,    0,
+   661,  607,  608,  662,    0,
+   715,  661,  662,  716,    0,
+   769,  715,  716,  770,    0,
+   823,  769,  770,  824,    0,
+   877,  823,  824,  878,    0,
+   931,  877,  878,  932,    0,
+   985,  931,  932,  986,    0,
+  1039,  985,  986, 1040,    0,
+    13, 1039, 1040,   14,    0,
+
+   /* 30 */
+    68,   14,   15,   69,    0,
+   122,   68,   69,  123,    0,
+   176,  122,  123,  177,    0,
+   230,  176,  177,  231,    0,
+   284,  230,  231,  285,    0,
+   338,  284,  285,  339,    0,
+   392,  338,  339,  393,    0,
+   446,  392,  393,  447,    0,
+   500,  446,  447,  501,    0,
+   554,  500,  501,  555,    0,
+
+   /* 40 */
+   608,  554,  555,  609,    0,
+   662,  608,  609,  663,    0,
+   716,  662,  663,  717,    0,
+   770,  716,  717,  771,    0,
+   824,  770,  771,  825,    0,
+   878,  824,  825,  879,    0,
+   932,  878,  879,  933,    0,
+   986,  932,  933,  987,    0,
+  1040,  986,  987, 1041,    0,
+    14, 1040, 1041,   15,    0,
+
+   /* 50 */
+    69,   15,   16,   70,    0,
+   123,   69,   70,  124,    0,
+   177,  123,  124,  178,    0,
+   231,  177,  178,  232,    0,
+   285,  231,  232,  286,    0,
+   339,  285,  286,  340,    0,
+   393,  339,  340,  394,    0,
+   447,  393,  394,  448,    0,
+   501,  447,  448,  502,    0,
+   555,  501,  502,  556,    0,
+
+   /* 60 */
+   609,  555,  556,  610,    0,
+   663,  609,  610,  664,    0,
+   717,  663,  664,  718,    0,
+   771,  717,  718,  772,    0,
+   825,  771,  772,  826,    0,
+   879,  825,  826,  880,    0,
+   933,  879,  880,  934,    0,
+   987,  933,  934,  988,    0,
+  1041,  987,  988, 1042,    0,
+    15, 1041, 1042,   16,    0,
+
+   /* 70 */
+    70,   16,   17,   71,    0,
+   124,   70,   71,  125,    0,
+   178,  124,  125,  179,    0,
+   232,  178,  179,  233,    0,
+   286,  232,  233,  287,    0,
+   340,  286,  287,  341,    0,
+   394,  340,  341,  395,    0,
+   448,  394,  395,  449,    0,
+   502,  448,  449,  503,    0,
+   556,  502,  503,  557,    0,
+
+   /* 80 */
+   610,  556,  557,  611,    0,
+   664,  610,  611,  665,    0,
+   718,  664,  665,  719,    0,
+   772,  718,  719,  773,    0,
+   826,  772,  773,  827,    0,
+   880,  826,  827,  881,    0,
+   934,  880,  881,  935,    0,
+   988,  934,  935,  989,    0,
+  1042,  988,  989, 1043,    0,
+    16, 1042, 1043,   17,    0,
+
+   /* 90 */
+    71,   17,   18,   72,    0,
+   125,   71,   72,  126,    0,
+   179,  125,  126,  180,    0,
+   233,  179,  180,  234,    0,
+   287,  233,  234,  288,    0,
+   341,  287,  288,  342,    0,
+   395,  341,  342,  396,    0,
+   449,  395,  396,  450,    0,
+   503,  449,  450,  504,    0,
+   557,  503,  504,  558,    0,
+
+   /* 100 */
+   611,  557,  558,  612,    0,
+   665,  611,  612,  666,    0,
+   719,  665,  666,  720,    0,
+   773,  719,  720,  774,    0,
+   827,  773,  774,  828,    0,
+   881,  827,  828,  882,    0,
+   935,  881,  882,  936,    0,
+   989,  935,  936,  990,    0,
+  1043,  989,  990, 1044,    0,
+    17, 1043, 1044,   18,    0,
+
+   /* 110 */
+    72,   18,   19,   73,    0,
+   126,   72,   73,  127,    0,
+   180,  126,  127,  181,    0,
+   234,  180,  181,  235,    0,
+   288,  234,  235,  289,    0,
+   342,  288,  289,  343,    0,
+   396,  342,  343,  397,    0,
+   450,  396,  397,  451,    0,
+   504,  450,  451,  505,    0,
+   558,  504,  505,  559,    0,
+
+   /* 120 */
+   612,  558,  559,  613,    0,
+   666,  612,  613,  667,    0,
+   720,  666,  667,  721,    0,
+   774,  720,  721,  775,    0,
+   828,  774,  775,  829,    0,
+   882,  828,  829,  883,    0,
+   936,  882,  883,  937,    0,
+   990,  936,  937,  991,    0,
+  1044,  990,  991, 1045,    0,
+    18, 1044, 1045,   19,    0,
+
+   /* 130 */
+    73,   19,   20,   74,    0,
+   127,   73,   74,  128,    0,
+   181,  127,  128,  182,    0,
+   235,  181,  182,  236,    0,
+   289,  235,  236,  290,    0,
+   343,  289,  290,  344,    0,
+   397,  343,  344,  398,    0,
+   451,  397,  398,  452,    0,
+   505,  451,  452,  506,    0,
+   559,  505,  506,  560,    0,
+
+   /* 140 */
+   613,  559,  560,  614,    0,
+   667,  613,  614,  668,    0,
+   721,  667,  668,  722,    0,
+   775,  721,  722,  776,    0,
+   829,  775,  776,  830,    0,
+   883,  829,  830,  884,    0,
+   937,  883,  884,  938,    0,
+   991,  937,  938,  992,    0,
+  1045,  991,  992, 1046,    0,
+    19, 1045, 1046,   20,    0,
+
+   /* 150 */
+    74,   20,   21,   75,    0,
+   128,   74,   75,  129,    0,
+   182,  128,  129,  183,    0,
+   236,  182,  183,  237,    0,
+   290,  236,  237,  291,    0,
+   344,  290,  291,  345,    0,
+   398,  344,  345,  399,    0,
+   452,  398,  399,  453,    0,
+   506,  452,  453,  507,    0,
+   560,  506,  507,  561,    0,
+
+   /* 160 */
+   614,  560,  561,  615,    0,
+   668,  614,  615,  669,    0,
+   722,  668,  669,  723,    0,
+   776,  722,  723,  777,    0,
+   830,  776,  777,  831,    0,
+   884,  830,  831,  885,    0,
+   938,  884,  885,  939,    0,
+   992,  938,  939,  993,    0,
+  1046,  992,  993, 1047,    0,
+    20, 1046, 1047,   21,    0,
+
+   /* --------------------- Size 8 ------------------- */
+  22,   23,   14,   13,   76,   77,   68,   67,   76,   77,   68,   67, 
+ 130,  131,  122,  121,  130,  131,  122,  121,  184,  185,  176,  175, 
+ 184,  185,  176,  175,  238,  239,  230,  229,  238,  239,  230,  229, 
+ 292,  293,  284,  283,  292,  293,  284,  283,  346,  347,  338,  337, 
+ 346,  347,  338,  337,  400,  401,  392,  391,  400,  401,  392,  391, 
+ 454,  455,  446,  445,  454,  455,  446,  445,  508,  509,  500,  499, 
+ 508,  509,  500,  499,  562,  563,  554,  553,  562,  563,  554,  553, 
+ 616,  617,  608,  607,  616,  617,  608,  607,  670,  671,  662,  661, 
+ 670,  671,  662,  661,  724,  725,  716,  715,  724,  725,  716,  715, 
+ 778,  779,  770,  769,  778,  779,  770,  769,  832,  833,  824,  823, 
+ 832,  833,  824,  823,  886,  887,  878,  877,  886,  887,  878,  877, 
+ 940,  941,  932,  931,  940,  941,  932,  931,  994,  995,  986,  985, 
+ 994,  995,  986,  985, 1048, 1049, 1040, 1039, 1048, 1049, 1040, 1039, 
+  22,   23,   14,   13,   31,   32,   23,   22,   85,   86,   77,   76, 
+  85,   86,   77,   76,  139,  140,  131,  130,  139,  140,  131,  130, 
+ 193,  194,  185,  184,  193,  194,  185,  184,  247,  248,  239,  238, 
+ 247,  248,  239,  238,  301,  302,  293,  292,  301,  302,  293,  292, 
+ 355,  356,  347,  346,  355,  356,  347,  346,  409,  410,  401,  400, 
+ 409,  410,  401,  400,  463,  464,  455,  454,  463,  464,  455,  454, 
+ 517,  518,  509,  508,  517,  518,  509,  508,  571,  572,  563,  562, 
+ 571,  572,  563,  562,  625,  626,  617,  616,  625,  626,  617,  616, 
+ 679,  680,  671,  670,  679,  680,  671,  670,  733,  734,  725,  724, 
+ 733,  734,  725,  724,  787,  788,  779,  778,  787,  788,  779,  778, 
+ 841,  842,  833,  832,  841,  842,  833,  832,  895,  896,  887,  886, 
+ 895,  896,  887,  886,  949,  950,  941,  940,  949,  950,  941,  940, 
+1003, 1004,  995,  994, 1003, 1004,  995,  994, 1057, 1058, 1049, 1048, 
+1057, 1058, 1049, 1048,   31,   32,   23,   22,   40,   41,   32,   31, 
+  94,   95,   86,   85,   94,   95,   86,   85,  148,  149,  140,  139, 
+ 148,  149,  140,  139,  202,  203,  194,  193,  202,  203,  194,  193, 
+ 256,  257,  248,  247,  256,  257,  248,  247,  310,  311,  302,  301, 
+ 310,  311,  302,  301,  364,  365,  356,  355,  364,  365,  356,  355, 
+ 418,  419,  410,  409,  418,  419,  410,  409,  472,  473,  464,  463, 
+ 472,  473,  464,  463,  526,  527,  518,  517,  526,  527,  518,  517, 
+ 580,  581,  572,  571,  580,  581,  572,  571,  634,  635,  626,  625, 
+ 634,  635,  626,  625,  688,  689,  680,  679,  688,  689,  680,  679, 
+ 742,  743,  734,  733,  742,  743,  734,  733,  796,  797,  788,  787, 
+ 796,  797,  788,  787,  850,  851,  842,  841,  850,  851,  842,  841, 
+ 904,  905,  896,  895,  904,  905,  896,  895,  958,  959,  950,  949, 
+ 958,  959,  950,  949, 1012, 1013, 1004, 1003, 1012, 1013, 1004, 1003, 
+1066, 1067, 1058, 1057, 1066, 1067, 1058, 1057,   40,   41,   32,   31, 
+  49,   50,   41,   40,  103,  104,   95,   94,  103,  104,   95,   94, 
+ 157,  158,  149,  148,  157,  158,  149,  148,  211,  212,  203,  202, 
+ 211,  212,  203,  202,  265,  266,  257,  256,  265,  266,  257,  256, 
+ 319,  320,  311,  310,  319,  320,  311,  310,  373,  374,  365,  364, 
+ 373,  374,  365,  364,  427,  428,  419,  418,  427,  428,  419,  418, 
+ 481,  482,  473,  472,  481,  482,  473,  472,  535,  536,  527,  526, 
+ 535,  536,  527,  526,  589,  590,  581,  580,  589,  590,  581,  580, 
+ 643,  644,  635,  634,  643,  644,  635,  634,  697,  698,  689,  688, 
+ 697,  698,  689,  688,  751,  752,  743,  742,  751,  752,  743,  742, 
+ 805,  806,  797,  796,  805,  806,  797,  796,  859,  860,  851,  850, 
+ 859,  860,  851,  850,  913,  914,  905,  904,  913,  914,  905,  904, 
+ 967,  968,  959,  958,  967,  968,  959,  958, 1021, 1022, 1013, 1012, 
+1021, 1022, 1013, 1012, 1075, 1076, 1067, 1066, 1075, 1076, 1067, 1066, 
+  49,   50,   41,   40,   58,   59,   50,   49,  112,  113,  104,  103, 
+ 112,  113,  104,  103,  166,  167,  158,  157,  166,  167,  158,  157, 
+ 220,  221,  212,  211,  220,  221,  212,  211,  274,  275,  266,  265, 
+ 274,  275,  266,  265,  328,  329,  320,  319,  328,  329,  320,  319, 
+ 382,  383,  374,  373,  382,  383,  374,  373,  436,  437,  428,  427, 
+ 436,  437,  428,  427,  490,  491,  482,  481,  490,  491,  482,  481, 
+ 544,  545,  536,  535,  544,  545,  536,  535,  598,  599,  590,  589, 
+ 598,  599,  590,  589,  652,  653,  644,  643,  652,  653,  644,  643, 
+ 706,  707,  698,  697,  706,  707,  698,  697,  760,  761,  752,  751, 
+ 760,  761,  752,  751,  814,  815,  806,  805,  814,  815,  806,  805, 
+ 868,  869,  860,  859,  868,  869,  860,  859,  922,  923,  914,  913, 
+ 922,  923,  914,  913,  976,  977,  968,  967,  976,  977,  968,  967, 
+1030, 1031, 1022, 1021, 1030, 1031, 1022, 1021, 1084, 1085, 1076, 1075, 
+1084, 1085, 1076, 1075,   58,   59,   50,   49,   23,   24,   15,   14, 
+  77,   78,   69,   68,   77,   78,   69,   68,  131,  132,  123,  122, 
+ 131,  132,  123,  122,  185,  186,  177,  176,  185,  186,  177,  176, 
+ 239,  240,  231,  230,  239,  240,  231,  230,  293,  294,  285,  284, 
+ 293,  294,  285,  284,  347,  348,  339,  338,  347,  348,  339,  338, 
+ 401,  402,  393,  392,  401,  402,  393,  392,  455,  456,  447,  446, 
+ 455,  456,  447,  446,  509,  510,  501,  500,  509,  510,  501,  500, 
+ 563,  564,  555,  554,  563,  564,  555,  554,  617,  618,  609,  608, 
+ 617,  618,  609,  608,  671,  672,  663,  662,  671,  672,  663,  662, 
+ 725,  726,  717,  716,  725,  726,  717,  716,  779,  780,  771,  770, 
+ 779,  780,  771,  770,  833,  834,  825,  824,  833,  834,  825,  824, 
+ 887,  888,  879,  878,  887,  888,  879,  878,  941,  942,  933,  932, 
+ 941,  942,  933,  932,  995,  996,  987,  986,  995,  996,  987,  986, 
+1049, 1050, 1041, 1040, 1049, 1050, 1041, 1040,   23,   24,   15,   14, 
+  32,   33,   24,   23,   86,   87,   78,   77,   86,   87,   78,   77, 
+ 140,  141,  132,  131,  140,  141,  132,  131,  194,  195,  186,  185, 
+ 194,  195,  186,  185,  248,  249,  240,  239,  248,  249,  240,  239, 
+ 302,  303,  294,  293,  302,  303,  294,  293,  356,  357,  348,  347, 
+ 356,  357,  348,  347,  410,  411,  402,  401,  410,  411,  402,  401, 
+ 464,  465,  456,  455,  464,  465,  456,  455,  518,  519,  510,  509, 
+ 518,  519,  510,  509,  572,  573,  564,  563,  572,  573,  564,  563, 
+ 626,  627,  618,  617,  626,  627,  618,  617,  680,  681,  672,  671, 
+ 680,  681,  672,  671,  734,  735,  726,  725,  734,  735,  726,  725, 
+ 788,  789,  780,  779,  788,  789,  780,  779,  842,  843,  834,  833, 
+ 842,  843,  834,  833,  896,  897,  888,  887,  896,  897,  888,  887, 
+ 950,  951,  942,  941,  950,  951,  942,  941, 1004, 1005,  996,  995, 
+1004, 1005,  996,  995, 1058, 1059, 1050, 1049, 1058, 1059, 1050, 1049, 
+  32,   33,   24,   23,   41,   42,   33,   32,   95,   96,   87,   86, 
+  95,   96,   87,   86,  149,  150,  141,  140,  149,  150,  141,  140, 
+ 203,  204,  195,  194,  203,  204,  195,  194,  257,  258,  249,  248, 
+ 257,  258,  249,  248,  311,  312,  303,  302,  311,  312,  303,  302, 
+ 365,  366,  357,  356,  365,  366,  357,  356,  419,  420,  411,  410, 
+ 419,  420,  411,  410,  473,  474,  465,  464,  473,  474,  465,  464, 
+ 527,  528,  519,  518,  527,  528,  519,  518,  581,  582,  573,  572, 
+ 581,  582,  573,  572,  635,  636,  627,  626,  635,  636,  627,  626, 
+ 689,  690,  681,  680,  689,  690,  681,  680,  743,  744,  735,  734, 
+ 743,  744,  735,  734,  797,  798,  789,  788,  797,  798,  789,  788, 
+ 851,  852,  843,  842,  851,  852,  843,  842,  905,  906,  897,  896, 
+ 905,  906,  897,  896,  959,  960,  951,  950,  959,  960,  951,  950, 
+1013, 1014, 1005, 1004, 1013, 1014, 1005, 1004, 1067, 1068, 1059, 1058, 
+1067, 1068, 1059, 1058,   41,   42,   33,   32,   50,   51,   42,   41, 
+ 104,  105,   96,   95,  104,  105,   96,   95,  158,  159,  150,  149, 
+ 158,  159,  150,  149,  212,  213,  204,  203,  212,  213,  204,  203, 
+ 266,  267,  258,  257,  266,  267,  258,  257,  320,  321,  312,  311, 
+ 320,  321,  312,  311,  374,  375,  366,  365,  374,  375,  366,  365, 
+ 428,  429,  420,  419,  428,  429,  420,  419,  482,  483,  474,  473, 
+ 482,  483,  474,  473,  536,  537,  528,  527,  536,  537,  528,  527, 
+ 590,  591,  582,  581,  590,  591,  582,  581,  644,  645,  636,  635, 
+ 644,  645,  636,  635,  698,  699,  690,  689,  698,  699,  690,  689, 
+ 752,  753,  744,  743,  752,  753,  744,  743,  806,  807,  798,  797, 
+ 806,  807,  798,  797,  860,  861,  852,  851,  860,  861,  852,  851, 
+ 914,  915,  906,  905,  914,  915,  906,  905,  968,  969,  960,  959, 
+ 968,  969,  960,  959, 1022, 1023, 1014, 1013, 1022, 1023, 1014, 1013, 
+1076, 1077, 1068, 1067, 1076, 1077, 1068, 1067,   50,   51,   42,   41, 
+  59,   60,   51,   50,  113,  114,  105,  104,  113,  114,  105,  104, 
+ 167,  168,  159,  158,  167,  168,  159,  158,  221,  222,  213,  212, 
+ 221,  222,  213,  212,  275,  276,  267,  266,  275,  276,  267,  266, 
+ 329,  330,  321,  320,  329,  330,  321,  320,  383,  384,  375,  374, 
+ 383,  384,  375,  374,  437,  438,  429,  428,  437,  438,  429,  428, 
+ 491,  492,  483,  482,  491,  492,  483,  482,  545,  546,  537,  536, 
+ 545,  546,  537,  536,  599,  600,  591,  590,  599,  600,  591,  590, 
+ 653,  654,  645,  644,  653,  654,  645,  644,  707,  708,  699,  698, 
+ 707,  708,  699,  698,  761,  762,  753,  752,  761,  762,  753,  752, 
+ 815,  816,  807,  806,  815,  816,  807,  806,  869,  870,  861,  860, 
+ 869,  870,  861,  860,  923,  924,  915,  914,  923,  924,  915,  914, 
+ 977,  978,  969,  968,  977,  978,  969,  968, 1031, 1032, 1023, 1022, 
+1031, 1032, 1023, 1022, 1085, 1086, 1077, 1076, 1085, 1086, 1077, 1076, 
+  59,   60,   51,   50,   24,   25,   16,   15,   78,   79,   70,   69, 
+  78,   79,   70,   69,  132,  133,  124,  123,  132,  133,  124,  123, 
+ 186,  187,  178,  177,  186,  187,  178,  177,  240,  241,  232,  231, 
+ 240,  241,  232,  231,  294,  295,  286,  285,  294,  295,  286,  285, 
+ 348,  349,  340,  339,  348,  349,  340,  339,  402,  403,  394,  393, 
+ 402,  403,  394,  393,  456,  457,  448,  447,  456,  457,  448,  447, 
+ 510,  511,  502,  501,  510,  511,  502,  501,  564,  565,  556,  555, 
+ 564,  565,  556,  555,  618,  619,  610,  609,  618,  619,  610,  609, 
+ 672,  673,  664,  663,  672,  673,  664,  663,  726,  727,  718,  717, 
+ 726,  727,  718,  717,  780,  781,  772,  771,  780,  781,  772,  771, 
+ 834,  835,  826,  825,  834,  835,  826,  825,  888,  889,  880,  879, 
+ 888,  889,  880,  879,  942,  943,  934,  933,  942,  943,  934,  933, 
+ 996,  997,  988,  987,  996,  997,  988,  987, 1050, 1051, 1042, 1041, 
+1050, 1051, 1042, 1041,   24,   25,   16,   15,   33,   34,   25,   24, 
+  87,   88,   79,   78,   87,   88,   79,   78,  141,  142,  133,  132, 
+ 141,  142,  133,  132,  195,  196,  187,  186,  195,  196,  187,  186, 
+ 249,  250,  241,  240,  249,  250,  241,  240,  303,  304,  295,  294, 
+ 303,  304,  295,  294,  357,  358,  349,  348,  357,  358,  349,  348, 
+ 411,  412,  403,  402,  411,  412,  403,  402,  465,  466,  457,  456, 
+ 465,  466,  457,  456,  519,  520,  511,  510,  519,  520,  511,  510, 
+ 573,  574,  565,  564,  573,  574,  565,  564,  627,  628,  619,  618, 
+ 627,  628,  619,  618,  681,  682,  673,  672,  681,  682,  673,  672, 
+ 735,  736,  727,  726,  735,  736,  727,  726,  789,  790,  781,  780, 
+ 789,  790,  781,  780,  843,  844,  835,  834,  843,  844,  835,  834, 
+ 897,  898,  889,  888,  897,  898,  889,  888,  951,  952,  943,  942, 
+ 951,  952,  943,  942, 1005, 1006,  997,  996, 1005, 1006,  997,  996, 
+1059, 1060, 1051, 1050, 1059, 1060, 1051, 1050,   33,   34,   25,   24, 
+  42,   43,   34,   33,   96,   97,   88,   87,   96,   97,   88,   87, 
+ 150,  151,  142,  141,  150,  151,  142,  141,  204,  205,  196,  195, 
+ 204,  205,  196,  195,  258,  259,  250,  249,  258,  259,  250,  249, 
+ 312,  313,  304,  303,  312,  313,  304,  303,  366,  367,  358,  357, 
+ 366,  367,  358,  357,  420,  421,  412,  411,  420,  421,  412,  411, 
+ 474,  475,  466,  465,  474,  475,  466,  465,  528,  529,  520,  519, 
+ 528,  529,  520,  519,  582,  583,  574,  573,  582,  583,  574,  573, 
+ 636,  637,  628,  627,  636,  637,  628,  627,  690,  691,  682,  681, 
+ 690,  691,  682,  681,  744,  745,  736,  735,  744,  745,  736,  735, 
+ 798,  799,  790,  789,  798,  799,  790,  789,  852,  853,  844,  843, 
+ 852,  853,  844,  843,  906,  907,  898,  897,  906,  907,  898,  897, 
+ 960,  961,  952,  951,  960,  961,  952,  951, 1014, 1015, 1006, 1005, 
+1014, 1015, 1006, 1005, 1068, 1069, 1060, 1059, 1068, 1069, 1060, 1059, 
+  42,   43,   34,   33,   51,   52,   43,   42,  105,  106,   97,   96, 
+ 105,  106,   97,   96,  159,  160,  151,  150,  159,  160,  151,  150, 
+ 213,  214,  205,  204,  213,  214,  205,  204,  267,  268,  259,  258, 
+ 267,  268,  259,  258,  321,  322,  313,  312,  321,  322,  313,  312, 
+ 375,  376,  367,  366,  375,  376,  367,  366,  429,  430,  421,  420, 
+ 429,  430,  421,  420,  483,  484,  475,  474,  483,  484,  475,  474, 
+ 537,  538,  529,  528,  537,  538,  529,  528,  591,  592,  583,  582, 
+ 591,  592,  583,  582,  645,  646,  637,  636,  645,  646,  637,  636, 
+ 699,  700,  691,  690,  699,  700,  691,  690,  753,  754,  745,  744, 
+ 753,  754,  745,  744,  807,  808,  799,  798,  807,  808,  799,  798, 
+ 861,  862,  853,  852,  861,  862,  853,  852,  915,  916,  907,  906, 
+ 915,  916,  907,  906,  969,  970,  961,  960,  969,  970,  961,  960, 
+1023, 1024, 1015, 1014, 1023, 1024, 1015, 1014, 1077, 1078, 1069, 1068, 
+1077, 1078, 1069, 1068,   51,   52,   43,   42,   60,   61,   52,   51, 
+ 114,  115,  106,  105,  114,  115,  106,  105,  168,  169,  160,  159, 
+ 168,  169,  160,  159,  222,  223,  214,  213,  222,  223,  214,  213, 
+ 276,  277,  268,  267,  276,  277,  268,  267,  330,  331,  322,  321, 
+ 330,  331,  322,  321,  384,  385,  376,  375,  384,  385,  376,  375, 
+ 438,  439,  430,  429,  438,  439,  430,  429,  492,  493,  484,  483, 
+ 492,  493,  484,  483,  546,  547,  538,  537,  546,  547,  538,  537, 
+ 600,  601,  592,  591,  600,  601,  592,  591,  654,  655,  646,  645, 
+ 654,  655,  646,  645,  708,  709,  700,  699,  708,  709,  700,  699, 
+ 762,  763,  754,  753,  762,  763,  754,  753,  816,  817,  808,  807, 
+ 816,  817,  808,  807,  870,  871,  862,  861,  870,  871,  862,  861, 
+ 924,  925,  916,  915,  924,  925,  916,  915,  978,  979,  970,  969, 
+ 978,  979,  970,  969, 1032, 1033, 1024, 1023, 1032, 1033, 1024, 1023, 
+1086, 1087, 1078, 1077, 1086, 1087, 1078, 1077,   60,   61,   52,   51, 
+  25,   26,   17,   16,   79,   80,   71,   70,   79,   80,   71,   70, 
+ 133,  134,  125,  124,  133,  134,  125,  124,  187,  188,  179,  178, 
+ 187,  188,  179,  178,  241,  242,  233,  232,  241,  242,  233,  232, 
+ 295,  296,  287,  286,  295,  296,  287,  286,  349,  350,  341,  340, 
+ 349,  350,  341,  340,  403,  404,  395,  394,  403,  404,  395,  394, 
+ 457,  458,  449,  448,  457,  458,  449,  448,  511,  512,  503,  502, 
+ 511,  512,  503,  502,  565,  566,  557,  556,  565,  566,  557,  556, 
+ 619,  620,  611,  610,  619,  620,  611,  610,  673,  674,  665,  664, 
+ 673,  674,  665,  664,  727,  728,  719,  718,  727,  728,  719,  718, 
+ 781,  782,  773,  772,  781,  782,  773,  772,  835,  836,  827,  826, 
+ 835,  836,  827,  826,  889,  890,  881,  880,  889,  890,  881,  880, 
+ 943,  944,  935,  934,  943,  944,  935,  934,  997,  998,  989,  988, 
+ 997,  998,  989,  988, 1051, 1052, 1043, 1042, 1051, 1052, 1043, 1042, 
+  25,   26,   17,   16,   34,   35,   26,   25,   88,   89,   80,   79, 
+  88,   89,   80,   79,  142,  143,  134,  133,  142,  143,  134,  133, 
+ 196,  197,  188,  187,  196,  197,  188,  187,  250,  251,  242,  241, 
+ 250,  251,  242,  241,  304,  305,  296,  295,  304,  305,  296,  295, 
+ 358,  359,  350,  349,  358,  359,  350,  349,  412,  413,  404,  403, 
+ 412,  413,  404,  403,  466,  467,  458,  457,  466,  467,  458,  457, 
+ 520,  521,  512,  511,  520,  521,  512,  511,  574,  575,  566,  565, 
+ 574,  575,  566,  565,  628,  629,  620,  619,  628,  629,  620,  619, 
+ 682,  683,  674,  673,  682,  683,  674,  673,  736,  737,  728,  727, 
+ 736,  737,  728,  727,  790,  791,  782,  781,  790,  791,  782,  781, 
+ 844,  845,  836,  835,  844,  845,  836,  835,  898,  899,  890,  889, 
+ 898,  899,  890,  889,  952,  953,  944,  943,  952,  953,  944,  943, 
+1006, 1007,  998,  997, 1006, 1007,  998,  997, 1060, 1061, 1052, 1051, 
+1060, 1061, 1052, 1051,   34,   35,   26,   25,   43,   44,   35,   34, 
+  97,   98,   89,   88,   97,   98,   89,   88,  151,  152,  143,  142, 
+ 151,  152,  143,  142,  205,  206,  197,  196,  205,  206,  197,  196, 
+ 259,  260,  251,  250,  259,  260,  251,  250,  313,  314,  305,  304, 
+ 313,  314,  305,  304,  367,  368,  359,  358,  367,  368,  359,  358, 
+ 421,  422,  413,  412,  421,  422,  413,  412,  475,  476,  467,  466, 
+ 475,  476,  467,  466,  529,  530,  521,  520,  529,  530,  521,  520, 
+ 583,  584,  575,  574,  583,  584,  575,  574,  637,  638,  629,  628, 
+ 637,  638,  629,  628,  691,  692,  683,  682,  691,  692,  683,  682, 
+ 745,  746,  737,  736,  745,  746,  737,  736,  799,  800,  791,  790, 
+ 799,  800,  791,  790,  853,  854,  845,  844,  853,  854,  845,  844, 
+ 907,  908,  899,  898,  907,  908,  899,  898,  961,  962,  953,  952, 
+ 961,  962,  953,  952, 1015, 1016, 1007, 1006, 1015, 1016, 1007, 1006, 
+1069, 1070, 1061, 1060, 1069, 1070, 1061, 1060,   43,   44,   35,   34, 
+  52,   53,   44,   43,  106,  107,   98,   97,  106,  107,   98,   97, 
+ 160,  161,  152,  151,  160,  161,  152,  151,  214,  215,  206,  205, 
+ 214,  215,  206,  205,  268,  269,  260,  259,  268,  269,  260,  259, 
+ 322,  323,  314,  313,  322,  323,  314,  313,  376,  377,  368,  367, 
+ 376,  377,  368,  367,  430,  431,  422,  421,  430,  431,  422,  421, 
+ 484,  485,  476,  475,  484,  485,  476,  475,  538,  539,  530,  529, 
+ 538,  539,  530,  529,  592,  593,  584,  583,  592,  593,  584,  583, 
+ 646,  647,  638,  637,  646,  647,  638,  637,  700,  701,  692,  691, 
+ 700,  701,  692,  691,  754,  755,  746,  745,  754,  755,  746,  745, 
+ 808,  809,  800,  799,  808,  809,  800,  799,  862,  863,  854,  853, 
+ 862,  863,  854,  853,  916,  917,  908,  907,  916,  917,  908,  907, 
+ 970,  971,  962,  961,  970,  971,  962,  961, 1024, 1025, 1016, 1015, 
+1024, 1025, 1016, 1015, 1078, 1079, 1070, 1069, 1078, 1079, 1070, 1069, 
+  52,   53,   44,   43,   61,   62,   53,   52,  115,  116,  107,  106, 
+ 115,  116,  107,  106,  169,  170,  161,  160,  169,  170,  161,  160, 
+ 223,  224,  215,  214,  223,  224,  215,  214,  277,  278,  269,  268, 
+ 277,  278,  269,  268,  331,  332,  323,  322,  331,  332,  323,  322, 
+ 385,  386,  377,  376,  385,  386,  377,  376,  439,  440,  431,  430, 
+ 439,  440,  431,  430,  493,  494,  485,  484,  493,  494,  485,  484, 
+ 547,  548,  539,  538,  547,  548,  539,  538,  601,  602,  593,  592, 
+ 601,  602,  593,  592,  655,  656,  647,  646,  655,  656,  647,  646, 
+ 709,  710,  701,  700,  709,  710,  701,  700,  763,  764,  755,  754, 
+ 763,  764,  755,  754,  817,  818,  809,  808,  817,  818,  809,  808, 
+ 871,  872,  863,  862,  871,  872,  863,  862,  925,  926,  917,  916, 
+ 925,  926,  917,  916,  979,  980,  971,  970,  979,  980,  971,  970, 
+1033, 1034, 1025, 1024, 1033, 1034, 1025, 1024, 1087, 1088, 1079, 1078, 
+1087, 1088, 1079, 1078,   61,   62,   53,   52,   26,   27,   18,   17, 
+  80,   81,   72,   71,   80,   81,   72,   71,  134,  135,  126,  125, 
+ 134,  135,  126,  125,  188,  189,  180,  179,  188,  189,  180,  179, 
+ 242,  243,  234,  233,  242,  243,  234,  233,  296,  297,  288,  287, 
+ 296,  297,  288,  287,  350,  351,  342,  341,  350,  351,  342,  341, 
+ 404,  405,  396,  395,  404,  405,  396,  395,  458,  459,  450,  449, 
+ 458,  459,  450,  449,  512,  513,  504,  503,  512,  513,  504,  503, 
+ 566,  567,  558,  557,  566,  567,  558,  557,  620,  621,  612,  611, 
+ 620,  621,  612,  611,  674,  675,  666,  665,  674,  675,  666,  665, 
+ 728,  729,  720,  719,  728,  729,  720,  719,  782,  783,  774,  773, 
+ 782,  783,  774,  773,  836,  837,  828,  827,  836,  837,  828,  827, 
+ 890,  891,  882,  881,  890,  891,  882,  881,  944,  945,  936,  935, 
+ 944,  945,  936,  935,  998,  999,  990,  989,  998,  999,  990,  989, 
+1052, 1053, 1044, 1043, 1052, 1053, 1044, 1043,   26,   27,   18,   17, 
+  35,   36,   27,   26,   89,   90,   81,   80,   89,   90,   81,   80, 
+ 143,  144,  135,  134,  143,  144,  135,  134,  197,  198,  189,  188, 
+ 197,  198,  189,  188,  251,  252,  243,  242,  251,  252,  243,  242, 
+ 305,  306,  297,  296,  305,  306,  297,  296,  359,  360,  351,  350, 
+ 359,  360,  351,  350,  413,  414,  405,  404,  413,  414,  405,  404, 
+ 467,  468,  459,  458,  467,  468,  459,  458,  521,  522,  513,  512, 
+ 521,  522,  513,  512,  575,  576,  567,  566,  575,  576,  567,  566, 
+ 629,  630,  621,  620,  629,  630,  621,  620,  683,  684,  675,  674, 
+ 683,  684,  675,  674,  737,  738,  729,  728,  737,  738,  729,  728, 
+ 791,  792,  783,  782,  791,  792,  783,  782,  845,  846,  837,  836, 
+ 845,  846,  837,  836,  899,  900,  891,  890,  899,  900,  891,  890, 
+ 953,  954,  945,  944,  953,  954,  945,  944, 1007, 1008,  999,  998, 
+1007, 1008,  999,  998, 1061, 1062, 1053, 1052, 1061, 1062, 1053, 1052, 
+  35,   36,   27,   26,   44,   45,   36,   35,   98,   99,   90,   89, 
+  98,   99,   90,   89,  152,  153,  144,  143,  152,  153,  144,  143, 
+ 206,  207,  198,  197,  206,  207,  198,  197,  260,  261,  252,  251, 
+ 260,  261,  252,  251,  314,  315,  306,  305,  314,  315,  306,  305, 
+ 368,  369,  360,  359,  368,  369,  360,  359,  422,  423,  414,  413, 
+ 422,  423,  414,  413,  476,  477,  468,  467,  476,  477,  468,  467, 
+ 530,  531,  522,  521,  530,  531,  522,  521,  584,  585,  576,  575, 
+ 584,  585,  576,  575,  638,  639,  630,  629,  638,  639,  630,  629, 
+ 692,  693,  684,  683,  692,  693,  684,  683,  746,  747,  738,  737, 
+ 746,  747,  738,  737,  800,  801,  792,  791,  800,  801,  792,  791, 
+ 854,  855,  846,  845,  854,  855,  846,  845,  908,  909,  900,  899, 
+ 908,  909,  900,  899,  962,  963,  954,  953,  962,  963,  954,  953, 
+1016, 1017, 1008, 1007, 1016, 1017, 1008, 1007, 1070, 1071, 1062, 1061, 
+1070, 1071, 1062, 1061,   44,   45,   36,   35,   53,   54,   45,   44, 
+ 107,  108,   99,   98,  107,  108,   99,   98,  161,  162,  153,  152, 
+ 161,  162,  153,  152,  215,  216,  207,  206,  215,  216,  207,  206, 
+ 269,  270,  261,  260,  269,  270,  261,  260,  323,  324,  315,  314, 
+ 323,  324,  315,  314,  377,  378,  369,  368,  377,  378,  369,  368, 
+ 431,  432,  423,  422,  431,  432,  423,  422,  485,  486,  477,  476, 
+ 485,  486,  477,  476,  539,  540,  531,  530,  539,  540,  531,  530, 
+ 593,  594,  585,  584,  593,  594,  585,  584,  647,  648,  639,  638, 
+ 647,  648,  639,  638,  701,  702,  693,  692,  701,  702,  693,  692, 
+ 755,  756,  747,  746,  755,  756,  747,  746,  809,  810,  801,  800, 
+ 809,  810,  801,  800,  863,  864,  855,  854,  863,  864,  855,  854, 
+ 917,  918,  909,  908,  917,  918,  909,  908,  971,  972,  963,  962, 
+ 971,  972,  963,  962, 1025, 1026, 1017, 1016, 1025, 1026, 1017, 1016, 
+1079, 1080, 1071, 1070, 1079, 1080, 1071, 1070,   53,   54,   45,   44, 
+  62,   63,   54,   53,  116,  117,  108,  107,  116,  117,  108,  107, 
+ 170,  171,  162,  161,  170,  171,  162,  161,  224,  225,  216,  215, 
+ 224,  225,  216,  215,  278,  279,  270,  269,  278,  279,  270,  269, 
+ 332,  333,  324,  323,  332,  333,  324,  323,  386,  387,  378,  377, 
+ 386,  387,  378,  377,  440,  441,  432,  431,  440,  441,  432,  431, 
+ 494,  495,  486,  485,  494,  495,  486,  485,  548,  549,  540,  539, 
+ 548,  549,  540,  539,  602,  603,  594,  593,  602,  603,  594,  593, 
+ 656,  657,  648,  647,  656,  657,  648,  647,  710,  711,  702,  701, 
+ 710,  711,  702,  701,  764,  765,  756,  755,  764,  765,  756,  755, 
+ 818,  819,  810,  809,  818,  819,  810,  809,  872,  873,  864,  863, 
+ 872,  873,  864,  863,  926,  927,  918,  917,  926,  927,  918,  917, 
+ 980,  981,  972,  971,  980,  981,  972,  971, 1034, 1035, 1026, 1025, 
+1034, 1035, 1026, 1025, 1088, 1089, 1080, 1079, 1088, 1089, 1080, 1079, 
+  62,   63,   54,   53,   27,   28,   19,   18,   81,   82,   73,   72, 
+  81,   82,   73,   72,  135,  136,  127,  126,  135,  136,  127,  126, 
+ 189,  190,  181,  180,  189,  190,  181,  180,  243,  244,  235,  234, 
+ 243,  244,  235,  234,  297,  298,  289,  288,  297,  298,  289,  288, 
+ 351,  352,  343,  342,  351,  352,  343,  342,  405,  406,  397,  396, 
+ 405,  406,  397,  396,  459,  460,  451,  450,  459,  460,  451,  450, 
+ 513,  514,  505,  504,  513,  514,  505,  504,  567,  568,  559,  558, 
+ 567,  568,  559,  558,  621,  622,  613,  612,  621,  622,  613,  612, 
+ 675,  676,  667,  666,  675,  676,  667,  666,  729,  730,  721,  720, 
+ 729,  730,  721,  720,  783,  784,  775,  774,  783,  784,  775,  774, 
+ 837,  838,  829,  828,  837,  838,  829,  828,  891,  892,  883,  882, 
+ 891,  892,  883,  882,  945,  946,  937,  936,  945,  946,  937,  936, 
+ 999, 1000,  991,  990,  999, 1000,  991,  990, 1053, 1054, 1045, 1044, 
+1053, 1054, 1045, 1044,   27,   28,   19,   18,   36,   37,   28,   27, 
+  90,   91,   82,   81,   90,   91,   82,   81,  144,  145,  136,  135, 
+ 144,  145,  136,  135,  198,  199,  190,  189,  198,  199,  190,  189, 
+ 252,  253,  244,  243,  252,  253,  244,  243,  306,  307,  298,  297, 
+ 306,  307,  298,  297,  360,  361,  352,  351,  360,  361,  352,  351, 
+ 414,  415,  406,  405,  414,  415,  406,  405,  468,  469,  460,  459, 
+ 468,  469,  460,  459,  522,  523,  514,  513,  522,  523,  514,  513, 
+ 576,  577,  568,  567,  576,  577,  568,  567,  630,  631,  622,  621, 
+ 630,  631,  622,  621,  684,  685,  676,  675,  684,  685,  676,  675, 
+ 738,  739,  730,  729,  738,  739,  730,  729,  792,  793,  784,  783, 
+ 792,  793,  784,  783,  846,  847,  838,  837,  846,  847,  838,  837, 
+ 900,  901,  892,  891,  900,  901,  892,  891,  954,  955,  946,  945, 
+ 954,  955,  946,  945, 1008, 1009, 1000,  999, 1008, 1009, 1000,  999, 
+1062, 1063, 1054, 1053, 1062, 1063, 1054, 1053,   36,   37,   28,   27, 
+  45,   46,   37,   36,   99,  100,   91,   90,   99,  100,   91,   90, 
+ 153,  154,  145,  144,  153,  154,  145,  144,  207,  208,  199,  198, 
+ 207,  208,  199,  198,  261,  262,  253,  252,  261,  262,  253,  252, 
+ 315,  316,  307,  306,  315,  316,  307,  306,  369,  370,  361,  360, 
+ 369,  370,  361,  360,  423,  424,  415,  414,  423,  424,  415,  414, 
+ 477,  478,  469,  468,  477,  478,  469,  468,  531,  532,  523,  522, 
+ 531,  532,  523,  522,  585,  586,  577,  576,  585,  586,  577,  576, 
+ 639,  640,  631,  630,  639,  640,  631,  630,  693,  694,  685,  684, 
+ 693,  694,  685,  684,  747,  748,  739,  738,  747,  748,  739,  738, 
+ 801,  802,  793,  792,  801,  802,  793,  792,  855,  856,  847,  846, 
+ 855,  856,  847,  846,  909,  910,  901,  900,  909,  910,  901,  900, 
+ 963,  964,  955,  954,  963,  964,  955,  954, 1017, 1018, 1009, 1008, 
+1017, 1018, 1009, 1008, 1071, 1072, 1063, 1062, 1071, 1072, 1063, 1062, 
+  45,   46,   37,   36,   54,   55,   46,   45,  108,  109,  100,   99, 
+ 108,  109,  100,   99,  162,  163,  154,  153,  162,  163,  154,  153, 
+ 216,  217,  208,  207,  216,  217,  208,  207,  270,  271,  262,  261, 
+ 270,  271,  262,  261,  324,  325,  316,  315,  324,  325,  316,  315, 
+ 378,  379,  370,  369,  378,  379,  370,  369,  432,  433,  424,  423, 
+ 432,  433,  424,  423,  486,  487,  478,  477,  486,  487,  478,  477, 
+ 540,  541,  532,  531,  540,  541,  532,  531,  594,  595,  586,  585, 
+ 594,  595,  586,  585,  648,  649,  640,  639,  648,  649,  640,  639, 
+ 702,  703,  694,  693,  702,  703,  694,  693,  756,  757,  748,  747, 
+ 756,  757,  748,  747,  810,  811,  802,  801,  810,  811,  802,  801, 
+ 864,  865,  856,  855,  864,  865,  856,  855,  918,  919,  910,  909, 
+ 918,  919,  910,  909,  972,  973,  964,  963,  972,  973,  964,  963, 
+1026, 1027, 1018, 1017, 1026, 1027, 1018, 1017, 1080, 1081, 1072, 1071, 
+1080, 1081, 1072, 1071,   54,   55,   46,   45,   63,   64,   55,   54, 
+ 117,  118,  109,  108,  117,  118,  109,  108,  171,  172,  163,  162, 
+ 171,  172,  163,  162,  225,  226,  217,  216,  225,  226,  217,  216, 
+ 279,  280,  271,  270,  279,  280,  271,  270,  333,  334,  325,  324, 
+ 333,  334,  325,  324,  387,  388,  379,  378,  387,  388,  379,  378, 
+ 441,  442,  433,  432,  441,  442,  433,  432,  495,  496,  487,  486, 
+ 495,  496,  487,  486,  549,  550,  541,  540,  549,  550,  541,  540, 
+ 603,  604,  595,  594,  603,  604,  595,  594,  657,  658,  649,  648, 
+ 657,  658,  649,  648,  711,  712,  703,  702,  711,  712,  703,  702, 
+ 765,  766,  757,  756,  765,  766,  757,  756,  819,  820,  811,  810, 
+ 819,  820,  811,  810,  873,  874,  865,  864,  873,  874,  865,  864, 
+ 927,  928,  919,  918,  927,  928,  919,  918,  981,  982,  973,  972, 
+ 981,  982,  973,  972, 1035, 1036, 1027, 1026, 1035, 1036, 1027, 1026, 
+1089, 1090, 1081, 1080, 1089, 1090, 1081, 1080,   63,   64,   55,   54, 
+  28,   29,   20,   19,   82,   83,   74,   73,   82,   83,   74,   73, 
+ 136,  137,  128,  127,  136,  137,  128,  127,  190,  191,  182,  181, 
+ 190,  191,  182,  181,  244,  245,  236,  235,  244,  245,  236,  235, 
+ 298,  299,  290,  289,  298,  299,  290,  289,  352,  353,  344,  343, 
+ 352,  353,  344,  343,  406,  407,  398,  397,  406,  407,  398,  397, 
+ 460,  461,  452,  451,  460,  461,  452,  451,  514,  515,  506,  505, 
+ 514,  515,  506,  505,  568,  569,  560,  559,  568,  569,  560,  559, 
+ 622,  623,  614,  613,  622,  623,  614,  613,  676,  677,  668,  667, 
+ 676,  677,  668,  667,  730,  731,  722,  721,  730,  731,  722,  721, 
+ 784,  785,  776,  775,  784,  785,  776,  775,  838,  839,  830,  829, 
+ 838,  839,  830,  829,  892,  893,  884,  883,  892,  893,  884,  883, 
+ 946,  947,  938,  937,  946,  947,  938,  937, 1000, 1001,  992,  991, 
+1000, 1001,  992,  991, 1054, 1055, 1046, 1045, 1054, 1055, 1046, 1045, 
+  28,   29,   20,   19,   37,   38,   29,   28,   91,   92,   83,   82, 
+  91,   92,   83,   82,  145,  146,  137,  136,  145,  146,  137,  136, 
+ 199,  200,  191,  190,  199,  200,  191,  190,  253,  254,  245,  244, 
+ 253,  254,  245,  244,  307,  308,  299,  298,  307,  308,  299,  298, 
+ 361,  362,  353,  352,  361,  362,  353,  352,  415,  416,  407,  406, 
+ 415,  416,  407,  406,  469,  470,  461,  460,  469,  470,  461,  460, 
+ 523,  524,  515,  514,  523,  524,  515,  514,  577,  578,  569,  568, 
+ 577,  578,  569,  568,  631,  632,  623,  622,  631,  632,  623,  622, 
+ 685,  686,  677,  676,  685,  686,  677,  676,  739,  740,  731,  730, 
+ 739,  740,  731,  730,  793,  794,  785,  784,  793,  794,  785,  784, 
+ 847,  848,  839,  838,  847,  848,  839,  838,  901,  902,  893,  892, 
+ 901,  902,  893,  892,  955,  956,  947,  946,  955,  956,  947,  946, 
+1009, 1010, 1001, 1000, 1009, 1010, 1001, 1000, 1063, 1064, 1055, 1054, 
+1063, 1064, 1055, 1054,   37,   38,   29,   28,   46,   47,   38,   37, 
+ 100,  101,   92,   91,  100,  101,   92,   91,  154,  155,  146,  145, 
+ 154,  155,  146,  145,  208,  209,  200,  199,  208,  209,  200,  199, 
+ 262,  263,  254,  253,  262,  263,  254,  253,  316,  317,  308,  307, 
+ 316,  317,  308,  307,  370,  371,  362,  361,  370,  371,  362,  361, 
+ 424,  425,  416,  415,  424,  425,  416,  415,  478,  479,  470,  469, 
+ 478,  479,  470,  469,  532,  533,  524,  523,  532,  533,  524,  523, 
+ 586,  587,  578,  577,  586,  587,  578,  577,  640,  641,  632,  631, 
+ 640,  641,  632,  631,  694,  695,  686,  685,  694,  695,  686,  685, 
+ 748,  749,  740,  739,  748,  749,  740,  739,  802,  803,  794,  793, 
+ 802,  803,  794,  793,  856,  857,  848,  847,  856,  857,  848,  847, 
+ 910,  911,  902,  901,  910,  911,  902,  901,  964,  965,  956,  955, 
+ 964,  965,  956,  955, 1018, 1019, 1010, 1009, 1018, 1019, 1010, 1009, 
+1072, 1073, 1064, 1063, 1072, 1073, 1064, 1063,   46,   47,   38,   37, 
+  55,   56,   47,   46,  109,  110,  101,  100,  109,  110,  101,  100, 
+ 163,  164,  155,  154,  163,  164,  155,  154,  217,  218,  209,  208, 
+ 217,  218,  209,  208,  271,  272,  263,  262,  271,  272,  263,  262, 
+ 325,  326,  317,  316,  325,  326,  317,  316,  379,  380,  371,  370, 
+ 379,  380,  371,  370,  433,  434,  425,  424,  433,  434,  425,  424, 
+ 487,  488,  479,  478,  487,  488,  479,  478,  541,  542,  533,  532, 
+ 541,  542,  533,  532,  595,  596,  587,  586,  595,  596,  587,  586, 
+ 649,  650,  641,  640,  649,  650,  641,  640,  703,  704,  695,  694, 
+ 703,  704,  695,  694,  757,  758,  749,  748,  757,  758,  749,  748, 
+ 811,  812,  803,  802,  811,  812,  803,  802,  865,  866,  857,  856, 
+ 865,  866,  857,  856,  919,  920,  911,  910,  919,  920,  911,  910, 
+ 973,  974,  965,  964,  973,  974,  965,  964, 1027, 1028, 1019, 1018, 
+1027, 1028, 1019, 1018, 1081, 1082, 1073, 1072, 1081, 1082, 1073, 1072, 
+  55,   56,   47,   46,   64,   65,   56,   55,  118,  119,  110,  109, 
+ 118,  119,  110,  109,  172,  173,  164,  163,  172,  173,  164,  163, 
+ 226,  227,  218,  217,  226,  227,  218,  217,  280,  281,  272,  271, 
+ 280,  281,  272,  271,  334,  335,  326,  325,  334,  335,  326,  325, 
+ 388,  389,  380,  379,  388,  389,  380,  379,  442,  443,  434,  433, 
+ 442,  443,  434,  433,  496,  497,  488,  487,  496,  497,  488,  487, 
+ 550,  551,  542,  541,  550,  551,  542,  541,  604,  605,  596,  595, 
+ 604,  605,  596,  595,  658,  659,  650,  649,  658,  659,  650,  649, 
+ 712,  713,  704,  703,  712,  713,  704,  703,  766,  767,  758,  757, 
+ 766,  767,  758,  757,  820,  821,  812,  811,  820,  821,  812,  811, 
+ 874,  875,  866,  865,  874,  875,  866,  865,  928,  929,  920,  919, 
+ 928,  929,  920,  919,  982,  983,  974,  973,  982,  983,  974,  973, 
+1036, 1037, 1028, 1027, 1036, 1037, 1028, 1027, 1090, 1091, 1082, 1081, 
+1090, 1091, 1082, 1081,   64,   65,   56,   55,   29,   30,   21,   20, 
+  83,   84,   75,   74,   83,   84,   75,   74,  137,  138,  129,  128, 
+ 137,  138,  129,  128,  191,  192,  183,  182,  191,  192,  183,  182, 
+ 245,  246,  237,  236,  245,  246,  237,  236,  299,  300,  291,  290, 
+ 299,  300,  291,  290,  353,  354,  345,  344,  353,  354,  345,  344, 
+ 407,  408,  399,  398,  407,  408,  399,  398,  461,  462,  453,  452, 
+ 461,  462,  453,  452,  515,  516,  507,  506,  515,  516,  507,  506, 
+ 569,  570,  561,  560,  569,  570,  561,  560,  623,  624,  615,  614, 
+ 623,  624,  615,  614,  677,  678,  669,  668,  677,  678,  669,  668, 
+ 731,  732,  723,  722,  731,  732,  723,  722,  785,  786,  777,  776, 
+ 785,  786,  777,  776,  839,  840,  831,  830,  839,  840,  831,  830, 
+ 893,  894,  885,  884,  893,  894,  885,  884,  947,  948,  939,  938, 
+ 947,  948,  939,  938, 1001, 1002,  993,  992, 1001, 1002,  993,  992, 
+1055, 1056, 1047, 1046, 1055, 1056, 1047, 1046,   29,   30,   21,   20, 
+  38,   39,   30,   29,   92,   93,   84,   83,   92,   93,   84,   83, 
+ 146,  147,  138,  137,  146,  147,  138,  137,  200,  201,  192,  191, 
+ 200,  201,  192,  191,  254,  255,  246,  245,  254,  255,  246,  245, 
+ 308,  309,  300,  299,  308,  309,  300,  299,  362,  363,  354,  353, 
+ 362,  363,  354,  353,  416,  417,  408,  407,  416,  417,  408,  407, 
+ 470,  471,  462,  461,  470,  471,  462,  461,  524,  525,  516,  515, 
+ 524,  525,  516,  515,  578,  579,  570,  569,  578,  579,  570,  569, 
+ 632,  633,  624,  623,  632,  633,  624,  623,  686,  687,  678,  677, 
+ 686,  687,  678,  677,  740,  741,  732,  731,  740,  741,  732,  731, 
+ 794,  795,  786,  785,  794,  795,  786,  785,  848,  849,  840,  839, 
+ 848,  849,  840,  839,  902,  903,  894,  893,  902,  903,  894,  893, 
+ 956,  957,  948,  947,  956,  957,  948,  947, 1010, 1011, 1002, 1001, 
+1010, 1011, 1002, 1001, 1064, 1065, 1056, 1055, 1064, 1065, 1056, 1055, 
+  38,   39,   30,   29,   47,   48,   39,   38,  101,  102,   93,   92, 
+ 101,  102,   93,   92,  155,  156,  147,  146,  155,  156,  147,  146, 
+ 209,  210,  201,  200,  209,  210,  201,  200,  263,  264,  255,  254, 
+ 263,  264,  255,  254,  317,  318,  309,  308,  317,  318,  309,  308, 
+ 371,  372,  363,  362,  371,  372,  363,  362,  425,  426,  417,  416, 
+ 425,  426,  417,  416,  479,  480,  471,  470,  479,  480,  471,  470, 
+ 533,  534,  525,  524,  533,  534,  525,  524,  587,  588,  579,  578, 
+ 587,  588,  579,  578,  641,  642,  633,  632,  641,  642,  633,  632, 
+ 695,  696,  687,  686,  695,  696,  687,  686,  749,  750,  741,  740, 
+ 749,  750,  741,  740,  803,  804,  795,  794,  803,  804,  795,  794, 
+ 857,  858,  849,  848,  857,  858,  849,  848,  911,  912,  903,  902, 
+ 911,  912,  903,  902,  965,  966,  957,  956,  965,  966,  957,  956, 
+1019, 1020, 1011, 1010, 1019, 1020, 1011, 1010, 1073, 1074, 1065, 1064, 
+1073, 1074, 1065, 1064,   47,   48,   39,   38,   56,   57,   48,   47, 
+ 110,  111,  102,  101,  110,  111,  102,  101,  164,  165,  156,  155, 
+ 164,  165,  156,  155,  218,  219,  210,  209,  218,  219,  210,  209, 
+ 272,  273,  264,  263,  272,  273,  264,  263,  326,  327,  318,  317, 
+ 326,  327,  318,  317,  380,  381,  372,  371,  380,  381,  372,  371, 
+ 434,  435,  426,  425,  434,  435,  426,  425,  488,  489,  480,  479, 
+ 488,  489,  480,  479,  542,  543,  534,  533,  542,  543,  534,  533, 
+ 596,  597,  588,  587,  596,  597,  588,  587,  650,  651,  642,  641, 
+ 650,  651,  642,  641,  704,  705,  696,  695,  704,  705,  696,  695, 
+ 758,  759,  750,  749,  758,  759,  750,  749,  812,  813,  804,  803, 
+ 812,  813,  804,  803,  866,  867,  858,  857,  866,  867,  858,  857, 
+ 920,  921,  912,  911,  920,  921,  912,  911,  974,  975,  966,  965, 
+ 974,  975,  966,  965, 1028, 1029, 1020, 1019, 1028, 1029, 1020, 1019, 
+1082, 1083, 1074, 1073, 1082, 1083, 1074, 1073,   56,   57,   48,   47, 
+  65,   66,   57,   56,  119,  120,  111,  110,  119,  120,  111,  110, 
+ 173,  174,  165,  164,  173,  174,  165,  164,  227,  228,  219,  218, 
+ 227,  228,  219,  218,  281,  282,  273,  272,  281,  282,  273,  272, 
+ 335,  336,  327,  326,  335,  336,  327,  326,  389,  390,  381,  380, 
+ 389,  390,  381,  380,  443,  444,  435,  434,  443,  444,  435,  434, 
+ 497,  498,  489,  488,  497,  498,  489,  488,  551,  552,  543,  542, 
+ 551,  552,  543,  542,  605,  606,  597,  596,  605,  606,  597,  596, 
+ 659,  660,  651,  650,  659,  660,  651,  650,  713,  714,  705,  704, 
+ 713,  714,  705,  704,  767,  768,  759,  758,  767,  768,  759,  758, 
+ 821,  822,  813,  812,  821,  822,  813,  812,  875,  876,  867,  866, 
+ 875,  876,  867,  866,  929,  930,  921,  920,  929,  930,  921,  920, 
+ 983,  984,  975,  974,  983,  984,  975,  974, 1037, 1038, 1029, 1028, 
+1037, 1038, 1029, 1028, 1091, 1092, 1083, 1082, 1091, 1092, 1083, 1082, 
+  65,   66,   57,   56, 
+};
+
+int       matlist[1200];
+double    u[1093];
+double    v[1093];
+double    w[1093];
+double    t[1200];      /* Zone-centered */
+
+/***********************************************************************
+ *
+ * Purpose:  Test the DBCalcExternalFacelist routine with all the
+ *           ucd shapes.
+ *
+ * Programmer:  Eric Brugger
+ * Date:        January 8, 1996
+ *
+ * Input arguments:
+ *
+ * Output arguments:
+ *
+ * Input/Output arguments:
+ *
+ * Notes:
+ *
+ * Modifications:
+ *    Eric Brugger, Thu Jan 11 11:56:29 PST 1996
+ *    I modified the routine to also create some scalars.
+ *
+ *    Sean Ahern, Tue Mar 31 17:47:24 PST 1998
+ *    Changed the globe coordinates and varibles to type double.
+ *
+ *    Sean Ahern, Tue Mar 31 17:51:44 PST 1998
+ *    Reformatted whitespace.
+ *
+ *    Robb Matzke, 1999-04-09
+ *    Added argument parsing to control the driver which is used.
+ *
+ *    Jeremy Meredith, Thu Mar 23 13:25:12 PST 2000
+ *    The prisms were backwards.  I flipped them (above in the nodelist).
+ *
+ **********************************************************************/
+int
+main(int argc, char *argv[])
+{
+    int             i, j, k;
+    int             mat;
+    int             cycle = 0;
+    float           time = 0.;
+    int             nzones = 1200;
+    int             nnodes = 1093;
+    int             ndims = 3;
+    int             lznodelist = 8560;
+    int             origin = 0;
+    int             nzshapes = 4;
+    int             zshapecnt[4] = {40, 200, 160, 800};
+    int             zshapesize[4] = {4, 6, 5, 8};
+    char           *coordnames[3] = {"xcoords", "ycoords", "zcoords"};
+    int             dims[3] = {1200, 1, 1};
+    int             nmat = 4;
+    int             matnos[4] = {1, 2, 3, 4};
+    DBfile         *dbfile;
+    DBfacelist     *fl;
+    DBoptlist      *optlist;
+    double         *coords[3];
+    char	   *filename = "globe.pdb";
+    int		    driver = DB_PDB;
+    int             show_all_errors = FALSE;
+    char **matnames;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB",6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "globe.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "globe.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    DBSetDeprecateWarnings(0);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                      "unstructured mesh of globe", driver);
+
+    /* 
+     * Create the velocity component arrays.
+     */
+    for (i = 0; i < 1093; i++)
+    {
+        u[i] = coord1[i];
+        v[i] = -coord0[i];
+        w[i] = 0.;
+    }
+
+    /* 
+     * Create a material array where each shape type is a different
+     * material.
+     */
+    k = 0;
+    for (i = 0; i < nzshapes; i++)
+    {
+        switch (zshapesize[i])
+        {
+        case 4:
+            mat = 1;
+            break;
+        case 5:
+            mat = 2;
+            break;
+        case 6:
+            mat = 3;
+            break;
+        case 8:
+            mat = 4;
+            break;
+        default:
+            mat = 4;
+            break;
+        }
+        for (j = 0; j < zshapecnt[i]; j++)
+            matlist[k++] = mat;
+    }
+
+    i = 30;
+    DBWrite(dbfile, "_meshtvinfo", "mesh mesh1;pseudocolor u",
+            &i, 1, DB_CHAR);
+    i = 50;
+    DBWrite(dbfile, "_meshtv_defvars",
+            "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+            &i, 1, DB_CHAR);
+
+    /* 
+     * Create a zonelist that describes a mesh that looks like a
+     * globe and then call DBCalcExternalFacelist to calculate
+     * the face list that goes with it.
+     */
+    DBPutZonelist(dbfile, "zl", nzones, ndims, znodelist, lznodelist, origin,
+                  zshapesize, zshapecnt, nzshapes);
+
+    fl = DBCalcExternalFacelist(znodelist, nnodes, origin, zshapesize,
+                                zshapecnt, nzshapes, matlist, 1);
+
+    DBPutFacelist(dbfile, "fl", fl->nfaces, fl->ndims, fl->nodelist,
+                  fl->lnodelist, fl->origin, fl->zoneno, fl->shapesize,
+                  fl->shapecnt, fl->nshapes, fl->types, fl->typelist,
+                  fl->ntypes);
+
+    DBFreeFacelist(fl);
+
+    coords[0] = coord0;
+    coords[1] = coord1;
+    coords[2] = coord2;
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+
+    for(i=0;i<1200;i++)
+    {
+        t[i] = i;
+    }
+
+    DBPutUcdmesh(dbfile, "mesh1", ndims, coordnames, (void *)coords, nnodes,
+                 nzones, "zl", "fl", DB_DOUBLE, optlist);
+
+    matnames = (char**)malloc(sizeof(char*)*4);
+    matnames[0] = strdup("Inner poles");
+    matnames[1] = strdup("Core");
+    matnames[2] = strdup("Outer poles");
+    matnames[3] = strdup("Mantle");
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+    DBPutMaterial(dbfile, "mat1", "mesh1", nmat, matnos, matlist, dims, ndims,
+                  NULL, NULL, NULL, NULL, 0, DB_FLOAT, optlist);
+
+    DBPutUcdvar1(dbfile, "u", "mesh1", (void *)u, nnodes, NULL, 0,
+                 DB_DOUBLE, DB_NODECENT, optlist);
+
+    DBPutUcdvar1(dbfile, "v", "mesh1", (void *)v, nnodes, NULL, 0,
+                 DB_DOUBLE, DB_NODECENT, optlist);
+
+    DBPutUcdvar1(dbfile, "w", "mesh1", (void *)w, nnodes, NULL, 0,
+                 DB_DOUBLE, DB_NODECENT, optlist);
+
+    DBPutUcdvar1(dbfile, "t", "mesh1", (void *)t, nzones, NULL, 0,
+                 DB_DOUBLE, DB_ZONECENT, optlist);
+
+    DBClose(dbfile);
+
+    DBFreeOptlist(optlist);
+    for (i = 0; i < 4; i++)
+        free(matnames[i]);
+    free(matnames);
+
+    CleanupDriverStuff();
+    return(0);
+}
diff --git a/tests/grab.c b/tests/grab.c
new file mode 100644
index 0000000..8b89b0a
--- /dev/null
+++ b/tests/grab.c
@@ -0,0 +1,311 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <math.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef WIN32
+#include <sys/time.h>
+#include <unistd.h>
+#endif
+#include <stdlib.h>
+#include "silo.h"
+
+#include "config.h"
+#ifdef HAVE_HDF5_H
+/* Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
+   in this file uses version 1.6 of the HDF5 API. This is harmless for
+   versions of HDF5 before 1.8 and ensures correct compilation with
+   version 1.8 and thereafter. When, and if, the HDF5 code in this file
+   is explicitly upgraded to the 1.8 API, this symbol should be removed. */
+#define H5_USE_16_API
+#include "hdf5.h"
+#endif
+
+#include <std.c>
+
+
+/*-------------------------------------------------------------------------
+ * Function:        main
+ *
+ * Purpose:        
+ *
+ * Return:        0
+ *
+ * Programmer:        
+ *      Thomas R. Treadway, Mon Mar 12 14:13:51 PDT 2007
+ *      Test of HDF5 grab.
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#undef NX
+#define NX 100
+#undef NY
+#define NY 10
+#undef NZ
+#define NZ 5
+#undef NT
+#define NT 70
+#undef DX
+#define DX 10.
+#undef DY
+#define DY 0.5
+#undef DZ
+#define DZ 5.
+#undef SPACE1_DIM1
+#define SPACE1_DIM1 4
+#undef SPACE1_RANK
+#define SPACE1_RANK 1
+#undef ARRAY1_DIM1
+#define ARRAY1_DIM1 4
+#undef ARRAY1_RANK
+#define ARRAY1_RANK 1
+
+#define  ALLOC_N(x,n)     (x *) calloc (n, sizeof (x))
+#define  FREE(x)          if ( (x) != NULL) {free(x);(x)=NULL;}
+
+int
+main(int argc, char *argv[])
+{
+    int            verbose = 0;
+    int            i, j, k, len, ndims;
+    int            driver=DB_HDF5;
+    char          *filename="grab.h5";
+    DBfile        *dbfile;
+    char           mesh_command[256];
+    int            dims[3];
+    char          *coordnames[3]={"x", "y", "z"};
+    float         *coords[3];
+    float         *xcoord;
+    float         *ycoord;
+    float         *zcoord;
+    float         *var;
+    float          widths[3];
+    int            show_all_errors = FALSE;
+    int type;
+
+#ifdef HAVE_HDF5_H
+    hid_t          sid1;       /* Dataspace ID                     */
+    hid_t          tid1;       /* Datatype ID                      */
+    hsize_t        sdims1[] = {SPACE1_DIM1};
+    hsize_t        tdims1[] = {ARRAY1_DIM1};
+    int wdata[SPACE1_DIM1][ARRAY1_DIM1];   /* Information to write */
+#endif
+
+    var = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    xcoord = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    ycoord = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    zcoord = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+       if (!strncmp(argv[i], "DB_PDB",6)) {
+          fprintf(stderr, "This test only supported on HDF5 driver\n");
+          exit(1);
+       } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+          driver = StringToDriver(argv[i]);
+          filename = "grab.h5";
+       } else if (!strcmp(argv[i], "verbose")) {
+          verbose = 1;
+       } else if (!strcmp(argv[i], "help")) {
+          printf("Usage: %s [verbose]\n", argv[0]);
+          printf("       verbose  - displays more feedback\n");
+          printf("       DB_PDB   - enable PDB driver, which doesn't support driver grab\n");
+          printf("       DB_HDF5  - enable HDF5 driver, the default\n");
+          return (0);
+       } else if (!strcmp(argv[i], "show-all-errors")) {
+          show_all_errors = 1;
+       } else if (argv[i][0] != '\0') {
+          fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+       }
+    }
+
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+    widths[0] = DX;
+    widths[1] = DY;
+    widths[2] = DZ;
+
+    /*
+     * Build the mesh and a variable.
+     */
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                double    x1, y1, z1;
+  
+                x1 = ((float)i / (float)NX) * widths[0];
+                y1 = ((float)j / (float)NY) * widths[1];
+                z1 = ((float)k / (float)NZ) * widths[2];
+
+                xcoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = x1;
+                ycoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = y1;
+                zcoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = z1;
+                var[i+j*(NX+1)+k*(NX+1)*(NY+1)] = x1+y1+z1;
+            }
+        }
+    }
+
+    coords[0] = xcoord;
+    coords[1] = ycoord;
+    coords[2] = zcoord;
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_TOP, NULL);
+
+      /*
+       * Create a file that contains a simple variables.
+       */
+      if (verbose)
+         printf("Creating file: `%s'\n", filename);
+      dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, 
+         "Native Driver I/O Test", driver);
+
+    DBPutQuadmesh(dbfile, "mesh", coordnames, coords, dims, ndims,
+        DB_FLOAT, DB_NONCOLLINEAR, NULL);
+    DBPutQuadvar1(dbfile, "foo", "mesh", var, dims, ndims,
+                             NULL, 0, DB_FLOAT, DB_NODECENT, NULL);
+    DBPutQuadvar1(dbfile, "bar", "mesh", var, dims, ndims,
+                             NULL, 0, DB_FLOAT, DB_NODECENT, NULL);
+
+#ifdef HAVE_HDF5_H
+  {
+    /*
+     * grab the HDF5 file handle
+     */
+    hid_t dset;
+    hid_t h5Grp;
+    hid_t silo_h5id = *((hid_t*)DBGrabDriver(dbfile));
+
+    /*
+     * This call will fail with E_GRABBED
+     */
+    sprintf(mesh_command, "mesh mesh; contour foo");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    /*
+     * Make a separate name space for driver-native work using
+     * driver-native interface
+     */
+    h5Grp = H5Gcreate(silo_h5id, "hdf5_native_data", 0);
+
+    /* Allocate and initialize array data to write */
+    for(i=0; i<SPACE1_DIM1; i++)
+        for(j=0; j<ARRAY1_DIM1; j++)
+            wdata[i][j]=i*10+j;
+    /* Create dataspace for datasets */
+    sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
+    /* Create a datatype to refer to */
+    tid1 = H5Tarray_create (H5T_NATIVE_INT,ARRAY1_RANK,tdims1,NULL);
+    /*
+     * Create and write a dataset in this group
+     */
+    dset = H5Dcreate(h5Grp, "dataset", tid1, sid1, H5P_DEFAULT);
+    H5Dwrite(dset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, var);
+    H5Dclose(dset);
+    /* Close datatype */
+    H5Tclose(tid1);
+    /* Close disk dataspace */
+    H5Sclose(sid1);
+
+    /*
+     * Close the group
+     */
+    H5Gclose(h5Grp);
+
+    /*
+     * Return control of native API to Silo
+     */
+    type = DBUngrabDriver(dbfile, (void *)&silo_h5id);
+    if (type != (driver&0xF))
+    {
+       printf("Wrong drive type returned from Ungrab\n");
+       return 1;
+    }
+  }
+#endif
+
+    /*
+     * Now this call will succeed
+     */
+    sprintf(mesh_command, "mesh mesh; contour bar");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    type = DBGetDriverTypeFromPath(filename);
+    if (type != (driver&0xF))
+    {
+       printf("Wrong drive type=%d returned from GetDriverTypeFromPath\n",
+       type);
+       return 1;
+    }
+
+    FREE(var);
+    FREE(xcoord);
+    FREE(ycoord);
+    FREE(zcoord);
+
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/group_test.c b/tests/group_test.c
new file mode 100644
index 0000000..a0a7d37
--- /dev/null
+++ b/tests/group_test.c
@@ -0,0 +1,1959 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*---------------------------------------------------------------------------
+ * group_test.c -- Multi-Group Test File Generator.
+ * 
+ * Programmed by Jeremy Meredith, May 21, 1999
+ *
+ * This test file creates multi-group (and necessarily multi_block) objects.
+ * It also allows testing of block, group, and zone/node origins.
+ *
+ *      multi_rect3d.pdb  - 36 blocks   (3 x 4 x 3)
+ *      multi_curv3d.pdb  - 36 blocks   (3 x 4 x 3)
+ *      multi_ucd3d.pdb   - 36 blocks   (3 x 4 x 3)
+ *
+ *-------------------------------------------------------------------------*/
+
+#include <ctype.h>
+#include <math.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <silo.h>
+#include <std.c>
+
+#define MAXBLOCKS       100           /* maximum number of blocks in an object   */
+#define STRLEN          60
+
+#define NX 30
+#define NY 40
+#define NZ 30
+
+#define MIN(x, y) (x) < (y) ? (x) : (y)
+#define MAX(x, y) (x) > (y) ? (x) : (y)
+
+#define ALLOC_N(T,N)            ((T*)calloc((N),sizeof(T)))
+#define FREE(M)         if(M){free(M);(M)=NULL;}
+
+int           build_multi(DBfile *, int, int, int, int, int, int);
+
+void          build_block_rect3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                 int);
+void          build_block_curv3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                 int);
+void          build_block_ucd3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                int);
+
+static void   fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz,
+                               int matno);
+static void   fill_rect3d_mat(float x[], float y[], float z[], int matlist[],
+                              int nx, int ny, int nz, int mix_next[],
+                              int mix_mat[], int mix_zone[], float mix_vf[],
+                              int *mixlen, int matno, double xcenter,
+                              double ycenter, double zcenter, double radius);
+
+int blockorigin;
+int grouporigin;
+int zoneorigin;
+
+/*-------------------------------------------------------------------------
+ * Function:    fill_rect3d_bkgr
+ *
+ * Purpose:     Fill the entire material array with the material "matno".
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Eric Brugger, 10/17/97
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+static void
+fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz, int matno)
+{
+    int       i, j, k;
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++) {
+                matlist[k * nx * ny + j * nx + i] = matno;
+            }
+        }
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    fill_rect3d_bkgr
+ *
+ * Purpose:     Fill the specified material array with sphere centered
+ *              at "xcenter", "ycenter", "zcenter" and radius of "radius"
+ *              with the material "matno".
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Eric Brugger, 10/17/97
+ *
+ * Modifications:
+ *     Sean Ahern, Thu Jul  2 17:02:18 PDT 1998
+ *     Fixed an indexing problem.
+ *
+ *------------------------------------------------------------------------*/
+static void
+fill_rect3d_mat(float x[], float y[], float z[], int matlist[], int nx,
+                int ny, int nz, int mix_next[], int mix_mat[], int mix_zone[],
+                float mix_vf[], int *mixlen, int matno, double xcenter,
+                double ycenter, double zcenter, double radius)
+{
+    int       i, j, k, l, m, n;
+    double    dist;
+    int       cnt;
+    int       mixlen2;
+    int       *itemp;
+    float     dx, dy, dz;
+    float     xx[10], yy[10], zz[10];
+
+    mixlen2 = *mixlen;
+
+    itemp = ALLOC_N (int, (nx + 1) * (ny + 1) * (nz + 1));
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++) {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                itemp[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] =
+                    (dist < radius) ? 1 : 0;
+            }
+        }
+    }
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++) {
+                cnt = itemp[(i) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k + 1] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k + 1] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k + 1] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k + 1];
+                if (cnt == 0) {
+                    /* EMPTY */
+                }
+                else if (cnt == 8) {
+                    matlist[i * nx * ny + j * nx + k] = matno;
+                }
+                else {
+                    dx = (x[i + 1] - x[i]) / 11.;
+                    dy = (y[j + 1] - y[j]) / 11.;
+                    dz = (z[k + 1] - z[k]) / 11.;
+                    for (l = 0; l < 10; l++) {
+                        xx[l] = x[i] + (dx / 2.) + (l * dx);
+                        yy[l] = y[j] + (dy / 2.) + (l * dy);
+                        zz[l] = z[k] + (dz / 2.) + (l * dz);
+                    }
+                    cnt = 0;
+                    for (l = 0; l < 10; l++) {
+                        for (m = 0; m < 10; m++) {
+                            for (n = 0; n < 10; n++) {
+                                dist = sqrt((xx[l] - xcenter) *
+                                            (xx[l] - xcenter) +
+                                            (yy[m] - ycenter) *
+                                            (yy[m] - ycenter) +
+                                            (zz[n] - zcenter) *
+                                            (zz[n] - zcenter));
+                                cnt += (dist < radius) ? 1 : 0;
+                            }
+                        }
+                    }
+                    matlist[i * nx * ny + j * nx + k] = -(mixlen2 + 1);
+                    mix_mat[mixlen2] = matno - 1;
+                    mix_mat[mixlen2 + 1] = matno;
+                    mix_next[mixlen2] = mixlen2 + 2;
+                    mix_next[mixlen2 + 1] = 0;
+                    mix_zone[mixlen2] = i * nx * ny + j * nx + k;
+                    mix_zone[mixlen2 + 1] = i * nx * ny + j * nx + k;
+                    mix_vf[mixlen2] = 1. - (((float)cnt) / 1000.);
+                    mix_vf[mixlen2 + 1] = ((float)cnt) / 1000.;
+                    mixlen2 += 2;
+                }
+            }
+        }
+    }
+
+    FREE (itemp);
+
+    *mixlen = mixlen2;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    usage
+ *
+ * Purpose:     Print a usage message and exit with non-zero status.
+ *
+ * Return:      never returns
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, July 14, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+usage(const char *progname)
+{
+    fprintf(stderr, "\
+Usage: %s <blockorigin> <grouporigin> <zoneorigin>\n\
+       One of the following symbols can also appear anywhere on the command\n\
+       line to indicate the file driver to use: DB_PDB (the default),\n\
+       or DB_HDF5.\n", progname);
+    
+    exit(1);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     Generate multi block test files.
+ *
+ * Return:      Success:
+ *              Failure:
+ *
+ * Programmer:  Jeremy Meredith, May 21, 1999
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-14
+ *              The file driver constant can also appear anywhere on the
+ *              command-line (one of the strings DB_PDB or DB_HDF5).
+ *------------------------------------------------------------------------*/
+int
+main(int argc, char *argv[])
+{
+    DBfile      *dbfile;
+    int         i, nnumbers=0;
+    char        *rest;
+    int         driver=DB_PDB;
+    const char  *file_ext = "pdb";
+    char        filename[256];
+    int         show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+        if (isdigit(argv[i][0]) ||
+            ('-'==argv[i][0] && isdigit(argv[i][1]))) {
+            switch (nnumbers++) {
+            case 0:
+                blockorigin = strtol(argv[i], &rest, 0);
+                break;
+            case 1:
+                grouporigin = strtol(argv[i], &rest, 0);
+                break;
+            case 2:
+                zoneorigin = strtol(argv[i], &rest, 0);
+                break;
+            default:
+                usage(argv[0]);
+            }
+            if (rest && *rest) usage(argv[0]);
+        } else if (!strncmp(argv[i], "DB_PDB",6)) {
+            driver = StringToDriver(argv[i]);
+            file_ext = "pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            file_ext = "h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "unknown option: %s\n", argv[i]);
+            usage(argv[0]);
+        }
+    }
+    if (nnumbers!=3) usage(argv[0]);
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    DBSetDeprecateWarnings(0);
+
+    /*
+     * Create the multi-group rectilinear 3d mesh.
+     */
+    sprintf(filename, "group_rect3d.%s", file_ext);
+    fprintf(stderr, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-group rectilinear 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 3, 4, 3,
+                           DB_COLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /*
+     * Create the multi-group curvilinear 3d mesh.
+     */
+    sprintf(filename, "group_curv3d.%s", file_ext);
+    fprintf(stderr, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-group curvilinear 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 3, 4, 3,
+                           DB_NONCOLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /*
+     * Create the multi-group ucd 3d mesh.
+     */
+    sprintf(filename, "group_ucd3d.%s", file_ext);
+    fprintf(stderr, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                           "multi-group ucd 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_UCDMESH, DB_UCDVAR, 3, 4, 3,
+                           0) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return(0);
+}                               /* main */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_multi
+ *
+ * Purpose:     Make a multi-group mesh, multi-group variables, and a 
+ *              multi-group material based on the given meshtype, 
+ *              dimensionality of the mesh, and number of blocks in the
+ *              x-direction, y-direction, and z-direction.  Also specify
+ *              if the mesh is collinear when creating a quad mesh.  The
+ *              total number of blocks created for the mesh equals
+ *              number of blocks in x-direction times number of blocks in
+ *              y-direction times number of blocks in z-direction.
+ *
+ *              nblocks = nblocks_x * nblocks_y * nblocks_z
+ *
+ * Return:      Success: 0
+ *
+ *              Failure: -1
+ *
+ * Programmer:  Jeremy Meredith, May 21, 1999
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+int
+build_multi(DBfile *dbfile, int meshtype, int vartype, int nblocks_x,
+            int nblocks_y, int nblocks_z, int coord_type)
+{
+    int             i;
+    int             cycle;
+    float           time;
+    double          dtime;
+    int             nmatnos;
+    int             matnos[3];
+    char            names[MAXBLOCKS][STRLEN];
+    char           *meshnames[MAXBLOCKS];
+    int             meshtypes[MAXBLOCKS];
+    char            names1[MAXBLOCKS][STRLEN];
+    char            names2[MAXBLOCKS][STRLEN];
+    char            names3[MAXBLOCKS][STRLEN];
+    char            names4[MAXBLOCKS][STRLEN];
+    char            names5[MAXBLOCKS][STRLEN];
+    char           *var1names[MAXBLOCKS];
+    char           *var2names[MAXBLOCKS];
+    char           *var3names[MAXBLOCKS];
+    char           *var4names[MAXBLOCKS];
+    char           *var5names[MAXBLOCKS];
+    int             vartypes[MAXBLOCKS];
+    char            names0[MAXBLOCKS][STRLEN];
+    char           *matnames[MAXBLOCKS];
+    char            dirnames[MAXBLOCKS][STRLEN];
+
+    DBoptlist      *optlist;
+
+    int             ngroups = 2;
+
+    int             nblocks = nblocks_x * nblocks_y * nblocks_z;
+
+    /*
+     * Initialize the names and create the directories for the blocks.
+     */
+
+    for (i = 0; i < nblocks; i++)
+    {
+
+        sprintf(names[i], "/block%d/mesh1", i);
+        meshnames[i] = names[i];
+        meshtypes[i] = meshtype;
+
+        sprintf(names1[i], "/block%d/d", i);
+        sprintf(names2[i], "/block%d/p", i);
+        sprintf(names3[i], "/block%d/u", i);
+        sprintf(names4[i], "/block%d/v", i);
+        sprintf(names5[i], "/block%d/w", i);
+        var1names[i] = names1[i];
+        var2names[i] = names2[i];
+        var3names[i] = names3[i];
+        var4names[i] = names4[i];
+        var5names[i] = names5[i];
+        vartypes[i] = vartype;
+
+        sprintf(names0[i], "/block%d/mat1", i);
+        matnames[i] = names0[i];
+
+        /* make the directory for the block mesh */
+
+        sprintf(dirnames[i], "/block%d", i);
+
+        if (DBMkDir(dbfile, dirnames[i]) == -1)
+        {
+            fprintf(stderr, "Could not make directory \"%s\"\n", dirnames[i]);
+            return (-1);
+        }                       /* if */
+    }                           /* for */
+
+    /* create the blocks */
+
+    switch (meshtype)
+    {
+      case DB_QUADMESH:
+        if (coord_type == DB_COLLINEAR)
+        {
+            build_block_rect3d(dbfile, dirnames, 
+                               nblocks_x, nblocks_y, nblocks_z);
+        }
+        else if (coord_type == DB_NONCOLLINEAR)
+        {
+            build_block_curv3d(dbfile, dirnames, 
+                               nblocks_x, nblocks_y, nblocks_z);
+        }
+        break;
+
+      case DB_UCDMESH:
+        build_block_ucd3d(dbfile, dirnames, nblocks_x, nblocks_y,
+                          nblocks_z);
+        break;
+
+      default:
+        fprintf(stderr, "Bad mesh type.\n");
+        return (-1);
+    }
+
+    /* create the option lists for the multi-block calls. */
+
+    cycle = 54;
+    time = 5.4;
+    dtime = 5.4;
+    nmatnos = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_NMATNOS, &nmatnos);
+    DBAddOption(optlist, DBOPT_MATNOS, matnos);
+    DBAddOption(optlist, DBOPT_BLOCKORIGIN, &blockorigin);
+    DBAddOption(optlist, DBOPT_GROUPORIGIN, &grouporigin);
+    DBAddOption(optlist, DBOPT_NGROUPS, &ngroups);
+
+    /* create the multi-block mesh */
+
+    if (DBPutMultimesh(dbfile, "mesh1", nblocks,
+                       meshnames, meshtypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi mesh\n");
+        return (-1);
+    }                           /* if */
+    /* create the multi-block variables */
+    if (DBPutMultivar(dbfile, "d", nblocks, var1names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var d\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "p", nblocks, var2names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var p\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "u", nblocks, var3names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var u\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "v", nblocks, var4names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var v\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "w", nblocks, var5names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var w\n");
+        return (-1);
+    }                       /* if */
+    if (DBPutMultimat(dbfile, "mat1", nblocks, matnames, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi material\n");
+        return (-1);
+    }                           /* if */
+    DBFreeOptlist(optlist);
+
+    return (0);
+}                               /* build_multi */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_rect3d
+ *
+ * Purpose:     Build a 3-d rectilinear mesh and add it to the open database.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  
+ *
+ * Modifications:
+ *
+ *    Katherine Price, Aug 4, 1995
+ *    Modified function to output blocks.
+ *
+ *    Robb Matzke, Sun Dec 18 17:39:58 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Fri Oct 17 17:09:00 PDT 1997
+ *    I modified the routine to output 3 materials instead of 2 and
+ *    to use the routines fill_rect3d_bkgr and fill_rect3d_mat to
+ *    fill the material arrays.
+ *
+ *    Eric Brugger, Mon Mar 2  20:46:27 PDT 1998
+ *    I increased the size of the mixed material arrays to avoid a trap
+ *    of a memory write condition.
+ *
+ *    Sean Ahern, Thu Jul  2 11:04:30 PDT 1998
+ *    Fixed an indexing problem.
+ *
+ *    Jeremy Meredith, Fri May 21 15:49:10 PDT 1999
+ *    Added groups, baseindex, and zone origin.
+ *
+ *    Lisa J. Roberts, Fri Apr  7 11:28:42 PDT 2000
+ *    Removed cnt, itemp, l, m, n, dx, dy, dz, xx, yy, zz, var1id,
+ *    var2id, var3id, var4id, var5id, and matid, which were unused.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_rect3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y, int nblocks_z)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    int             ndims;
+    int             dims[3], zdims[3];
+    float          *coords[3];
+    float           x[NX + 1], y[NY + 1], z[NZ + 1];
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+    float           *d, *p;
+    float           *u, *v;
+    float           *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             dims2[3];
+    int             mixlen;
+    int             *mix_next, *mix_mat, *mix_zone;
+    float           *mix_vf;
+
+    DBoptlist      *optlist;
+
+    int             i, j, k;
+    float           xave, yave, zave;
+    float           xcenter, ycenter, zcenter;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             base_x, base_y, base_z;
+    int             n_x, n_y, n_z;
+
+    float           x2[NX + 1], y2[NY + 1], z2[NZ + 1];
+    float           *d2, *p2;
+    float           *u2, *v2;
+    float           *w2;
+    int             *matlist2;
+    int             mixlen2;
+    int             *mix_next2, *mix_mat2, *mix_zone2;
+    float           *mix_vf2;
+
+    int             groupnum;
+    int             baseindex[3];
+
+    matlist = ALLOC_N(int, NX * NY * NZ);
+    mix_next = ALLOC_N(int, 20000);
+    mix_mat = ALLOC_N(int, 20000);
+    mix_zone = ALLOC_N(int, 20000);
+    mix_vf = ALLOC_N(float, 20000);
+    matlist2 = ALLOC_N(int, NX * NY * NZ);
+    mix_next2 = ALLOC_N(int, 20000);
+    mix_mat2 = ALLOC_N(int, 20000);
+    mix_zone2 = ALLOC_N(int, 20000);
+    mix_vf2 = ALLOC_N(float, 20000);
+
+    d = ALLOC_N(float, NX * NY * NZ);
+    p = ALLOC_N(float, NX * NY * NZ);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d2 = ALLOC_N(float, NX * NY * NZ);
+    p2 = ALLOC_N(float, NX * NY * NZ);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+    for (i = 0; i < NX + 1; i++)
+        x[i] = i * (1. / NX);
+    for (i = 0; i < NY + 1; i++)
+        y[i] = i * (1. / NY);
+    for (i = 0; i < NZ + 1; i++)
+        z[i] = i * (1. / NZ);
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = .5;
+    ycenter = .5;
+    zcenter = .5;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    zdims[2] = NZ;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            for (k = 0; k < NZ; k++)
+            {
+                xave = (x[i] + x[i + 1]) / 2.;
+                yave = (y[j] + y[j + 1]) / 2.;
+                zave = (z[k] + z[k + 1]) / 2.;
+                dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                            (yave - ycenter) * (yave - ycenter) +
+                            (zave - zcenter) * (zave - zcenter));
+                d[k * NX * NY + j * NX + i] = dist;
+                p[k * NX * NY + j * NX + i] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = .5001;
+    ycenter = .5001;
+    zcenter = .5001;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                u[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+                v[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+                w[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (z[k] - zcenter) / dist;
+            }
+        }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    dims2[2] = NZ;
+    mixlen = 0;
+
+    /*
+     * Put in the material for the entire mesh.
+     */
+    fill_rect3d_bkgr (matlist, NX, NY, NZ, 1);
+
+    mixlen = 0;
+    fill_rect3d_mat (x, y, z, matlist, NX, NY, NZ, mix_next,
+                     mix_mat, mix_zone, mix_vf, &mixlen, 2, .5, .5, .5, .6);
+    fill_rect3d_mat (x, y, z, matlist, NX, NY, NZ, mix_next,
+                     mix_mat, mix_zone, mix_vf, &mixlen, 3, .5, .5, .5, .4);
+    if (mixlen > 20000)
+    {
+         printf ("memory overwrite: mixlen = %d > 20000\n", mixlen);
+         exit (-1);
+    }
+
+    /*
+     * Now extract the data for this block. 
+     */
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    dims[2] = delta_z + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    zdims[2] = delta_z;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+    dims2[2] = delta_z;
+
+    /*
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stderr, "\t%s\n", dirnames[block]);
+
+        /*
+         * Now extract the data for this block. 
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y;
+        base_z = (block / (nblocks_x * nblocks_y)) * delta_z;
+
+        for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            x2[i] = x[n_x];
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            y2[j] = y[n_y];
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            z2[k] = z[n_z];
+
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+                {
+                    u2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        mixlen2 = 0;
+        for (k = 0, n_z = base_z; k < delta_z; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+                {
+                    d2[k * delta_x * delta_y + j * delta_x + i] =
+                        d[n_z * NX * NY + n_y * NX + n_x];
+                    p2[k * delta_x * delta_y + j * delta_x + i] =
+                        p[n_z * NX * NY + n_y * NX + n_x];
+
+                    if (matlist[n_z * NX * NY + n_y * NX + n_x] < 0)
+                    {
+                        mixlen = -matlist[n_z * NX * NY + n_y * NX + n_x] - 1;
+
+                        matlist2[k * delta_x * delta_y + j * delta_x + i]
+                            = -(mixlen2 + 1);
+                        mix_mat2[mixlen2] = mix_mat[mixlen];
+                        mix_mat2[mixlen2 + 1] = mix_mat[mixlen + 1];
+                        mix_next2[mixlen2] = mixlen2 + 2;
+                        mix_next2[mixlen2 + 1] = 0;
+                        mix_zone2[mixlen2]
+                            = k * delta_x * delta_y + j * delta_x + i;
+                        mix_zone2[mixlen2 + 1]
+                            = k * delta_x * delta_y + j * delta_x + i;
+                        mix_vf2[mixlen2] = mix_vf[mixlen];
+                        mix_vf2[mixlen2 + 1] = mix_vf[mixlen + 1];
+                        mixlen2 += 2;
+                    } else
+                        matlist2[k * delta_x * delta_y + j * delta_x + i]
+                            = matlist[n_z * NX * NY + n_y * NX + n_x];
+                }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                       /* if */
+
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        optlist = DBMakeOptlist(13);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+
+        DBAddOption(optlist, DBOPT_ORIGIN, &zoneorigin);
+
+        groupnum = block / (nblocks_x*nblocks_y*nblocks_z * 2/3) + grouporigin;
+        DBAddOption(optlist, DBOPT_GROUPNUM, &groupnum);
+
+        baseindex[0]= base_x + zoneorigin;
+        baseindex[1]= base_y + zoneorigin;
+        baseindex[2]= base_z + zoneorigin - 
+                      (groupnum == (1+grouporigin) ? (NZ*2/3) : 0);
+        DBAddOption(optlist, DBOPT_BASEINDEX, baseindex);
+
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords, dims, ndims,
+                      DB_FLOAT, DB_COLLINEAR, optlist);
+
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var5name, meshname, w2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                  matlist2, dims2, ndims, mix_next2, mix_mat2, mix_zone2,
+                      mix_vf2, mixlen2, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                       /* if */
+    }                           /* for */
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(mix_vf);
+    FREE(matlist2);
+    FREE(mix_next2);
+    FREE(mix_mat2);
+    FREE(mix_zone2);
+    FREE(mix_vf2);
+
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+}                               /* build_block_rect3d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_ucd3d
+ *
+ * Purpose:     Build a 3-d UCD mesh and add it to the open database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:        
+ *
+ * Programmer:  
+ *
+ * Modifications:
+ *    Mark Miller, Tue Oct  6 09:46:48 PDT 1998 
+ *    fixing node numbering in ucd3d stuff
+ *
+ *    Katherine Price, Aug 4, 1995
+ *    Modified function to output blocks.
+ *
+ *    Robb Matzke, Sun Dec 18 17:40:58 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Fri Oct 17 17:09:00 PDT 1997
+ *    I modified the routine to output more blocks, mixed material zones,
+ *    and ghost zones.
+ *
+ *    Eric Brugger, Thu Oct 23 16:37:03 PDT 1997
+ *    I corrected a bug where the max_index passed to the routine
+ *    DBCalcExternalFacelist2 was 1 too large.
+ *
+ *    Eric Brugger, Fri Mar 12 16:01:44 PST 1999
+ *    I modified the routine to use the new interface to
+ *    DBCalcExternalFacelist2.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_ucd3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                  int nblocks_x, int nblocks_y, int nblocks_z)
+{
+#undef  NX
+#define NX 30
+#undef  NY
+#define NY 40
+#undef  NZ
+#define NZ 30
+
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    float          *coords[3];
+    float           *x, *y, *z;
+    int             nfaces, nzones, nnodes;
+    int             lfacelist, lzonelist;
+    int             fshapesize, fshapecnt, zshapetype, zshapesize, zshapecnt;
+    int             *zonelist;
+    int             *facelist;
+    int             *zoneno;
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+    float          *vars[1];
+    char           *varnames[1];
+    float           *d, *p, *u, *v, *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             mixlen;
+    int             *mix_next, *mix_mat, *mix_zone;
+    float           *mix_vf;
+    float           *xstrip, *ystrip, *zstrip;
+
+    DBoptlist      *optlist;
+
+    DBfacelist     *fl;
+
+    int             i, j, k;
+    int             iz;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           h, dh;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             n_x, n_y, n_z;
+
+    int             imin, imax, jmin, jmax, kmin, kmax;
+    int             nx, ny, nz;
+
+    float           *x2, *y2, *z2;
+    float           *d2, *p2, *u2, *v2, *w2;
+    int             *matlist2, *ghost;
+
+    int             nreal;
+    int             ighost;
+    int             itemp;
+    int             hi_off;
+
+    int             groupnum;
+    int             *globalzone;
+    int             *globalnode;
+
+    int             one=1;
+    DBobject       *obj;
+
+
+    zonelist = ALLOC_N(int, 16000);
+    facelist = ALLOC_N(int, 10000);
+    zoneno = ALLOC_N(int, 2000);
+    matlist = ALLOC_N(int, NX*NY*NZ);
+    mix_next = ALLOC_N(int, 4500);
+    mix_mat = ALLOC_N(int, 4500);
+    mix_zone = ALLOC_N(int, 4500);
+    matlist2 = ALLOC_N(int, 2000);
+    ghost = ALLOC_N(int, 2000);
+    globalzone = ALLOC_N(int, 2000);
+    globalnode = ALLOC_N(int, 3000);
+
+    mix_vf = ALLOC_N(float, 4500);
+    xstrip = ALLOC_N(float, NX+NY+NZ);
+    ystrip = ALLOC_N(float, NX+NY+NZ);
+    zstrip = ALLOC_N(float, NX+NY+NZ);
+    x2 = ALLOC_N(float, 2646);
+    y2 = ALLOC_N(float, 2646);
+    z2 = ALLOC_N(float, 2646);
+    d2 = ALLOC_N(float, 2646);
+    p2 = ALLOC_N(float, 2646);
+    u2 = ALLOC_N(float, 2646);
+    v2 = ALLOC_N(float, 2646);
+    w2 = ALLOC_N(float, 2646);
+    x = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    y = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    z = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    d = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    p = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    u = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    v = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+    w = ALLOC_N(float, (NX+1)*(NY+1)*(NZ+1));
+
+    /*
+     * Create the coordinate arrays for the entire mesh.
+     */
+    dh = 20. / (float) NX;
+    dtheta = (180. / (float) NY) * (3.1415926 / 180.);
+    dr = 3. / (float) NZ;
+    h = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        theta = 0.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            r = 2.;
+            for (k = 0; k < NZ + 1; k++)
+            {
+                x[i * (NX+1)*(NY+1) + j * (NX+1) + k] = r * cos(theta);
+                y[i * (NX+1)*(NY+1) + j * (NX+1) + k] = r * sin(theta);
+                z[i * (NX+1)*(NY+1) + j * (NX+1) + k] = h;
+                r += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    /*
+     * Create the density and pressure arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i * (NX+1)*(NY+1) + j * (NX+1) + k] - xcenter) *
+                            (x[i * (NX+1)*(NY+1) + j * (NX+1) + k] - xcenter) +
+                            (y[i * (NX+1)*(NY+1) + j * (NX+1) + k] - ycenter) *
+                            (y[i * (NX+1)*(NY+1) + j * (NX+1) + k] - ycenter));
+                d[i * (NX+1)*(NY+1) + j * (NX+1) + k] = dist;
+                p[i * (NX+1)*(NY+1) + j * (NX+1) + k] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /*
+     * Create the velocity component arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[i * (NX+1)*(NY+1) + j * (NX+1) + k] = (x[i] - xcenter) / dist;
+                v[i * (NX+1)*(NY+1) + j * (NX+1) + k] = (y[j] - ycenter) / dist;
+                w[i * (NX+1)*(NY+1) + j * (NX+1) + k] = 0.;
+            }
+        }
+    }
+
+    /*
+     * Put in the material for the entire mesh.
+     */
+    fill_rect3d_bkgr (matlist, NX, NY, NZ, 1);
+
+    for (i = 0; i < NY; i++)
+    {
+        xstrip[i] = (float)i;
+        ystrip[i] = (float)i;
+        zstrip[i] = (float)i;
+    }
+
+    mixlen = 0;
+    fill_rect3d_mat (xstrip, ystrip, zstrip, matlist, NX, NY, NZ, mix_next,
+                     mix_mat, mix_zone, mix_vf, &mixlen, 2, 15., 20., 15., 10.);
+    fill_rect3d_mat (xstrip, ystrip, zstrip, matlist, NX, NY, NZ, mix_next,
+                     mix_mat, mix_zone, mix_vf, &mixlen, 3, 15., 20., 15., 5.);
+    if (mixlen > 4500)
+    {
+         printf ("memory overwrite: mixlen = %d > 4500\n", mixlen);
+         exit (-1);
+    }
+
+    /*
+     * Set up variables that are independent of the block number.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    var1name = "d";
+    var2name = "p";
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    /*
+     * Now extract the data for this block. 
+     */
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+
+    /*
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stderr, "\t%s\n", dirnames[block]);
+
+        /*
+         * Now extract the data for this block. 
+         */
+        imin = (block % nblocks_x) * delta_x - 1;
+        imax = MIN (imin + delta_x + 3, NX + 1);
+        imin = MAX (imin, 0);
+        nx = imax - imin;
+        jmin = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y - 1;
+        jmax = MIN (jmin + delta_y + 3, NY + 1);
+        jmin = MAX (jmin, 0);
+        ny = jmax - jmin;
+        kmin = (block / (nblocks_x * nblocks_y)) * delta_z - 1;
+        kmax = MIN (kmin + delta_z + 3, NZ + 1);
+        kmin = MAX (kmin, 0);
+        nz = kmax - kmin;
+
+        for (k = 0, n_z = kmin; n_z < kmax; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax; i++, n_x++)
+                {
+                    globalnode[k * nx * ny + j * nx + i] = 
+                        n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x 
+                        + zoneorigin;
+
+                    x2[k * nx * ny + j * nx + i] =
+                        x[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    y2[k * nx * ny + j * nx + i] =
+                        y[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    z2[k * nx * ny + j * nx + i] =
+                        z[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    d2[k * nx * ny + j * nx + i] =
+                        d[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    p2[k * nx * ny + j * nx + i] =
+                        p[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    u2[k * nx * ny + j * nx + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * nx * ny + j * nx + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * nx * ny + j * nx + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        iz = 0;
+        for (k = 0, n_z = kmin; n_z < kmax - 1; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax - 1; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax - 1; i++, n_x++)
+                {
+                    globalzone[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] =
+                        n_z * NX * NY + n_y * NX + n_x + zoneorigin;
+
+                    zonelist[iz]     = (k + 0) * nx * ny + (j + 1) * nx + i + 1;
+                    zonelist[iz + 1] = (k + 0) * nx * ny + (j + 0) * nx + i + 1;
+                    zonelist[iz + 2] = (k + 1) * nx * ny + (j + 0) * nx + i + 1;
+                    zonelist[iz + 3] = (k + 1) * nx * ny + (j + 1) * nx + i + 1;
+                    zonelist[iz + 4] = (k + 0) * nx * ny + (j + 1) * nx + i + 0;
+                    zonelist[iz + 5] = (k + 0) * nx * ny + (j + 0) * nx + i + 0;
+                    zonelist[iz + 6] = (k + 1) * nx * ny + (j + 0) * nx + i + 0;
+                    zonelist[iz + 7] = (k + 1) * nx * ny + (j + 1) * nx + i + 0;
+                    iz += 8;
+
+                    matlist2[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] =
+                        matlist[n_z * NX * NY + n_y * NX + n_x];
+
+                    if (((k == 0 || n_z == kmax - 2) &&
+                         (n_z != 0 && n_z != NZ - 1)) ||
+                        ((j == 0 || n_y == jmax - 2) &&
+                         (n_y != 0 && n_y != NY - 1)) ||
+                        ((i == 0 || n_x == imax - 2) &&
+                         (n_x != 0 && n_x != NX - 1)))
+                        ghost[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] = 1;
+                    else
+                        ghost[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] = 0;
+                }
+
+        /*
+         * Resort the zonelist, matlist so that the ghost zones are at the
+         * end.
+         */
+        nzones = (nx - 1) * (ny - 1) * (nz - 1);
+        nreal = nzones;
+        for (i = 0; i < nzones; i++)
+            nreal -= ghost [i];
+        ighost = nzones - 1;
+        for (i = 0; i < nreal; i++)
+        {
+            if (ghost[i] == 1)
+            {
+                /*
+                 * Find the first non ghost zone.
+                 */
+                while (ghost[ighost] == 1)
+                    ighost--;
+                j = ighost;
+
+                itemp = zonelist[i*8];
+                zonelist[i*8]   = zonelist [j*8];
+                zonelist[j*8]   = itemp;
+                itemp = zonelist[i*8+1];
+                zonelist[i*8+1] = zonelist [j*8+1];
+                zonelist[j*8+1] = itemp;
+                itemp = zonelist[i*8+2];
+                zonelist[i*8+2] = zonelist [j*8+2];
+                zonelist[j*8+2] = itemp;
+                itemp = zonelist[i*8+3];
+                zonelist[i*8+3] = zonelist [j*8+3];
+                zonelist[j*8+3] = itemp;
+                itemp = zonelist[i*8+4];
+                zonelist[i*8+4] = zonelist [j*8+4];
+                zonelist[j*8+4] = itemp;
+                itemp = zonelist[i*8+5];
+                zonelist[i*8+5] = zonelist [j*8+5];
+                zonelist[j*8+5] = itemp;
+                itemp = zonelist[i*8+6];
+                zonelist[i*8+6] = zonelist [j*8+6];
+                zonelist[j*8+6] = itemp;
+                itemp = zonelist[i*8+7];
+                zonelist[i*8+7] = zonelist [j*8+7];
+                zonelist[j*8+7] = itemp;
+
+                itemp = matlist2[i];
+                matlist2[i] = matlist2 [j];
+                matlist2[j] = itemp;
+
+                itemp = ghost[i];
+                ghost[i] = ghost [j];
+                ghost[j] = itemp;
+            }
+        }
+
+        /*
+         * Calculate the external face list.
+         */
+        nnodes = nx * ny * nz;
+        hi_off = nzones - nreal;
+
+        zshapesize = 8;
+        zshapecnt = nzones;
+        zshapetype = DB_ZONETYPE_HEX;
+        lzonelist = nzones * 8;
+
+        fl = DBCalcExternalFacelist2(zonelist, nnodes, 0, hi_off, 0,
+                                     &zshapetype, &zshapesize, &zshapecnt, 1,
+                                     matlist2, 0);
+
+        nfaces = fl->nfaces;
+        fshapecnt = fl->nfaces;
+        fshapesize = 4;
+        lfacelist = fl->lnodelist;
+        for (i = 0; i < lfacelist; i++)
+            facelist[i] = fl->nodelist[i];
+        for (i = 0; i < nfaces; i++)
+            zoneno[i] = fl->zoneno[i];
+
+        DBFreeFacelist(fl);
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                       /* if */
+
+        /* Write out the mesh and variables. */
+        optlist = DBMakeOptlist(13);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+        DBAddOption(optlist, DBOPT_HI_OFFSET, &hi_off);
+        DBAddOption(optlist, DBOPT_NODENUM, globalnode);
+
+        DBAddOption(optlist, DBOPT_ORIGIN, &zoneorigin);
+
+        groupnum = block / (nblocks_x*nblocks_y*nblocks_z * 2/3) + grouporigin;
+        DBAddOption(optlist, DBOPT_GROUPNUM, &groupnum);
+
+        if (nfaces > 0)
+            DBPutFacelist(dbfile, "fl1", nfaces, 3, facelist, lfacelist, 0,
+                          zoneno, &fshapesize, &fshapecnt, 1, NULL, NULL, 0);
+
+        /*
+         * Output the zonelist.  This is being done at the object
+         * level to add the hi_offset option which can't be output
+         * with the DBPutZonelist routine.
+         */
+        obj = DBMakeObject("zl1", DB_ZONELIST, 10);
+
+        DBAddIntComponent(obj, "ndims", 3);
+        DBAddIntComponent(obj, "nzones", nzones);
+        DBAddIntComponent(obj, "nshapes", 1);
+        DBAddIntComponent(obj, "lnodelist", lzonelist);
+        DBAddIntComponent(obj, "origin", zoneorigin);
+        DBAddIntComponent(obj, "hi_offset", hi_off);
+        DBAddVarComponent(obj, "nodelist", "zl1_nodelist");
+        DBAddVarComponent(obj, "shapecnt", "zl1_shapecnt");
+        DBAddVarComponent(obj, "shapesize", "zl1_shapesize");
+        DBAddVarComponent(obj, "gzoneno", "zl1_gzoneno");
+
+        DBWriteObject(dbfile, obj, 0);
+        DBFreeObject(obj);
+        DBWrite (dbfile, "zl1_nodelist", zonelist, &lzonelist, 1, DB_INT);
+        DBWrite (dbfile, "zl1_shapecnt", &zshapecnt, &one, 1, DB_INT);
+        DBWrite (dbfile, "zl1_shapesize", &zshapesize, &one, 1, DB_INT);
+        DBWrite (dbfile, "zl1_gzoneno", globalzone, &nzones, 1, DB_INT);
+
+        /*
+         * Output the rest of the mesh and variables.
+         */
+        if (nfaces > 0)
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", "fl1", DB_FLOAT, optlist);
+        else
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", NULL, DB_FLOAT, optlist);
+
+        vars[0] = d2;
+        varnames[0] = var1name;
+        DBPutUcdvar(dbfile, var1name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = p2;
+        varnames[0] = var2name;
+        DBPutUcdvar(dbfile, var2name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = u2;
+        varnames[0] = var3name;
+        DBPutUcdvar(dbfile, var3name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = v2;
+        varnames[0] = var4name;
+        DBPutUcdvar(dbfile, var4name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = w2;
+        varnames[0] = var5name;
+        DBPutUcdvar(dbfile, var5name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, &nzones, 1, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                       /* if */
+    }                           /* for */
+
+    FREE(zonelist);
+    FREE(facelist);
+    FREE(zoneno);
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+    FREE(ghost);
+    FREE(globalzone);
+    FREE(globalnode);
+
+    FREE(mix_vf);
+    FREE(xstrip);
+    FREE(ystrip);
+    FREE(zstrip);
+    FREE(x2);
+    FREE(y2);
+    FREE(z2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+}                               /* build_block_ucd3d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_curv3d
+ *
+ * Purpose:     Build a 3-d Curvillinear  mesh and add it to the open 
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:        
+ *
+ * Programmer:  Tony L. Jones  
+ *              May 30, 1995
+ *
+ * Modifications:
+ *    Tony Jones      June 15, 1995
+ *    Density and Pressure calculation was in err.  Previous
+ *    algorithm was passing non-existent values to the mentioned
+ *    arrays.  Problem fixed by decrementing the max loop index.
+ *
+ *    Lisa J. Roberts, Fri Apr  7 11:33:42 PDT 2000
+ *    Removed origin, zave, zcenter, vars and varnames, which were unused.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_curv3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y, int nblocks_z)
+{
+#undef  NX
+#define NX 30
+#undef  NY
+#define NY 40
+#undef  NZ
+#define NZ 30
+
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    float          *coords[3];
+
+    float           *x;
+    float           *y;
+    float           *z;
+
+    int             ndims, zdims[3];
+    int             dims[3], dims2[3];
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+
+    float           *d, *p;
+    float           *u;
+    float           *v;
+    float           *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             mixlen;
+    int             *mix_next, *mix_mat;
+    int             *mix_zone;
+    float           *mix_vf;
+
+    DBoptlist      *optlist;
+
+    int             i, j, k;
+
+    float           xave, yave;
+    float           xcenter, ycenter;
+
+    float           theta, dtheta;
+    float           r, dr;
+    float           h, dh;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             base_x, base_y, base_z;
+    int             n_x, n_y, n_z;
+
+    float           *x2;
+    float           *y2;
+    float           *z2;
+    float           *d2, *p2;
+    float           *u2;
+    float           *v2;
+    float           *w2;
+    int             *matlist2;
+
+    int             groupnum, baseindex[3];
+
+
+    matlist = ALLOC_N(int, NX * NY * NZ);
+    mix_next = ALLOC_N(int, NX * NY * NZ);
+    mix_mat = ALLOC_N(int, NX * NY * NZ);
+    mix_zone = ALLOC_N(int, NX * NY * NZ);
+    matlist2 = ALLOC_N(int, NX * NY * NZ);
+
+    mix_vf = ALLOC_N(float, NX * NY * NZ);
+    x = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    y = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    z = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d = ALLOC_N(float, NX * NY * NZ);
+    p = ALLOC_N(float, NX * NY * NZ);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    x2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    y2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    z2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d2 = ALLOC_N(float, NX * NY * NZ);
+    p2 = ALLOC_N(float, NX * NY * NZ);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+
+    /*
+     * Create the mesh. 
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+
+    dtheta = (180. / NX) * (3.1415926 / 180.);
+    dh = 1;
+    dr = 3. / NY;
+    theta = 0;
+
+    for (i = 0; i < NX + 1; i++)
+    {
+        r = 2.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            h = 0.;
+            for (k = 0; k < NZ + 1; k++)
+            {
+                x[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = r * cos(theta);
+                y[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = r * sin(theta);
+                z[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = h;
+                h += dh;
+            }
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /*
+     * Create the density and pressure arrays. 
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    zdims[2] = NZ;
+
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            for (k = 0; k < NZ; k++)
+            {
+
+                xave = (x[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] +
+                      x[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i + 1] +
+                x[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i + 1] +
+                x[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i]) / 4.;
+
+                yave = (y[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] +
+                      y[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i + 1] +
+                y[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i + 1] +
+                y[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i]) / 4.;
+
+                dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                            (yave - ycenter) * (yave - ycenter));
+                d[k * (NX) * (NY) + j * (NX) + i] = dist;
+                p[k * (NX) * (NY) + j * (NX) + i] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /*
+     *      Create the velocity component arrays. 
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = 0.;
+    ycenter = 0.;
+
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+                v[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+                w[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = 0.;
+            }
+
+        }
+    }
+
+    /*
+     *   Create the material array.  
+     */
+
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    dims2[2] = NZ;
+
+    mixlen = 0;
+
+    /*
+     * Put in the material in 3 shells.
+     */
+
+    for (i = 0; i < NX; i++)
+    {
+        for (k = 0; k < NZ; k++)
+        {
+            for (j = 0; j < 10; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 1;
+            }
+            for (j = 10; j < 20; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 2;
+            }
+            for (j = 20; j < NY; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 3;
+            }
+        }
+
+    }
+
+    /*
+     * Now extract the data for this block. 
+     */
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    dims[2] = delta_z + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    zdims[2] = delta_z;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+    dims2[2] = delta_z;
+
+    /*
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stderr, "\t%s\n", dirnames[block]);
+
+        /*
+         * Now extract the data for this block. 
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y;
+        base_z = (block / (nblocks_x * nblocks_y)) * delta_z;
+
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+                {
+                    x2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        x[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    y2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        y[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    z2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        z[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    u2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        for (k = 0, n_z = base_z; k < delta_z; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+                {
+                    d2[k * delta_x * delta_y + j * delta_x + i] =
+                        d[n_z * NX * NY + n_y * NX + n_x];
+                    p2[k * delta_x * delta_y + j * delta_x + i] =
+                        p[n_z * NX * NY + n_y * NX + n_x];
+                    matlist2[k * delta_x * delta_y + j * delta_x + i] =
+                        matlist[n_z * NX * NY + n_y * NX + n_x];
+                }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                       /* if */
+
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        optlist = DBMakeOptlist(13);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+
+        DBAddOption(optlist, DBOPT_ORIGIN, &zoneorigin);
+
+        groupnum = block / (nblocks_x*nblocks_y*nblocks_z * 2/3) + grouporigin;
+        DBAddOption(optlist, DBOPT_GROUPNUM, &groupnum);
+
+        baseindex[0]= base_x + zoneorigin;
+        baseindex[1]= base_y + zoneorigin;
+        baseindex[2]= base_z + zoneorigin -
+                      (groupnum == (1+grouporigin) ? (NZ*2/3) : 0);
+        DBAddOption(optlist, DBOPT_BASEINDEX, baseindex);
+
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords,
+                      dims, ndims, DB_FLOAT, DB_NONCOLLINEAR,
+                      optlist);
+
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutQuadvar1(dbfile, var5name, meshname, w2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, dims2, ndims, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                       /* if */
+    }                           /* for */
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+
+    FREE(mix_vf);
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(x2);
+    FREE(y2);
+    FREE(z2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+
+}                               /* build_block_curv3d */
diff --git a/tests/ioperf.c b/tests/ioperf.c
new file mode 100644
index 0000000..6d983c1
--- /dev/null
+++ b/tests/ioperf.c
@@ -0,0 +1,618 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <dlfcn.h>
+#include <errno.h>
+#include <float.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <ioperf.h>
+
+#ifdef PARALLEL
+#include <mpi.h>
+#endif
+
+/*-------------------------------------------------------------------------
+  Function: bjhash 
+
+  Purpose: Hash a variable length stream of bytes into a 32-bit value.
+
+  Programmer: By Bob Jenkins, 1996.  bob_jenkins at burtleburtle.net.
+
+  You may use this code any way you wish, private, educational, or
+  commercial.  It's free. However, do NOT use for cryptographic purposes.
+
+  See http://burtleburtle.net/bob/hash/evahash.html
+ *-------------------------------------------------------------------------*/
+
+#define bjhash_mix(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); \
+}
+
+static unsigned int bjhash(register const unsigned char *k, register unsigned int length, register unsigned int initval)
+{
+   register unsigned int a,b,c,len;
+
+   len = length;
+   a = b = 0x9e3779b9;
+   c = initval;
+
+   while (len >= 12)
+   {
+      a += (k[0] +((unsigned int)k[1]<<8) +((unsigned int)k[2]<<16) +((unsigned int)k[3]<<24));
+      b += (k[4] +((unsigned int)k[5]<<8) +((unsigned int)k[6]<<16) +((unsigned int)k[7]<<24));
+      c += (k[8] +((unsigned int)k[9]<<8) +((unsigned int)k[10]<<16)+((unsigned int)k[11]<<24));
+      bjhash_mix(a,b,c);
+      k += 12; len -= 12;
+   }
+
+   c += length;
+
+   switch(len)
+   {
+      case 11: c+=((unsigned int)k[10]<<24);
+      case 10: c+=((unsigned int)k[9]<<16);
+      case 9 : c+=((unsigned int)k[8]<<8);
+      case 8 : b+=((unsigned int)k[7]<<24);
+      case 7 : b+=((unsigned int)k[6]<<16);
+      case 6 : b+=((unsigned int)k[5]<<8);
+      case 5 : b+=k[4];
+      case 4 : a+=((unsigned int)k[3]<<24);
+      case 3 : a+=((unsigned int)k[2]<<16);
+      case 2 : a+=((unsigned int)k[1]<<8);
+      case 1 : a+=k[0];
+   }
+
+   bjhash_mix(a,b,c);
+
+   return c;
+}
+
+typedef struct _timeinfo_t
+{
+    ioop_t op;
+    size_t size;
+    double t0; /* time started */
+    double t1; /* time completed */
+} timeinfo_t;
+
+static int GetSizeFromModifierChar(char c)
+{
+    int n=1;
+    switch (c)
+    {
+        case 'b': case 'B': n=1; break;
+        case 'k': case 'K': n=1024; break;
+        case 'm': case 'M': n=1024*1024; break;
+        case 'g': case 'G': n=1024*1024*1024; break;
+        default:  n=1; break;
+    }
+    return n;
+}
+
+static char* GetUniqueString(const options_t *opts)
+{
+    struct timeval tv0;
+    unsigned int hval;
+    long hid, rnum;
+    char rstate[128];
+    static char retval[128];
+
+    if (!opts->no_mpi)
+    {
+        sprintf(retval, "%08d", opts->mpi_rank);
+	return retval;
+    }
+
+    /* ok, try to build a random string */
+    gettimeofday(&tv0, 0);
+    hval = bjhash((unsigned char *) &tv0, sizeof(tv0), 0);
+
+    hid = gethostid();
+    hval = bjhash((unsigned char *) &hid, sizeof(hid), hval);
+
+    initstate(hval, rstate, 128);
+    rnum = random();
+    hval = bjhash((unsigned char *) &rnum, sizeof(rnum), hval);
+
+    sprintf(retval, "%08d", hval);
+    return retval;
+}
+
+
+/*
+ * This is a default timer, with microsecond accuracy or thereabouts.
+ * IO Interface plugins can override this default timer if they wish.
+ * First call initializes time zero. Succeeding calls return time since
+ * first initialized.
+ */
+static double GetTime()
+{
+    static double t0 = -1;
+    double t1;
+    struct timeval tv1;
+
+    if (t0<0)
+    {
+        struct timeval tv0;
+        gettimeofday(&tv0, 0);
+        t0 = (double)tv0.tv_sec*1e+6+(double)tv0.tv_usec;
+        return 0;
+    }
+
+    gettimeofday(&tv1, 0);
+    t1 = (double)tv1.tv_sec*1e+6+(double)tv1.tv_usec;
+
+    return t1-t0;
+}
+
+static int ProcessCommandLine(int argc, char *argv[], options_t *opts)
+{
+    char plugin_opts_delim[256];
+    int i,n,nerrors=0;
+    for (i=1; i<argc; i++)
+    {
+        errno=0;
+        if (!strcmp(argv[i], "--io-interface"))
+        {
+            i++;
+            opts->io_interface = strdup(argv[i]);
+            sprintf(plugin_opts_delim, "--%s-args", opts->io_interface);
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--request-size"))
+        {
+            i++;
+            n=strlen(argv[i])-1;
+            n=GetSizeFromModifierChar(argv[i][n]);
+            opts->request_size_in_bytes = strtol(argv[i], (char **)NULL, 10)*n;
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--num-requests"))
+        {
+            i++;
+            opts->num_requests = strtol(argv[i], (char **)NULL, 10);
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--seek-noise"))
+        {
+            i++;
+            opts->seek_noise = strtol(argv[i], (char **)NULL, 10);
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--size-noise"))
+        {
+            i++;
+            opts->size_noise = strtol(argv[i], (char **)NULL, 10);
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--initial-size"))
+        {
+            i++;
+            n=strlen(argv[i])-1;
+            n=GetSizeFromModifierChar(argv[i][n]);
+            opts->initial_file_size = strtol(argv[i], (char **)NULL, 10)*n;
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--alignment"))
+        {
+            i++;
+            n=strlen(argv[i])-1;
+            n=GetSizeFromModifierChar(argv[i][n]);
+            opts->alignment = strtol(argv[i], (char **)NULL, 10)*n;
+            if (errno) goto fail;
+        }
+        else if (!strcmp(argv[i], "--rand-file-name"))
+        {
+            opts->rand_file_name = 1;
+        }
+        else if (!strcmp(argv[i], "--no-mpi"))
+        {
+            opts->no_mpi = 1;
+        }
+        else if (!strcmp(argv[i], "--test-read"))
+        {
+            opts->flags = IO_READ;
+        }
+        else if (!strcmp(argv[i], "--print-details"))
+        {
+            opts->print_details = 1;
+        }
+        else if (!strcmp(argv[i], plugin_opts_delim))
+        {
+            break;
+        }
+	else if (argv[i][0] != '\0')
+        {
+fail:
+	    fprintf(stderr, "%s: bad argument `%s' (\"%s\")\n", argv[0], argv[i],
+                errno?strerror(errno):"");
+            exit(1);
+	}
+    }
+
+    /* sanity check some values */
+    if (opts->io_interface == 0)
+        fprintf(stderr, "%d: no io-interface specified\n", nerrors++);
+    if (nerrors)
+        exit(nerrors);
+
+    return i+1;
+}
+
+#ifdef STATIC_PLUGINS
+extern iointerface_t* CreateInterface_silo(int argi, int argc, char *argv[],
+    const char *filename, const options_t *opts);
+extern iointerface_t* CreateInterface_hdf5(int argi, int argc, char *argv[],
+    const char *filename, const options_t *opts);
+extern iointerface_t* CreateInterface_stdio(int argi, int argc, char *argv[],
+    const char *filename, const options_t *opts);
+extern iointerface_t* CreateInterface_sec2(int argi, int argc, char *argv[],
+    const char *filename, const options_t *opts);
+extern iointerface_t* CreateInterface_pdb(int argi, int argc, char *argv[],
+    const char *filename, const options_t *opts);
+#endif
+
+static iointerface_t* GetIOInterface(int argi, int argc, char *argv[], const options_t *opts)
+{
+    char testfilename[256];
+    char ifacename[256];
+    void *dlhandle=0;
+    iointerface_t *retval=0;
+
+    /* First, get rid of the old data file */
+    strcpy(ifacename, opts->io_interface);
+    sprintf(testfilename, "iop_test_%s%s.dat", ifacename, 
+        opts->rand_file_name?GetUniqueString(opts):"");
+    unlink(testfilename);
+
+    /* First, attempt to create interface using static approach, if that
+       is enabled. */
+#ifdef STATIC_PLUGINS
+    if (!strcmp(ifacename, "silo"))
+        retval = CreateInterface_silo(argi, argc, argv, testfilename, opts);
+    else if (!strcmp(ifacename, "hdf5"))
+        retval = CreateInterface_hdf5(argi, argc, argv, testfilename, opts);
+    else if (!strcmp(ifacename, "stdio"))
+        retval = CreateInterface_stdio(argi, argc, argv, testfilename, opts);
+    else if (!strcmp(ifacename, "sec2"))
+        retval = CreateInterface_sec2(argi, argc, argv, testfilename, opts);
+    else if (!strcmp(ifacename, "pdb"))
+        retval = CreateInterface_pdb(argi, argc, argv, testfilename, opts);
+#else
+    /* Fall back to dynamic approach */
+    if (!retval)
+    {
+        char libfilename[256];
+        sprintf(libfilename, "./ioperf_%s.so", ifacename);
+        dlhandle = dlopen(libfilename, RTLD_LAZY);
+        if (dlhandle)
+        {
+            CreateInterfaceFunc createFunc = (CreateInterfaceFunc) dlsym(dlhandle, "CreateInterface");
+            if (!createFunc)
+            {
+                fprintf(stderr,"Encountered dlsym error \"%s\"\n", dlerror());
+                exit(1);
+            }
+
+            /* we allow the io-interface plugin to process command line args too */
+            retval = createFunc(argi, argc, argv, testfilename, opts);
+
+        }
+        else
+        {
+            fprintf(stderr,"Encountered dlopen error \"%s\"\n", dlerror());
+            exit(1);
+        }
+    }
+#endif
+
+    if (!retval)
+    {
+        fprintf(stderr,"Encountered error instantiating IO interface\n");
+        exit(1);
+    }
+
+    /* store off the handle to this plugin so we can close it later */
+    retval->dlhandle = dlhandle;
+
+    /* slip in the default time function */
+    if (!retval->Time)
+        retval->Time = GetTime;
+
+    return retval;
+}
+
+static void AddTimingInfo(ioop_t op, size_t size, double t0, double t1)
+{
+    static timeinfo_t *tinfo=0;
+    static int i=0;
+    static int max=100;
+
+    if (op == OP_OUTPUT_TIMINGS || op == OP_OUTPUT_SUMMARY)
+    {
+        int j;
+        const char *opnms[] = {"WRITE", "READ", "OPEN", "CLOSE", "SEEK", "ERROR"};
+        double tottime=0, totwrtime=0, totrdtime=0, toterrtime=0;
+        size_t totwrbytes=0, totrdbytes=0;
+        double wrfastest=0, wrslowest=DBL_MAX, rdfastest=0, rdslowest=DBL_MAX;
+        int wrfastesti=-1, wrslowesti=-1, rdfastesti=-1, rdslowesti=-1;
+        double wravg, rdavg;
+
+        if (op == OP_OUTPUT_TIMINGS)
+            fprintf(stdout, "i\top\tt0\t\tt1\t\tsize\n");
+        for (j=0; j<i; j++)
+        {
+            if (op == OP_OUTPUT_TIMINGS)
+            {
+                fprintf(stdout, "%d\t%s\t%f\t%f\t%zd\n",
+                    j,opnms[tinfo[j].op],tinfo[j].t0,tinfo[j].t1,tinfo[j].size);
+            }
+
+            if (tinfo[j].op != OP_ERROR)
+            {
+                tottime += (tinfo[j].t1-tinfo[j].t0);
+            }
+            else
+            {
+                toterrtime += (tinfo[j].t1-tinfo[j].t0);
+            }
+
+            if (tinfo[j].op == OP_WRITE)
+            {
+                double wrtime = tinfo[j].t1-tinfo[j].t0;
+                double wrspeed = wrtime?(tinfo[j].size/wrtime):0;
+                totwrtime += wrtime;
+                totwrbytes += tinfo[j].size;
+                if (wrspeed > wrfastest)
+                {
+                    wrfastest = wrspeed;
+                    wrfastesti = j;
+                }
+                if (wrspeed < wrslowest)
+                {
+                    wrslowest = wrspeed;
+                    wrslowesti = j;
+                }
+            }
+            else if (tinfo[j].op == OP_READ)
+            {
+                double rdtime = tinfo[j].t1-tinfo[j].t0;
+                double rdspeed = rdtime?(tinfo[j].size/rdtime):0;
+                totrdtime += rdtime;
+                totrdbytes += tinfo[j].size;
+                if (rdspeed > rdfastest)
+                {
+                    rdfastest = rdspeed;
+                    rdfastesti = j;
+                }
+                if (rdspeed < rdslowest)
+                {
+                    rdslowest = rdspeed;
+                    rdslowesti = j;
+                }
+            }
+        }
+
+        fprintf(stdout, "=============================================================\n");
+        fprintf(stdout, "==========================Summary============================\n");
+        fprintf(stdout, "=============================================================\n");
+        if (totwrbytes)
+        {
+            fprintf(stdout, "**************************Writes****************************\n");
+            fprintf(stdout, "Total:   %zd bytes in %f seconds = %f Mb/s\n",
+                totwrbytes, tottime*1e-6, totwrbytes/(tottime*1e-6)/(1<<20));
+            fprintf(stdout, "Average: %zd bytes in %f seconds = %f Mb/s\n",
+                totwrbytes, totwrtime*1e-6, totwrbytes/(totwrtime*1e-6)/(1<<20));
+            if (wrfastesti>=0)
+                fprintf(stdout, "Fastest: %zd bytes in %f seconds = %f Mb/s (iter=%d)\n",
+                tinfo[wrfastesti].size, (tinfo[wrfastesti].t1-tinfo[wrfastesti].t0)*1e-6,
+                wrfastest*1e+6/(1<<20), wrfastesti);
+            if (wrslowesti>=0)
+                fprintf(stdout, "Slowest: %zd bytes in %f seconds = %f Mb/s (iter=%d)\n",
+                tinfo[wrslowesti].size, (tinfo[wrslowesti].t1-tinfo[wrslowesti].t0)*1e-6,
+                wrslowest*1e+6/(1<<20), wrslowesti);
+        }
+        if (totrdbytes)
+        {
+            fprintf(stdout, "**************************Reads*****************************\n");
+            fprintf(stdout, "Total:   %zd bytes in %f seconds = %f Mb/s\n",
+                totrdbytes, tottime*1e-6, totrdbytes/(tottime*1e-6)/(1<<20));
+            fprintf(stdout, "Average: %zd bytes in %f seconds = %f Mb/s\n",
+                totrdbytes, totrdtime*1e-6, totrdbytes/(totrdtime*1e-6)/(1<<20));
+            if (rdfastesti>=0)
+                fprintf(stdout, "Fastest: %zd bytes in %f seconds = %f Mb/s (iter=%d)\n",
+                tinfo[rdfastesti].size, (tinfo[rdfastesti].t1-tinfo[rdfastesti].t0)*1e-6,
+                rdfastest*1e+6/(1<<20),rdfastesti);
+            if (rdslowesti>=0)
+                fprintf(stdout, "Slowest: %zd bytes in %f seconds = %f Mb/s (iter=%d)\n",
+                tinfo[rdslowesti].size, (tinfo[rdslowesti].t1-tinfo[rdslowesti].t0)*1e-6,
+                rdslowest*1e+6/(1<<20), rdslowesti);
+        } 
+
+        return;
+    }
+
+    if (tinfo==0 || i==max-1)
+    {
+        max = max*1.5;
+        tinfo = (timeinfo_t*) realloc(tinfo, max*sizeof(timeinfo_t));
+    }
+
+    tinfo[i].op = op;
+    tinfo[i].t0 = t0;
+    tinfo[i].t1 = t1;
+    tinfo[i].size = size;
+    i++;
+}
+
+static void TestWrites(iointerface_t *ioiface, const options_t *opts)
+{
+    int i,n;
+    double t0,t1;
+    double *buf;
+    int num_doubles;
+
+    /* allocate and initialize a buffer of data to write */
+    num_doubles = opts->request_size_in_bytes / sizeof(double);
+    buf = (double*) calloc(opts->request_size_in_bytes,1);
+    for (i=0; i<num_doubles;i++)
+        buf[i] = i;
+
+    for (i=0; i<opts->num_requests; i++)
+    {
+        /* Add some request noise */
+        if (opts->size_noise && i && (i%(opts->size_noise))==0)
+        {
+            t0 = ioiface->Time();
+            n = ioiface->Write(buf, 8);
+            t1 = ioiface->Time();
+            AddTimingInfo(n==8?OP_WRITE:OP_ERROR, n, t0, t1);
+        }
+
+        /* Ok, do a write of prescribed size */
+        t0 = ioiface->Time();
+        n = ioiface->Write(buf, opts->request_size_in_bytes);
+        t1 = ioiface->Time();
+        AddTimingInfo(n==opts->request_size_in_bytes?OP_WRITE:OP_ERROR, n, t0, t1);
+    }
+}
+
+int
+main(int argc, char *argv[])
+{
+    options_t      options;
+    iointerface_t  *ioiface;
+    double         t0,t1;
+    int            plugin_argi;
+
+    /* setup default options */
+    memset(&options, 0, sizeof(options));
+    options.request_size_in_bytes = 4096;
+    options.num_requests = 100;
+    options.flags = IO_WRITE|IO_TRUNCATE;
+
+    plugin_argi = ProcessCommandLine(argc, argv, &options);
+
+#ifdef PARALLEL
+    if (!options.no_mpi)
+    {
+        MPI_Init(&argc, &argv);
+        MPI_Comm_size(MPI_COMM_WORLD, &options.mpi_size);
+	MPI_Comm_rank(MPI_COMM_WORLD, &options.mpi_rank);
+    }
+#endif
+
+    /* GetIOInterface either exits or returns valid pointer */
+    ioiface = GetIOInterface(plugin_argi, argc, argv, &options);
+
+    /* First call initializes timer */
+    t0 = ioiface->Time();
+
+    /* open the file */
+    if (!ioiface->Open(0))
+    {
+        fprintf(stderr, "Problem opening file\n");
+        exit(1);
+    }
+    t1 = ioiface->Time();
+    AddTimingInfo(OP_OPEN, 0, t0, t1);
+
+    if (options.flags&IO_WRITE)
+        TestWrites(ioiface, &options);
+
+    /* close the file */
+    t0 = ioiface->Time();
+    if (!ioiface->Close())
+    {
+        fprintf(stderr, "Problem closing file\n");
+    }
+    t1 = ioiface->Time();
+    AddTimingInfo(OP_CLOSE, 0, t0, t1);
+
+/*
+    if (options.flags&IO_READ)
+        TestReads(ioiface, &options);
+*/
+        
+
+#ifndef STATIC_PLUGINS
+    /* close the interface */
+    if (ioiface->dlhandle)
+        dlclose(ioiface->dlhandle);
+#endif
+    
+    /* output timing info */
+    if (options.print_details)
+        AddTimingInfo(OP_OUTPUT_TIMINGS, 0, 0, 0);
+    else
+        AddTimingInfo(OP_OUTPUT_SUMMARY, 0, 0, 0);
+
+#ifdef PARALLEL
+    if (!options.no_mpi)
+        MPI_Finalize();
+#endif
+
+    return (0);
+}
diff --git a/tests/ioperf.h b/tests/ioperf.h
new file mode 100644
index 0000000..a731bf2
--- /dev/null
+++ b/tests/ioperf.h
@@ -0,0 +1,111 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+typedef enum _ioflags_t
+{
+    IO_WRITE    = 0x00000001,
+    IO_READ     = 0x00000002,
+    IO_APPEND   = 0x00000004,
+    IO_TRUNCATE = 0x00000008
+} ioflags_t;
+
+/* if you define members such that a value of 0 serves
+   as a suitable default, then you don't have to worry
+   about an special initialization. */
+typedef struct _options_t
+{
+    const char *io_interface;
+    int request_size_in_bytes;
+    int num_requests;
+    int initial_file_size;
+    int seek_noise;
+    int size_noise;
+    int test_read;
+    ioflags_t flags;
+    int print_details;
+    int alignment;
+    int rand_file_name;
+    int no_mpi;
+    int mpi_rank;
+    int mpi_size;
+} options_t;
+
+typedef enum _ioop_t
+{
+    OP_WRITE,
+    OP_READ,
+    OP_OPEN,
+    OP_CLOSE,
+    OP_SEEK,
+    OP_ERROR,
+    OP_OUTPUT_TIMINGS,
+    OP_OUTPUT_SUMMARY
+} ioop_t;
+
+typedef int (*OpenFunc)(ioflags_t flags);
+typedef int (*WriteFunc)(void *buf, size_t nbytes);
+typedef int (*ReadFunc)(void *buf, size_t nbytes);
+typedef int (*CloseFunc)(void);
+typedef int (*SeekFunc)(size_t offset);
+typedef double (*TimeFunc)(void);
+
+typedef struct _iointerface_t
+{
+    TimeFunc Time; /* A default is provided but can be overridden by plugin */
+    OpenFunc Open;
+    WriteFunc Write;
+    ReadFunc Read;
+    CloseFunc Close;
+    SeekFunc Seek;
+    void *dlhandle;
+} iointerface_t;
+
+typedef iointerface_t* (*CreateInterfaceFunc)(int argi, int argc, char *argv[], const char *filename, const options_t *opts);
diff --git a/tests/ioperf_hdf5.c b/tests/ioperf_hdf5.c
new file mode 100644
index 0000000..d3c6c91
--- /dev/null
+++ b/tests/ioperf_hdf5.c
@@ -0,0 +1,244 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#define H5_USE_16_API
+#include <hdf5.h>
+
+#include <ioperf.h>
+
+/*
+ * Implement ioperf's I/O interface using HDF5 functions
+ */
+
+static int use_log = 0;
+static int use_silo_fapl = 0;
+static int silo_block_size = 1<<14;
+static int silo_block_count = 16;
+static int sbuf_size = -1;
+static int mbuf_size = -1;
+static int rbuf_size = -1;
+static int lbuf_size = 0;
+static options_t options;
+static const char *filename;
+static hid_t fid;
+static hid_t dspc = -1;
+
+static int Open_hdf5(ioflags_t iopflags)
+{
+    hid_t fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+    herr_t h5status = 0;
+
+    if (sbuf_size >= 0)
+        h5status |= H5Pset_sieve_buf_size(fapl_id, sbuf_size);
+
+    if (mbuf_size >= 0)
+        h5status |= H5Pset_meta_block_size(fapl_id, mbuf_size);
+
+    if (rbuf_size >= 0)
+        h5status |= H5Pset_small_data_block_size(fapl_id, mbuf_size);
+
+    if (use_silo_fapl)
+    {
+        h5status |= H5Pset_fapl_silo(fapl_id);
+        h5status |= H5Pset_silo_block_size_and_count(fapl_id, (hsize_t) silo_block_size,
+            silo_block_count);
+    }
+    else if (use_log)
+    {
+        int flags = H5FD_LOG_LOC_IO|H5FD_LOG_NUM_IO|H5FD_LOG_TIME_IO|H5FD_LOG_ALLOC;
+
+        if (lbuf_size > 0)
+            flags = H5FD_LOG_ALL;
+
+        h5status |= H5Pset_fapl_log(fapl_id, "ioperf_hdf5_log.out", flags, lbuf_size);
+    }
+
+    fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); 
+    if (fid < 0 || h5status < 0) return 0;
+    return 1;
+}
+
+static int Write_hdf5(void *buf, size_t nbytes)
+{
+    hid_t dsid;
+    herr_t n1, n2;
+    char dsname[256];
+    static int n = 0;
+    if (dspc == -1)
+    {
+        hsize_t dims = nbytes;
+        dspc = H5Screate_simple(1, &dims, &dims);
+    }
+
+    sprintf(dsname, "data_%07d", n++);
+    dsid = H5Dcreate(fid, dsname, H5T_NATIVE_UCHAR, dspc, H5P_DEFAULT);
+    if (dsid < 0) return 0;
+    n1 = H5Dwrite(dsid, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+    n2 = H5Dclose(dsid);
+    if (n1 < 0 || n2 < 0) return 0;
+    return nbytes;
+}
+
+static int Read_hdf5(void *buf, size_t nbytes)
+{
+    hid_t dsid;
+    herr_t n1, n2;
+    char dsname[256];
+    static int n = 0;
+    if (dspc == -1)
+    {
+        hsize_t dims = nbytes;
+        dspc = H5Screate_simple(1, &dims, &dims);
+    }
+
+    sprintf(dsname, "data_%07d", n++);
+    dsid = H5Dopen(fid, dsname);
+    if (dsid < 0) return 0;
+    n1 = H5Dread(dsid, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+    n2  = H5Dclose(dsid);
+    if (n1 < 0 || n2 < 0) return 0;
+    return nbytes;
+}
+
+static int Close_hdf5()
+{
+    if (dspc != -1)
+        H5Sclose(dspc);
+    if (H5Fclose(fid) < 0) return 0;
+    return 1;
+}
+
+static int ProcessArgs_hdf5(int argi, int argc, char *argv[])
+{
+    int i,n,nerrors=0;
+    for (i=argi; i<argc; i++)
+    {
+        errno=0;
+        if (!strcmp(argv[i], "--sieve-buf-size"))
+        {
+            sbuf_size = i<argc-1?strtol(argv[i+1], (char **)NULL, 10):0;
+            if (errno==0 && sbuf_size>=0) i++;
+            else goto fail;
+        }
+        else if (!strcmp(argv[i], "--meta-block-size"))
+        {
+            mbuf_size = i<argc-1?strtol(argv[i+1], (char **)NULL, 10):0;
+            if (errno==0 && mbuf_size>=0) i++;
+            else goto fail;
+        }
+        else if (!strcmp(argv[i], "--small-block-size"))
+        {
+            rbuf_size = i<argc-1?strtol(argv[i+1], (char **)NULL, 10):0;
+            if (errno==0 && rbuf_size>=0) i++;
+            else goto fail;
+        }
+        else if (!strcmp(argv[i], "--log"))
+        {
+            char *eptr;
+            use_log = 1;
+            lbuf_size = i<argc-1?strtol(argv[i+1], &eptr, 10):0;
+            if (errno==0 && lbuf_size>=0 && eptr != argv[i+1]) i++;
+        }
+        else if (!strcmp(argv[i], "--silo-fapl"))
+        {
+            char *eptr;
+            use_silo_fapl = 1;
+            silo_block_size = i<argc-1?strtol(argv[i+1], &eptr, 10):silo_block_size;
+            if (errno==0 && silo_block_size>=0 && eptr != argv[i+1]) i++;
+            silo_block_count = i<argc-1?strtol(argv[i+1], &eptr, 10):silo_block_count;
+            if (errno==0 && silo_block_count>=0 && eptr != argv[i+1]) i++;
+        }
+        else goto fail;
+    }
+    return 0;
+
+fail:
+    fprintf(stderr, "%s: bad argument `%s' (\"%s\")\n", argv[0], argv[i],
+        errno?strerror(errno):"");
+    return 1;
+}
+
+static iointerface_t *CreateInterfaceReal(int argi, int argc, char *argv[], const char *_filename,
+    const options_t *opts)
+{
+    iointerface_t *retval;
+
+    options = *opts;
+    filename = strdup(_filename);
+
+    if (ProcessArgs_hdf5(argi, argc, argv) != 0)
+        return 0;
+
+    retval = (iointerface_t*) calloc(sizeof(iointerface_t),1);
+    retval->Open = Open_hdf5;
+    retval->Write = Write_hdf5;
+    retval->Read = Read_hdf5;
+    retval->Close = Close_hdf5;
+
+    return retval;
+}
+
+#ifdef STATIC_PLUGINS
+iointerface_t *CreateInterface_hdf5(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#else
+iointerface_t *CreateInterface(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi argc, argv, _filename, opts);
+}
+#endif
+
diff --git a/tests/ioperf_pdb.c b/tests/ioperf_pdb.c
new file mode 100644
index 0000000..dff094d
--- /dev/null
+++ b/tests/ioperf_pdb.c
@@ -0,0 +1,120 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdlib.h>
+#include <string.h>
+#include <lite_pdb.h>
+#include <ioperf.h>
+
+/*
+ * Implement ioperf's I/O interface using PDB functions
+ */
+
+static options_t options;
+static char *filename;
+static PDBfile *pdbfile;
+
+static int Open_pdb(ioflags_t iopflags)
+{
+    pdbfile = lite_PD_create(filename);
+    if (!pdbfile) return 0;
+    return 1;
+}
+
+static int Write_pdb(void *buf, size_t nbytes)
+{
+    int status;
+    char dsname[256];
+    static int n = 0;
+    sprintf(dsname, "data_%07d(%d)", n++, nbytes/sizeof(double));
+    status = lite_PD_write(pdbfile, dsname, "double", buf);
+    if (status) return nbytes;
+    return 0;
+}
+
+static int Read_pdb(void *buf, size_t nbytes)
+{
+    return 0;
+}
+
+static int Close_pdb()
+{
+    return lite_PD_close(pdbfile);
+}
+
+static iointerface_t *CreateInterfaceReal(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    iointerface_t *retval;
+
+    options = *opts;
+    filename = strdup(_filename);
+
+    retval = (iointerface_t*) calloc(sizeof(iointerface_t),1);
+    retval->Open = Open_pdb;
+    retval->Write = Write_pdb;
+    retval->Read = Read_pdb;
+    retval->Close = Close_pdb;
+
+    return retval;
+}
+
+#ifdef STATIC_PLUGINS
+iointerface_t *CreateInterface_pdb(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#else
+iointerface_t *CreateInterface(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#endif
+
diff --git a/tests/ioperf_sec2.c b/tests/ioperf_sec2.c
new file mode 100644
index 0000000..dd584b1
--- /dev/null
+++ b/tests/ioperf_sec2.c
@@ -0,0 +1,136 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <ioperf.h>
+
+/*
+ * Implement ioperf's I/O interface using section 2 functions
+ */
+
+static options_t options;
+static const char *filename;
+static int fd;
+
+static int Open_sec2(ioflags_t iopflags)
+{
+    int flags = 0x0;
+
+    flags = O_CREAT|O_RDWR;
+    if ((iopflags&IO_WRITE) && !(iopflags&IO_READ)) flags=O_WRONLY;
+    if (!(iopflags&IO_WRITE) && (iopflags&IO_READ)) flags=O_RDONLY;
+    if (iopflags&IO_TRUNCATE) flags|=O_TRUNC;
+    if (iopflags&IO_APPEND) flags|=O_APPEND;
+
+    fd = open(filename, flags, S_IRUSR|S_IWUSR); 
+
+    return fd;
+}
+
+static int Write_sec2(void *buf, size_t nbytes)
+{
+    if (options.alignment > 0)
+    {
+        off_t cur = lseek(fd, 0, SEEK_CUR);
+	off_t remainder = cur % options.alignment;
+	if (remainder > 0)
+	    lseek(fd, remainder, SEEK_CUR);
+    }
+
+    return write(fd, buf, nbytes);
+}
+
+static int Read_sec2(void *buf, size_t nbytes)
+{
+    return read(fd, buf, nbytes);
+}
+
+static int Close_sec2()
+{
+    int n = close(fd);
+    if (n == 0) return 1;
+    return n;
+}
+
+static iointerface_t *CreateInterfaceReal(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    iointerface_t *retval;
+
+    options = *opts;
+    filename = strdup(_filename);
+
+    retval = (iointerface_t*) calloc(sizeof(iointerface_t),1);
+    retval->Open = Open_sec2;
+    retval->Write = Write_sec2;
+    retval->Read = Read_sec2;
+    retval->Close = Close_sec2;
+
+    return retval;
+}
+
+#ifdef STATIC_PLUGINS
+iointerface_t *CreateInterface_sec2(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#else
+iointerface_t *CreateInterface(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#endif
+
diff --git a/tests/ioperf_silo.c b/tests/ioperf_silo.c
new file mode 100644
index 0000000..ce82ace
--- /dev/null
+++ b/tests/ioperf_silo.c
@@ -0,0 +1,196 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <silo.h>
+#include <std.c>
+
+#include <ioperf.h>
+
+/*
+ * Implement ioperf's I/O interface using Silo functions
+ */
+
+static options_t options;
+static const char *filename;
+DBfile *dbfile;
+static int has_mesh = 0;
+static int driver = DB_HDF5;
+static int show_all_errors = FALSE;
+
+static int Open_silo(ioflags_t iopflags)
+{
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "ioperf test file", driver);
+    if (!dbfile) return 0;
+    return 1;
+}
+
+static int Write_silo(void *buf, size_t nbytes)
+{
+    static int n = 0;
+    int dims[3] = {1, 1, 1};
+    int status;
+
+    dims[0] = nbytes / sizeof(double);
+    if (!has_mesh)
+    {
+        char *coordnames[] = {"x"};
+        void *coords[3] = {0, 0, 0};
+        coords[0] = buf;
+        has_mesh = 1;
+        status = DBPutQuadmesh(dbfile, "mesh", coordnames, coords, dims, 1, DB_DOUBLE, DB_COLLINEAR, 0);
+    }
+    else
+    {
+        char dsname[64];
+        sprintf(dsname, "data_%07d", n++);
+        status = DBPutQuadvar1(dbfile, dsname, "mesh", buf, dims, 1, 0, 0, DB_DOUBLE, DB_NODECENT, 0);
+    }
+
+    if (status < 0) return 0;
+    return nbytes;
+}
+
+static int Read_silo(void *buf, size_t nbytes)
+{
+    char dsname[64];
+    static int n = 0;
+    void *status;
+    sprintf(dsname, "data_%07d", n++);
+    status = DBGetQuadvar(dbfile, dsname);
+    if (status == 0) return 0;
+    return nbytes;
+}
+
+static int Close_silo()
+{
+    CleanupDriverStuff();
+    if (DBClose(dbfile) < 0) return 0;
+    return 1;
+}
+
+static int ProcessArgs_silo(int argi, int argc, char *argv[])
+{
+    int i,n,nerrors=0;
+    DBoptlist *opts = DBMakeOptlist(30);
+    for (i=argi; i<argc; i++)
+    {
+        errno=0;
+        if (!strcmp(argv[i], "--driver"))
+        {
+            i++;
+	    driver = StringToDriver(argv[i]);
+        }
+        else if (!strcmp(argv[i], "--checksums"))
+        {
+            DBSetEnableChecksums(1);
+        }
+        else if (!strcmp(argv[i], "--hdf5friendly"))
+        {
+            DBSetFriendlyHDF5Names(1);
+        }
+        else if (!strcmp(argv[i], "--compression"))
+        {
+            char compstr[256];
+            i++;
+            sprintf(compstr, "METHOD=%s", argv[i]);
+            DBSetCompression(compstr);
+        }
+        else if (!strcmp(argv[i], "--show-all-errors"))
+	{
+            show_all_errors = 1;
+	}
+        else goto fail;
+    }
+    return 0;
+
+fail:
+    fprintf(stderr, "%s: bad argument `%s' (\"%s\")\n", argv[0], argv[i],
+        errno?strerror(errno):"");
+    return 1;
+}
+
+static iointerface_t *CreateInterfaceReal(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    iointerface_t *retval;
+
+    options = *opts;
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    if (ProcessArgs_silo(argi, argc, argv) != 0)
+        return 0;
+
+    filename = strdup(_filename);
+
+    retval = (iointerface_t*) calloc(sizeof(iointerface_t),1);
+    retval->Open = Open_silo;
+    retval->Write = Write_silo;
+    retval->Read = Read_silo;
+    retval->Close = Close_silo;
+
+    return retval;
+}
+
+#ifdef STATIC_PLUGINS
+iointerface_t *CreateInterface_silo(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#else
+iointerface_t *CreateInterface(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#endif
diff --git a/tests/ioperf_stdio.c b/tests/ioperf_stdio.c
new file mode 100644
index 0000000..6933117
--- /dev/null
+++ b/tests/ioperf_stdio.c
@@ -0,0 +1,122 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <ioperf.h>
+
+/*
+ * Purpose: Implement ioperf's I/O interface using stdio functions
+ */
+
+static options_t options;
+static const char *filename;
+static FILE *file; 
+
+static int Open_stdio(ioflags_t iopflags)
+{
+    char *mode;
+
+    mode = "a+";
+    if ((iopflags&IO_WRITE) && !(iopflags&IO_READ)) mode="w";
+    if (!(iopflags&IO_WRITE) && (iopflags&IO_READ)) mode="r";
+
+    file = fopen(filename, mode);
+    if (!file) return 0;
+    return 1;
+}
+
+static int Write_stdio(void *buf, size_t nbytes)
+{
+    return fwrite(buf, 1, nbytes, file);
+}
+
+static int Read_stdio(void *buf, size_t nbytes)
+{
+    return fread(buf, 1, nbytes, file);
+}
+
+static int Close_stdio()
+{
+    int n = fclose(file);
+    if (n == 0) return 1;
+    return n;
+}
+
+static iointerface_t *CreateInterfaceReal(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    iointerface_t *retval;
+
+    options = *opts;
+    filename = strdup(_filename);
+
+    retval = (iointerface_t*) calloc(sizeof(iointerface_t),1);
+    retval->Open = Open_stdio;
+    retval->Write = Write_stdio;
+    retval->Read = Read_stdio;
+    retval->Close = Close_stdio;
+
+    return retval;
+}
+
+#ifdef STATIC_PLUGINS
+iointerface_t *CreateInterface_stdio(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#else
+iointerface_t *CreateInterface(int argi, int argc, char *argv[], const char *_filename, const options_t *opts)
+{
+    return CreateInterfaceReal(argi, argc, argv, _filename, opts);
+}
+#endif
diff --git a/tests/ioperf_tests b/tests/ioperf_tests
new file mode 100755
index 0000000..718f04a
--- /dev/null
+++ b/tests/ioperf_tests
@@ -0,0 +1,48 @@
+#!/bin/sh
+#drivers=$(ls ioperf_*.c | cut -d'_' -f2 | cut -d'.' -f1)
+drivers="sec2 stdio hdf5 pdb silo"
+#silodrivers="DB_PDB DB_HDF5 DB_HDF5_CORE DB_HDF5_SEC2 DB_HDF5_STDIO"
+silodrivers="DB_PDB DB_HDF5"
+#silodrivers="DB_PDB DB_HDF5_OPTS(DBOPT_H5_VFD=DB_H5VFD_SILO,DBOPT_H5_SILO_BLOCK_SIZE=307200)"
+#reqsizes="1K 5K 10K 25K 50K 75K 100K 175K 250K 500K 1M 5M 10M 50M 100M"
+reqsizes="1K 5K 10K 25K 50K 75K 100K 175K 250K"
+scenarios=(":" "-n:--size-noise 1")
+#siloscenarios=(":" "-n:--size-noise 1" "-f:--hdf5friendly" "-ck:--checksums" "-gz:--compression GZIP" "-sz:--compression SZIP" "-fpz:--compression FPZIP")
+siloscenarios=(":" "-n:--size-noise 1")
+numreqs="10"
+IOP=./ioperf_static
+
+for d in $drivers; do
+    if test $d = silo; then
+        for sd in $silodrivers; do
+            for (( i=0; i<${#siloscenarios[*]}; i++ )); do
+                moniker=$(echo ${siloscenarios[$i]} | cut -d':' -f1)
+                args=$(echo ${siloscenarios[$i]} | cut -d':' -f2)
+                echo "${d}-${sd}${moniker}"
+                for rs in $reqsizes; do
+                    results=$($IOP --io-interface $d --request-size $rs --num-requests $numreqs $args --silo-args --driver $sd)
+                    tot=$(echo $results | cut -d':' -f2 | cut -d'=' -f2 | cut -d' ' -f2)
+                    avg=$(echo $results | cut -d':' -f3 | cut -d'=' -f2 | cut -d' ' -f2)
+                    echo "$rs	$tot	$avg"
+                done
+                if test $sd = DB_PDB -a $i -eq 1; then
+                    break 1
+                fi
+            done
+#            rm -f iop_test_${d}.dat
+        done
+    else
+        for (( i=0; i<${#scenarios[*]}; i++ )); do
+            moniker=$(echo ${scenarios[$i]} | cut -d':' -f1)
+            args=$(echo ${scenarios[$i]} | cut -d':' -f2)
+            echo "${d}${moniker}"
+            for rs in $reqsizes; do
+                results=$($IOP --io-interface $d --request-size $rs --num-requests $numreqs $args)
+                tot=$(echo $results | cut -d':' -f2 | cut -d'=' -f2 | cut -d' ' -f2)
+                avg=$(echo $results | cut -d':' -f3 | cut -d'=' -f2 | cut -d' ' -f2)
+                echo "$rs	$tot	$avg"
+            done
+        done
+    fi
+#    rm -f iop_test_${d}.dat
+done
diff --git a/tests/largefile.c b/tests/largefile.c
new file mode 100644
index 0000000..860def4
--- /dev/null
+++ b/tests/largefile.c
@@ -0,0 +1,249 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo           */
+
+#ifdef WIN32
+#include <stdlib.h>
+#endif
+#include <math.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+
+#define ONE_MEG 1048576
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+
+#include <std.c>
+
+static void
+build_curve (DBfile *dbfile, int driver)
+{
+   float        x[20], y[2][20] ;
+   int          i ;
+   DBoptlist    *opts ;
+
+   /*
+    * Sine and cosine for 1/2 cycle.  Both curves have the same
+    * X data points and share the data in the file.
+    */
+   for (i=0; i<20; i++) {
+      x[i] = i * M_PI / 20.0 ;
+      y[0][i] = sin (x[i]) ;
+      y[1][i] = cos (x[i]) ;
+   }
+
+   opts = DBMakeOptlist (10) ;
+   DBAddOption (opts, DBOPT_XLABEL, "X Axis") ;
+   DBAddOption (opts, DBOPT_YLABEL, "Y Axis") ;
+   DBAddOption (opts, DBOPT_XUNITS, "radians") ;
+
+   /*
+    * Write the 'sincurve' curve. The hdf5 driver allows the user to specify
+    * the name which will be used to store the x values, but the pdb driver
+    * requires us to know where the values were stored.
+    */
+   if (DB_HDF5==(driver&0xF)) DBAddOption(opts, DBOPT_XVARNAME, "sincurve_xvals");
+   DBPutCurve (dbfile, "sincurve", x, y[0], DB_FLOAT, 20, opts);
+   if (DB_HDF5!=(driver&0xF)) DBAddOption(opts, DBOPT_XVARNAME, "sincurve_xvals");
+
+   /*
+    * Write the 'coscurve' curve. It shares x values with the 'sincurve'
+    * curve.
+    */
+   DBPutCurve (dbfile, "coscurve", NULL, y[1], DB_FLOAT, 20, opts) ;
+   DBFreeOptlist (opts) ;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:        main
+ *
+ * Purpose:        
+ *
+ * Return:        0
+ *
+ * Programmer: Mark C. Miller, sometime in the past
+ *
+ * Modifications:
+ *     Mark C. Miller, Wed Jan  7 15:14:47 PST 2009
+ *     Added check of return value for DBWrite calls.
+ *
+ *-------------------------------------------------------------------------
+ */
+int            dims[]={ONE_MEG/sizeof(float)};
+float          val[ONE_MEG/sizeof(float)];
+float          rval[ONE_MEG/sizeof(float)];
+
+int
+main(int argc, char *argv[])
+{
+    
+    int            nerrors = 0;
+    int            i, j, ndims=1; 
+    int            driver=DB_HDF5;
+    char          *filename="largefile.silo";
+    int            show_all_errors = FALSE;
+    DBfile        *dbfile;
+    int            nIters = 2500;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB",6)) {
+            driver = StringToDriver(argv[i]);
+            if (sizeof(int)<8)
+            {
+                fprintf(stderr, "Looks like PDB cannot support >2Gig files. Will stop at 1.990 Gigs\n");
+                nIters = 1990;
+            }
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "largefile.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument '%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_TOP, NULL);
+    DBForceSingle(1);
+
+    /*
+     * Create a file that contains a simple variables.
+     */
+    printf("Creating file: '%s'\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "Simple Test", driver);
+
+    for (j = 0; j < nIters; j++)
+    {
+        char tmpname[64];
+
+        if (j % 100 == 0)
+            printf("Iterations %04d to %04d of %04d\n", j, j+100-1, nIters);
+
+        sprintf(tmpname, "simple_%04d", j);
+
+        for (i = 0; i < dims[0]; i++)
+            val[i] = (float) dims[0] * j + i;
+
+        if (DBWrite(dbfile, tmpname, val, dims, ndims, DB_FLOAT) != 0)
+        {
+            DBClose(dbfile);
+            exit(1);
+        }
+    }
+
+   /*
+    * Put some objects VisIt can process at the end of the file
+    */
+    build_curve(dbfile, driver);
+
+    DBClose(dbfile);
+
+    /*
+     * Now try opening the file again and reading the simple
+     * variable.
+     */
+    printf("Reopening '%s'\n", filename);
+    dbfile = DBOpen(filename, driver, DB_READ);
+
+    if (dbfile == 0)
+    {
+        printf("Unable to Reopen file for reading\n");
+        exit(1);
+    }
+
+    /*
+     * Randomly examine 50 arrays from the first and last 500
+     */
+    srand(0xBabeFace);
+    for (j = 0; j < 100; j++)
+    {
+        char tmpname[64];
+
+        int n = rand() % 500 + (j >= 50 ? (nIters-500) : 0);
+
+        sprintf(tmpname, "simple_%04d", n);
+
+        if (DBReadVar(dbfile, tmpname, rval) < 0)
+        {
+            nerrors++;
+            if (nerrors < 10) printf("DBReadVar for \"%s\" failed\n", tmpname);
+            if (nerrors == 10) printf("Further errors will be suppressed\n");
+        }
+
+        for (i = 0; i < dims[0]; i++)
+        {
+            val[i] = (float) dims[0] * n + i;
+            if (val[i] != rval[i])
+            {
+                nerrors++;
+                if (nerrors < 10) printf("Read error in \"%s\" at position %04d. Expected %f, got %f\n",
+                                          tmpname, i, val[i], rval[i]);
+                if (nerrors == 10) printf("Further errors will be suppressed\n");
+                break;
+            }
+        }
+    }
+
+    DBClose(dbfile);
+
+    exit(nerrors > 0);
+}
diff --git a/tests/listtypes.c b/tests/listtypes.c
new file mode 100644
index 0000000..b34bc57
--- /dev/null
+++ b/tests/listtypes.c
@@ -0,0 +1,406 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <silo.h>
+#include <config.h>
+
+#define ALLOC_N(T, N) (T *)malloc((N) * sizeof(T))
+#define FREE(P) if(P) {free(P); (P) = NULL;}
+
+/* Prototypes */
+void PrintFileComponentTypes(char *);
+void PrintObjectComponentsType(DBfile *, char *, char *);
+
+/*********************************************************************
+ *
+ * Purpose: Converts an int DB type to its string name.
+ *
+ * Programmer: Brad Whitlock
+ * Date:       Thu Jan 20 14:12:23 PST 2000
+ *
+ * Input Arguments:
+ *    type : This is an integer representing a DB type.
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Mon Sep 21 15:17:08 PDT 2009
+ *   Adding support for long long type.
+ *
+ *   Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *   Conditionally compile long long support only when its
+ *   different from long.
+ *
+ *   Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *   Made long long support UNconditionally compiled.
+ ********************************************************************/
+
+char *
+IntToTypename(int type)
+{
+    char *retval;
+
+    switch(type)
+    {
+    case DB_INT:
+        retval = "DB_INT";
+        break;
+    case DB_SHORT:
+        retval = "DB_SHORT";
+        break;
+    case DB_LONG:
+        retval = "DB_LONG";
+        break;
+    case DB_LONG_LONG:
+        retval = "DB_LONG_LONG";
+        break;
+    case DB_FLOAT:
+        retval = "DB_FLOAT";
+        break;
+    case DB_DOUBLE:
+        retval = "DB_DOUBLE";
+        break;
+    case DB_CHAR:
+        retval = "DB_CHAR";
+        break;
+    case DB_VARIABLE:
+        retval = "DB_VARIABLE";
+        break;
+    default:
+        retval = "DB_NOTYPE";
+    }
+
+    return retval;
+}
+
+/*********************************************************************
+ *
+ * Purpose: Main function for listtypes.c. This function iterates
+ *          over the command line arguments and supplies them to
+ *          a function that prints the component types for a file.
+ *          This program tests the DBGetComponentType function.
+ *
+ * Programmer: Brad Whitlock
+ * Date:       Thu Jan 20 13:05:37 PST 2000
+ *
+ * Input Arguments:
+ *     argc : The number of command line arguments.
+ *     argv : An array containing the command line arguments.
+ *
+ * Modifications:
+ *     Thomas R. Treadway, Thu Jul  5 16:33:38 PDT 2007
+ *     Chaneged main's return type to int, to stop gcc-4.x whining.
+ *
+ ********************************************************************/
+
+int
+main(int argc, char *argv[])
+{
+    int i;
+
+    if(argc < 2)
+    {
+        printf("Usage: listtypes filename [filename ...]\n");
+        exit(0);
+    }
+
+    DBShowErrors (DB_NONE, NULL);
+
+    /* Print the types for components in the specified files. */
+    for(i = 1; i < argc; i++)
+    {
+        if (!strcmp(argv[i], "show-all-errors"))
+            DBShowErrors (DB_ALL_AND_DRVR, NULL);
+        else
+            PrintFileComponentTypes(argv[i]);
+    }
+    
+    return 0;
+}
+
+/*********************************************************************
+ *
+ * Purpose: Macroize code that processes entries in the TOC.
+ *
+ * The last 'S' argument to the macro is used to handle plural or
+ * singular form of specification of toc data members.
+ *
+ * Programmer: Mark C. Miller
+ * Date:       June 19, 2008 
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Wed Sep 23 11:55:48 PDT 2009
+ *   Added misc. variables.
+ ********************************************************************/
+#define PRINT_OBJS(theFile, theToc, theClass, Indent, S)        \
+    nobjs += theToc->n ## theClass ## S;                                \
+    for (i = 0; i < theToc->n ## theClass ## S; i++)            \
+        PrintObjectComponentsType(theFile, theToc->theClass ## _names[i], Indent);
+
+int ProcessCurrentDirectory(DBfile *dbfile, DBtoc *dbtoc, int depth)
+{
+    int i, j, nobjs;
+    char indent[1024];
+    int ndirs = dbtoc->ndir;
+
+    /* compute an indent */
+    for (i = 0; i < depth * 3; i++)
+        indent[i] = ' ';
+    indent[i] = '\0';
+
+    /* descend into subdirs, first */
+    if(ndirs > 0)
+    {
+        /* Make a list of all the directory names since the list
+         * in the TOC will change as we change directories.
+         */
+        char currentdir[1024];
+        char **dir_names = ALLOC_N(char *, ndirs);
+        DBGetDir(dbfile, currentdir);
+        for(i = 0; i < ndirs; i++)
+        {
+            dir_names[i] = ALLOC_N(char, 1+strlen(dbtoc->dir_names[i])+
+                                   strlen(currentdir));
+            sprintf(dir_names[i], "%s%s", currentdir, dbtoc->dir_names[i]);
+        }
+
+        /* Search each directory for objects. */
+        for(j = 0; j < ndirs; j++)
+        {
+            /* Change directories and get the TOC. */
+            DBtoc *current_dbtoc;
+            DBSetDir(dbfile, dir_names[j]);
+            current_dbtoc = DBGetToc(dbfile);
+            printf("%sDirectory: %s\n", indent, dir_names[j]);
+            if (ProcessCurrentDirectory(dbfile, current_dbtoc, depth+1) <= 0)
+                printf("%s<directory contains no objects>\n\n", indent);
+        }
+
+        /* Free the directory list. */
+        for(i = 0; i < ndirs; i++)
+            FREE(dir_names[i]);
+        FREE(dir_names);
+
+        DBSetDir(dbfile, currentdir);
+        dbtoc = DBGetToc(dbfile);
+    }
+
+    /* Print the objects in the top directory. */
+    nobjs = ndirs; 
+    PRINT_OBJS(dbfile, dbtoc, obj, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, defvars, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, array, indent, s);
+    PRINT_OBJS(dbfile, dbtoc, var, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, curve, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, ptmesh, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, ptvar, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, qmesh, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, qvar, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, ucdmesh, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, ucdvar, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, csgmesh, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, csgvar, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, mat, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, matspecies, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, multimesh, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, multimeshadj, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, multivar, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, multimat, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, multimatspecies, indent, /*void*/);
+    PRINT_OBJS(dbfile, dbtoc, mrgtree, indent, s);
+    PRINT_OBJS(dbfile, dbtoc, mrgvar, indent, s);
+    PRINT_OBJS(dbfile, dbtoc, groupelmap, indent, s);
+    return nobjs;
+}
+
+/*********************************************************************
+ *
+ * Purpose: Reads the specified file and prints out the types of all
+ *          of its components.
+ *
+ * Programmer: Brad Whitlock
+ * Date:       Thu Jan 20 12:21:36 PDT 2000
+ *
+ * Input Arguments:
+ *     filename : The path and name the file we want to print out.
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Wed Sep 23 11:56:19 PDT 2009
+ *   Made it use DB_UNKNOWN driver to open.
+ ********************************************************************/
+
+void
+PrintFileComponentTypes(char *filename)
+{
+    DBfile *dbfile = NULL;
+    DBtoc  *dbtoc = NULL;
+
+    /* Open the data file. Return if it cannot be read. */
+    if((dbfile = DBOpen(filename, DB_UNKNOWN, DB_READ)) == NULL)
+    {
+        printf("File: %s\n    <could not be opened>\n\n", filename);
+        return;
+    }
+
+    /* Read the file's table of contents. */
+    if((dbtoc = DBGetToc(dbfile)) == NULL)
+    {
+        printf("File: %s\n    <could not read TOC>\n\n", filename);
+        DBClose(dbfile);
+        return;
+    }
+
+    printf("File: %s\n", filename);
+
+    if (ProcessCurrentDirectory(dbfile, dbtoc, 0) <= 0)
+        printf("<file contains no objects>\n\n");
+
+    /* Close the file. */
+    DBClose(dbfile);
+}
+
+/*********************************************************************
+ *
+ * Purpose: Prints all of the components in the specified object.
+ *          The component's name, type, and value are printed. The
+ *          value is printed using the type information gathered
+ *          from DBGetComponentType.
+ *
+ * Programmer: Brad Whitlock
+ * Date:       Thu Jan 20 13:09:48 PST 2000
+ *
+ * Input Arguments:
+ *     dbfile  : The database file.
+ *     objname : The name of the object whose components we're
+ *               going to print.
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Wed Sep 23 11:56:40 PDT 2009
+ *  Added support for misc. variable printing.
+ ********************************************************************/
+
+void
+PrintObjectComponentsType(DBfile *dbfile, char *objname, char *indent)
+{
+    int  i, comptype = DB_NOTYPE;
+    DBobject *obj = NULL;
+
+    /* Get the component names for the object. */
+    if((obj = DBGetObject(dbfile, objname)) == NULL)
+    {
+        int len = DBGetVarLength(dbfile, objname);
+        comptype = DBGetVarType(dbfile, objname);
+        printf("%sObject: \"%s\" is a simple array\n", indent, objname);
+        printf("    Length: %d  Type: %-11s\n", len, IntToTypename(comptype));
+        return;
+    }
+
+    printf("%sObject: \"%s\"\n", indent, objname);
+    if(obj->ncomponents > 0)
+    {
+        void *comp = NULL;
+
+        /* For each component, read its type and print it. */
+        for(i = 0; i < obj->ncomponents; i++)
+        {
+            comptype = DBGetComponentType(dbfile, objname, obj->comp_names[i]);
+
+            comp = NULL;
+            if(comptype != DB_VARIABLE)
+                comp = DBGetComponent(dbfile, objname, obj->comp_names[i]);
+
+            printf("    %sComponent: %-15s  Type: %-11s",
+                   indent, obj->comp_names[i], IntToTypename(comptype));
+
+            if(comp != NULL)
+            {
+                /* Use the type information returned by DBGetComponentType 
+                 * to correctly process the component data.
+                 */
+                switch(comptype)
+                {
+                case DB_INT:
+                    printf(" Value: %d\n", *((int *)comp));
+                    break;
+                case DB_CHAR:
+                    printf(" Value: %s\n", (char *)comp);
+                    break;
+                case DB_FLOAT:
+                    printf(" Value: %g\n", *((float *)comp));
+                    break;
+                case DB_DOUBLE:
+                    printf(" Value: %.30g\n", *((double *)comp));
+                    break;
+                default:
+                    printf(" Value: ???\n");
+                }
+
+                /* Free the component memory. */
+                free(comp);
+            }
+            else
+                printf("\n");
+        }
+        printf("\n");
+    }
+    else
+        printf("    %s<no components>\n\n", indent);
+
+    /* Free the object.*/
+    DBFreeObject(obj);
+}
diff --git a/tests/mat3d_3across.c b/tests/mat3d_3across.c
new file mode 100644
index 0000000..ec78039
--- /dev/null
+++ b/tests/mat3d_3across.c
@@ -0,0 +1,181 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*------------------------------------------------------------------------
+ * mat3d_3across.c -- 3d curvilinear test case with up to 3 materials/zone
+ *                    
+ *
+ * Programmer:  Jeremy Meredith,  March 28, 2000
+ *
+ *  This test case creates a 3x3x3 curvilinear mesh.  The 9 leftmost zones
+ *  contain material 1.  The 9 rightmost zones contain material 3.  The 9
+ *  central zones contain materials 1,2,3 in a 20/60/20 split.
+ *
+ *  This should (ideally) produce a strip of material 2 down the center 
+ *  of the mesh.
+ *
+ *
+ * Modifications:
+ *
+ *-----------------------------------------------------------------------*/
+#include <stdlib.h>
+#include <string.h>
+#include "silo.h"
+#include <std.c>
+
+#define zx 3
+#define zy 3
+#define zz 3
+
+#define nx 4
+#define ny 4
+#define nz 4
+
+float x[nx*ny*nz]={-1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,
+                   -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,
+                   -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,
+                   -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2,  -1, 0, 1, 2};
+float y[nx*ny*nz]={-1,-1,-1,-1,   0, 0, 0, 0,   1, 1, 1, 1,   2, 2, 2, 2,
+                   -1,-1,-1,-1,   0, 0, 0, 0,   1, 1, 1, 1,   2, 2, 2, 2,
+                   -1,-1,-1,-1,   0, 0, 0, 0,   1, 1, 1, 1,   2, 2, 2, 2,
+                   -1,-1,-1,-1,   0, 0, 0, 0,   1, 1, 1, 1,   2, 2, 2, 2};
+float z[nx*ny*nz]={-1,-1,-1,-1,  -1,-1,-1,-1,  -1,-1,-1,-1,  -1,-1,-1,-1, 
+                    0, 0, 0, 0,   0, 0, 0, 0,   0, 0, 0, 0,   0, 0, 0, 0,
+                    1, 1, 1, 1,   1, 1, 1, 1,   1, 1, 1, 1,   1, 1, 1, 1,
+                    2, 2, 2, 2,   2, 2, 2, 2,   2, 2, 2, 2,   2, 2, 2, 2};
+
+int nmat=3;
+int matnos[] = {1,2,3};
+
+int     matlist[nx*ny*nz] = { 1,-1,3,  1,-4,3,  1,-7,3,
+                              1,-10,3, 1,-13,3, 1,-16,3,
+                              1,-19,3, 1,-22,3, 1,-25,3 };
+int     mix_mat [100]     = { 1,2,3,   1,2,3,  1,2,3, 
+                              1,2,3,   1,2,3,  1,2,3,
+                              1,2,3,   1,2,3,  1,2,3  };
+int     mix_next[100]     = { 2,3,0,   5,6,0,  8,9,0,
+                              11,12,0, 14,15,0, 17,18,0,
+                              20,21,0, 23,24,0, 26,27,0 };
+#define M1 .2
+#define M2 .6
+#define M3 .2
+
+float   mix_vf  [100]     = { M1,M2,M3, M1,M2,M3, M1,M2,M3,
+                              M1,M2,M3, M1,M2,M3, M1,M2,M3,
+                              M1,M2,M3, M1,M2,M3, M1,M2,M3 };
+
+int     mix_zone[100]     = {  2, 2, 2,  5, 5, 5,  8, 8, 8,
+                              11,11,11, 14,14,14, 17,17,17,
+                              20,20,20, 23,23,23, 26,26,26 };
+int     mixlen = 27;
+
+int     dims[3];
+
+#define ALLOC_N(t,n) (t*)(calloc(n, sizeof(n)));
+
+/*--------------------*/
+/*    Main Program    */
+/*--------------------*/
+int main(int argc, char **argv) {
+    DBfile *db;
+    int            i, driver = DB_PDB;
+    char          *filename = "csg.pdb";
+    int            show_all_errors = FALSE;
+    char  *coordnames[3];
+    float *coord[3];
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB",6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "mat3d_3across.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "mat3d_3across.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+  if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+  coordnames[0]=strdup("x");
+  coordnames[1]=strdup("y");
+  coordnames[2]=strdup("z");
+
+  coord[0] = x;
+  coord[1] = y;
+  coord[2] = z;
+
+  dims[0]=nx;
+  dims[1]=ny;
+  dims[2]=nz;
+
+  db=DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+              "Mixed zone 3d test", driver);
+
+  DBPutQuadmesh(db, "mesh", coordnames, coord, dims, 3, 
+                DB_FLOAT, DB_NONCOLLINEAR, NULL);
+
+  dims[0]=zx;
+  dims[1]=zy;
+  dims[2]=zz;
+
+  DBPutMaterial(db, "material", "mesh", nmat, matnos, matlist, dims, 3, 
+		mix_next, mix_mat, mix_zone, mix_vf, mixlen, DB_FLOAT, NULL);
+
+  DBClose(db);
+
+  CleanupDriverStuff();
+  return 0;
+}
+
diff --git a/tests/matf77.f b/tests/matf77.f
new file mode 100644
index 0000000..b446877
--- /dev/null
+++ b/tests/matf77.f
@@ -0,0 +1,443 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+      program testmat
+
+
+c...This program tests the use of the UCD Fortran jacket routines, plus
+c...the underlying UCD C routines.
+
+
+      call writeit ("mat.pdb")
+      print *,'Created mat.pdb'
+
+
+      stop
+      end
+
+      subroutine writeit (fname)
+c----------------------------------------------------------------------
+c----------------------------------------------------------------------
+c----------------------------------------------------------------------
+c----------------------------------------------------------------------
+c----------------------------------------------------------------------
+cc      implicit double precision (a-h,o-z)
+
+
+c...Include SILO definitions.
+
+      include 'silo.inc'
+
+
+      character*(*) fname
+
+      parameter (NMATS  = 2)
+      parameter (NZONES = 6)
+      parameter (NFACES = 10)   ! External faces only
+      parameter (NNODES = 12)
+      parameter (MAXMIX = NMATS * NZONES)
+      parameter (MAXOMIX= NMATS * 2)
+      parameter (NZSHAPES = 1)
+      parameter (NFSHAPES = 1)
+      parameter (NFTYPES  = 0)
+      parameter (LZNODELIST = 4 * NZONES)
+      parameter (LFNODELIST = 2 * NFACES)
+
+
+      integer  dbid, idatatype
+      integer  tcycle
+      real     ttime
+      real     x(NNODES), y(NNODES)
+      real     d(NZONES), df(MAXOMIX), dfnew(MAXMIX)
+      integer  fnodelist(LFNODELIST)
+      integer  fshapesize(NFSHAPES), fshapecnt(NFSHAPES)
+      integer  zshapesize(NZSHAPES), zshapecnt(NZSHAPES)
+      integer  znodelist(LZNODELIST)
+      integer  flid, zlid
+
+      integer  matlist(NZONES), matlisto(NZONES)
+      integer  nmix(NMATS), matnos(NMATS)
+      real     vf(MAXOMIX)
+      integer  mixedels(MAXOMIX)
+
+      integer  mix_mat(MAXMIX), mix_next(MAXMIX)
+      integer  mix_zone(MAXMIX)
+      real     mix_vf(MAXMIX)
+      character*1024 meshnms(3)
+      integer  dims(2), err, optlist, lmeshnms(3)
+      integer  meshtypes(3)
+
+
+      data matlist /2, 2, 0, 0, 1, 1/
+      data mixedels/3, 4, 3, 4/
+      data nmix    /2, 2/
+      data vf      /.6, .8, .4, .2/
+      data matnos  /1, 2/
+      data ttime   /1.23/
+      data tcycle  /200/
+
+      data x /0., 0., 0., 0.,1.5,1.5,1.5,1.5, 3., 3., 3., 3./
+      data y /3., 2., 1., 0., 3., 2., 1., 0., 3., 2., 1., 0./
+      data d /1.,2.,3.,4.,5.,6./
+      data df/.58,.78,.42,.22/
+
+      data fshapesize /2/, fshapecnt/NFACES/
+      data zshapesize /4/, zshapecnt/NZONES/
+      data fnodelist  /0,1,1,2,2,3,3,7,7,11,11,10,10,9,9,8,8,4,4,0/
+      data znodelist
+     .         /0,1,5,4,4,5,9,8,1,2,6,5,5,6,10,9,2,3,7,6,6,7,11,10/
+
+
+      ttime = 2.345
+cc      idatatype = 20       ! double
+      idatatype = 19       ! float
+
+      err = dbshowerrors(DB_ABORT)
+      err = dbset2dstrlen(1024)
+
+c...Create option list for use with functions that want it.
+
+      err = dbmkoptlist (5, optlist)
+      err = dbaddiopt   (optlist, DBOPT_CYCLE, tcycle)  ! integer
+      err = dbaddropt   (optlist, DBOPT_TIME,  ttime)   ! real
+
+
+
+      err = dbcreate(fname, len(fname), 0, DB_LOCAL,
+     .               "foo-info", 8, DB_PDB, dbid)
+      if (err .ne. 0) then
+         print *,'Error from dbcreate'
+         stop
+      endif
+
+      err = dbputfl(dbid, "facelist", 8,
+     .              NFACES, 2, fnodelist, LFNODELIST, 0, DB_F77NULL,
+     .              fshapesize, fshapecnt, NFSHAPES, DB_F77NULL,
+     .              DB_F77NULL, 0, flid)
+
+
+
+
+      err = dbputzl(dbid, "zonelist", 8,
+     .              NZONES, 2, znodelist, LZNODELIST, 0,
+     .              zshapesize, zshapecnt, NZSHAPES, zlid)
+
+
+      err = dbaddcopt (optlist, DBOPT_XLABEL, "my-x-label", 10)
+
+      err = dbputum(dbid, "mesh1", 5, 2, x, y, DB_F77NULL,
+     .              "X", 1, "Y", 1, DB_F77NULLSTRING, 0,
+     .              idatatype, NNODES, NZONES, "zonelist", 8,
+     .              "facelist", 8, optlist, meshid)
+
+
+
+c...Test material conversion functions, and write results.
+
+      do 10 i = 1 , MAXMIX
+         mix_mat(i)  = -99
+         mix_next(i) = -99
+         mix_zone(i) = -99
+         mix_vf(i)   = -99.
+ 10   continue
+
+      inmats  = NMATS
+      inzones = NZONES
+      dims(1) = NZONES
+      ndims   = 1
+
+
+
+      err = convtmat (mixedels, nmix, matlist, matnos, matlisto,
+     .                mix_next, mix_mat, mix_zone,
+     .                mixlen, idatatype, inmats, inzones,
+     .                vf, mix_vf)
+
+      err = dbputmat (dbid, "mat", 3, "mesh1", 5,
+     .               inmats, matnos, matlisto,
+     .               dims, ndims, mix_next, mix_mat, mix_zone, mix_vf,
+     .               mixlen, idatatype, optlist, matid)
+
+
+      err = convtmix (df, idatatype, mixedels, nmix, inmats,
+     .                matlist, inzones, dfnew, mixlen)
+
+      err = dbputuv1 (dbid, "d", 1, "mesh1", 5,
+     .                d, inzones, dfnew, mixlen,
+     .                idatatype, DB_ZONECENT, optlist, id)
+
+c...This is a bugus multi-mesh but it tests the interface,
+c...particularly with strings larger than 32 chars
+      meshnms(3)  = "foobargorfo"
+      lmeshnms(3) = 11
+      meshnms(1)  = "mesh1"
+      lmeshnms(1) = 5
+      meshnms(2)  = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+      lmeshnms(2) = 40
+      meshtypes(1) = DB_UCD
+      meshtypes(2) = DB_UCD
+      meshtypes(3) = DB_UCD
+      err = dbputmmesh (dbid, "multimesh", 9, 3,
+     .                  meshnms, lmeshnms, meshtypes,
+     .                  DB_F77NULL, id)
+
+c...Test out multi mesh. (Special case, since nmesh == 1.) Ordinarily
+c...you would have to provide arrays for the 'ids', 'types' and 'dirs'.
+
+c     meshnms(1)  = "mesh1"
+c     lmeshnms(1) = 5
+c
+c     err = dbputmulti (dbid, "multimesh", 9, 1, meshid,
+c    .                  meshnms, lmeshnms, DB_UCD, 0,
+c    .                  DB_F77NULL, id)
+
+c...Close file before quitting.
+
+      err = dbclose(dbid)
+
+      return
+      end
+
+c ******************************************************************************
+c *  Routine                                                            convtmat
+c *
+c *  Purpose
+c *
+c * 	Convert from by-material representation of material data to by-zone.
+c *
+c *  Programmer
+c *
+c *     Jeff Long, NSSD/B
+c *
+c *  Notes
+c *
+c *     The SILO material routines expect data to be stored in a by-zone
+c *     fashion. This function converts from the ALE3D representation to
+c *     the SILO representation.
+c *
+c ******************************************************************************
+
+      function convtmat (mixed_els, nmix, matlist, matnos, matlist_out,
+     .                   mix_next, mix_mat, mix_zone, mixlen, datatype,
+     .                   nmats, nzones, vf, mix_vf)
+
+                                ! Input variables
+      integer  nmats		! Number of materials
+      integer  nzones		! Number of zones
+      integer  mixed_els(*)	! [sumnmix]: mat-1 mixed els, mat-2, etc.
+      integer  nmix(*)		! [nmats]: number of mixed els per mat
+      integer  matlist(*)       ! [nzone]: material id, else 0 for mixed
+      integer  matnos(*)        ! [nmats]: material ID's
+      real     vf(*)		! [sumnmix]: mat-1 vf's, mat-2, etc.
+      integer  datatype		! Datatype indicator for volume fractions
+
+
+                                ! Output variables
+      integer  mixlen		! Length of output mixed-data arrays
+      integer  matlist_out(*)	! [nzone]: material id, else <0 for mixed
+      integer  mix_next(*)      ! [mixlen]: index of next entry for this zone
+      integer  mix_mat(*)       ! [mixlen]: material ID
+      integer  mix_zone(*)      ! [mixlen]: back pointer to original zone
+      real     mix_vf(*)        ! [mixlen]: volume fractions in new format
+
+
+      integer  i, j, iz, sumnmix
+      integer  ifirst, imix
+      integer  mat(1000)        ! FIX ME -- Should be dynamic, or an argument
+
+
+      convtmat = 0
+
+      ! Count total number of mixed elements
+      sumnmix = 0
+      do i = 1, nmats
+  	  sumnmix = sumnmix + nmix(i)
+      enddo
+
+
+c     *------------------------------------------------------------
+c     * Build a mixed-length variable which contains the material
+c     * number for that entry.
+c     *-----------------------------------------------------------
+
+       iz = 1
+       do i = 1 , nmats
+          do j = 1 , nmix(i)
+             mat(iz) = matnos(i)
+             iz = iz+1
+          enddo
+       enddo
+
+
+c      *------------------------------------------------------------
+c      *  Loop over all mixed zones, setting mixed-data arrays in
+c      *  process. Connect the various mixed entries for each zone
+c      *  via the mix_next array, and modify 'matlist' to have the
+c      *  negative index into mixed data arrays instead of merely
+c      *  '0' to indicate mixed zones.
+c      *------------------------------------------------------------
+
+       imix = 1	  ! Use 1-origin indexing
+
+       do i = 1 , nzones
+
+  	  matlist_out(i) = matlist(i)
+
+  	  if (matlist(i) .le. 0) then	! Mixed zone
+
+  	       ifirst = -1
+
+  	       do j = 1 , sumnmix
+
+  		    if (mixed_els(j) .eq. i) then
+
+  			 if (ifirst .eq. -1) then ! 1st el in linked list
+                            ifirst = imix
+  			 else			! Set prev el to point to this
+                            mix_next(imix-1) = imix
+                         endif
+
+  			 mix_vf(imix)   = vf(j)
+  			 mix_mat(imix)  = mat(j)
+  			 mix_next(imix) = 0
+  			 mix_zone(imix) = i
+
+  			 imix = imix + 1
+  		    endif
+  	       enddo
+  	       if (ifirst .gt. 0) matlist_out(i) = -ifirst
+
+  	  endif
+       enddo
+
+       mixlen = sumnmix
+
+
+       return
+       end
+
+
+c *****************************************************************************
+c *  Routine                                                            convtmix
+c *
+c *  Purpose
+c *
+c * 	Convert a mixed data array from by-material to by-zone format.
+c *
+c *  Programmer
+c *
+c *     Jeff Long, NSSD/B
+c *
+c *  Notes
+c *
+c *     The SILO material routines expect data to be stored in a by-zone
+c *     fashion. This function converts from the ALE3D representation to
+c *     the SILO representation.
+c *
+c *****************************************************************************
+
+      function convtmix (mixvar, datatype, mixed_els, nmix, nmats,
+     . 	                 matlist, nzones, mixf, mixlen)
+
+                                ! Input variables
+       real     mixvar(*)	! (sumnmix): mat-1 mix-data, mat-2, etc.
+       integer  datatype	! Real    or int
+       integer  mixed_els(*)	! (sumnmix): mat-1 mixed els, mat-2, etc.
+       integer  nmix(*)		! (nmats): number of mixed els per mat
+       integer  nmats		! Number of materials
+       integer  matlist(*)	! (nzone): material id, else 0 for mixed
+       integer  nzones		! Number of zones
+
+                                ! Output variables
+       real     mixf(*)		! (mixlen): mixed data in new format
+       integer  mixlen		! Returned length of output mixed-data array
+
+
+       integer  i, j, sumnmix
+       integer  imix
+
+
+       convtmix = 0
+
+       ! Count total number of mixed elements
+       sumnmix = 0
+       do i = 1 , nmats
+          sumnmix = sumnmix + nmix(i)
+       enddo
+
+
+c      *------------------------------------------------------------
+c      *  Loop over all mixed zones, setting mixed-data array in
+c      *  process.
+c      *------------------------------------------------------------
+       imix = 1
+       do i = 1 , nzones
+
+          if (matlist(i) .le. 0) then ! Mixed zone
+
+             do j = 1 , sumnmix
+
+                if (mixed_els(j) .eq. i) then
+                   mixf(imix) = mixvar(j)
+                   imix       = imix + 1
+                endif
+
+             enddo
+          endif
+       enddo
+
+       return
+       end
+
+
diff --git a/tests/merge_block.c b/tests/merge_block.c
new file mode 100644
index 0000000..e426518
--- /dev/null
+++ b/tests/merge_block.c
@@ -0,0 +1,831 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <silo.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#ifndef WIN32
+#include <dirent.h>
+#include <unistd.h>
+#else
+#include <direct.h>
+#include <shlwapi.h>
+#endif
+#include <stdlib.h>
+#include <std.c>
+
+#define ALLOC(T)                ((T*)calloc((size_t)1,sizeof(T)))
+#define ALLOC_N(T,N)            ((T*)calloc((size_t)(N),sizeof(T)))
+#define REALLOC_N(P,T,N)        ((T*)realloc((P),(size_t)((N)*sizeof(T))))
+#define FREE(M)         if(M){free(M);(M)=NULL;}
+
+#ifndef MIN
+#define MIN(X,Y)      ((X)<(Y)?(X):(Y))
+#endif
+#ifndef MAX
+#define MAX(X,Y)      ((X)>(Y)?(X):(Y))
+#endif
+
+void MCopyFile (char *fileName, char *meshFileName, int driver);
+void GetFileList (char *baseName, char ***files, int *nFiles);
+void ListSort (char **list, int n);
+
+main (int argc, char **argv)
+{
+    int       i, driver = DB_PDB;
+    int       nFiles;
+    char    **files=NULL;
+
+    /*
+     * Check the execute line arguments.
+     */
+    if (argc != 3 && argc != 4)
+    {
+        printf ("usage: merge_blocks basename meshfilename [DB_HDF5 | DB_PDB]\n");
+        exit (1);
+    }
+    if (argc == 4)
+    {
+        if (!strncmp(argv[3], "DB_PDB", 6))
+            driver = StringToDriver(argv[3]);
+        else if (!strncmp(argv[3], "DB_HDF5", 7))
+            driver = StringToDriver(argv[3]);
+    }
+    printf ("Using base %s. Mesh file name %s\n", argv[1], argv[2]);
+
+    /*
+     * Get the list of files.
+     */
+    GetFileList (argv[1], &files, &nFiles);
+    printf ("Found %d files.\n", nFiles);
+    if (nFiles == 1)
+    {
+        printf ("file = %s\n", files[0]);
+    }
+    else if (nFiles == 2)
+    {
+        printf ("files = %s, %s\n", files[0], files[1]);
+    }
+    else
+    {
+        printf ("files = %s, %s, ...\n", files[0], files[1]);
+    }
+
+    /*
+     * Loop over all the files copying them with out the duplicate faces.
+     */
+    DBShowErrors (DB_ABORT, NULL);
+    DBForceSingle (1);
+
+    for (i = 0; i < nFiles; i++)
+    {
+        MCopyFile (files[i], argv[2], driver);
+    }
+
+    CleanupDriverStuff();
+}
+
+void
+MCopyFile (char *fileName, char *meshFileName, int driver)
+{
+    int       i, j, k, l;
+    int       cycle;
+    float     time;
+
+    DBfile    *dbfile1=NULL, *dbfile2=NULL, *dbfile3=NULL;
+    DBtoc     *toc=NULL;
+    DBfacelist *fl=NULL;
+    DBucdmesh **um=NULL;
+    DBucdvar  **uv=NULL;
+    DBmaterial **mat=NULL;
+    DBmultimesh *mm=NULL;
+    DBobject  *obj=NULL;
+    int       **local_global_map=NULL;
+
+    int       nDomains;
+    int       nVars;
+    char      **vars=NULL;
+
+    char      tmpstr[256];
+
+    int       nzones, nnodes;
+    float     min_extents[3], max_extents[3];
+    int       lnodelist;
+    int       *nodelist=NULL;
+    int       *matlist=NULL;
+    float     *coord=NULL;
+
+    int       ioffset;
+    int       mixlen;
+    float     *mix_vf;
+    int       *mix_next=NULL, *mix_mat=NULL, *mix_zone=NULL;
+    int       dims[3];
+
+    int       ione = 1;
+    int       ithree = 3;
+    int       ieight = 8;
+    int       itwentyfour = 24;
+
+    /*
+     * Open the old file.
+     */
+    dbfile1 = DBOpen (fileName, DB_UNKNOWN, DB_READ);
+
+    /*
+     * Open the mesh file.
+     */
+    dbfile2 = DBOpen (meshFileName, DB_UNKNOWN, DB_READ);
+
+    /*
+     * Get the list of variables in the file.
+     */
+    toc = DBGetToc (dbfile1);
+    nVars = toc->nmultivar;
+    vars = ALLOC_N (char *, toc->nmultivar);
+    for (i = 0; i < toc->nmultivar; i++)
+    {
+        vars[i] = ALLOC_N (char, strlen (toc->multivar_names[i]) + 1);
+        strcpy (vars[i], toc->multivar_names[i]);
+    }
+
+    /*
+     * Determine the number of domains.
+     */
+    mm = DBGetMultimesh(dbfile1, toc->multimesh_names[0]);
+    nDomains = mm->nblocks;
+    DBFreeMultimesh(mm);
+
+    /*
+     * Open the new file.
+     */
+    sprintf (tmpstr, "%s.silo", fileName);
+    dbfile3 = DBCreate (tmpstr, DB_CLOBBER, DB_LOCAL,
+                        "merged blocks", driver);
+
+    /*
+     * Write out _meshtvinfo.
+     */
+    DBWrite (dbfile3, "_meshtvinfo", "mesh mesh1;pseudocolor p",
+             &itwentyfour, 1, DB_CHAR);
+
+
+    /*
+     * Read the mesh and materials for all the blocks.
+     */
+    um = ALLOC_N (DBucdmesh *, nDomains);
+    local_global_map = ALLOC_N (int *, nDomains);
+    mat = ALLOC_N (DBmaterial *, nDomains);
+    for (i = 0; i < nDomains; i++)
+    {
+        sprintf (tmpstr, "/domain_%d/mesh_3d", i);
+        if ((um[i] = DBGetUcdmesh (dbfile1, tmpstr)) == NULL)
+        {
+            printf ("Error reading mesh %d.\n", i);
+            exit (1);
+        }
+        sprintf (tmpstr, "/domain_%d/global_node_map", i);
+        local_global_map[i] = ALLOC_N (int, um[i]->nnodes);
+        if (DBReadVar (dbfile2, tmpstr, local_global_map[i]) != 0)
+        {
+            printf ("Error reading local global map %d.\n", i);
+            exit (1);
+        }
+        sprintf (tmpstr, "/domain_%d/material", i);
+        if ((mat[i] = DBGetMaterial (dbfile1, tmpstr)) == NULL)
+        {
+            printf ("Error reading material %d.\n", i);
+            exit (1);
+        }
+    }
+    printf ("mesh and materials read.\n");
+
+    /*
+     * Determine the number of zones and nodes in the problem.
+     * Determine the extents of the problem.
+     */
+    nzones = 0;
+    nnodes = 0;
+    min_extents[0] = um[0]->min_extents[0];
+    min_extents[1] = um[0]->min_extents[1];
+    min_extents[2] = um[0]->min_extents[2];
+    max_extents[0] = um[0]->max_extents[0];
+    max_extents[1] = um[0]->max_extents[1];
+    max_extents[2] = um[0]->max_extents[2];
+    for (i = 0; i < nDomains; i++)
+    {
+        int       nnode;
+        int       *map;
+
+        nzones += um[i]->zones->nzones;
+        nnode = um[i]->nnodes;
+        map   = local_global_map[i];
+        for (j = 0; j < nnode; j++)
+        {
+            nnodes = MAX (nnodes, map[j]);
+        }
+        min_extents[0] = MIN (min_extents[0], um[i]->min_extents[0]);
+        min_extents[1] = MIN (min_extents[1], um[i]->min_extents[1]);
+        min_extents[2] = MIN (min_extents[2], um[i]->min_extents[2]);
+        max_extents[0] = MAX (max_extents[0], um[i]->max_extents[0]);
+        max_extents[1] = MAX (max_extents[1], um[i]->max_extents[1]);
+        max_extents[2] = MAX (max_extents[2], um[i]->max_extents[2]);
+    }
+    nnodes++;
+
+    printf ("nzones = %d, nnodes = %d\n", nzones, nnodes);
+    printf ("min_extents = %g %g %g\n", min_extents [0], min_extents[1],
+            min_extents[2]);
+    printf ("max_extents = %g %g %g\n", max_extents [0], max_extents[1],
+            max_extents[2]);
+
+    /*
+     * Merge the zonelist.
+     */
+    nodelist = ALLOC_N (int, nzones*8);
+    k = 0;
+    for (i = 0; i < nDomains; i++)
+    {
+        int       nzone;
+        int       *nl=NULL;
+        int       *map=NULL;
+
+        nzone = um[i]->zones->nzones;
+        nl = um[i]->zones->nodelist;
+        map = local_global_map[i];
+        for (j = 0; j < nzone*8; j++)
+        {
+            nodelist[k++] = map[nl[j]];
+        }
+    }
+    lnodelist = nzones * 8;
+    printf ("nodelist merged.\n");
+
+    /*
+     * Merge the matlist.
+     */
+    mixlen = 0;
+    for (i = 0; i < nDomains; i++)
+        mixlen += mat[i]->mixlen;
+    mix_vf = ALLOC_N (float, mixlen);
+    mix_next = ALLOC_N (int, mixlen);
+    mix_mat = ALLOC_N (int, mixlen);
+    mix_zone = NULL;
+    k = 0;
+    ioffset = 0;
+    for (i = 0; i < nDomains; i++)
+    {
+        int       mixlen2;
+        float     *mix_vf2=NULL;
+        int       *mix_next2=NULL, *mix_mat2=NULL;
+
+        mixlen2 = mat[i]->mixlen;
+        mix_vf2 = mat[i]->mix_vf;
+        mix_next2 = mat[i]->mix_next;
+        mix_mat2 = mat[i]->mix_mat;
+        for (j = 0; j < mixlen2; j++)
+        {
+            mix_vf[k] = mix_vf2[j];
+            if (mix_next2[j] == 0)
+                mix_next[k] = 0;
+            else
+                mix_next[k] = mix_next2[j] + ioffset;
+            mix_mat[k++] = mix_mat2[j];
+        }
+        ioffset += mixlen2;
+    }
+
+    matlist = ALLOC_N (int, nzones);
+    k = 0;
+    ioffset = 0;
+    for (i = 0; i < nDomains; i++)
+    {
+        int       nzone;
+        int       *ml;
+
+        nzone = um[i]->zones->nzones;
+        ml = mat[i]->matlist;
+        for (j = 0; j < nzone; j++)
+        {
+            if (ml[j] > 0)
+                matlist[k++] = ml[j];
+            else
+                matlist[k++] = ml[j] - ioffset;
+        }
+        ioffset += mat[i]->mixlen;
+    }
+    printf ("matlist merged.\n");
+    printf ("mixlen = %d.\n", mixlen);
+
+    /*
+     * Write out the zonelist.
+     */
+    DBWrite (dbfile3, "zl_nodelist", nodelist, &lnodelist, 1, DB_INT);
+
+    DBWrite (dbfile3, "zl_shapecnt", &nzones, &ione, 1, DB_INT);
+
+    DBWrite (dbfile3, "zl_shapesize", &ieight, &ione, 1, DB_INT);
+
+    obj = DBMakeObject ("zl", DB_ZONELIST, 15);
+
+    DBAddIntComponent (obj, "ndims", 3);
+    DBAddIntComponent (obj, "nzones", nzones);
+    DBAddIntComponent (obj, "nshapes", 1);
+    DBAddIntComponent (obj, "lnodelist", lnodelist);
+    DBAddIntComponent (obj, "origin", um[0]->zones->origin);
+    DBAddVarComponent (obj, "nodelist", "zl_nodelist");
+    DBAddVarComponent (obj, "shapecnt", "zl_shapecnt");
+    DBAddVarComponent (obj, "shapesize", "zl_shapesize");
+
+    DBWriteObject(dbfile3, obj, 1);
+    DBFreeObject(obj);
+
+    printf ("zonelist written.\n");
+
+    /*
+     * Write out the facelist.
+     */
+    fl = DBCalcExternalFacelist(nodelist, nnodes,
+                                um[0]->zones->origin, &ieight,
+                                &nzones, 1,
+                                NULL, 0);
+
+    DBWrite (dbfile3, "fl_nodelist", fl->nodelist,
+             &(fl->lnodelist), 1, DB_INT);
+
+    DBWrite (dbfile3, "fl_shapecnt", fl->shapecnt,
+             &(fl->nshapes), 1, DB_INT);
+
+    DBWrite (dbfile3, "fl_shapesize", fl->shapesize,
+             &(fl->nshapes), 1, DB_INT);
+
+    if (fl->zoneno != NULL)
+         DBWrite (dbfile3, "fl_zoneno", fl->zoneno,
+                  &(fl->nfaces), 1, DB_INT);
+
+    obj = DBMakeObject ("fl", DB_FACELIST, 15);
+
+    DBAddIntComponent (obj, "ndims", fl->ndims);
+    DBAddIntComponent (obj, "nfaces", fl->nfaces);
+    DBAddIntComponent (obj, "nshapes", fl->nshapes);
+    DBAddIntComponent (obj, "ntypes", fl->ntypes);
+    DBAddIntComponent (obj, "lnodelist", fl->lnodelist);
+    DBAddIntComponent (obj, "origin", fl->origin);
+    DBAddVarComponent (obj, "nodelist", "fl_nodelist");
+    DBAddVarComponent (obj, "shapecnt", "fl_shapecnt");
+    DBAddVarComponent (obj, "shapesize", "fl_shapesize");
+    if (fl->zoneno != NULL)
+         DBAddVarComponent (obj, "zoneno", "fl_zoneno");
+
+    DBWriteObject(dbfile3, obj, 1);
+    DBFreeObject(obj);
+
+    DBFreeFacelist(fl);
+
+    FREE (nodelist);
+
+    printf ("facelist written.\n");
+
+    /*
+     * Write out the mesh.
+     */
+    time = um[0]->time;
+    cycle = um[0]->cycle;
+
+    coord    = ALLOC_N (float, nnodes);
+
+    for (i = 0; i < nDomains; i++)
+    {
+        float     *local_coord=NULL;
+        int       *map=NULL;
+        int       nnode;
+
+        local_coord = um[i]->coords[0];
+        map = local_global_map[i];
+        nnode = um[i]->nnodes;
+        for (j = 0; j < nnode; j++)
+        {
+            coord[map[j]] = local_coord[j];
+        }
+    }
+    DBWrite (dbfile3, "mesh1_coord0", coord, &nnodes, 1, DB_FLOAT);
+
+    for (i = 0; i < nDomains; i++)
+    {
+        float     *local_coord=NULL;
+        int       *map=NULL;
+        int       nnode;
+
+        local_coord = um[i]->coords[1];
+        map = local_global_map[i];
+        nnode = um[i]->nnodes;
+        for (j = 0; j < nnode; j++)
+        {
+            coord[map[j]] = local_coord[j];
+        }
+    }
+    DBWrite (dbfile3, "mesh1_coord1", coord, &nnodes, 1, DB_FLOAT);
+
+    for (i = 0; i < nDomains; i++)
+    {
+        float     *local_coord=NULL;
+        int       *map=NULL;
+        int       nnode;
+
+        local_coord = um[i]->coords[2];
+        map = local_global_map[i];
+        nnode = um[i]->nnodes;
+        for (j = 0; j < nnode; j++)
+        {
+            coord[map[j]] = local_coord[j];
+        }
+    }
+    DBWrite (dbfile3, "mesh1_coord2", coord, &nnodes, 1, DB_FLOAT);
+
+    FREE (coord);
+
+    DBWrite (dbfile3, "mesh1_min_extents", min_extents,
+             &ithree, 1, DB_FLOAT);
+
+    DBWrite (dbfile3, "mesh1_max_extents", max_extents,
+             &ithree, 1, DB_FLOAT);
+
+    DBWrite (dbfile3, "time", &time, &ione, 1, DB_FLOAT);
+    DBWrite (dbfile3, "cycle", &cycle, &ione, 1, DB_INT);
+
+    obj = DBMakeObject ("mesh1", DB_UCDMESH, 25);
+
+    DBAddVarComponent (obj, "coord0", "mesh1_coord0");
+    DBAddVarComponent (obj, "coord1", "mesh1_coord1");
+    DBAddVarComponent (obj, "coord2", "mesh1_coord2");
+    DBAddVarComponent (obj, "min_extents", "mesh1_min_extents");
+    DBAddVarComponent (obj, "max_extents", "mesh1_max_extents");
+    DBAddStrComponent (obj, "zonelist", "zl");
+    DBAddStrComponent (obj, "facelist", "fl");
+    DBAddIntComponent (obj, "ndims", um[0]->ndims);
+    DBAddIntComponent (obj, "nnodes", nnodes);
+    DBAddIntComponent (obj, "nzones", nzones);
+    DBAddIntComponent (obj, "origin", um[0]->origin);
+    DBAddIntComponent (obj, "datatype", DB_FLOAT);
+    DBAddVarComponent (obj, "time", "time");
+    DBAddVarComponent (obj, "cycle", "cycle");
+    DBAddStrComponent (obj, "label0", um[0]->labels[0]);
+    DBAddStrComponent (obj, "label1", um[0]->labels[1]);
+    DBAddStrComponent (obj, "label2", um[0]->labels[2]);
+
+    DBWriteObject(dbfile3, obj, 1);
+    DBFreeObject(obj);
+
+    for (i = 0; i < nDomains; i++)
+    {
+        DBFreeUcdmesh (um[i]);
+    }
+
+    /*
+     * Write out the material arrays.
+     */
+    dims[0] = nzones;
+    dims[1] = 0;
+    dims[2] = 0;
+    DBWrite (dbfile3, "mat1_dims", dims, &ithree, 1, DB_INT);
+    DBWrite (dbfile3, "mat1_matlist", matlist, &nzones, 1, DB_INT);
+    DBWrite (dbfile3, "mat1_matnos", mat[0]->matnos, &(mat[0]->nmat),
+             1, DB_INT);
+    if (mixlen > 0)
+    {
+        DBWrite (dbfile3, "mat1_mix_vf", mix_vf, &mixlen, 1, DB_FLOAT);
+        DBWrite (dbfile3, "mat1_mix_next", mix_next, &mixlen, 1, DB_INT);
+        DBWrite (dbfile3, "mat1_mix_mat", mix_mat, &mixlen, 1, DB_INT);
+        if (mix_zone != NULL)
+            DBWrite (dbfile3, "mat1_mix_zone", mix_zone, &mixlen, 1, DB_INT);
+    }
+
+    obj = DBMakeObject ("mat1", DB_MATERIAL, 15);
+
+    DBAddStrComponent (obj, "meshid", "mesh1");
+    DBAddIntComponent (obj, "ndims", 1);
+    DBAddIntComponent (obj, "nmat", mat[0]->nmat);
+    DBAddIntComponent (obj, "mixlen", mixlen);
+    DBAddIntComponent (obj, "origin", mat[0]->origin);
+    DBAddIntComponent (obj, "major_order", mat[0]->major_order);
+    DBAddIntComponent (obj, "datatype", DB_FLOAT);
+    DBAddVarComponent (obj, "dims", "mat1_dims");
+    DBAddVarComponent (obj, "matlist", "mat1_matlist");
+    DBAddVarComponent (obj, "matnos", "mat1_matnos");
+    if (mixlen > 0)
+    {
+        DBAddVarComponent (obj, "mix_vf", "mat1_mix_vf");
+        DBAddVarComponent (obj, "mix_next", "mat1_mix_next");
+        DBAddVarComponent (obj, "mix_mat", "mat1_mix_mat");
+        if (mix_zone != NULL)
+            DBAddVarComponent (obj, "mix_zone", "mat1_mix_zone");
+    }
+
+    DBWriteObject(dbfile3, obj, 1);
+    DBFreeObject(obj);
+
+    printf ("material written.\n");
+
+    for (i = 0; i < nDomains; i++)
+    {
+        DBFreeMaterial (mat[i]);
+    }
+
+    /*
+     * Write out the variables.
+     */
+    uv = ALLOC_N (DBucdvar *, nDomains);
+    for (i = 0; i < nVars; i++)
+    {
+        int       nels;
+        float     *var=NULL;
+
+        /*
+         * Read the variable.
+         */
+        for (j = 0; j < nDomains; j++)
+        {
+            sprintf (tmpstr, "/domain_%d/%s", j, vars[i]);
+            if ((uv[j] = DBGetUcdvar (dbfile1, tmpstr)) == NULL)
+            {
+                printf ("Error reading variable %s mesh %d.\n", vars[i], j);
+                exit (1);
+            }
+        }
+        printf ("variable %s read.\n", vars[i]);
+
+        /*
+         * Merge the variable.
+         */
+        if (uv[0]->centering == DB_ZONECENT)
+        {
+            /*
+             * Zone centered variable.
+             */
+            nels = nzones;
+            var = ALLOC_N (float, nels);
+            l = 0;
+            for (j = 0; j < nDomains; j++)
+            {
+                int       nels2;
+                float     *var2=NULL;
+
+                nels2 = uv[j]->nels;
+                var2  = uv[j]->vals[0];
+                for (k = 0; k < nels2; k++)
+                {
+                    var[l++] = var2[k];
+                }
+            }
+        }
+        else
+        {
+            /*
+             * Node centered variable.
+             */
+            nels = nnodes;
+            var = ALLOC_N (float, nels);
+            for (j = 0; j < nDomains; j++)
+            {
+                int       nels2;
+                float     *var2=NULL;
+                int       *map=NULL;
+
+                nels2 = uv[j]->nels;
+                var2  = uv[j]->vals[0];
+                map = local_global_map[j];
+                for (k = 0; k < nels2; k++)
+                {
+                    var[map[k]] = var2[k];
+                }
+            }
+        }
+        printf ("variable %s merged.\n", vars[i]);
+
+        /*
+         * Write the variable.
+         */
+        sprintf (tmpstr, "%s_data", vars[i]);
+        DBWrite (dbfile3, tmpstr, var, &nels, 1, DB_FLOAT);
+
+        obj = DBMakeObject (vars[i], DB_UCDVAR, 15);
+
+        DBAddVarComponent (obj, "value0", tmpstr);
+        DBAddStrComponent (obj, "meshid", "mesh1");
+        DBAddIntComponent (obj, "ndims", 1);
+        DBAddIntComponent (obj, "nvals", 1);
+        DBAddIntComponent (obj, "nels", nels);
+        DBAddIntComponent (obj, "centering", uv[0]->centering);
+        DBAddIntComponent (obj, "origin", uv[0]->origin);
+        DBAddIntComponent (obj, "mixlen", 0);
+        DBAddIntComponent (obj, "datatype", uv[0]->datatype);
+        DBAddVarComponent (obj, "time", "time");
+        DBAddVarComponent (obj, "cycle", "cycle");
+
+        DBWriteObject(dbfile3, obj, 1);
+        DBFreeObject(obj);
+
+        printf ("variable %s written.\n", vars[i]);
+
+        for (j = 0; j < nDomains; j++)
+        {
+            DBFreeUcdvar (uv[j]);
+        }
+
+        FREE (var);
+    }
+
+    FREE (uv);
+    FREE (um);
+    for (i = 0; i < nDomains; i++)
+    {
+        FREE (local_global_map[i]);
+    }
+    FREE (local_global_map);
+    FREE (mat);
+
+    /*
+     * Close the old, mesh, and new files.
+     */
+    DBClose (dbfile1);
+    DBClose (dbfile2);
+    DBClose (dbfile3);
+}
+
+
+
+void
+GetFileList (char *baseName, char ***filesOut, int *nFilesOut)
+{
+    int       nFiles;
+    int       nFileMax;
+    char    **files=NULL;
+
+#ifndef WIN32
+    DIR      *dirp=NULL;
+    struct dirent  *dp=NULL;
+#else
+    WIN32_FIND_DATA fd;
+    HANDLE dirHandle = INVALID_HANDLE_VALUE;
+#endif
+
+    struct stat     buf ;
+
+
+    /*
+     * Open the directory.
+     */
+#ifndef WIN32
+    dirp = opendir (".");
+    if (dirp == NULL) {
+        printf ("Error opening current directory\n");
+
+
+        *filesOut = NULL;
+        *nFilesOut = 0;
+        return;
+    }
+#else
+    dirHandle = FindFirstFile(".", &fd);
+    if (dirHandle == INVALID_HANDLE_VALUE)
+    {
+        printf ("Error opening current directory\n");
+        *filesOut = NULL;
+        *nFilesOut = 0;
+        return;
+    }
+#endif
+
+    /*
+     * Read the current directory.
+     */
+    nFiles = 0;
+    nFileMax = 128;
+    files = ALLOC_N (char *, nFileMax);
+#ifndef WIN32
+    for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp))
+    {
+        char *fName = dp->d_name;
+#else
+    while (FindNextFile(dirHandle, &fd))
+    {
+        char *fName = fd.cFileName;
+#endif
+
+        if (fName [0] != '.')
+        {
+            if ((stat (fName, &buf) == 0) &&
+                ((buf.st_mode & S_IFDIR) == 0))
+            {
+                /*
+                 * A file.
+                 */
+                if (strncmp (fName, baseName, strlen (baseName)) == 0)
+                {
+                    if (nFiles >= nFileMax)
+                    {
+                        nFileMax += 64;
+                        files = REALLOC_N (files, char *, nFileMax);
+                    }
+                    files [nFiles] = ALLOC_N (char, (strlen(fName)+1));
+                    strcpy (files [nFiles], fName);
+                    nFiles++;
+                }
+            }
+        }
+    }
+
+    /*
+     * Close the directory.
+     */
+#ifndef WIN32
+    closedir (dirp);
+#else
+    FindClose(dirHandle);
+#endif
+
+    /*
+     * Sort the list.
+     */
+    ListSort (files, nFiles);
+
+    /*
+     * Set the return arguments.
+     */
+    *filesOut = files;
+    *nFilesOut = nFiles;
+}
+
+void
+ListSort (char **list, int n)
+{
+    int       i, j;
+    int       iMin;
+    char      *temp=NULL;
+
+    /*
+     * Do a selection sort.
+     */
+    for (i = 0; i < n - 1; i++)
+    {
+        iMin = i;
+        for (j = i+1; j < n; j++)
+        {
+            if (strcmp (list [j], list [iMin]) < 0)
+                iMin = j;
+        }
+        temp        = list [i];
+        list [i]    = list [iMin];
+        list [iMin] = temp;
+    }
+}
diff --git a/tests/mk_nasf_pdb.c b/tests/mk_nasf_pdb.c
new file mode 100644
index 0000000..d98ecc2
--- /dev/null
+++ b/tests/mk_nasf_pdb.c
@@ -0,0 +1,64 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <pdb.h>
+
+int main()
+{
+    int foo[10] = {0,1,2,3,4,5,6,7,8,9};
+    PDBfile *f = lite_PD_open("not_a_silo_file.pdb", "w");
+    lite_PD_mkdir(f, "dir1");
+    lite_PD_mkdir(f, "dir2");
+    lite_PD_cd(f, "dir2");
+    lite_PD_write(f, "foo(10)", "integer", foo);
+    lite_PD_close(f);
+    return 0;
+}
diff --git a/tests/mmadjacency.c b/tests/mmadjacency.c
new file mode 100644
index 0000000..2d837df
--- /dev/null
+++ b/tests/mmadjacency.c
@@ -0,0 +1,162 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>     /* For exit()   */
+#include <string.h>     /* For strcmp() */
+#include "silo.h"
+#include <std.c>
+
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    DBmultimeshadj *foo;
+    int            i, driver = DB_PDB;
+    char          *filename = "adjacency.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "adjacency.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "adjacency.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    printf("Creating test file: \"%s\".\n", filename); 
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "multi-mesh adjacency test file", driver);
+
+    /* this is a really basic test of DBPutMultimeshadj. It tests only that
+       the API behaves as expected, not the contents of the object */
+    {
+       int meshtypes[] = {DB_UCDMESH, DB_UCDMESH, DB_UCDMESH, DB_UCDMESH, DB_UCDMESH};
+       int nneighbors[] = {3, 3, 3, 3, 4};
+       int neighbors[] =  {1,3,4,  0,2,4, 1,3,4, 0,2,4, 0,1,2,3};
+       int lnodelists[] = {3,3,3, 3,3,3,  3,3,3, 3,3,3, 3,3,3,3};
+
+       /* note, we're using global indexing here. Its just a test. */
+       static int nodelistA[] = {4,13,22};   /* 0 & 1 */
+       static int nodelistB[] = {35,36,37};  /* 0 & 3 */
+       static int nodelistC[] = {22,30,37};  /* 0 & 4 */
+
+       static int nodelistD[] = {4,13,22};   /* 1 & 0 */
+       static int nodelistE[] = {41,42,43};  /* 1 & 2 */
+       static int nodelistF[] = {22,31,41};  /* 1 & 4 */
+
+       static int nodelistG[] = {41,42,43};  /* 2 & 1 */
+       static int nodelistH[] = {56,65,74};  /* 2 & 3 */
+       static int nodelistI[] = {41,48,56};  /* 2 & 4 */
+
+       static int nodelistJ[] = {35,36,37};  /* 3 & 0 */
+       static int nodelistK[] = {56,65,74};  /* 3 & 2 */
+       static int nodelistL[] = {37,47,56};  /* 3 & 4 */
+
+       static int nodelistM[] = {22,30,37};  /* 4 & 0 */
+       static int nodelistN[] = {22,31,41};  /* 4 & 1 */
+       static int nodelistO[] = {41,48,56};  /* 4 & 2 */
+       static int nodelistP[] = {37,47,56};  /* 4 & 3 */
+
+       static int *nodelists[] = {nodelistA, nodelistB, nodelistC,
+                           nodelistD, nodelistE, nodelistF,
+                           nodelistG, nodelistH, nodelistI,
+                           nodelistJ, nodelistK, nodelistL,
+                           nodelistM, nodelistN, nodelistO, nodelistP};
+
+       static int *nodelists2[] = {nodelistA, nodelistB, nodelistC,
+                                 NULL,      NULL,      NULL,
+                                 NULL,      NULL,      NULL,
+                            nodelistJ, nodelistK, nodelistL,
+                            nodelistM, nodelistN, nodelistO, nodelistP};
+
+       static int *nodelists3[] = {     NULL,      NULL,      NULL,
+                            nodelistD, nodelistE, nodelistF,
+                            nodelistG, nodelistH, nodelistI,
+                                 NULL,      NULL,      NULL,
+                                 NULL,      NULL,      NULL,      NULL};
+   
+       int nblocks = sizeof(meshtypes) / sizeof(meshtypes[0]);
+
+       DBPutMultimeshadj(dbfile, "mmadjacency", nblocks, meshtypes,
+          nneighbors, neighbors, NULL, lnodelists, nodelists,
+          NULL, NULL, NULL);
+
+       /* now try writing the same object with repeated calls */
+       DBPutMultimeshadj(dbfile, "mmadjacency2", nblocks, meshtypes,
+          nneighbors, neighbors, NULL, lnodelists, nodelists2,
+          NULL, NULL, NULL);
+       DBPutMultimeshadj(dbfile, "mmadjacency2", nblocks, meshtypes,
+          nneighbors, neighbors, NULL, lnodelists, nodelists3,
+          NULL, NULL, NULL);
+    }
+
+    DBClose(dbfile);
+
+    dbfile = DBOpen(filename, DB_UNKNOWN, DB_READ);
+
+    /* test reading a multimesh adj object */
+    foo = DBGetMultimeshadj(dbfile, "mmadjacency", -1, NULL);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/multi_file.c b/tests/multi_file.c
new file mode 100644
index 0000000..79abd9d
--- /dev/null
+++ b/tests/multi_file.c
@@ -0,0 +1,1126 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*
+ * Create a multi-file multi-block mesh.
+ *
+ */
+
+#include <math.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#ifdef WIN32
+#  include <direct.h>
+#endif
+
+#include <silo.h>
+#include <std.c>
+
+#define MAXBLOCKS       400       /* Maximum number of blocks in an object */
+#define STRLEN          60
+#define MIXMAX          20000     /* Maximum length of the mixed arrays */
+#define NFILES          8         /* The number of files to create */
+
+#define MIN(x, y) (x) < (y) ? (x) : (y)
+#define MAX(x, y) (x) > (y) ? (x) : (y)
+
+#define ALLOC_N(T,N)    ((T*)calloc((N),sizeof(T)))
+#define FREE(M)         if(M){free(M);(M)=NULL;}
+
+int multidir = 0;
+int use_ns = 0;
+
+void fill_bkgr(int *, int, int, int, int);
+void fill_mat(float *, float *, float *, int *, int, int, int,
+    int *, int *, int *, float *, int *, int, double, double, double, double);
+
+int  build_multi(char *, int, char *, int, int, int);
+
+void build_block_ucd3d(char *, int, char *, int, int, int);
+
+/***********************************************************************
+ *
+ * Purpose:
+ *    Generate a multi file 3d ucd multi block test file.
+ *
+ * Programmer:  Eric Brugger
+ * Date:        September 17, 2001
+ *
+ * Modifications:
+ *   Mark C. Miller, Wed Jul 14 15:33:43 PDT 2010
+ *   Added use-ns (namescheme) options for multi-block objects. 
+ ***********************************************************************/
+int
+main(int argc, char *argv[])
+{
+    int            i;
+    char          *basename="ucd3d";
+    char          *file_ext="pdb";
+    int            driver=DB_PDB;
+    int            show_all_errors = FALSE;
+
+    /*
+     * Parse the command-line.
+     */
+    for (i = 1; i < argc; i++)
+    {
+        if (!strncmp(argv[i], "DB_PDB", 6))
+        {
+            driver = StringToDriver(argv[i]);
+            file_ext = "pdb";
+        }
+        else if (!strncmp(argv[i], "DB_HDF5", 7))
+        {
+            driver = StringToDriver(argv[i]);
+            file_ext = "h5";
+        }
+        else if (!strcmp(argv[i], "multidir"))
+        {
+            multidir = 1;
+        }
+        else if (!strcmp(argv[i], "use-ns"))
+        {
+            use_ns = 1;
+        }
+        else if (!strcmp(argv[i], "show-all-errors"))
+	{
+            show_all_errors = 1;
+	}
+	else if (argv[i][0] != '\0')
+        {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    /* 
+     * Create the multi-block ucd 3d mesh.
+     */
+    build_multi(basename, driver, file_ext, 6, 8, 6);
+
+    CleanupDriverStuff();
+    return 0;
+}
+
+/***********************************************************************      
+ *
+ * Purpose:
+ *    Fill the entire material array with the material "matno".
+ *
+ * Programmer:  Eric Brugger
+ * Date:        September 17, 2001
+ *
+ ***********************************************************************/
+void
+fill_bkgr(int *matlist, int nx, int ny, int nz, int matno)
+{
+    int             i, j, k;
+
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                matlist[k * nx * ny + j * nx + i] = matno;
+            }
+        }
+    }
+}
+
+/***********************************************************************      
+ *
+ * Purpose:
+ *    Fill the specified material array with sphere centered at
+ *    "xcenter", "ycenter", "zcenter" and radius of "radius" with
+ *    the material "matno".
+ *
+ * Programmer:  Eric Brugger
+ * Date:        September 17, 2001
+ *
+ ***********************************************************************/
+void
+fill_mat(float *x, float *y, float *z, int *matlist, int nx,
+         int ny, int nz, int *mix_next, int *mix_mat, int *mix_zone,
+         float *mix_vf, int *mixlen, int matno, double xcenter,
+         double ycenter, double zcenter, double radius)
+{
+    int             i, j, k, l, m, n;
+    double          dist;
+    int             cnt;
+    int             mixlen2;
+    int            *itemp=NULL;
+    float           dx, dy, dz;
+    float           xx[10], yy[10], zz[10];
+
+    mixlen2 = *mixlen;
+
+    itemp = ALLOC_N(int, (nx + 1) * (ny + 1) * (nz + 1));
+
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                itemp[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] =
+                    (dist < radius) ? 1 : 0;
+            }
+        }
+    }
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                cnt = itemp[(i)   * (nx+1) * (ny+1) + (j)   * (nx+1) + k  ] +
+                      itemp[(i)   * (nx+1) * (ny+1) + (j+1) * (nx+1) + k  ] +
+                      itemp[(i)   * (nx+1) * (ny+1) + (j+1) * (nx+1) + k+1] +
+                      itemp[(i)   * (nx+1) * (ny+1) + (j)   * (nx+1) + k+1] +
+                      itemp[(i+1) * (nx+1) * (ny+1) + (j)   * (nx+1) + k  ] +
+                      itemp[(i+1) * (nx+1) * (ny+1) + (j+1) * (nx+1) + k  ] +
+                      itemp[(i+1) * (nx+1) * (ny+1) + (j+1) * (nx+1) + k+1] +
+                      itemp[(i+1) * (nx+1) * (ny+1) + (j)   * (nx+1) + k+1];
+                if (cnt == 0)
+                {
+                    /* EMPTY */
+                }
+                else if (cnt == 8)
+                {
+                    matlist[i * nx * ny + j * nx + k] = matno;
+                }
+                else
+                {
+                    dx = (x[i + 1] - x[i]) / 11.;
+                    dy = (y[j + 1] - y[j]) / 11.;
+                    dz = (z[k + 1] - z[k]) / 11.;
+                    for (l = 0; l < 10; l++)
+                    {
+                        xx[l] = x[i] + (dx / 2.) + (l * dx);
+                        yy[l] = y[j] + (dy / 2.) + (l * dy);
+                        zz[l] = z[k] + (dz / 2.) + (l * dz);
+                    }
+                    cnt = 0;
+                    for (l = 0; l < 10; l++)
+                    {
+                        for (m = 0; m < 10; m++)
+                        {
+                            for (n = 0; n < 10; n++)
+                            {
+                                dist = sqrt((xx[l] - xcenter) *
+                                            (xx[l] - xcenter) +
+                                            (yy[m] - ycenter) *
+                                            (yy[m] - ycenter) +
+                                            (zz[n] - zcenter) *
+                                            (zz[n] - zcenter));
+                                cnt += (dist < radius) ? 1 : 0;
+                            }
+                        }
+                    }
+                    matlist[i * nx * ny + j * nx + k] = -(mixlen2 + 1);
+                    mix_mat[mixlen2] = matno - 1;
+                    mix_mat[mixlen2 + 1] = matno;
+                    mix_next[mixlen2] = mixlen2 + 2;
+                    mix_next[mixlen2 + 1] = 0;
+                    mix_zone[mixlen2] = i * nx * ny + j * nx + k;
+                    mix_zone[mixlen2 + 1] = i * nx * ny + j * nx + k;
+                    mix_vf[mixlen2] = 1. - (((float)cnt) / 1000.);
+                    mix_vf[mixlen2 + 1] = ((float)cnt) / 1000.;
+                    mixlen2 += 2;
+                }
+            }
+        }
+    }
+
+    FREE(itemp);
+
+    *mixlen = mixlen2;
+}
+
+/***********************************************************************      
+ *
+ * Purpose:
+ *    Make a multi-block mesh, multi-block variables, and a multi-block
+ *    material based on the given meshtype, dimensionality of the mesh,
+ *    and number of blocks in the x-direction, y-direction, and
+ *    z-direction.  Also specify if the mesh is collinear when creating
+ *    a quad mesh.  The total number of blocks created for the mesh
+ *    equals number of blocks in x-direction times number of blocks in
+ *    y-direction times number of blocks in z-direction.
+ *
+ *    nblocks = nblocks_x * nblocks_y * nblocks_z
+ *
+ * Programmer:  Eric Brugger
+ * Date:        September 17, 2001
+ *
+ * Modifications:
+ *   Mark C. Miller, Wed Jul 14 15:34:55 PDT 2010
+ *   Added support for namescheme options on mulit-block objects.
+ ***********************************************************************/
+int
+build_multi(char *basename, int driver, char *file_ext,
+            int nblocks_x, int nblocks_y, int nblocks_z)
+{
+    int             i;
+    int             cycle;
+    float           time;
+    double          dtime;
+    int             nmatnos;
+    int             matnos[3];
+    char            names[MAXBLOCKS][STRLEN];
+    char           *meshnames[MAXBLOCKS];
+    int             meshtypes[MAXBLOCKS];
+    char            names1[MAXBLOCKS][STRLEN];
+    char            names2[MAXBLOCKS][STRLEN];
+    char            names3[MAXBLOCKS][STRLEN];
+    char            names4[MAXBLOCKS][STRLEN];
+    char            names5[MAXBLOCKS][STRLEN];
+    char           *var1names[MAXBLOCKS];
+    char           *var2names[MAXBLOCKS];
+    char           *var3names[MAXBLOCKS];
+    char           *var4names[MAXBLOCKS];
+    char           *var5names[MAXBLOCKS];
+    int             vartypes[MAXBLOCKS];
+    char            names0[MAXBLOCKS][STRLEN];
+    char           *matnames[MAXBLOCKS];
+    char           file_ns[128];
+    char           block_ns[128];
+    int            block_type;
+
+    DBoptlist      *optlist=NULL;
+
+    char            filename[80];
+    DBfile         *dbfile=NULL;
+
+    int             nblocks = nblocks_x * nblocks_y * nblocks_z;
+
+    /* 
+     * Initialize the names and create the directories for the blocks.
+     */
+    for (i = 0; i < nblocks; i++)
+    {
+        int       filenum;
+        char      prefix[120];
+
+        filenum = i / (nblocks / NFILES);
+        if (multidir)
+#ifdef WIN32	
+            sprintf(prefix, "multi_file.dir\\%03d\\%s%d.%s:/block%d/", filenum, basename, filenum, file_ext, i);
+#else
+            sprintf(prefix, "multi_file.dir/%03d/%s%d.%s:/block%d/", filenum, basename, filenum, file_ext, i);
+#endif
+        else
+            sprintf(prefix, "%s%d.%s:/block%d/", basename, filenum, file_ext, i);
+
+        sprintf(names[i], "%smesh1", prefix);
+        meshnames[i] = names[i];
+        meshtypes[i] = DB_UCDMESH;
+
+        sprintf(names1[i], "%sd", prefix);
+        sprintf(names2[i], "%sp", prefix);
+        sprintf(names3[i], "%su", prefix);
+        sprintf(names4[i], "%sv", prefix);
+        sprintf(names5[i], "%sw", prefix);
+        var1names[i] = names1[i];
+        var2names[i] = names2[i];
+        var3names[i] = names3[i];
+        var4names[i] = names4[i];
+        var5names[i] = names5[i];
+        vartypes[i] = DB_UCDVAR;
+
+        sprintf(names0[i], "%smat1", prefix);
+        matnames[i] = names0[i];
+    }
+
+    /*
+     * Create nameschemes for files and blocks within files
+     */
+    if (use_ns)
+    {
+        if (multidir)
+        {
+#ifdef WIN32	
+            sprintf(file_ns, "|multi_file.dir\\%%03d\\%%s%%d.%%s|n/36|'%s'|n/36|'%s'", basename, file_ext);
+#else
+            sprintf(file_ns, "|multi_file.dir/%%03d/%%s%%d.%%s|n/36|'%s'|n/36|'%s'", basename, file_ext);
+#endif
+        }
+        else
+            sprintf(file_ns, "|%%s%%d.%%s|'%s'|n/36|'%s'", basename, file_ext);
+        sprintf(block_ns, "|/block%%d/mesh1|n");
+    }
+
+    /*
+     * Create the blocks.
+     */
+    build_block_ucd3d(basename, driver, file_ext, 
+                      nblocks_x, nblocks_y, nblocks_z);
+
+    /*
+     * Create the file.
+     */
+    sprintf(filename, "%s_root.%s", basename, file_ext);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+        "multi-file ucd 3d test file", driver)) == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+        return -1;
+    }
+
+    /*
+     * Create the option lists for the multi-block calls.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+    nmatnos = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_NMATNOS, &nmatnos);
+    DBAddOption(optlist, DBOPT_MATNOS, matnos);
+    if (use_ns)
+    {
+        DBAddOption(optlist, DBOPT_MB_FILE_NS, file_ns);
+        DBAddOption(optlist, DBOPT_MB_BLOCK_NS, block_ns);
+        DBAddOption(optlist, DBOPT_MB_BLOCK_TYPE, &block_type);
+    }
+
+    /*
+     * Create the multi-block mesh, variables and material.
+     */
+    block_type = DB_UCDMESH;
+    if (DBPutMultimesh(dbfile, "mesh1", nblocks,
+                       use_ns?0:meshnames, use_ns?0:meshtypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi mesh\n");
+        return -1;
+    }
+    block_type = DB_UCDVAR;
+    sprintf(block_ns, "|/block%%d/d|n");
+    if (DBPutMultivar(dbfile, "d", nblocks, use_ns?0:var1names, use_ns?0:vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var d\n");
+        return -1;
+    }
+    sprintf(block_ns, "|/block%%d/p|n");
+    if (DBPutMultivar(dbfile, "p", nblocks, use_ns?0:var2names, use_ns?0:vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var p\n");
+        return -1;
+    }
+    sprintf(block_ns, "|/block%%d/u|n");
+    if (DBPutMultivar(dbfile, "u", nblocks, use_ns?0:var3names, use_ns?0:vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var u\n");
+        return -1;
+    }
+    sprintf(block_ns, "|/block%%d/v|n");
+    if (DBPutMultivar(dbfile, "v", nblocks, use_ns?0:var4names, use_ns?0:vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var v\n");
+        return -1;
+    }
+    sprintf(block_ns, "|/block%%d/w|n");
+    if (DBPutMultivar(dbfile, "w", nblocks, use_ns?0:var5names, use_ns?0:vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var w\n");
+        return -1;
+    }
+    sprintf(block_ns, "|/block%%d/mat1|n");
+    if (DBPutMultimat(dbfile, "mat1", nblocks, use_ns?0:matnames, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi material\n");
+        return -1;
+    }
+    DBFreeOptlist(optlist);
+
+    /*
+     * Close the file.
+     */
+    DBClose(dbfile);
+
+    return 0;
+}
+
+/***********************************************************************
+ * Purpose:
+ *    Build a 3-d UCD mesh and add it to the open database.
+ *
+ * Programmer:  Eric Brugger
+ * Date:        September 17, 2001
+ *
+ ***********************************************************************/
+void
+build_block_ucd3d(char *basename, int driver, char *file_ext,
+                  int nblocks_x, int nblocks_y, int nblocks_z)
+{
+    int             nx, ny, nz;
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    float          *coords[3];
+    float          *x=NULL, *y=NULL, *z=NULL;
+
+    char           *meshname=NULL, *var1name=NULL, *var2name=NULL,
+                   *var3name=NULL, *var4name=NULL, *var5name=NULL;
+    char           *matname=NULL;
+    float          *vars[1];
+    char           *varnames[1];
+    float          *d=NULL, *p=NULL, *u=NULL, *v=NULL, *w=NULL;
+
+    int             nmats;
+    int             matnos[3];
+    int            *matlist=NULL;
+    int             mixlen;
+    int            *mix_next=NULL, *mix_mat=NULL, *mix_zone=NULL;
+    float          *mix_vf=NULL;
+    float          *xstrip=NULL, *ystrip=NULL, *zstrip=NULL;
+
+    int             i, j, k;
+    int             iz;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           h, dh;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+
+    nx = 120;
+    ny = 160;
+    nz = 120;
+
+    x = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    y = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    z = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+
+    d = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    p = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    u = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    v = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+    w = ALLOC_N(float, (nx+1)*(ny+1)*(nz+1));
+
+    matlist  = ALLOC_N(int, nx*ny*nz);
+    mix_next = ALLOC_N(int, 85000);
+    mix_mat  = ALLOC_N(int, 85000);
+    mix_zone = ALLOC_N(int, 85000);
+    mix_vf   = ALLOC_N(float, 85000);
+
+    xstrip   = ALLOC_N(float, nx+ny+nz);
+    ystrip   = ALLOC_N(float, nx+ny+nz);
+    zstrip   = ALLOC_N(float, nx+ny+nz);
+
+    /* 
+     * Create the coordinate arrays for the entire mesh.
+     */
+    dh = 20. / (float)nx;
+    dtheta = (180. / (float)ny) * (3.1415926 / 180.);
+    dr = 3. / (float)nz;
+    h = 0.;
+    for (i = 0; i < nx + 1; i++)
+    {
+        theta = 0.;
+        for (j = 0; j < ny + 1; j++)
+        {
+            r = 2.;
+            for (k = 0; k < nz + 1; k++)
+            {
+                x[i * (nx+1)*(ny+1) + j * (nx+1) + k] = r * cos(theta);
+                y[i * (nx+1)*(ny+1) + j * (nx+1) + k] = r * sin(theta);
+                z[i * (nx+1)*(ny+1) + j * (nx+1) + k] = h;
+                r += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    /* 
+     * Create the density and pressure arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < nx + 1; i++)
+    {
+        for (j = 0; j < ny + 1; j++)
+        {
+            for (k = 0; k < nz + 1; k++)
+            {
+                dist = sqrt((x[i * (nx+1)*(ny+1) + j * (nx+1) + k] - xcenter) *
+                            (x[i * (nx+1)*(ny+1) + j * (nx+1) + k] - xcenter) +
+                            (y[i * (nx+1)*(ny+1) + j * (nx+1) + k] - ycenter) *
+                            (y[i * (nx+1)*(ny+1) + j * (nx+1) + k] - ycenter));
+                d[i * (nx+1)*(ny+1) + j * (nx+1) + k] = dist;
+                p[i * (nx+1)*(ny+1) + j * (nx+1) + k] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /* 
+     * Create the velocity component arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < nx + 1; i++)
+    {
+        for (j = 0; j < ny + 1; j++)
+        {
+            for (k = 0; k < nz + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[i * (nx+1)*(ny+1) + j * (nx+1) + k] = (x[i] - xcenter) / dist;
+                v[i * (nx+1)*(ny+1) + j * (nx+1) + k] = (y[j] - ycenter) / dist;
+                w[i * (nx+1)*(ny+1) + j * (nx+1) + k] = 0.;
+            }
+        }
+    }
+
+    /* 
+     * Put in the material for the entire mesh.
+     */
+    fill_bkgr(matlist, nx, ny, nz, 1);
+
+    for (i = 0; i < ny; i++)
+    {
+        xstrip[i] = (float)i;
+        ystrip[i] = (float)i;
+        zstrip[i] = (float)i;
+    }
+
+    mixlen = 0;
+    fill_mat(xstrip, ystrip, zstrip, matlist, nx, ny, nz, mix_next,
+             mix_mat, mix_zone, mix_vf, &mixlen, 2, 60., 80., 60., 40.);
+    fill_mat(xstrip, ystrip, zstrip, matlist, nx, ny, nz, mix_next,
+             mix_mat, mix_zone, mix_vf, &mixlen, 3, 60., 80., 60., 20.);
+    if (mixlen > 85000)
+    {
+        printf("memory overwrite: mixlen = %d > 85000\n", mixlen);
+        exit(-1);
+    }
+    /* 
+     * Set up variables that are independent of the block number.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    var1name = "d";
+    var2name = "p";
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    /* 
+     * Now extract the data for this block.
+     */
+    delta_x = nx / nblocks_x;
+    delta_y = ny / nblocks_y;
+    delta_z = nz / nblocks_z;
+
+    if (multidir)
+    {
+        int st;
+        unlink("multi_file.dir/000/ucd3d0.pdb");
+        unlink("multi_file.dir/000/ucd3d0.h5");
+        rmdir("multi_file.dir/000");
+        unlink("multi_file.dir/001/ucd3d1.pdb");
+        unlink("multi_file.dir/001/ucd3d1.h5");
+        rmdir("multi_file.dir/001");
+        unlink("multi_file.dir/002/ucd3d2.pdb");
+        unlink("multi_file.dir/002/ucd3d2.h5");
+        rmdir("multi_file.dir/002");
+        unlink("multi_file.dir/003/ucd3d3.pdb");
+        unlink("multi_file.dir/003/ucd3d3.h5");
+        rmdir("multi_file.dir/003");
+        unlink("multi_file.dir/004/ucd3d4.pdb");
+        unlink("multi_file.dir/004/ucd3d4.h5");
+        rmdir("multi_file.dir/004");
+        unlink("multi_file.dir/005/ucd3d5.pdb");
+        unlink("multi_file.dir/005/ucd3d5.h5");
+        rmdir("multi_file.dir/005");
+        unlink("multi_file.dir/006/ucd3d6.pdb");
+        unlink("multi_file.dir/006/ucd3d6.h5");
+        rmdir("multi_file.dir/006");
+        unlink("multi_file.dir/007/ucd3d7.pdb");
+        unlink("multi_file.dir/007/ucd3d7.h5");
+        rmdir("multi_file.dir/007");
+        rmdir("multi_file.dir");
+#ifndef WIN32
+        st = mkdir("multi_file.dir",S_IRWXU|S_IRWXG|S_IRWXU);
+#else
+        st = _mkdir("multi_file.dir");
+#endif
+        if (st < 0)
+        {
+            fprintf(stderr, "Unable to mkdir(\"multi_file.dir\")\n");
+            return;
+        }
+        fprintf(stdout, "\tMade directory multi_file.dir\n");
+    }
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        char            dirname[80];
+        int             filenum;
+        char            filename[120];
+
+        int             imin, imax, jmin, jmax, kmin, kmax;
+        int             nnx, nny, nnz;
+
+        float          *x2=NULL, *y2=NULL, *z2=NULL;
+        float          *d2=NULL, *p2=NULL, *u2=NULL, *v2=NULL, *w2=NULL;
+        int            *matlist2=NULL, *ghost=NULL;
+
+        int             n_x, n_y, n_z;
+
+        int             nreal;
+        int             ighost;
+        int             itemp;
+        int             hi_off;
+
+        int             one = 1;
+
+        int             nfaces, nzones, nnodes;
+        int             lfacelist, lzonelist;
+        int             fshapesize, fshapecnt;
+        int             zshapetype, zshapesize, zshapecnt;
+        int            *zonelist=NULL;
+        int            *facelist=NULL;
+        int            *zoneno=NULL;
+
+        DBfacelist     *fl=NULL;
+
+        DBoptlist      *optlist=NULL;
+        DBobject       *obj=NULL;
+        DBfile         *dbfile;
+
+        sprintf(dirname, "/block%d", block);
+        filenum = block / ((nblocks_x * nblocks_y * nblocks_z) / NFILES);
+        if (multidir)
+            sprintf(filename, "multi_file.dir/%03d/%s%d.%s", filenum, basename, filenum, file_ext);
+        else
+            sprintf(filename, "%s%d.%s", basename, filenum, file_ext);
+
+        fprintf(stdout, "\t%s:%s\n", filename, dirname);
+
+        /* 
+         * Now extract the data for this block.
+         */
+        imin = (block % nblocks_x) * delta_x - 1;
+        imax = MIN(imin + delta_x + 3, nx + 1);
+        imin = MAX(imin, 0);
+        nnx = imax - imin;
+        jmin = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y - 1;
+        jmax = MIN(jmin + delta_y + 3, ny + 1);
+        jmin = MAX(jmin, 0);
+        nny = jmax - jmin;
+        kmin = (block / (nblocks_x * nblocks_y)) * delta_z - 1;
+        kmax = MIN(kmin + delta_z + 3, nz + 1);
+        kmin = MAX(kmin, 0);
+        nnz = kmax - kmin;
+
+        x2 = ALLOC_N(float, nnx*nny*nnz);
+        y2 = ALLOC_N(float, nnx*nny*nnz);
+        z2 = ALLOC_N(float, nnx*nny*nnz);
+        d2 = ALLOC_N(float, nnx*nny*nnz);
+        p2 = ALLOC_N(float, nnx*nny*nnz);
+        u2 = ALLOC_N(float, nnx*nny*nnz);
+        v2 = ALLOC_N(float, nnx*nny*nnz);
+        w2 = ALLOC_N(float, nnx*nny*nnz);
+        matlist2 = ALLOC_N(int, (nnx-1)*(nny-1)*(nnz-1));
+        ghost    = ALLOC_N(int, (nnx-1)*(nny-1)*(nnz-1));
+
+        coords[0] = x2;
+        coords[1] = y2;
+        coords[2] = z2;
+
+        for (k = 0, n_z = kmin; n_z < kmax; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax; i++, n_x++)
+                {
+                    x2[k * nnx * nny + j * nnx + i] =
+                        x[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    y2[k * nnx * nny + j * nnx + i] =
+                        y[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    z2[k * nnx * nny + j * nnx + i] =
+                        z[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    d2[k * nnx * nny + j * nnx + i] =
+                        d[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    p2[k * nnx * nny + j * nnx + i] =
+                        p[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    u2[k * nnx * nny + j * nnx + i] =
+                        u[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    v2[k * nnx * nny + j * nnx + i] =
+                        v[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                    w2[k * nnx * nny + j * nnx + i] =
+                        w[n_z * (nx + 1) * (ny + 1) + n_y * (nx + 1) + n_x];
+                }
+
+        zonelist = ALLOC_N(int, (nnx-1)*(nny-1)*(nnz-1)*8);
+
+        iz = 0;
+        for (k = 0, n_z = kmin; n_z < kmax - 1; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax - 1; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax - 1; i++, n_x++)
+                {
+                    zonelist[iz]     = (k+0) * nnx*nny + (j+1) * nnx + i+1;
+                    zonelist[iz + 1] = (k+0) * nnx*nny + (j+0) * nnx + i+1;
+                    zonelist[iz + 2] = (k+1) * nnx*nny + (j+0) * nnx + i+1;
+                    zonelist[iz + 3] = (k+1) * nnx*nny + (j+1) * nnx + i+1;
+                    zonelist[iz + 4] = (k+0) * nnx*nny + (j+1) * nnx + i+0;
+                    zonelist[iz + 5] = (k+0) * nnx*nny + (j+0) * nnx + i+0;
+                    zonelist[iz + 6] = (k+1) * nnx*nny + (j+0) * nnx + i+0;
+                    zonelist[iz + 7] = (k+1) * nnx*nny + (j+1) * nnx + i+0;
+                    iz += 8;
+
+                    matlist2[k * (nnx - 1) * (nny - 1) + j * (nnx - 1) + i] =
+                        matlist[n_z * nx * ny + n_y * nx + n_x];
+
+                    if (((k == 0 || n_z == kmax - 2) &&
+                         (n_z != 0 && n_z != nz - 1)) ||
+                        ((j == 0 || n_y == jmax - 2) &&
+                         (n_y != 0 && n_y != ny - 1)) ||
+                        ((i == 0 || n_x == imax - 2) &&
+                         (n_x != 0 && n_x != nx - 1)))
+                        ghost[k * (nnx-1) * (nny-1) + j * (nnx-1) + i] = 1;
+                    else
+                        ghost[k * (nnx-1) * (nny-1) + j * (nnx-1) + i] = 0;
+                }
+
+        /* 
+         * Resort the zonelist, matlist so that the ghost zones are at the
+         * end.
+         */
+        nzones = (nnx - 1) * (nny - 1) * (nnz - 1);
+        nreal = nzones;
+        for (i = 0; i < nzones; i++)
+            nreal -= ghost[i];
+        ighost = nzones - 1;
+        for (i = 0; i < nreal; i++)
+        {
+            if (ghost[i] == 1)
+            {
+                /* 
+                 * Find the first non ghost zone.
+                 */
+                while (ghost[ighost] == 1)
+                    ighost--;
+                j = ighost;
+
+                itemp = zonelist[i * 8];
+                zonelist[i * 8] = zonelist[j * 8];
+                zonelist[j * 8] = itemp;
+                itemp = zonelist[i * 8 + 1];
+                zonelist[i * 8 + 1] = zonelist[j * 8 + 1];
+                zonelist[j * 8 + 1] = itemp;
+                itemp = zonelist[i * 8 + 2];
+                zonelist[i * 8 + 2] = zonelist[j * 8 + 2];
+                zonelist[j * 8 + 2] = itemp;
+                itemp = zonelist[i * 8 + 3];
+                zonelist[i * 8 + 3] = zonelist[j * 8 + 3];
+                zonelist[j * 8 + 3] = itemp;
+                itemp = zonelist[i * 8 + 4];
+                zonelist[i * 8 + 4] = zonelist[j * 8 + 4];
+                zonelist[j * 8 + 4] = itemp;
+                itemp = zonelist[i * 8 + 5];
+                zonelist[i * 8 + 5] = zonelist[j * 8 + 5];
+                zonelist[j * 8 + 5] = itemp;
+                itemp = zonelist[i * 8 + 6];
+                zonelist[i * 8 + 6] = zonelist[j * 8 + 6];
+                zonelist[j * 8 + 6] = itemp;
+                itemp = zonelist[i * 8 + 7];
+                zonelist[i * 8 + 7] = zonelist[j * 8 + 7];
+                zonelist[j * 8 + 7] = itemp;
+
+                itemp = matlist2[i];
+                matlist2[i] = matlist2[j];
+                matlist2[j] = itemp;
+
+                itemp = ghost[i];
+                ghost[i] = ghost[j];
+                ghost[j] = itemp;
+            }
+        }
+
+        /* 
+         * Calculate the external face list.
+         */
+        nnodes = nnx * nny * nnz;
+        hi_off = nzones - nreal;
+
+        zshapesize = 8;
+        zshapecnt = nzones;
+        zshapetype = DB_ZONETYPE_HEX;
+        lzonelist = nzones * 8;
+
+        fl = DBCalcExternalFacelist2(zonelist, nnodes, 0, hi_off, 0,
+                                     &zshapetype, &zshapesize, &zshapecnt, 1,
+                                     matlist2, 0);
+
+        facelist = ALLOC_N(int, fl->lnodelist);
+        zoneno   = ALLOC_N(int, fl->nfaces);
+
+        nfaces = fl->nfaces;
+        fshapecnt = fl->nfaces;
+        fshapesize = 4;
+        lfacelist = fl->lnodelist;
+        for (i = 0; i < lfacelist; i++)
+            facelist[i] = fl->nodelist[i];
+        for (i = 0; i < nfaces; i++)
+            zoneno[i] = fl->zoneno[i];
+
+        DBFreeFacelist(fl);
+
+        /*
+         * If the block number is devisible by 1/NFILES of the total number
+         * of blocks then create the file, otherwise just open the file
+         * since it has already been created.
+         */
+        if (block % ((nblocks_x * nblocks_y * nblocks_z) / NFILES) == 0)
+        {
+            if (multidir)
+            {
+                int st;
+                char dname[60];
+                sprintf(dname, "multi_file.dir/%03d", filenum);
+#ifndef WIN32
+                st = mkdir(dname, S_IRWXU|S_IRWXG|S_IRWXU);
+#else
+                st = _mkdir(dname);
+#endif
+                if (st < 0)
+                {
+                    fprintf(stderr, "Unable to make directory \"%s\"\n", dname);
+                    return;
+                }
+                fprintf(stdout, "\tMade directory %s\n", dname);
+            }
+
+            if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                "multi-file ucd 3d test file", driver)) == NULL)
+            {
+                fprintf(stderr, "Could not create '%s'.\n", filename);
+                return;
+            }
+        }
+        else
+        {
+            if ((dbfile = DBOpen(filename, driver, DB_APPEND)) == NULL)
+            {
+                fprintf(stderr, "Could not open '%s'.\n", filename);
+                return;
+            }
+        }
+
+        /*
+         * Make the directory for the block and cd into it.
+         */
+        if (DBMkDir(dbfile, dirname) == -1)
+        {
+            fprintf(stderr, "Could not make directory \"%s\"\n", dirname);
+            return;
+        }
+        if (DBSetDir(dbfile, dirname) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n", dirname);
+            return;
+        }
+
+        /*
+         * Write out the mesh and variables.
+         */
+        optlist = DBMakeOptlist(10);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+        DBAddOption(optlist, DBOPT_HI_OFFSET, &hi_off);
+
+        if (nfaces > 0)
+            DBPutFacelist(dbfile, "fl1", nfaces, 3, facelist, lfacelist, 0,
+                      zoneno, &fshapesize, &fshapecnt, 1, NULL, NULL, 0);
+
+        DBPutZonelist2(dbfile, "zl1", nzones, 3, zonelist, lzonelist, 0,
+            0, hi_off, &zshapetype, &zshapesize, &zshapecnt, 1, 0);
+
+        /* 
+         * Output the rest of the mesh and variables.
+         */
+        if (nfaces > 0)
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", "fl1", DB_FLOAT, optlist);
+        else
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", NULL, DB_FLOAT, optlist);
+
+        vars[0] = d2;
+        varnames[0] = var1name;
+        DBPutUcdvar(dbfile, var1name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = p2;
+        varnames[0] = var2name;
+        DBPutUcdvar(dbfile, var2name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = u2;
+        varnames[0] = var3name;
+        DBPutUcdvar(dbfile, var3name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = v2;
+        varnames[0] = var4name;
+        DBPutUcdvar(dbfile, var4name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        vars[0] = w2;
+        varnames[0] = var5name;
+        DBPutUcdvar(dbfile, var5name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, &nzones, 1, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        FREE(x2);
+        FREE(y2);
+        FREE(z2);
+        FREE(d2);
+        FREE(p2);
+        FREE(u2);
+        FREE(v2);
+        FREE(w2);
+        FREE(matlist2);
+        FREE(ghost);
+
+        FREE(zonelist);
+        FREE(facelist);
+        FREE(zoneno);
+
+        /*
+         * Close the file.
+         */
+        DBClose(dbfile);
+    }
+
+    FREE(x);
+    FREE(y);
+    FREE(z);
+
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(mix_vf);
+
+    FREE(xstrip);
+    FREE(ystrip);
+    FREE(zstrip);
+}
+
diff --git a/tests/multi_test.c b/tests/multi_test.c
new file mode 100644
index 0000000..22540bc
--- /dev/null
+++ b/tests/multi_test.c
@@ -0,0 +1,3182 @@
+/*---------------------------------------------------------------------------
+ * multi_testall.c -- Multi-Block Test File Generator.
+ *
+ * Programmed by Katherine Price, August 4, 1995
+ *
+ * This test file creates multi-block objects, that are based on the same
+ * data sets as the objects created by testall.c.
+ *
+ *	multi_rect2d.*  - 12 blocks	(3 x 4)
+ *	multi_curv2d.*  -  5 blocks	(5 x 1)
+ *	multi_point2d.* -  5 blocks	(5 x 1)
+ *	multi_rect3d.*  - 36 blocks	(3 x 4 x 3)
+ *	multi_curv3d.*  - 36 blocks	(3 x 4 x 3)
+ *	multi_ucd3d.*   - 20 blocks	(1 x 1 x 20)
+ *
+ * Note: The multi_curv3d.* file has not been tested.
+ *
+ * Modifications:
+ *     Sean Ahern, Thu Jun 13 11:52:47 PDT 1996
+ *     Got rid of the ^Ls in the file.
+ *
+ *     Sean Ahern, Tue Dec  7 16:07:04 PST 1999
+ *     Changed functions to ANSI style.  Reformatted code through indent.
+ *
+ *     Lisa J. Roberts, Fri Apr  7 10:30:59 PDT 2000
+ *     Added string.h to get rid of compiler warnings.
+ *
+ *-------------------------------------------------------------------------*/
+
+#include <math.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "silo.h"
+
+#define NX 30
+#define NY 40
+#define NZ 30
+
+#define MAXBLOCKS       100           /* maximum number of blocks in an object   */
+#define MAXNUMVARS      10            /* maximum number of vars to output */
+#define STRLEN          60
+#define MIXMAX          20000       /* Maximum length of the mixed arrays */
+#define MAXMATNO        3
+
+#define ALLOC_N(T,N)            ((T*)((N)>0?calloc((size_t)(N),sizeof(T)):0))
+#define FREE(M)         if(M){free(M);(M)=NULL;}
+#ifndef MAX
+#define MAX(X,Y)        ((X)>(Y)?(X):(Y))
+#define MIN(X,Y)        ((X)<(Y)?(X):(Y))
+#endif
+
+#define SET_OPTIONS(ES,EX,ZCNTS,MLEN,MCNTS,MLISTS,HASEXT)   \
+    if (optlist) DBFreeOptlist(optlist);                    \
+    optlist = DBMakeOptlist(20);                            \
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);              \
+    DBAddOption(optlist, DBOPT_TIME, &time);                \
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);              \
+    DBAddOption(optlist, DBOPT_NMATNOS, &nmatnos);          \
+    DBAddOption(optlist, DBOPT_MATNOS, matnos);             \
+    DBAddOption(optlist, DBOPT_EXTENTS_SIZE, &ES);          \
+    DBAddOption(optlist, DBOPT_TENSOR_RANK, &scalar_rank);  \
+    DBAddOption(optlist, DBOPT_MMESH_NAME, mmesh_name);     \
+    if (EX)                                                 \
+       DBAddOption(optlist, DBOPT_EXTENTS, EX);             \
+    if (ZCNTS)                                              \
+       DBAddOption(optlist, DBOPT_ZONECOUNTS, ZCNTS);       \
+    if (MLEN)                                               \
+       DBAddOption(optlist, DBOPT_MIXLENS, MLEN);           \
+    if (MCNTS)                                              \
+       DBAddOption(optlist, DBOPT_MATCOUNTS, MCNTS);        \
+    if (MLISTS)                                             \
+       DBAddOption(optlist, DBOPT_MATLISTS, MLISTS);        \
+    if (HASEXT)                                             \
+       DBAddOption(optlist, DBOPT_HAS_EXTERNAL_ZONES, HASEXT)
+
+
+double varextents[MAXNUMVARS][2*MAXBLOCKS];
+int mixlens[MAXBLOCKS];
+int zonecounts[MAXBLOCKS];
+int has_external_zones[MAXBLOCKS];
+int matcounts[MAXBLOCKS];
+int matlists[MAXBLOCKS][MAXMATNO+1];
+int driver = DB_PDB;
+int check_early_close = FALSE;
+
+int           build_multi(DBfile *, int, int, int, int, int, int, int);
+
+void          build_block_rect2d(DBfile *, char[MAXBLOCKS][STRLEN], int, int);
+void          build_block_curv2d(DBfile *, char[MAXBLOCKS][STRLEN], int, int);
+void          build_block_point2d(DBfile *, char[MAXBLOCKS][STRLEN], int, int);
+void          build_block_rect3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                 int);
+void          build_block_curv3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                 int);
+void          build_block_ucd3d(DBfile *, char[MAXBLOCKS][STRLEN], int, int,
+                                int);
+
+static void   put_extents(float *arr, int len, double *ext_arr, int block);
+static void   fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz,
+                               int matno);
+static void   fill_rect3d_mat(float x[], float y[], float z[], int matlist[],
+                              int nx, int ny, int nz, int mix_next[],
+                              int mix_mat[], int mix_zone[], float mix_vf[],
+                              int *mixlen, int matno, double xcenter,
+                              double ycenter, double zcenter, double radius);
+
+/*-------------------------------------------------------------------------
+ * Function:    put_extents
+ *
+ * Purpose:     Compute the extents of the given data and put in in the
+ *              specified array for the specified block
+ *
+ * Programmer:  Mark C. Miller, 07Aug03
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+static void
+put_extents(float *arr, int len, double *ext_arr, int block)
+{
+   int i;
+   double min = arr[0], max = min;
+   for (i = 0; i < len; i++)
+   {
+      if (arr[i] < min)
+         min = arr[i];
+      if (arr[i] > max)
+         max = arr[i];
+   }
+   ext_arr[2*block] = min;
+   ext_arr[2*block+1] = max;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    count_mats 
+ *
+ * Purpose:     Count the number of unique materials in a block
+ *              To count the number of unique materials actaully in this
+ *              block, we use an approximate algorithm where we assume every
+ *              block that contains a given material, does not contain it
+ *              only in a mixed element. In this way, we can count materials
+ *              be examining only the clean material data
+ *
+ * Programmer:  Mark C. Miller, 14Aug03
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+static int 
+count_mats(int nzones, int *matlist, int *unique_mats)
+{
+   int i, num_mats = 0;
+   int mat_map[MAXMATNO+1] = {0,0,0,0};
+   for (i = 0; i < nzones; i++)
+   {
+      if (matlist[i]>=0)
+         mat_map[matlist[i]] = 1;
+   }
+   for (i = 0; i < MAXMATNO+1; i++)
+      if (mat_map[i] == 1)
+         unique_mats[num_mats++] = i;
+
+   return num_mats;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    fill_rect3d_bkgr
+ *
+ * Purpose:     Fill the entire material array with the material "matno".
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Eric Brugger, 10/17/97
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+static void
+fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz, int matno)
+{
+    int             i, j, k;
+
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                matlist[k * nx * ny + j * nx + i] = matno;
+            }
+        }
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    fill_rect3d_mat
+ *
+ * Purpose:     Fill the specified material array with sphere centered
+ *              at "xcenter", "ycenter", "zcenter" and radius of "radius"
+ *              with the material "matno".
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Eric Brugger, 10/17/97
+ *
+ * Modifications:
+ *     Sean Ahern, Thu Jul  2 17:02:18 PDT 1998
+ *     Fixed an indexing problem.
+ *
+ *------------------------------------------------------------------------*/
+static void
+fill_rect3d_mat(float x[], float y[], float z[], int matlist[], int nx,
+                int ny, int nz, int mix_next[], int mix_mat[], int mix_zone[],
+                float mix_vf[], int *mixlen, int matno, double xcenter,
+                double ycenter, double zcenter, double radius)
+{
+    int             i, j, k, l, m, n;
+    double          dist;
+    int             cnt;
+    int             mixlen2;
+    int            *itemp;
+    float           dx, dy, dz;
+    float           xx[10], yy[10], zz[10];
+
+    mixlen2 = *mixlen;
+
+    itemp = ALLOC_N(int, (nx + 1) * (ny + 1) * (nz + 1));
+
+    for (i = 0; i < nx+1; i++)
+    {
+        for (j = 0; j < ny+1; j++)
+        {
+            for (k = 0; k < nz+1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                itemp[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] =
+                    (dist < radius) ? 1 : 0;
+            }
+        }
+    }
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                cnt = itemp[(k + 0) * (nx + 1) * (ny + 1) + (j + 0) * (nx + 1) + i + 0] +
+                      itemp[(k + 0) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + i + 0] +
+                      itemp[(k + 0) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + i + 1] +
+                      itemp[(k + 0) * (nx + 1) * (ny + 1) + (j + 0) * (nx + 1) + i + 1] +
+                      itemp[(k + 1) * (nx + 1) * (ny + 1) + (j + 0) * (nx + 1) + i + 0] +
+                      itemp[(k + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + i + 0] +
+                      itemp[(k + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + i + 1] +
+                      itemp[(k + 1) * (nx + 1) * (ny + 1) + (j + 0) * (nx + 1) + i + 1];
+                if (cnt == 0)
+                {
+                    /* EMPTY */
+                } else if (cnt == 8)
+                {
+                    matlist[k * nx * ny + j * nx + i] = matno;
+                } else
+                {
+                    dx = (x[i + 1] - x[i]) / 11.;
+                    dy = (y[j + 1] - y[j]) / 11.;
+                    dz = (z[k + 1] - z[k]) / 11.;
+                    for (l = 0; l < 10; l++)
+                    {
+                        xx[l] = x[i] + (dx / 2.) + (l * dx);
+                        yy[l] = y[j] + (dy / 2.) + (l * dy);
+                        zz[l] = z[k] + (dz / 2.) + (l * dz);
+                    }
+                    cnt = 0;
+                    for (l = 0; l < 10; l++)
+                    {
+                        for (m = 0; m < 10; m++)
+                        {
+                            for (n = 0; n < 10; n++)
+                            {
+                                dist = sqrt((xx[l] - xcenter) *
+                                            (xx[l] - xcenter) +
+                                            (yy[m] - ycenter) *
+                                            (yy[m] - ycenter) +
+                                            (zz[n] - zcenter) *
+                                            (zz[n] - zcenter));
+                                cnt += (dist < radius) ? 1 : 0;
+                            }
+                        }
+                    }
+                    matlist[k * nx * ny + j * nx + i] = -(mixlen2 + 1);
+                    mix_mat[mixlen2] = matno - 1;
+                    mix_mat[mixlen2 + 1] = matno;
+                    mix_next[mixlen2] = mixlen2 + 2;
+                    mix_next[mixlen2 + 1] = 0;
+                    mix_zone[mixlen2] = k * nx * ny + j * nx + i;
+                    mix_zone[mixlen2 + 1] = k * nx * ny + j * nx + i;
+                    mix_vf[mixlen2] = 1. - (((float)cnt) / 1000.);
+                    mix_vf[mixlen2 + 1] = ((float)cnt) / 1000.;
+                    mixlen2 += 2;
+                }
+            }
+        }
+    }
+
+    FREE(itemp);
+
+    *mixlen = mixlen2;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     Generate multi block test files.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Katherine Price, 8/4/95
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Oct 17 17:05:32 PDT 1997
+ *    Modified the number of blocks in the ucd3d sample file.
+ *
+ *    Eric Brugger, Mon Mar 2  20:46:27 PDT 1998
+ *    Added the creation of a 2d multi-block point mesh.
+ *
+ *    Sean Ahern, Thu Jul  2 10:57:15 PDT 1998
+ *    Added a return statement.
+ *
+ *    Robb Matzke, 1999-04-09
+ *    Added argument parsing to control the driver which is used.
+ *
+ *    Sean Ahern, Tue Dec  7 16:07:31 PST 1999
+ *    Fixed the type of argv.
+ *
+ *    Mark C. Miller, Wed Dec  2 12:12:49 PST 2009
+ *    Fixed declaration of 'inc'
+ *------------------------------------------------------------------------*/
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile;
+    char           filename[256], *file_ext=".pdb";
+    int            i;
+    int            dochecks = FALSE;
+    int            hdfriendly = FALSE;
+    int            inc = 512 << 11;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+        if (!strcmp(argv[i], "DB_PDB")) {
+            driver = DB_PDB;
+            file_ext = ".pdb";
+        } else if (!strcmp(argv[i], "DB_HDF5")) {
+            driver = DB_HDF5;
+            file_ext = ".h5";
+        } else if (!strcmp(argv[i], "DB_HDF5_SEC2")) {
+            driver = DB_HDF5_SEC2;
+            file_ext = ".h5";
+        } else if (!strcmp(argv[i], "DB_HDF5_STDIO")) {
+            driver = DB_HDF5_STDIO;
+            file_ext = ".h5";
+        } else if (!strcmp(argv[i], "DB_HDF5_CORE")) {
+            driver = inc | DB_HDF5_CORE;
+            file_ext = ".h5";
+        } else if (!strcmp(argv[i], "hzip")) {
+            DBSetCompression("ERRMODE=FALLBACK METHOD=HZIP");
+        } else if (!strcmp(argv[i], "fpzip")) {
+            DBSetCompression("METHOD=FPZIP LOSS=3");
+        } else if (!strcmp(argv[i], "fpziplossless")) {
+            DBSetCompression("METHOD=FPZIP");
+        } else if (!strcmp(argv[i], "earlyclose")) {
+            check_early_close = TRUE;
+        } else if (!strcmp(argv[i], "check")) {
+            dochecks = TRUE;
+        } else if (!strcmp(argv[i], "hdf-friendly")) {
+            hdfriendly = TRUE;
+        } else if (!strcmp(argv[i], "hdf-friendly-hard")) {
+            hdfriendly = 2;
+        } else {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    DBShowErrors(DB_TOP, NULL);
+    DBSetEnableChecksums(dochecks);
+    if (driver == DB_HDF5 || driver == DB_HDF5_SEC2 ||
+        driver == DB_HDF5_STDIO || driver == (inc|DB_HDF5_CORE))
+        DBSetFriendlyHDF5Names(hdfriendly);
+
+    /*
+     * Create the multi-block rectilinear 2d mesh.
+     */
+    sprintf(filename, "multi_rect2d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-block rectilinear 2d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 2, 3, 4, 1,
+                           DB_COLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /* 
+     * Create the multi-block curvilinear 2d mesh.
+     */
+    sprintf(filename, "multi_curv2d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-block curvilinear 2d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 2, 5, 1, 1,
+                           DB_NONCOLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /* 
+     * Create the multi-block point 2d mesh.
+     */
+    sprintf(filename, "multi_point2d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                           "multi-block point 2d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_POINTMESH, DB_POINTVAR, 2, 5, 1, 1,
+                           0) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /* 
+     * Create the multi-block rectilinear 3d mesh.
+     */
+    sprintf(filename, "multi_rect3d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-block rectilinear 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 3, 3, 4, 3,
+                           DB_COLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /* 
+     * Create the multi-block curvilinear 3d mesh.
+     */
+    sprintf(filename, "multi_curv3d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-block curvilinear 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_QUADMESH, DB_QUADVAR, 3, 3, 4, 3,
+                           DB_NONCOLLINEAR) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    /* 
+     * Create the multi-block ucd 3d mesh.
+     */
+    sprintf(filename, "multi_ucd3d%s", file_ext);
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                           "multi-block ucd 3d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_multi(dbfile, DB_UCDMESH, DB_UCDVAR, 3, 3, 4, 3,
+                           0) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    return (0);
+}                                      /* main */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_multi
+ *
+ * Purpose:     Make a multi-block mesh, multi-block variables, and a
+ *              multi-block material based on the given meshtype,
+ *              dimensionality of the mesh, and number of blocks in the
+ *              x-direction, y-direction, and z-direction.  Also specify
+ *              if the mesh is collinear when creating a quad mesh.  The
+ *              total number of blocks created for the mesh equals
+ *              number of blocks in x-direction times number of blocks in
+ *              y-direction times number of blocks in z-direction.
+ *
+ *              nblocks = nblocks_x * nblocks_y * nblocks_z
+ *
+ * Return:      Success: 0
+ *
+ *              Failure: -1
+ *
+ * Programmer:  Katherine Price, 5/19/95
+ *
+ * Modifications:
+ *    Eric Brugger, Tue Jan 16 08:53:59 PST 1996
+ *    I modified the multi-block calls to output time, dtime, and cycle
+ *    in the option lists.
+ *
+ *    Eric Brugger, Fri Oct 17 17:09:00 PDT 1997
+ *    I modified the routine to output the materials and number of materials
+ *    associated with the multimat.
+ *
+ *    Eric Brugger, Mon Mar 2  20:46:27 PDT 1998
+ *    Added the creation of a 2d multi-block point mesh.
+ *
+ *    Sean Ahern, Thu Jul  2 11:03:06 PDT 1998
+ *    Fixed a memory leak where we didn't free the optlist.
+ *
+ *    Jeremy Meredith, Tue Oct  4 12:28:35 PDT 2005
+ *    Renamed defvar types to avoid namespace collision.
+ *
+ *    Mark C. Miller, Mon Aug  7 17:03:51 PDT 2006
+ *    Added additional material object with material names and colors 
+ *------------------------------------------------------------------------*/
+int
+build_multi(DBfile *dbfile, int meshtype, int vartype, int dim, int nblocks_x,
+            int nblocks_y, int nblocks_z, int coord_type)
+{
+    int             i,j,k;
+    int             cycle;
+    float           time;
+    double          dtime;
+    int             nmatnos;
+    int             matnos[3];
+    char            names[MAXBLOCKS][STRLEN];
+    char           *meshnames[MAXBLOCKS];
+    int             meshtypes[MAXBLOCKS];
+    char            names1[MAXBLOCKS][STRLEN];
+    char            names2[MAXBLOCKS][STRLEN];
+    char            names3[MAXBLOCKS][STRLEN];
+    char            names4[MAXBLOCKS][STRLEN];
+    char            names5[MAXBLOCKS][STRLEN];
+    char           *var1names[MAXBLOCKS];
+    char           *var2names[MAXBLOCKS];
+    char           *var3names[MAXBLOCKS];
+    char           *var4names[MAXBLOCKS];
+    char           *var5names[MAXBLOCKS];
+    int             vartypes[MAXBLOCKS];
+    char            names0[MAXBLOCKS][STRLEN];
+    char           *matnames[MAXBLOCKS];
+    char            dirnames[MAXBLOCKS][STRLEN];
+
+    DBoptlist      *optlist = NULL;
+    int             one = 1;
+    int             scalar_rank = DB_VARTYPE_SCALAR;
+    char           *mmesh_name = "mesh1";
+
+    int             nblocks = nblocks_x * nblocks_y * nblocks_z;
+    int             extentssize;
+    int            *tmpList;
+    double         *tmpExtents;
+
+    /* 
+     * Initialize a simple grouping
+     */
+    int             ngroupings;
+    int             groupings[9];
+    char          **groupingnames = NULL;
+    ngroupings = 9;            /* number of elements in the grouping arrays */
+    groupings[0] = 5;          /* number of elements in this group */
+    groupings[1] = 0;
+    groupings[2] = 1;
+    groupings[3] = 2;
+    groupings[4] = 3;
+    groupings[5] = 4;
+    groupings[6] = 2;          /* number of elements in next group */
+    groupings[7] = 5;
+    groupings[8] = 6;
+    groupingnames = (char**)malloc(sizeof(char*)*ngroupings);
+    groupingnames[0] = safe_strdup("First Grouping");
+    groupingnames[1] = safe_strdup("Zero");
+    groupingnames[2] = safe_strdup("One");
+    groupingnames[3] = safe_strdup("Two");
+    groupingnames[4] = safe_strdup("Three");
+    groupingnames[5] = safe_strdup("Four");
+    groupingnames[6] = safe_strdup("Second Grouping");
+    groupingnames[7] = safe_strdup("Five");
+    groupingnames[8] = safe_strdup("Six");
+
+    /* 
+     * Initialize the names and create the directories for the blocks.
+     */
+
+    for (i = 0; i < nblocks; i++)
+    {
+
+        sprintf(names[i], "/block%d/mesh1", i);
+        meshnames[i] = names[i];
+        meshtypes[i] = meshtype;
+
+        sprintf(names1[i], "/block%d/d", i);
+        sprintf(names2[i], "/block%d/p", i);
+        sprintf(names3[i], "/block%d/u", i);
+        sprintf(names4[i], "/block%d/v", i);
+        sprintf(names5[i], "/block%d/w", i);
+        var1names[i] = names1[i];
+        var2names[i] = names2[i];
+        var3names[i] = names3[i];
+        var4names[i] = names4[i];
+        var5names[i] = names5[i];
+        vartypes[i] = vartype;
+
+        sprintf(names0[i], "/block%d/mat1", i);
+        matnames[i] = names0[i];
+
+        /* make the directory for the block mesh */
+
+        sprintf(dirnames[i], "/block%d", i);
+
+        if (DBMkDir(dbfile, dirnames[i]) == -1)
+        {
+            fprintf(stderr, "Could not make directory \"%s\"\n", dirnames[i]);
+            return (-1);
+        }                              /* if */
+    }                                  /* for */
+
+    /* test behavior when file is closed prematurely */
+    if (check_early_close)
+        DBClose(dbfile);
+
+    /* create the blocks */
+
+    switch (meshtype)
+    {
+    case DB_QUADMESH:
+        if (coord_type == DB_COLLINEAR)
+        {
+            if (dim == 2)
+                build_block_rect2d(dbfile, dirnames, nblocks_x, nblocks_y);
+            else if (dim == 3)
+                build_block_rect3d(dbfile, dirnames, nblocks_x, nblocks_y,
+                                   nblocks_z);
+        } else if (coord_type == DB_NONCOLLINEAR)
+        {
+            if (dim == 2)
+                build_block_curv2d(dbfile, dirnames, nblocks_x, nblocks_y);
+            else if (dim == 3)
+                build_block_curv3d(dbfile, dirnames, nblocks_x, nblocks_y,
+                                   nblocks_z);
+        }
+        break;
+
+    case DB_UCDMESH:
+        if (dim == 3)
+            build_block_ucd3d(dbfile, dirnames, nblocks_x, nblocks_y,
+                              nblocks_z);
+
+        break;
+
+    case DB_POINTMESH:
+        if (dim == 2)
+            build_block_point2d(dbfile, dirnames, nblocks_x, nblocks_y);
+
+        break;
+
+    default:
+        fprintf(stderr, "Bad mesh type.\n");
+        return (-1);
+    }                                  /* switch */
+
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+    nmatnos = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    /* create the multi-block mesh, reformat extents for coords */
+    extentssize = 2 * dim;
+    tmpExtents = (double *) malloc(nblocks * extentssize * sizeof(double));
+    for (i = 0; i < nblocks; i++)
+    {
+       for (j = 0; j < dim; j++)
+       {
+          tmpExtents[i*extentssize+j] = varextents[j][2*i];
+          tmpExtents[i*extentssize+j+dim] = varextents[j][2*i+1];
+       }
+    }
+    SET_OPTIONS(extentssize,tmpExtents,zonecounts,NULL,NULL,NULL,has_external_zones);
+    if (DBPutMultimesh(dbfile, "mesh1", nblocks,
+                       meshnames, meshtypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi mesh\n");
+        free(tmpExtents);
+        return (-1);
+    }                                  /* if */
+    
+    for (i = 0; i < ngroupings; i++)
+        FREE(groupingnames[i]);
+    FREE(groupingnames);
+
+    /* test hidding a multimesh */
+    DBAddOption(optlist, DBOPT_HIDE_FROM_GUI, &one);
+    DBPutMultimesh(dbfile, "mesh1_hidden", nblocks, meshnames, meshtypes, optlist);
+    DBClearOption(optlist, DBOPT_HIDE_FROM_GUI);
+    free(tmpExtents);
+
+    /* create the multi-block variables */
+    extentssize = 2;
+    SET_OPTIONS(extentssize,varextents[3],NULL,NULL,NULL,NULL,NULL);
+    if (DBPutMultivar(dbfile, "d", nblocks, var1names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var d\n");
+        return (-1);
+    }                                  /* if */
+    SET_OPTIONS(extentssize,varextents[4],NULL,NULL,NULL,NULL,NULL);
+    if (DBPutMultivar(dbfile, "p", nblocks, var2names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var p\n");
+        return (-1);
+    }                                  /* if */
+    SET_OPTIONS(extentssize,varextents[5],NULL,NULL,NULL,NULL,NULL);
+    if (DBPutMultivar(dbfile, "u", nblocks, var3names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var u\n");
+        return (-1);
+    }                                  /* if */
+    SET_OPTIONS(extentssize,varextents[6],NULL,NULL,NULL,NULL,NULL);
+    if (DBPutMultivar(dbfile, "v", nblocks, var4names, vartypes, optlist)
+        == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var v\n");
+        return (-1);
+    }                                  /* if */
+    if (dim == 3)
+    {
+        SET_OPTIONS(extentssize,varextents[7],NULL,NULL,NULL,NULL,NULL);
+        if (DBPutMultivar(dbfile, "w", nblocks, var5names, vartypes, optlist)
+            == -1)
+        {
+            DBFreeOptlist(optlist);
+            fprintf(stderr, "Error creating multi var w\n");
+            return (-1);
+        }                              /* if */
+    }
+    /* create the multi-block material */
+    k = 0;
+    for (i = 0; i < nblocks; i++)
+       k += matcounts[i];
+    tmpList = (int *) malloc(k * sizeof(int));
+    k = 0;
+    for (i = 0; i < nblocks; i++)
+       for (j = 0; j < matcounts[i]; j++)
+          tmpList[k++] = matlists[i][j];
+    extentssize = 0;
+    SET_OPTIONS(extentssize,NULL,NULL,mixlens,matcounts,tmpList,NULL);
+    if (meshtype != DB_POINTMESH)
+    {
+        if (DBPutMultimat(dbfile, "mat1", nblocks, matnames, optlist) == -1)
+        {
+            DBFreeOptlist(optlist);
+            fprintf(stderr, "Error creating multi material\n");
+            return (-1);
+        }                              /* if */
+
+        DBAddOption(optlist, DBOPT_ALLOWMAT0, &one);
+        /* add material names and colors option to this one */
+        if (1)
+        {
+            char *colors[3] = {"yellow","cyan","black"};
+            char *matrnames[3] = {"outer","middle","inner"};
+            DBAddOption(optlist, DBOPT_MATCOLORS, colors);
+            DBAddOption(optlist, DBOPT_MATNAMES, matrnames);
+            if (DBPutMultimat(dbfile, "mat2", nblocks, matnames, optlist) == -1)
+            {
+                DBFreeOptlist(optlist);
+                fprintf(stderr, "Error creating multi material\n");
+                return (-1);
+            }                              /* if */
+        }
+    }
+    free(tmpList);
+    DBFreeOptlist(optlist);
+
+    /* create a defvars object */
+    {
+        int ndefs = 3;
+        char   vnames[3][STRLEN], *pvnames[3];
+        char   defns[3][STRLEN], *pdefns[3];
+        int    types[3];
+        
+        types[0] = DB_VARTYPE_SCALAR;
+        sprintf(vnames[0], "sum");
+        pvnames[0] = vnames[0];
+        if (dim == 2)
+            sprintf(defns[0], "u+v");
+        else
+            sprintf(defns[0], "u+v+w");
+        pdefns[0] = defns[0];
+
+        types[1] = DB_VARTYPE_VECTOR;
+        sprintf(vnames[1], "vec");
+        pvnames[1] = vnames[1];
+        if (dim == 2)
+            sprintf(defns[1], "{u,v}");
+        else
+            sprintf(defns[1], "{u,v,w}");
+        pdefns[1] = defns[1];
+
+        types[2] = DB_VARTYPE_SCALAR;
+        sprintf(vnames[2], "nmats");
+        pvnames[2] = vnames[2];
+        sprintf(defns[2], "nmats(mat1)");
+        pdefns[2] = defns[2];
+
+        DBPutDefvars(dbfile, "defvars", ndefs, pvnames, types, pdefns, 0);
+    }
+
+    return (0);
+}                                      /* build_multi */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_rect2d
+ *
+ * Purpose:     Builds a rectilinear 2-d mesh and places it in the open
+ *              data file.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov 23 10:13:51 EST 1994
+ *
+ * Modifications:
+ *              Katherine Price, Aug 4, 1995
+ *              Modified function to output blocks.
+ *
+ *-------------------------------------------------------------------------*/
+void
+build_block_rect2d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    int             ndims;
+    int             dims[3], zdims[3];
+    float          *coords[3];
+    float           x[NX + 1], y[NY + 1];
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name, *matname;
+    float           *d, *p, *u, *v;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             dims2[3];
+    int             mixlen;
+    int             *mix_mat;
+    float           *mix_vf;
+
+    DBoptlist      *optlist;
+    char          **matnames = NULL;
+
+    int             i, j, k, l;
+    float           xave, yave;
+    float           xcenter, ycenter;
+    float           dist;
+    float           dx, dy;
+    float           xx[20], yy[20];
+    int             cnt;
+    int             *itemp;
+
+    int             block;
+    int             delta_x, delta_y;
+    int             base_x, base_y;
+    int             n_x, n_y;
+
+    float           x2[NX + 1], y2[NY + 1];
+    float           *d2, *p2, *u2, *v2;
+    int             *matlist2;
+    int             mixlen2;
+    int             *mix_next2, *mix_mat2, *mix_zone2;
+    float           *mix_vf2;
+
+
+    matlist = ALLOC_N(int, NX * NY);
+    mix_mat = ALLOC_N(int, NX * NY);
+    itemp = ALLOC_N(int, (NX + 1) * (NY + 1));
+    matlist2 = ALLOC_N(int, NX * NY);
+    mix_next2 = ALLOC_N(int, NX * NY);
+    mix_mat2 = ALLOC_N(int, NX * NY);
+    mix_zone2 = ALLOC_N(int, NX * NY);
+
+    d = ALLOC_N(float, NX * NY);
+    p = ALLOC_N(float, NX * NY);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1));
+    d2 = ALLOC_N(float, NX * NY);
+    p2 = ALLOC_N(float, NX * NY);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    mix_vf = ALLOC_N(float, NX * NY);
+    mix_vf2 = ALLOC_N(float, NX * NY);
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coords[0] = x;
+    coords[1] = y;
+    ndims = 2;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    for (i = 0; i < NX + 1; i++)
+        x[i] = i * (1. / NX);
+    for (i = 0; i < NY + 1; i++)
+        y[i] = i * (1. / NX);
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = .5;
+    ycenter = .5;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            xave = (x[i] + x[i + 1]) / 2.;
+            yave = (y[j] + y[j + 1]) / 2.;
+            dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                        (yave - ycenter) * (yave - ycenter));
+            d[j * NX + i] = dist;
+            p[j * NX + i] = 1. / (dist + .0001);
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    xcenter = .5001;
+    ycenter = .5001;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            u[j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+            v[j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+        }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("Shredded documents");
+    matnames[1] = safe_strdup("Marble");
+    matnames[2] = safe_strdup("Gold bullion");
+
+    /*
+     * Put in material 1.
+     */
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            matlist[j * NX + i] = 1;
+        }
+    }
+
+    /*
+     * Overlay material 2.
+     */
+    xcenter = .5;
+    ycenter = .5;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            itemp[j * (NX + 1) + i] = (dist < .4) ? 1 : 0;
+        }
+    }
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            cnt = itemp[(j) * (NX + 1) + (i)] + itemp[(j + 1) * (NX + 1) + (i)] +
+                itemp[(j + 1) * (NX + 1) + (i + 1)] + itemp[(j) * (NX + 1) + (i + 1)];
+            if (cnt == 0)
+            {
+                /* do nothing */
+            } else if (cnt == 4)
+            {
+                matlist[j * NX + i] = 2;
+            } else
+            {
+                dx = (x[i + 1] - x[i]) / 21.;
+                dy = (y[j + 1] - y[j]) / 21.;
+                for (k = 0; k < 20; k++)
+                {
+                    xx[k] = x[i] + (dx / 2.) + (k * dx);
+                    yy[k] = y[j] + (dy / 2.) + (k * dy);
+                }
+                cnt = 0;
+                for (k = 0; k < 20; k++)
+                {
+                    for (l = 0; l < 20; l++)
+                    {
+                        dist = sqrt((xx[k] - xcenter) *
+                                    (xx[k] - xcenter) +
+                                    (yy[l] - ycenter) *
+                                    (yy[l] - ycenter));
+                        cnt += (dist < .4) ? 1 : 0;
+                    }
+                }
+                matlist[j * NX + i] = -(mixlen + 1);
+                mix_mat[mixlen] = 1;
+                mix_mat[mixlen + 1] = 2;
+                mix_vf[mixlen] = 1. - (((float)cnt) / 400.);
+                mix_vf[mixlen + 1] = ((float)cnt) / 400.;
+                mixlen += 2;
+            }
+        }
+    }
+
+    /*
+     * Overlay material 3.
+     */
+    xcenter = .5;
+    ycenter = .5;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            itemp[j * (NX + 1) + i] = (dist < .2) ? 1 : 0;
+        }
+    }
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NX; j++)
+        {
+            cnt = itemp[(j) * (NX + 1) + (i)] + itemp[(j + 1) * (NX + 1) + (i)] +
+                itemp[(j + 1) * (NX + 1) + (i + 1)] + itemp[(j) * (NX + 1) + (i + 1)];
+            if (cnt == 0)
+            {
+                /* do nothing */
+            } else if (cnt == 4)
+            {
+                matlist[j * NX + i] = 3;
+            } else
+            {
+                dx = (x[i + 1] - x[i]) / 21.;
+                dy = (y[j + 1] - y[j]) / 21.;
+                for (k = 0; k < 20; k++)
+                {
+                    xx[k] = x[i] + (dx / 2.) + (k * dx);
+                    yy[k] = y[j] + (dy / 2.) + (k * dy);
+                }
+                cnt = 0;
+                for (k = 0; k < 20; k++)
+                {
+                    for (l = 0; l < 20; l++)
+                    {
+                        dist = sqrt((xx[k] - xcenter) *
+                                    (xx[k] - xcenter) +
+                                    (yy[l] - ycenter) *
+                                    (yy[l] - ycenter));
+                        cnt += (dist < .2) ? 1 : 0;
+                    }
+                }
+                matlist[j * NX + i] = -(mixlen + 1);
+                mix_mat[mixlen] = 2;
+                mix_mat[mixlen + 1] = 3;
+                mix_vf[mixlen] = 1. - (((float)cnt) / 400.);
+                mix_vf[mixlen + 1] = ((float)cnt) / 400.;
+                mixlen += 2;
+            }
+        }
+    }
+
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+
+    /*
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /*
+         * Now extract the data for this block.
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = (block / nblocks_x) * delta_y;
+
+        for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            x2[i] = x[n_x];
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            y2[j] = y[n_y];
+
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            {
+                u2[j * (delta_x + 1) + i] = u[n_y * (NX + 1) + n_x];
+                v2[j * (delta_x + 1) + i] = v[n_y * (NX + 1) + n_x];
+            }
+
+        mixlen2 = 0;
+        for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+            {
+                d2[j * delta_x + i] = d[n_y * NX + n_x];
+                p2[j * delta_x + i] = p[n_y * NX + n_x];
+
+                if (matlist[n_y * NX + n_x] < 0)
+                {
+                    mixlen = -matlist[n_y * NX + n_x] - 1;
+
+                    matlist2[j * delta_x + i] = -(mixlen2 + 1);
+                    mix_mat2[mixlen2] = mix_mat[mixlen];
+                    mix_mat2[mixlen2 + 1] = mix_mat[mixlen + 1];
+                    mix_next2[mixlen2] = mixlen2 + 2;
+                    mix_next2[mixlen2 + 1] = 0;
+                    mix_zone2[mixlen2] = j * delta_x + i;
+                    mix_zone2[mixlen2 + 1] = j * delta_x + i;
+                    mix_vf2[mixlen2] = mix_vf[mixlen];
+                    mix_vf2[mixlen2 + 1] = mix_vf[mixlen + 1];
+                    mixlen2 += 2;
+                } else
+                    matlist2[j * delta_x + i] = matlist[n_y * NX + n_x];
+            }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                       /* if */
+
+        /* Write out the variables. */
+        optlist = DBMakeOptlist(11);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+
+        /* populate optional data arrays */
+        put_extents(x2,dims[0],varextents[0],block);
+        put_extents(y2,dims[1],varextents[1],block);
+        has_external_zones[block] = 0;
+        if ((varextents[0][2*block] <= 0.0) ||
+            (varextents[1][2*block] <= 0.0) ||
+            (varextents[0][2*block+1] >= 1.0) ||
+            (varextents[1][2*block+1] >= 1.0))
+            has_external_zones[block] = 1;
+        zonecounts[block] = (dims[0]-1)*(dims[1]-1);
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords, dims, ndims,
+                      DB_FLOAT, DB_COLLINEAR, optlist);
+
+        put_extents(d2,(dims[0]-1)*(dims[1]-1),varextents[3],block);
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(p2,(dims[0]-1)*(dims[1]-1),varextents[4],block);
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(u2,dims[0]*dims[1],varextents[5],block);
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(v2,dims[0]*dims[1],varextents[6],block);
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        matcounts[block] = count_mats(dims2[0]*dims2[1],matlist2,matlists[block]);
+        mixlens[block] = mixlen2;
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, dims2, ndims, mix_next2, mix_mat2,
+                      mix_zone2, mix_vf2, mixlen2, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                       /* if */
+    }                           /* for */
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+
+    FREE(matlist);
+    FREE(mix_mat);
+    FREE(itemp);
+    FREE(matlist2);
+    FREE(mix_next2);
+    FREE(mix_mat2);
+    FREE(mix_zone2);
+
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(mix_vf);
+    FREE(mix_vf2);
+}                               /* build_block_rect2d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_curv2d
+ *
+ * Purpose:     Build a 2-d curvilinear mesh and place it in the open
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Katherine Price, Aug 4, 1995
+ *    Modified function to output blocks.
+ *
+ *    Robb Matzke, Sun Dec 18 17:39:27 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Mon Mar 2  20:46:27 PDT 1998
+ *    Changed the declaration of dirnames to use the constant STRLEN.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_curv2d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    int             ndims;
+    int             dims[3], zdims[3];
+    float          *coords[3];
+    float           *x, *y;
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name, *matname;
+    float           *d, *p, *u, *v;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             dims2[3];
+    int             mixlen;
+    int             *mix_next, *mix_mat, *mix_zone;
+    float           *mix_vf;
+
+    DBoptlist      *optlist = NULL;
+
+    int             i, j;
+    float           xave, yave;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y;
+    int             base_x, base_y;
+    int             n_x, n_y;
+
+    float           *x2, *y2;
+    float           *d2, *p2, *u2, *v2;
+    int             *matlist2;
+
+    matlist = ALLOC_N(int, NX * NY);
+    mix_next = ALLOC_N(int, NX * NY);
+    mix_mat = ALLOC_N(int, NX * NY);
+    mix_zone = ALLOC_N(int, NX * NY);
+    matlist2 = ALLOC_N(int, NX * NY);
+
+    x2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    y2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    d2 = ALLOC_N(float, NX * NY);
+    p2 = ALLOC_N(float, NX * NY);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    x = ALLOC_N(float, (NX + 1) * (NY + 1));
+    y = ALLOC_N(float, (NX + 1) * (NY + 1));
+    d = ALLOC_N(float, NX * NY);
+    p = ALLOC_N(float, NX * NY);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1));
+    mix_vf = ALLOC_N(float, NX * NY);
+
+    /* 
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    ndims = 2;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dtheta = (180. / NX) * (3.1415926 / 180.);
+    dr = 3. / NY;
+    theta = 0;
+    for (i = 0; i < NX + 1; i++)
+    {
+        r = 2.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            x[j * (NX + 1) + i] = r * cos(theta);
+            y[j * (NX + 1) + i] = r * sin(theta);
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /* 
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            xave = (x[(j) * (NX + 1) + i] + x[(j) * (NX + 1) + i + 1] +
+                    x[(j + 1) * (NX + 1) + i + 1] + x[(j + 1) * (NX + 1) + i]) / 4.;
+            yave = (y[(j) * (NX + 1) + i] + y[(j) * (NX + 1) + i + 1] +
+                    y[(j + 1) * (NX + 1) + i + 1] + y[(j + 1) * (NX + 1) + i]) / 4.;
+            dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                        (yave - ycenter) * (yave - ycenter));
+            d[j * NX + i] = dist;
+            p[j * NX + i] = 1. / (dist + .0001);
+        }
+    }
+
+    /* 
+     * Create the velocity component arrays. Note that the indexing
+     * on the x and y coordinates is for rectilinear meshes. It
+     * generates a nice vector field.
+     */
+    var3name = "u";
+    var4name = "v";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            u[j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+            v[j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+        }
+    }
+
+    /* 
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    mixlen = 0;
+
+    /* 
+     * Put in the material in 3 shells.
+     */
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < 10; j++)
+        {
+            matlist[j * NX + i] = 1;
+        }
+        for (j = 10; j < 20; j++)
+        {
+            matlist[j * NX + i] = 2;
+        }
+        for (j = 20; j < NY; j++)
+        {
+            matlist[j * NX + i] = 3;
+        }
+    }
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /* 
+         * Now extract the data for this block.
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = (block / nblocks_x) * delta_y;
+
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            {
+                x2[j * (delta_x + 1) + i] = x[n_y * (NX + 1) + n_x];
+                y2[j * (delta_x + 1) + i] = y[n_y * (NX + 1) + n_x];
+                u2[j * (delta_x + 1) + i] = u[n_y * (NX + 1) + n_x];
+                v2[j * (delta_x + 1) + i] = v[n_y * (NX + 1) + n_x];
+            }
+
+        for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+            {
+                d2[j * delta_x + i] = d[n_y * NX + n_x];
+                p2[j * delta_x + i] = p[n_y * NX + n_x];
+                matlist2[j * delta_x + i] = matlist[n_y * NX + n_x];
+            }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                              /* if */
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        optlist = DBMakeOptlist(10);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+
+        put_extents(x2,dims[0]*dims[1],varextents[0],block);
+        put_extents(y2,dims[0]*dims[1],varextents[1],block);
+        has_external_zones[block] = 1;
+        zonecounts[block] = (dims[0]-1)*(dims[1]-1);
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords, dims, ndims,
+                      DB_FLOAT, DB_NONCOLLINEAR, optlist);
+
+        put_extents(d2,(dims[0]-1)*(dims[1]-1),varextents[3],block);
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(p2,(dims[0]-1)*(dims[1]-1),varextents[4],block);
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(u2,dims[0]*dims[1],varextents[5],block);
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(v2,dims[0]*dims[1],varextents[6],block);
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        matcounts[block] = count_mats(dims2[0]*dims2[1],matlist2,matlists[block]);
+        mixlens[block] = mixlen;
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, dims2, ndims, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                              /* if */
+    }                                  /* for */
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+
+    FREE(x2);
+    FREE(y2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(x);
+    FREE(y);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(mix_vf);
+}                                      /* build_block_curv2d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_point2d
+ *
+ * Purpose:     Build a 2-d point mesh and place it in the open
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_point2d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                    int nblocks_x, int nblocks_y)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    float          *coords[3];
+    float           *x, *y;
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    float           *d, *p;
+    float           *u, *v;
+
+    DBoptlist      *optlist = NULL;
+
+    int             i, j;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y;
+    int             base_x, base_y;
+    int             n_x, n_y;
+    int             npts;
+    float          *vars[1];
+
+    float           *x2, *y2;
+    float           *d2, *p2;
+    float           *u2, *v2;
+
+
+    x = ALLOC_N(float, (NX + 1) * (NY + 1));
+    y = ALLOC_N(float, (NX + 1) * (NY + 1));
+    d = ALLOC_N(float, (NX + 1) * (NY + 1));
+    p = ALLOC_N(float, (NX + 1) * (NY + 1));
+    u = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1));
+    x2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    y2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    d2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    p2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1));
+
+    /* 
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coords[0] = x;
+    coords[1] = y;
+    dtheta = (180. / NX) * (3.1415926 / 180.);
+    dr = 3. / NY;
+    theta = 0;
+    for (i = 0; i < NX + 1; i++)
+    {
+        r = 2.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            x[j * (NX + 1) + i] = r * cos(theta);
+            y[j * (NX + 1) + i] = r * sin(theta);
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /* 
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[j * (NX + 1) + i] - xcenter) * (x[j * (NX + 1) + i] - xcenter) +
+                        (y[j * (NX + 1) + i] - ycenter) * (y[j * (NX + 1) + i] - ycenter));
+            d[j * (NX + 1) + i] = dist;
+            p[j * (NX + 1) + i] = 1. / (dist + .0001);
+        }
+    }
+
+    /* 
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            u[j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+            v[j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+        }
+    }
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+
+    coords[0] = x2;
+    coords[1] = y2;
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /* 
+         * Now extract the data for this block.
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = (block / nblocks_x) * delta_y;
+
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            {
+                x2[j * (delta_x + 1) + i] = x[n_y * (NX + 1) + n_x];
+                y2[j * (delta_x + 1) + i] = y[n_y * (NX + 1) + n_x];
+                d2[j * (delta_x + 1) + i] = d[n_y * (NX + 1) + n_x];
+                p2[j * (delta_x + 1) + i] = p[n_y * (NX + 1) + n_x];
+                u2[j * (delta_x + 1) + i] = u[n_y * (NX + 1) + n_x];
+                v2[j * (delta_x + 1) + i] = v[n_y * (NX + 1) + n_x];
+            }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                              /* if */
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        npts = (delta_x + 1) * (delta_y + 1);
+
+        optlist = DBMakeOptlist(10);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+
+        put_extents(x2,npts,varextents[0],block);
+        put_extents(y2,npts,varextents[1],block);
+        zonecounts[block] = 0;
+        DBPutPointmesh(dbfile, meshname, 2, coords, npts, DB_FLOAT, optlist);
+
+        put_extents(d2,npts,varextents[3],block);
+        vars[0] = d2;
+        DBPutPointvar(dbfile, var1name, meshname, 1, vars, npts, DB_FLOAT,
+                      optlist);
+
+        put_extents(p2,npts,varextents[4],block);
+        vars[0] = p2;
+        DBPutPointvar(dbfile, var2name, meshname, 1, vars, npts, DB_FLOAT,
+                      optlist);
+
+        put_extents(u2,npts,varextents[5],block);
+        vars[0] = u2;
+        DBPutPointvar(dbfile, var3name, meshname, 1, vars, npts, DB_FLOAT,
+                      optlist);
+
+        put_extents(v2,npts,varextents[6],block);
+        vars[0] = v2;
+        DBPutPointvar(dbfile, var4name, meshname, 1, vars, npts, DB_FLOAT,
+                      optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                              /* if */
+    }                                  /* for */
+
+    FREE(x);
+    FREE(y);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(x2);
+    FREE(y2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+}                                      /* build_block_point2d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_rect3d
+ *
+ * Purpose:     Build a 3-d rectilinear mesh and add it to the open database.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Katherine Price, Aug 4, 1995
+ *    Modified function to output blocks.
+ *
+ *    Robb Matzke, Sun Dec 18 17:39:58 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Fri Oct 17 17:09:00 PDT 1997
+ *    I modified the routine to output 3 materials instead of 2 and
+ *    to use the routines fill_rect3d_bkgr and fill_rect3d_mat to
+ *    fill the material arrays.
+ *
+ *    Eric Brugger, Mon Mar 2  20:46:27 PDT 1998
+ *    I increased the size of the mixed material arrays to avoid a trap
+ *    of a memory write condition.
+ *
+ *    Sean Ahern, Thu Jul  2 11:04:30 PDT 1998
+ *    Fixed an indexing problem.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_rect3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y, int nblocks_z)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    int             ndims;
+    int             dims[3], zdims[3];
+    float          *coords[3];
+    float           x[NX + 1], y[NY + 1], z[NZ + 1];
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+    float           *d, *p;
+    float           *u, *v;
+    float           *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             dims2[3];
+    int             mixlen;
+    int             *mix_next, *mix_mat, *mix_zone;
+    float           *mix_vf;
+
+    int             i, j, k;
+    float           xave, yave, zave;
+    float           xcenter, ycenter, zcenter;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             base_x, base_y, base_z;
+    int             n_x, n_y, n_z;
+
+    float           x2[NX + 1], y2[NY + 1], z2[NZ + 1];
+    float           *d2, *p2;
+    float           *u2, *v2;
+    float           *w2;
+    int             *matlist2;
+    int             mixlen2;
+    int             *mix_next2, *mix_mat2, *mix_zone2;
+    float           *mix_vf2;
+    int             one = 1;
+
+    DBoptlist      *optlist;
+
+    matlist = ALLOC_N(int, NX * NY * NZ);
+    mix_next = ALLOC_N(int, MIXMAX);
+    mix_mat = ALLOC_N(int, MIXMAX);
+    mix_zone = ALLOC_N(int, MIXMAX);
+    matlist2 = ALLOC_N(int, NX * NY * NZ);
+    mix_next2 = ALLOC_N(int, MIXMAX);
+    mix_mat2 = ALLOC_N(int, MIXMAX);
+    mix_zone2 = ALLOC_N(int, MIXMAX);
+
+    d = ALLOC_N(float, NX * NY * NZ);
+    p = ALLOC_N(float, NX * NY * NZ);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    mix_vf = ALLOC_N(float, MIXMAX);
+    d2 = ALLOC_N(float, NX * NY * NZ);
+    p2 = ALLOC_N(float, NX * NY * NZ);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    mix_vf2 = ALLOC_N(float, MIXMAX);
+
+    /* 
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+    for (i = 0; i < NX + 1; i++)
+        x[i] = i * (1. / NX);
+    for (i = 0; i < NY + 1; i++)
+        y[i] = i * (1. / NY);
+    for (i = 0; i < NZ + 1; i++)
+        z[i] = i * (1. / NZ);
+
+    /* 
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = .5;
+    ycenter = .5;
+    zcenter = .5;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    zdims[2] = NZ;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            for (k = 0; k < NZ; k++)
+            {
+                xave = (x[i] + x[i + 1]) / 2.;
+                yave = (y[j] + y[j + 1]) / 2.;
+                zave = (z[k] + z[k + 1]) / 2.;
+                dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                            (yave - ycenter) * (yave - ycenter) +
+                            (zave - zcenter) * (zave - zcenter));
+                d[k * NX * NY + j * NX + i] = dist;
+                p[k * NX * NY + j * NX + i] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /* 
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = .5001;
+    ycenter = .5001;
+    zcenter = .5001;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                u[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+                v[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+                w[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (z[k] - zcenter) / dist;
+            }
+        }
+    }
+
+    /* 
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    dims2[2] = NZ;
+    mixlen = 0;
+
+    /* 
+     * Put in the material for the entire mesh.
+     */
+    fill_rect3d_bkgr(matlist, NX, NY, NZ, 1);
+
+    mixlen = 0;
+    fill_rect3d_mat(x, y, z, matlist, NX, NY, NZ, mix_next,
+                  mix_mat, mix_zone, mix_vf, &mixlen, 2, .5, .5, .5, .6);
+    fill_rect3d_mat(x, y, z, matlist, NX, NY, NZ, mix_next,
+                  mix_mat, mix_zone, mix_vf, &mixlen, 3, .5, .5, .5, .4);
+    if (mixlen > MIXMAX)
+    {
+        printf("memory overwrite: mixlen = %d > %d\n", mixlen, MIXMAX);
+        exit(-1);
+    }
+    /* 
+     * Now extract the data for this block.
+     */
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    dims[2] = delta_z + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    zdims[2] = delta_z;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+    dims2[2] = delta_z;
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /* 
+         * Now extract the data for this block.
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y;
+        base_z = (block / (nblocks_x * nblocks_y)) * delta_z;
+
+        for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            x2[i] = x[n_x];
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            y2[j] = y[n_y];
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            z2[k] = z[n_z];
+
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+                {
+                    u2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        mixlen2 = 0;
+        for (k = 0, n_z = base_z; k < delta_z; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+                {
+                    d2[k * delta_x * delta_y + j * delta_x + i] =
+                        d[n_z * NX * NY + n_y * NX + n_x];
+                    p2[k * delta_x * delta_y + j * delta_x + i] =
+                        p[n_z * NX * NY + n_y * NX + n_x];
+
+                    if (matlist[n_z * NX * NY + n_y * NX + n_x] < 0)
+                    {
+                        mixlen = -matlist[n_z * NX * NY + n_y * NX + n_x] - 1;
+
+                        matlist2[k * delta_x * delta_y + j * delta_x + i]
+                            = -(mixlen2 + 1);
+                        mix_mat2[mixlen2] = mix_mat[mixlen];
+                        mix_mat2[mixlen2 + 1] = mix_mat[mixlen + 1];
+                        mix_next2[mixlen2] = mixlen2 + 2;
+                        mix_next2[mixlen2 + 1] = 0;
+                        mix_zone2[mixlen2]
+                            = k * delta_x * delta_y + j * delta_x + i;
+                        mix_zone2[mixlen2 + 1]
+                            = k * delta_x * delta_y + j * delta_x + i;
+                        mix_vf2[mixlen2] = mix_vf[mixlen];
+                        mix_vf2[mixlen2 + 1] = mix_vf[mixlen + 1];
+                        mixlen2 += 2;
+                    } else
+                        matlist2[k * delta_x * delta_y + j * delta_x + i]
+                            = matlist[n_z * NX * NY + n_y * NX + n_x];
+                }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                              /* if */
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        optlist = DBMakeOptlist(12);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+
+        /* populate varextetnts optional data array */
+        put_extents(x2,dims[0],varextents[0],block);
+        put_extents(y2,dims[1],varextents[1],block);
+        put_extents(z2,dims[2],varextents[2],block);
+
+        /* populate 'has_external_zones' optional data array */
+        has_external_zones[block] = 0;
+        if ((varextents[0][2*block] <= 0.0) ||
+            (varextents[1][2*block] <= 0.0) ||
+            (varextents[2][2*block] <= 0.0) ||
+            (varextents[0][2*block+1] >= 1.0) ||
+            (varextents[1][2*block+1] >= 1.0) ||
+            (varextents[2][2*block+1] >= 1.0))
+            has_external_zones[block] = 1;
+
+        zonecounts[block] = (dims[0]-1)*(dims[1]-1)*(dims[2]-1);
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords, dims, ndims,
+                      DB_FLOAT, DB_COLLINEAR, optlist);
+
+        put_extents(d2,(dims[0]-1)*(dims[1]-1)*(dims[2]-1),varextents[3],block);
+        DBAddOption(optlist, DBOPT_CONSERVED, &one);
+        DBAddOption(optlist, DBOPT_EXTENSIVE, &one);
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+        DBClearOption(optlist, DBOPT_CONSERVED);
+        DBClearOption(optlist, DBOPT_EXTENSIVE);
+
+        put_extents(p2,(dims[0]-1)*(dims[1]-1)*(dims[2]-1),varextents[4],block);
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(u2,dims[0]*dims[1]*dims[2],varextents[5],block);
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(v2,dims[0]*dims[1]*dims[2],varextents[6],block);
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(w2,dims[0]*dims[1]*dims[2],varextents[7],block);
+        DBPutQuadvar1(dbfile, var5name, meshname, w2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        matcounts[block] = count_mats(dims2[0]*dims2[1]*dims2[2],matlist2,matlists[block]);
+        mixlens[block] = mixlen2;
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                  matlist2, dims2, ndims, mix_next2, mix_mat2, mix_zone2,
+                      mix_vf2, mixlen2, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                              /* if */
+    }                                  /* for */
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+    FREE(mix_next2);
+    FREE(mix_mat2);
+    FREE(mix_zone2);
+
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(mix_vf);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+    FREE(mix_vf2);
+}                                      /* build_block_rect3d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_block_ucd3d
+ *
+ * Purpose:     Build a 3-d UCD mesh and add it to the open database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Mark Miller, Tue Oct  6 09:46:48 PDT 1998
+ *    fixing node numbering in ucd3d stuff
+ *
+ *    Katherine Price, Aug 4, 1995
+ *    Modified function to output blocks.
+ *
+ *    Robb Matzke, Sun Dec 18 17:40:58 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Fri Oct 17 17:09:00 PDT 1997
+ *    I modified the routine to output more blocks, mixed material zones,
+ *    and ghost zones.
+ *
+ *    Eric Brugger, Thu Oct 23 16:37:03 PDT 1997
+ *    I corrected a bug where the max_index passed to the routine
+ *    DBCalcExternalFacelist2 was 1 too large.
+ *
+ *    Eric Brugger, Fri Mar 12 16:01:44 PST 1999
+ *    I modified the routine to use the new interface to
+ *    DBCalcExternalFacelist2.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_ucd3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                  int nblocks_x, int nblocks_y, int nblocks_z)
+{
+
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    float          *coords[3];
+    float           *x, *y, *z;
+    int             nfaces, nzones, nnodes;
+    int             lfacelist, lzonelist;
+    int             fshapesize, fshapecnt, zshapetype, zshapesize, zshapecnt;
+    int             *zonelist;
+    int             *facelist;
+    int             *zoneno;
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+    float          *vars[1];
+    char           *varnames[1];
+    float           *d, *p, *u, *v, *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             mixlen;
+    int             *mix_next, *mix_mat, *mix_zone;
+    float           *mix_vf;
+    float           xstrip[NX + NY + NZ], ystrip[NX + NY + NZ], zstrip[NX + NY + NZ];
+
+    int             one = 1;
+    DBoptlist      *optlist;
+
+    DBfacelist     *fl;
+
+    int             i, j, k;
+    int             iz;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           h, dh;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             n_x, n_y, n_z;
+
+    int             imin, imax, jmin, jmax, kmin, kmax;
+    int             nx, ny, nz;
+
+    float           *x2, *y2, *z2;
+    float           *d2, *p2, *u2, *v2, *w2;
+    int             *matlist2, *ghost;
+
+    int             nreal;
+    int             ighost;
+    int             itemp;
+    int             hi_off;
+
+    zonelist = ALLOC_N(int, 16000);
+    facelist = ALLOC_N(int, 10000);
+    zoneno = ALLOC_N(int, 2000);
+    matlist = ALLOC_N(int, NX * NY * NZ);
+    mix_next = ALLOC_N(int, 4500);
+    mix_mat = ALLOC_N(int, 4500);
+    mix_zone = ALLOC_N(int, 4500);
+    matlist2 = ALLOC_N(int, 2000);
+    ghost = ALLOC_N(int, 2000);
+
+    x = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    y = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    z = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    p = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    u = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    mix_vf = ALLOC_N(float, 4500);
+    x2 = ALLOC_N(float, 2646);
+    y2 = ALLOC_N(float, 2646);
+    z2 = ALLOC_N(float, 2646);
+    d2 = ALLOC_N(float, 2646);
+    p2 = ALLOC_N(float, 2646);
+    u2 = ALLOC_N(float, 2646);
+    v2 = ALLOC_N(float, 2646);
+    w2 = ALLOC_N(float, 2646);
+
+
+    /* 
+     * Create the coordinate arrays for the entire mesh.
+     */
+    dh = 20. / (float)NX;
+    dtheta = (180. / (float)NY) * (3.1415926 / 180.);
+    dr = 3. / (float)NZ;
+    h = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        theta = 0.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            r = 2.;
+            for (k = 0; k < NZ + 1; k++)
+            {
+                x[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = r * cos(theta);
+                y[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = r * sin(theta);
+                z[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = h;
+                r += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    /* 
+     * Create the density and pressure arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] - xcenter) *
+                            (x[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] - xcenter) +
+                            (y[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] - ycenter) *
+                            (y[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] - ycenter));
+                d[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = dist;
+                p[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /* 
+     * Create the velocity component arrays for the entire mesh.
+     */
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = (x[i] - xcenter) / dist;
+                v[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = (y[j] - ycenter) / dist;
+                w[i * (NX + 1) * (NY + 1) + j * (NX + 1) + k] = 0.;
+            }
+        }
+    }
+
+    /* 
+     * Put in the material for the entire mesh.
+     */
+    fill_rect3d_bkgr(matlist, NX, NY, NZ, 1);
+
+    for (i = 0; i < NX + NY + NZ; i++)
+    {
+        xstrip[i] = (float)i;
+        ystrip[i] = (float)i;
+        zstrip[i] = (float)i;
+    }
+
+    mixlen = 0;
+    fill_rect3d_mat(xstrip, ystrip, zstrip, matlist, NX, NY, NZ, mix_next,
+              mix_mat, mix_zone, mix_vf, &mixlen, 2, 15., 20., 15., 10.);
+    fill_rect3d_mat(xstrip, ystrip, zstrip, matlist, NX, NY, NZ, mix_next,
+               mix_mat, mix_zone, mix_vf, &mixlen, 3, 15., 20., 15., 5.);
+    if (mixlen > 4500)
+    {
+        printf("memory overwrite: mixlen = %d > 4500\n", mixlen);
+        exit(-1);
+    }
+    /* 
+     * Set up variables that are independent of the block number.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    var1name = "d";
+    var2name = "p";
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    /* 
+     * Now extract the data for this block.
+     */
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /* 
+         * Now extract the data for this block.
+         */
+        imin = (block % nblocks_x) * delta_x - 1;
+        imax = MIN(imin + delta_x + 3, NX + 1);
+        imin = MAX(imin, 0);
+        nx = imax - imin;
+        jmin = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y - 1;
+        jmax = MIN(jmin + delta_y + 3, NY + 1);
+        jmin = MAX(jmin, 0);
+        ny = jmax - jmin;
+        kmin = (block / (nblocks_x * nblocks_y)) * delta_z - 1;
+        kmax = MIN(kmin + delta_z + 3, NZ + 1);
+        kmin = MAX(kmin, 0);
+        nz = kmax - kmin;
+
+        for (k = 0, n_z = kmin; n_z < kmax; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax; i++, n_x++)
+                {
+                    x2[k * nx * ny + j * nx + i] =
+                        x[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    y2[k * nx * ny + j * nx + i] =
+                        y[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    z2[k * nx * ny + j * nx + i] =
+                        z[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    d2[k * nx * ny + j * nx + i] =
+                        d[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    p2[k * nx * ny + j * nx + i] =
+                        p[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    u2[k * nx * ny + j * nx + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * nx * ny + j * nx + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * nx * ny + j * nx + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        iz = 0;
+        for (k = 0, n_z = kmin; n_z < kmax - 1; k++, n_z++)
+            for (j = 0, n_y = jmin; n_y < jmax - 1; j++, n_y++)
+                for (i = 0, n_x = imin; n_x < imax - 1; i++, n_x++)
+                {
+                    zonelist[iz] = (k + 0) * nx * ny + (j + 1) * nx + i + 1;
+                    zonelist[iz + 1] = (k + 0) * nx * ny + (j + 0) * nx + i + 1;
+                    zonelist[iz + 2] = (k + 1) * nx * ny + (j + 0) * nx + i + 1;
+                    zonelist[iz + 3] = (k + 1) * nx * ny + (j + 1) * nx + i + 1;
+                    zonelist[iz + 4] = (k + 0) * nx * ny + (j + 1) * nx + i + 0;
+                    zonelist[iz + 5] = (k + 0) * nx * ny + (j + 0) * nx + i + 0;
+                    zonelist[iz + 6] = (k + 1) * nx * ny + (j + 0) * nx + i + 0;
+                    zonelist[iz + 7] = (k + 1) * nx * ny + (j + 1) * nx + i + 0;
+                    iz += 8;
+
+                    matlist2[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] =
+                        matlist[n_z * NX * NY + n_y * NX + n_x];
+
+                    if (((k == 0 || n_z == kmax - 2) &&
+                         (n_z != 0 && n_z != NZ - 1)) ||
+                        ((j == 0 || n_y == jmax - 2) &&
+                         (n_y != 0 && n_y != NY - 1)) ||
+                        ((i == 0 || n_x == imax - 2) &&
+                         (n_x != 0 && n_x != NX - 1)))
+                        ghost[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] = 1;
+                    else
+                        ghost[k * (nx - 1) * (ny - 1) + j * (nx - 1) + i] = 0;
+                }
+
+        /* 
+         * Resort the zonelist, matlist so that the ghost zones are at the
+         * end.
+         */
+        nzones = (nx - 1) * (ny - 1) * (nz - 1);
+        nreal = nzones;
+        for (i = 0; i < nzones; i++)
+            nreal -= ghost[i];
+        ighost = nzones - 1;
+        for (i = 0; i < nreal; i++)
+        {
+            if (ghost[i] == 1)
+            {
+                /* 
+                 * Find the first non ghost zone.
+                 */
+                while (ghost[ighost] == 1)
+                    ighost--;
+                j = ighost;
+
+                itemp = zonelist[i * 8];
+                zonelist[i * 8] = zonelist[j * 8];
+                zonelist[j * 8] = itemp;
+                itemp = zonelist[i * 8 + 1];
+                zonelist[i * 8 + 1] = zonelist[j * 8 + 1];
+                zonelist[j * 8 + 1] = itemp;
+                itemp = zonelist[i * 8 + 2];
+                zonelist[i * 8 + 2] = zonelist[j * 8 + 2];
+                zonelist[j * 8 + 2] = itemp;
+                itemp = zonelist[i * 8 + 3];
+                zonelist[i * 8 + 3] = zonelist[j * 8 + 3];
+                zonelist[j * 8 + 3] = itemp;
+                itemp = zonelist[i * 8 + 4];
+                zonelist[i * 8 + 4] = zonelist[j * 8 + 4];
+                zonelist[j * 8 + 4] = itemp;
+                itemp = zonelist[i * 8 + 5];
+                zonelist[i * 8 + 5] = zonelist[j * 8 + 5];
+                zonelist[j * 8 + 5] = itemp;
+                itemp = zonelist[i * 8 + 6];
+                zonelist[i * 8 + 6] = zonelist[j * 8 + 6];
+                zonelist[j * 8 + 6] = itemp;
+                itemp = zonelist[i * 8 + 7];
+                zonelist[i * 8 + 7] = zonelist[j * 8 + 7];
+                zonelist[j * 8 + 7] = itemp;
+
+                itemp = matlist2[i];
+                matlist2[i] = matlist2[j];
+                matlist2[j] = itemp;
+
+                itemp = ghost[i];
+                ghost[i] = ghost[j];
+                ghost[j] = itemp;
+            }
+        }
+
+        /* 
+         * Calculate the external face list.
+         */
+        nnodes = nx * ny * nz;
+        hi_off = nzones - nreal;
+
+        zshapesize = 8;
+        zshapecnt = nzones;
+        zshapetype = DB_ZONETYPE_HEX;
+        lzonelist = nzones * 8;
+
+        fl = DBCalcExternalFacelist2(zonelist, nnodes, 0, hi_off, 0,
+                                 &zshapetype, &zshapesize, &zshapecnt, 1,
+                                     matlist2, 0);
+
+        nfaces = fl->nfaces;
+        fshapecnt = fl->nfaces;
+        fshapesize = 4;
+        lfacelist = fl->lnodelist;
+        for (i = 0; i < lfacelist; i++)
+            facelist[i] = fl->nodelist[i];
+        for (i = 0; i < nfaces; i++)
+            zoneno[i] = fl->zoneno[i];
+
+        DBFreeFacelist(fl);
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                              /* if */
+        /* Write out the mesh and variables. */
+        optlist = DBMakeOptlist(20);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+        DBAddOption(optlist, DBOPT_HI_OFFSET, &hi_off);
+
+        if (nfaces > 0)
+            DBPutFacelist(dbfile, "fl1", nfaces, 3, facelist, lfacelist, 0,
+                      zoneno, &fshapesize, &fshapecnt, 1, NULL, NULL, 0);
+
+        DBPutZonelist2(dbfile, "zl1", nzones, 3, zonelist, lzonelist, 0,
+            0, hi_off, &zshapetype, &zshapesize, &zshapecnt, 1, 0);
+
+        /* 
+         * Output the rest of the mesh and variables.
+         */
+        put_extents(x2,nnodes,varextents[0],block);
+        put_extents(y2,nnodes,varextents[1],block);
+        put_extents(z2,nnodes,varextents[2],block);
+        has_external_zones[block] = nfaces ? 1 : 0;
+        zonecounts[block] = nzones;
+        if (nfaces > 0)
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", "fl1", DB_FLOAT, optlist);
+        else
+            DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                         nnodes, nzones, "zl1", NULL, DB_FLOAT, optlist);
+
+        put_extents(d2,nzones,varextents[3],block);
+        vars[0] = d2;
+        varnames[0] = var1name;
+        DBPutUcdvar(dbfile, var1name, meshname, 1, varnames, vars,
+                    nzones, NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(p2,nzones,varextents[4],block);
+        vars[0] = p2;
+        varnames[0] = var2name;
+        DBPutUcdvar(dbfile, var2name, meshname, 1, varnames, vars,
+                    nzones, NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(u2,nnodes,varextents[5],block);
+        vars[0] = u2;
+        varnames[0] = var3name;
+        DBPutUcdvar(dbfile, var3name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(v2,nnodes,varextents[6],block);
+        vars[0] = v2;
+        varnames[0] = var4name;
+        DBPutUcdvar(dbfile, var4name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(w2,nnodes,varextents[7],block);
+        vars[0] = w2;
+        varnames[0] = var5name;
+        DBPutUcdvar(dbfile, var5name, meshname, 1, varnames, vars,
+                    nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        matcounts[block] = count_mats(nzones,matlist2,matlists[block]);
+        mixlens[block] = mixlen;
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, &nzones, 1, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                              /* if */
+    }                                  /* for */
+
+    FREE(zonelist);
+    FREE(facelist);
+    FREE(zoneno);
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+    FREE(ghost);
+
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(mix_vf);
+    FREE(x2);
+    FREE(y2);
+    FREE(z2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+
+}                                      /* build_block_ucd3d */
+
+/*-------------------------------------------------------------------------
+ * Function:    build_curv3d
+ *
+ * Purpose:     Build a 3-d Curvillinear  mesh and add it to the open
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  Tony L. Jones
+ *              May 30, 1995
+ *
+ * Modifications:
+ *    Tony Jones      June 15, 1995
+ *    Density and Pressure calculation was in err.  Previous
+ *    algorithm was passing non-existent values to the mentioned
+ *    arrays.  Problem fixed by decrementing the max loop index.
+ *
+ *    Jeremy Meredith, Tue Mar 28 09:38:55 PST 2000
+ *    Reversed the angular coordinates so they conform to the right
+ *    hand rule.  AGAIN.
+ * 
+ *-------------------------------------------------------------------------
+ */
+void
+build_block_curv3d(DBfile *dbfile, char dirnames[MAXBLOCKS][STRLEN],
+                   int nblocks_x, int nblocks_y, int nblocks_z)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    char           *coordnames[3];
+    float          *coords[3];
+
+    float          *x, *y, *z;
+
+    int             ndims, zdims[3];
+    int             dims[3], dims2[3];
+
+    char           *meshname, *var1name, *var2name, *var3name, *var4name;
+    char           *var5name, *matname;
+
+    float          *d, *p, *u, *v, *w;
+
+    int             nmats;
+    int             matnos[3];
+    int             *matlist;
+    int             mixlen;
+    int             *mix_next, *mix_mat;
+    int             *mix_zone;
+    float           *mix_vf;
+
+    DBoptlist      *optlist = NULL;
+
+    int             i, j, k;
+
+    float           xave, yave;
+    float           xcenter, ycenter;
+
+    float           theta, dtheta;
+    float           r, dr;
+    float           h, dh;
+    float           dist;
+
+    int             block;
+    int             delta_x, delta_y, delta_z;
+    int             base_x, base_y, base_z;
+    int             n_x, n_y, n_z;
+
+    float          *x2, *y2, *z2, *d2, *p2, *u2, *v2, *w2;
+    int             *matlist2;
+
+    matlist = ALLOC_N(int, NX * NY * NZ);
+    mix_next = ALLOC_N(int, NX * NY * NZ);
+    mix_mat = ALLOC_N(int, NX * NY * NZ);
+    mix_zone = ALLOC_N(int, NX * NY * NZ);
+    matlist2 = ALLOC_N(int, NX * NY * NZ);
+
+    x = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    y = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    z = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d = ALLOC_N(float, NX * NY * NZ);
+    p = ALLOC_N(float, NX * NY * NZ);
+    u = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    mix_vf = ALLOC_N(float, NX * NY * NZ);
+    x2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    y2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    z2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    d2 = ALLOC_N(float, NX * NY * NZ);
+    p2 = ALLOC_N(float, NX * NY * NZ);
+    u2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    v2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+    w2 = ALLOC_N(float, (NX + 1) * (NY + 1) * (NZ + 1));
+
+    /* 
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+
+    dtheta = -(180. / NX) * (3.1415926 / 180.);
+    dh = 1;
+    dr = 3. / NY;
+    theta = 3.1415926536;
+
+    for (i = 0; i < NX + 1; i++)
+    {
+        r = 2.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            h = 0.;
+            for (k = 0; k < NZ + 1; k++)
+            {
+                x[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = r * cos(theta);
+                y[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = r * sin(theta);
+                z[k * (NX + 1) * (NY + 1) + ((j * (NX + 1)) + i)] = h;
+                h += dh;
+            }
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /* 
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    zdims[2] = NZ;
+
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            for (k = 0; k < NZ; k++)
+            {
+
+                xave = (x[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] +
+                      x[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i + 1] +
+                x[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i + 1] +
+                x[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i]) / 4.;
+
+                yave = (y[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] +
+                      y[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i + 1] +
+                y[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i + 1] +
+                y[k * (NX + 1) * (NY + 1) + (j + 1) * (NX + 1) + i]) / 4.;
+
+                dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                            (yave - ycenter) * (yave - ycenter));
+                d[k * (NX) * (NY) + j * (NX) + i] = dist;
+                p[k * (NX) * (NY) + j * (NX) + i] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /* 
+     *      Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = 0.;
+    ycenter = 0.;
+
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+                v[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+                w[k * (NX + 1) * (NY + 1) + j * (NX + 1) + i] = 0.;
+            }
+
+        }
+    }
+
+    /* Create the material array.  */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+    dims2[2] = NZ;
+
+    mixlen = 0;
+
+    /*
+     * Put in the material in 3 shells.
+     */
+
+    for (i = 0; i < NX; i++)
+    {
+        for (k = 0; k < NZ; k++)
+        {
+            for (j = 0; j < 10; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 1;
+            }
+            for (j = 10; j < 20; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 2;
+            }
+            for (j = 20; j < NY; j++)
+            {
+                matlist[k * NX * NY + j * NX + i] = 3;
+            }
+        }
+
+    }
+
+    /* 
+     * Now extract the data for this block.
+     */
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+    delta_z = NZ / nblocks_z;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    coords[2] = z2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    dims[2] = delta_z + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    zdims[2] = delta_z;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+    dims2[2] = delta_z;
+
+    /* 
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y * nblocks_z; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /* 
+         * Now extract the data for this block.
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = ((block % (nblocks_x * nblocks_y)) / nblocks_x) * delta_y;
+        base_z = (block / (nblocks_x * nblocks_y)) * delta_z;
+
+        for (k = 0, n_z = base_z; k < delta_z + 1; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+                {
+                    x2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        x[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    y2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        y[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    z2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        z[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    u2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        u[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    v2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        v[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                    w2[k * (delta_x + 1) * (delta_y + 1) + j * (delta_x + 1) + i] =
+                        w[n_z * (NX + 1) * (NY + 1) + n_y * (NX + 1) + n_x];
+                }
+
+        for (k = 0, n_z = base_z; k < delta_z; k++, n_z++)
+            for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+                for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+                {
+                    d2[k * delta_x * delta_y + j * delta_x + i] =
+                        d[n_z * NX * NY + n_y * NX + n_x];
+                    p2[k * delta_x * delta_y + j * delta_x + i] =
+                        p[n_z * NX * NY + n_y * NX + n_x];
+                    matlist2[k * delta_x * delta_y + j * delta_x + i] =
+                        matlist[n_z * NX * NY + n_y * NX + n_x];
+                }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return;
+        }                              /* if */
+        /* Write out the variables. */
+        cycle = 48;
+        time = 4.8;
+        dtime = 4.8;
+
+        optlist = DBMakeOptlist(10);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+        DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+
+        put_extents(x2,dims[0]*dims[1]*dims[2],varextents[0],block);
+        put_extents(y2,dims[0]*dims[1]*dims[2],varextents[1],block);
+        put_extents(z2,dims[0]*dims[1]*dims[2],varextents[2],block);
+        has_external_zones[block] = 1;
+        zonecounts[block] = (dims[0]-1)*(dims[1]-1)*(dims[2]-1);
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords,
+                      dims, ndims, DB_FLOAT, DB_NONCOLLINEAR,
+                      optlist);
+
+        put_extents(d2,(dims[0]-1)*(dims[1]-1)*(dims[2]-1),varextents[3],block);
+        DBPutQuadvar1(dbfile, var1name, meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(p2,(dims[0]-1)*(dims[1]-1)*(dims[2]-1),varextents[4],block);
+        DBPutQuadvar1(dbfile, var2name, meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        put_extents(u2,dims[0]*dims[1]*dims[2],varextents[5],block);
+        DBPutQuadvar1(dbfile, var3name, meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(v2,dims[0]*dims[1]*dims[2],varextents[6],block);
+        DBPutQuadvar1(dbfile, var4name, meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        put_extents(w2,dims[0]*dims[1]*dims[2],varextents[7],block);
+        DBPutQuadvar1(dbfile, var5name, meshname, w2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        matcounts[block] = count_mats((dims[0]-1)*(dims[1]-1)*(dims[2]-1),matlist2,matlists[block]);
+        mixlens[block] = mixlen;
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, dims2, ndims, mix_next, mix_mat, mix_zone,
+                      mix_vf, mixlen, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        /*
+         * Test explicit call to free compression resources for a mesh
+         */
+        if (driver == DB_HDF5 && block % 6 == 0)
+            DBFreeCompressionResources(dbfile,0);        /* all mesh case */
+        else if (driver == DB_HDF5 && block % 2 == 0)
+            DBFreeCompressionResources(dbfile,meshname); /* specific mesh case */
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return;
+        }                              /* if */
+    }                                  /* for */
+
+    FREE(matlist);
+    FREE(mix_next);
+    FREE(mix_mat);
+    FREE(mix_zone);
+    FREE(matlist2);
+
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(mix_vf);
+    FREE(x2);
+    FREE(y2);
+    FREE(z2);
+    FREE(d2);
+    FREE(p2);
+    FREE(u2);
+    FREE(v2);
+    FREE(w2);
+
+}                                      /* build_block_curv3d */
diff --git a/tests/multispec.c b/tests/multispec.c
new file mode 100644
index 0000000..98e02a4
--- /dev/null
+++ b/tests/multispec.c
@@ -0,0 +1,582 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*---------------------------------------------------------------------------
+ * multispec.c -- Multi-Block Material Species Test File Generator.
+ * 
+ * Programmer: Jeremy Meredith, Sept 29, 1998
+ *
+ * This test file creates multi-block objects with mesh, variable,
+ * material, and species information.
+ *
+ * Note: Much of this was taken from the 2d curvilinear case of the
+ *       Silo multi-block test file "multi_test.c"
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Fri Apr  7 11:09:24 PDT 2000
+ *    Added string.h to remove compiler warnings.
+ *
+ *-------------------------------------------------------------------------*/
+
+#include <math.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <silo.h>
+#include <std.c>
+
+#define MAXBLOCKS	100           /* maximum number of blocks in an object   */
+#define STRLEN		60
+#define NX 30
+#define NY 40
+
+char *species_names[]={"Brad","Kathleen","Mark","Hank","Eric",
+                   "Jeremy","Cyrus","Sean","Dave","Randy",
+                   "Gunther","Tom"};
+char *speccolors[]={"Red","Green","Blue","Cyan","Magenta",
+                   "Yellow","Black","Orange","Brown","Purple",
+                   "White","Pink"};
+
+/*-------------------------------------------------------------------------
+ * Function:    build_dbfile
+ *
+ * Purpose:     Make a multi-block mesh, multi-block variables, and a 
+ *		multi-block material
+ *
+ * Return:      Success: 0
+ *              Failure: -1
+ *
+ * Programmer:  Jeremy Meredith, Sept 29, 1998
+ *
+ * Modifications:
+ *
+ *------------------------------------------------------------------------*/
+int
+build_dbfile(DBfile *dbfile)
+{
+    /* multiblock data */
+    int             nblocks_x=5;
+    int             nblocks_y=1;
+    int             nblocks = nblocks_x * nblocks_y;
+    char           *meshnames[MAXBLOCKS];
+    int             meshtypes[MAXBLOCKS];
+    char            names[7][MAXBLOCKS][STRLEN];
+    char           *varnames[4][MAXBLOCKS];
+    int             vartypes[MAXBLOCKS];
+    char           *matnames[MAXBLOCKS];
+    char           *specnames[MAXBLOCKS];
+    char            dirnames[MAXBLOCKS][STRLEN];
+    char           *meshname, 
+                   *varname[4], 
+                   *matname;
+    /* mesh data */
+    int             meshtype=DB_QUADMESH;
+    int             vartype=DB_QUADVAR;
+    int             coord_type=DB_NONCOLLINEAR;
+    char           *coordnames[3];
+    int             ndims;
+    int             dims[3], zdims[3];
+    float          *coords[3];
+    float           x[(NX + 1) * (NY + 1)], 
+                    y[(NX + 1) * (NY + 1)];
+    /* variables data */
+    float           d[NX * NY], 
+                    p[NX * NY], 
+                    u[(NX + 1) * (NY + 1)], 
+                    v[(NX + 1) * (NY + 1)];
+    int             usespecmf=1;
+    /* (multi)material data */
+    int             nmats;
+    int             matnos[3];
+    int             matlist[NX * NY];
+    /* (multi)species data */
+    char           *specname;
+    int             speclist[NX*NY],speclist2[NX*NY];
+    float           species_mf[NX*NY*5];
+    int             nspecies_mf;
+    int             nmatspec[3];
+    /* time data */
+    int             cycle;
+    float           time;
+    double          dtime;
+    /* option list */
+    DBoptlist      *optlist;
+    /* internal data */
+    int             i, j;
+    float           xave, yave;
+    float           xcenter, ycenter;
+    float           theta, dtheta;
+    float           r, dr;
+    float           dist;
+    int             block;
+    int             delta_x, delta_y;
+    int             base_x, base_y;
+    int             n_x, n_y;
+    /* single block data */
+    float           x2[(NX + 1) * (NY + 1)], 
+                    y2[(NX + 1) * (NY + 1)];
+    float           d2[NX * NY], 
+                    p2[NX * NY], 
+                    u2[(NX + 1) * (NY + 1)], 
+                    v2[(NX + 1) * (NY + 1)];
+    int             matlist2[NX * NY];
+    int             dims2[3];
+
+
+    /*
+     * Initialize the names and create the directories for the blocks.
+     */
+    for (i = 0; i < nblocks; i++)
+    {
+
+        sprintf(names[6][i], "/block%d/mesh1", i);
+        meshnames[i] = names[6][i];
+        meshtypes[i] = meshtype;
+
+        sprintf(names[0][i], "/block%d/d", i);
+        sprintf(names[1][i], "/block%d/p", i);
+        sprintf(names[2][i], "/block%d/u", i);
+        sprintf(names[3][i], "/block%d/v", i);
+        varnames[0][i] = names[0][i];
+        varnames[1][i] = names[1][i];
+        varnames[2][i] = names[2][i];
+        varnames[3][i] = names[3][i];
+        vartypes[i]    = vartype;
+
+        sprintf(names[4][i], "/block%d/mat1", i);
+        matnames[i] = names[4][i];
+	sprintf(names[5][i], "/block%d/species1",i);
+	specnames[i]= names[5][i];
+
+        /* make the directory for the block mesh */
+
+        sprintf(dirnames[i], "/block%d", i);
+
+        if (DBMkDir(dbfile, dirnames[i]) == -1)
+        {
+            fprintf(stderr, "Could not make directory \"%s\"\n", dirnames[i]);
+            return (-1);
+        }                       /* if */
+    }                           /* for */
+
+
+    /*
+     * Initalize species info
+     */
+    specname = "species1";
+    nmatspec[0]=3;
+    nmatspec[1]=1;
+    nmatspec[2]=2;
+
+    /*
+     * Initialize time info
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "mesh1";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+    coords[0] = x;
+    coords[1] = y;
+    ndims = 2;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dtheta = (180. / NX) * (3.1415926 / 180.);
+    dr = 3. / NY;
+    theta = 0;
+    for (i = 0; i < NX + 1; i++)
+    {
+        r = 2.;
+        for (j = 0; j < NY + 1; j++)
+        {
+            x[j * (NX + 1) + i] = r * cos(theta);
+            y[j * (NX + 1) + i] = r * sin(theta);
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    varname[0] = "d";
+    varname[1] = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = NX;
+    zdims[1] = NY;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < NY; j++)
+        {
+            xave = (x[(j) * (NX + 1) + i] + x[(j) * (NX + 1) + i + 1] +
+                    x[(j + 1) * (NX + 1) + i + 1] + x[(j + 1) * (NX + 1) + i]) / 4.;
+            yave = (y[(j) * (NX + 1) + i] + y[(j) * (NX + 1) + i + 1] +
+                    y[(j + 1) * (NX + 1) + i + 1] + y[(j + 1) * (NX + 1) + i]) / 4.;
+            dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                        (yave - ycenter) * (yave - ycenter));
+            d[j * NX + i] = dist*((float)i/(float)NX);
+            p[j * NX + i] = 1. / (dist + .0001);
+        }
+    }
+
+    /*
+     * Create the velocity component arrays. Note that the indexing
+     * on the x and y coordinates is for rectilinear meshes. It
+     * generates a nice vector field.
+     */
+    varname[2] = "u";
+    varname[3] = "v";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            u[j * (NX + 1) + i] = (x[i] - xcenter) / dist;
+            v[j * (NX + 1) + i] = (y[j] - ycenter) / dist;
+        }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = NX;
+    dims2[1] = NY;
+
+    /*
+     * Put in the material in 3 shells.
+     */
+    nspecies_mf=0;
+    for (i = 0; i < NX; i++)
+    {
+        for (j = 0; j < 10; j++)
+        {
+            matlist[j * NX + i] = 1;
+	    speclist[j*NX+i]=nspecies_mf+1;
+	    if (i<10) {
+              species_mf[nspecies_mf++]=.2;
+              species_mf[nspecies_mf++]=.3;
+              species_mf[nspecies_mf++]=.5;
+	    } 
+            else {
+              species_mf[nspecies_mf++]=.9;
+              species_mf[nspecies_mf++]=.1;
+              species_mf[nspecies_mf++]=.0;
+            }
+        }
+        for (j = 10; j < 20; j++)
+        {
+            matlist[j * NX + i] = 2;
+	    speclist[j*NX+i]=nspecies_mf+1;
+	    species_mf[nspecies_mf++]=1.;
+        }
+        for (j = 20; j < NY; j++)
+        {
+            matlist[j * NX + i] = 3;
+            speclist[j*NX+i]=nspecies_mf+1;
+            if (i<20) {
+                species_mf[nspecies_mf++]=.3;
+                species_mf[nspecies_mf++]=.7;
+            }
+            else {
+                species_mf[nspecies_mf++]=.9;
+                species_mf[nspecies_mf++]=.1;
+            }
+        }
+    }
+
+    delta_x = NX / nblocks_x;
+    delta_y = NY / nblocks_y;
+
+    coords[0] = x2;
+    coords[1] = y2;
+    dims[0] = delta_x + 1;
+    dims[1] = delta_y + 1;
+    zdims[0] = delta_x;
+    zdims[1] = delta_y;
+    dims2[0] = delta_x;
+    dims2[1] = delta_y;
+
+    /*
+     * Create the blocks for the multi-block object.
+     */
+
+    for (block = 0; block < nblocks_x * nblocks_y; block++)
+    {
+        fprintf(stdout, "\t%s\n", dirnames[block]);
+
+        /*
+         * Now extract the data for this block. 
+         */
+
+        base_x = (block % nblocks_x) * delta_x;
+        base_y = (block / nblocks_x) * delta_y;
+
+        for (j = 0, n_y = base_y; j < delta_y + 1; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x + 1; i++, n_x++)
+            {
+                x2[j * (delta_x + 1) + i] = x[n_y * (NX + 1) + n_x];
+                y2[j * (delta_x + 1) + i] = y[n_y * (NX + 1) + n_x];
+                u2[j * (delta_x + 1) + i] = u[n_y * (NX + 1) + n_x];
+                v2[j * (delta_x + 1) + i] = v[n_y * (NX + 1) + n_x];
+            }
+
+        for (j = 0, n_y = base_y; j < delta_y; j++, n_y++)
+            for (i = 0, n_x = base_x; i < delta_x; i++, n_x++)
+            {
+                d2[j * delta_x + i] = d[n_y * NX + n_x];
+                p2[j * delta_x + i] = p[n_y * NX + n_x];
+                matlist2[j * delta_x + i] = matlist[n_y * NX + n_x];
+		speclist2[j*delta_x+i]=speclist[n_y*NX+n_x];
+            }
+
+        if (DBSetDir(dbfile, dirnames[block]) == -1)
+        {
+            fprintf(stderr, "Could not set directory \"%s\"\n",
+                    dirnames[block]);
+            return -1;
+        }                       /* if */
+
+        /* Write out the variables. */
+
+        optlist = DBMakeOptlist(10);
+        DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+        DBAddOption(optlist, DBOPT_TIME, &time);
+        DBAddOption(optlist, DBOPT_DTIME, &dtime);
+        DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+        DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+        DBAddOption(optlist, DBOPT_XUNITS, "cm");
+        DBAddOption(optlist, DBOPT_YUNITS, "cm");
+
+        DBPutQuadmesh(dbfile, meshname, coordnames, coords, dims, ndims,
+                      DB_FLOAT, DB_NONCOLLINEAR, optlist);
+
+        DBPutQuadvar1(dbfile, varname[2], meshname, u2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+        DBPutQuadvar1(dbfile, varname[3], meshname, v2, dims, ndims,
+                      NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+	DBAddOption(optlist, DBOPT_USESPECMF, &usespecmf);
+
+        DBPutQuadvar1(dbfile, varname[0], meshname, d2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutQuadvar1(dbfile, varname[1], meshname, p2, zdims, ndims,
+                      NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+        DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                      matlist2, dims2, ndims, NULL, NULL, NULL,
+                      NULL, 0, DB_FLOAT, optlist);
+	
+	DBPutMatspecies(dbfile, specname, matname, nmats, nmatspec,
+			speclist2, dims2, ndims, nspecies_mf, species_mf,
+			NULL, 0, DB_FLOAT, optlist);
+
+        DBFreeOptlist(optlist);
+
+        if (DBSetDir(dbfile, "..") == -1)
+        {
+            fprintf(stderr, "Could not return to base directory\n");
+            return -1;
+        }                       /* if */
+    }                           /* for */
+
+
+    /* create the option lists for the multi-block calls. */
+
+    optlist = DBMakeOptlist(10);
+    /* For all calls: */
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    /* For multi-materials: */
+    DBAddOption(optlist, DBOPT_NMATNOS, &nmats);
+    DBAddOption(optlist, DBOPT_MATNOS, matnos);
+    /* For multi-species: */
+    DBAddOption(optlist, DBOPT_MATNAME, "mat1");
+    DBAddOption(optlist, DBOPT_NMAT, &nmats);
+    DBAddOption(optlist, DBOPT_NMATSPEC, nmatspec);
+    DBAddOption(optlist, DBOPT_SPECNAMES, species_names);
+    DBAddOption(optlist, DBOPT_SPECCOLORS, speccolors);
+    
+
+    /* create the multi-block mesh */
+    if (DBPutMultimesh(dbfile, "mesh1", nblocks, meshnames, 
+                                        meshtypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi mesh\n");
+        return (-1);
+    }                           /* if */
+ 
+   /* create the multi-block variables */
+    if (DBPutMultivar(dbfile, "d", nblocks, varnames[0], vartypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var d\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "p", nblocks, varnames[1], vartypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var p\n");
+        return (-1);
+    }                           /* if */
+
+    if (DBPutMultivar(dbfile, "u", nblocks, varnames[2], vartypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var u\n");
+        return (-1);
+    }                           /* if */
+    if (DBPutMultivar(dbfile, "v", nblocks, varnames[3], vartypes, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi var v\n");
+        return (-1);
+    }                           /* if */
+
+    /* create the multi-block material */
+    if (DBPutMultimat(dbfile, "mat1", nblocks, matnames, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi material\n");
+        return (-1);
+    }                           /* if */
+
+    /* create the multi-block species */
+    if (DBPutMultimatspecies(dbfile, "species1", nblocks, specnames, optlist) == -1)
+    {
+        DBFreeOptlist(optlist);
+        fprintf(stderr, "Error creating multi species\n");
+        return (-1);
+    }                           /* if */
+
+    DBFreeOptlist(optlist);
+
+    return (0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     Generate multi block curvilinear test file with species info.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  Jeremy Meredith, Sept 29, 1998
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *------------------------------------------------------------------------*/
+int
+main(int argc, char *argv[]) {
+    DBfile         *dbfile;
+    int		   i, driver = DB_PDB;
+    char	   *filename = "multispec.pdb";
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line options */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "multispec.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "multispec.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+    
+    /*
+     * Create the multi-block curvilinear 2d mesh.
+     */
+    fprintf(stdout, "creating %s\n", filename);
+    if ((dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                         "multi-block curvilinear 2d test file", driver))
+        == NULL)
+    {
+        fprintf(stderr, "Could not create '%s'.\n", filename);
+    } else if (build_dbfile(dbfile) == -1)
+    {
+        fprintf(stderr, "Error in creating '%s'.\n", filename);
+        DBClose(dbfile);
+    } else
+        DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return(0);
+}
diff --git a/tests/namescheme.c b/tests/namescheme.c
new file mode 100644
index 0000000..da343d4
--- /dev/null
+++ b/tests/namescheme.c
@@ -0,0 +1,157 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+/*
+ 
+  Modifications:
+    Mark C. Miller, Wed Jul 14 15:30:09 PDT 2010
+    I changed '$' external arrays to '#' (int valued) extern and added a new
+    test for '$' (string valued) external arrays. I also added an example
+    for the kinds of nameschemes as might be used for mult-block objects. 
+*/
+
+#include <silo.h>
+#include <string.h>
+
+int main()
+{
+    int i;
+    int P[100], U[4];
+    char *N[3];
+    char blockName[1024];
+
+    /* Test a somewhat complex expression */ 
+    DBnamescheme *ns2;
+    DBnamescheme *ns = DBMakeNamescheme("@foo_%+03d at 3-((n % 3)*(4+1)+1/2)+1");
+    if (strcmp(DBGetName(ns, 25), "foo_+01") != 0)
+        return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test ?:: operator */
+    ns = DBMakeNamescheme("@foo_%d@(n-5)?14:77:");
+    if (strcmp(DBGetName(ns, 6), "foo_14") != 0)
+        return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test multiple conversion specifiers */
+    ns = DBMakeNamescheme("|foo_%03dx%03d|n/5|n%5");
+    if (strcmp(DBGetName(ns, 17), "foo_003x002") != 0)
+       return 1;
+    if (strcmp(DBGetName(ns, 20), "foo_004x000") != 0)
+       return 1;
+    if (strcmp(DBGetName(ns, 3), "foo_000x003") != 0)
+       return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test embedded string value results */
+    ns = DBMakeNamescheme("@foo_%s@(n-5)?'master':'slave':");
+    if (strcmp(DBGetName(ns, 6), "foo_master") != 0)
+        return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test array-based references to int valued arrays and whose
+       array names are more than just one character long. */
+    for (i = 0; i < 100; i++)
+        P[i] = i*5;
+    for (i = 0; i < 4; i++)
+        U[i] = i*i;
+    ns = DBMakeNamescheme("@foo_%03dx%03d@#Place[n]@#Upper[n%4]", P, U);
+    if (strcmp(DBGetName(ns, 17), "foo_085x001") != 0)
+        return 1;
+    if (strcmp(DBGetName(ns, 18), "foo_090x004") != 0)
+        return 1;
+    if (strcmp(DBGetName(ns, 19), "foo_095x009") != 0)
+        return 1;
+    if (strcmp(DBGetName(ns, 20), "foo_100x000") != 0)
+        return 1;
+    if (strcmp(DBGetName(ns, 21), "foo_105x001") != 0)
+        return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test array-based references to char* valued array */
+    N[0] = "red";
+    N[1] = "green";
+    N[2] = "blue";
+    ns = DBMakeNamescheme("Hfoo_%sH$N[n%3]", N);
+    if (strcmp(DBGetName(ns, 17), "foo_blue") != 0)
+        return 1;
+    if (strcmp(DBGetName(ns, 6), "foo_red") != 0)
+        return 1;
+    DBFreeNamescheme(ns);
+
+    /* Test namescheme as it might be used for multi-block objects */
+    /* In particular, this test creates nameschems suitable for the data
+       produced by 'multi_file' test in multidir mode. */
+    ns = DBMakeNamescheme("|multi_file.dir/%03d/%s%d.%s|n/36|'ucd3d'|n/36|'pdb'");
+    ns2 = DBMakeNamescheme("|/block%d/mesh1|n");
+    strcpy(blockName, DBGetName(ns, 123)); /* filename part */
+    strcat(blockName, ":");
+    strcat(blockName, DBGetName(ns2, 123)); /* blockname part */
+    if (strcmp(blockName, "multi_file.dir/003/ucd3d3.pdb:/block123/mesh1") != 0)
+        return 0;
+    strcpy(blockName, DBGetName(ns, 0)); /* filename part */
+    strcat(blockName, ":");
+    strcat(blockName, DBGetName(ns2, 0)); /* blockname part */
+    if (strcmp(blockName, "multi_file.dir/000/ucd3d0.pdb:/block0/mesh1") != 0)
+        return 0;
+    strcpy(blockName, DBGetName(ns, 287)); /* filename part */
+    strcat(blockName, ":");
+    strcat(blockName, DBGetName(ns2, 287)); /* blockname part */
+    if (strcmp(blockName, "multi_file.dir/007/ucd3d7.pdb:/block287/mesh1") != 0)
+        return 0;
+    DBFreeNamescheme(ns);
+    DBFreeNamescheme(ns2);
+
+    return 0;
+}
diff --git a/tests/not_a_silo_file.h5 b/tests/not_a_silo_file.h5
new file mode 100644
index 0000000..836d5ef
Binary files /dev/null and b/tests/not_a_silo_file.h5 differ
diff --git a/tests/not_a_silo_file.pdb b/tests/not_a_silo_file.pdb
new file mode 100644
index 0000000..be90308
Binary files /dev/null and b/tests/not_a_silo_file.pdb differ
diff --git a/tests/obj.c b/tests/obj.c
new file mode 100644
index 0000000..3aaf3fc
--- /dev/null
+++ b/tests/obj.c
@@ -0,0 +1,161 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"
+#include <math.h>
+#include <stdlib.h>
+#ifdef WIN32
+#include <string.h>
+#endif
+#include <std.c>
+
+static void build_objs(DBfile *dbfile);
+
+int main(int argc, char **argv)
+{  
+    DBfile        *dbfile;
+    int         i, driver = DB_PDB;
+    char        *filename = "ucd.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "ucd.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "ucd.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "ucd test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+    build_objs(dbfile);
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return 0;
+}
+
+void
+build_objs(DBfile *dbfile)
+{  DBobject *o;
+
+   if (dbfile != NULL)
+   {
+      if ((o=DBMakeObject("first",DB_USERDEF,11)) != NULL)
+      {  int got;
+
+	 DBAddIntComponent(o,"member_0",0);
+	 DBAddIntComponent(o,"member_1",1);
+	 DBAddStrComponent(o,"member_2","two");
+	 DBAddIntComponent(o,"member_3",3);
+	 DBAddFltComponent(o,"member_4",4.4);
+	 DBAddVarComponent(o,"member_5","five");
+	 DBAddIntComponent(o,"member_6",6);
+	 DBAddFltComponent(o,"member_7",7.7);
+	 DBAddVarComponent(o,"member_8","eight");
+	 DBAddIntComponent(o,"member_9",9);
+         DBAddDblComponent(o,"member_10",10.10101010101010);
+	 got = DBWriteObject(dbfile,o,0);
+	 DBFreeObject(o);
+	 if (got < 0)
+	    goto punt;
+	 if ((o=DBMakeObject("second",DB_USERDEF,8)) != NULL)
+	 {  DBAddStrComponent(o,"field_0","zero");
+	    DBAddStrComponent(o,"field_1","one");
+	    DBAddStrComponent(o,"field_2","two");
+	    DBAddIntComponent(o,"field_3",3);
+	    DBAddIntComponent(o,"field_4",4);
+	    DBAddDblComponent(o,"field_5",55555.5555555555);
+	    DBAddFltComponent(o,"field_6",6.6);
+	    DBAddIntComponent(o,"field_7",7);
+	    got = DBWriteObject(dbfile,o,0);
+	    DBFreeObject(o);
+	    if (got < 0)
+	       goto punt;
+	    if ((o=DBMakeObject("third",DB_USERDEF,4)) != NULL)
+	    {  DBAddIntComponent(o,"component_0",0);
+	       DBAddVarComponent(o,"component_1","one");
+	       DBAddIntComponent(o,"component_2",2);
+	       DBAddIntComponent(o,"component_3",3);
+	       got = DBWriteObject(dbfile,o,0);
+	       DBFreeObject(o);
+	       if (got < 0)
+		  goto punt;
+	       if ((o=DBMakeObject("third",DB_USERDEF,5)) != NULL)
+	       {  DBAddStrComponent(o,"part_0","zero");
+		  DBAddVarComponent(o,"part_1","one");
+		  DBAddStrComponent(o,"part_2","two");
+		  DBAddIntComponent(o,"part_3",3);
+		  DBAddFltComponent(o,"part_4",4.4);
+		  got = DBWriteObject(dbfile,o,0);
+		  DBFreeObject(o);
+		  if (got < 0)
+		     goto punt;
+	       }
+	    }
+	 }
+      }
+punt:
+    ; 
+   }
+}
+
diff --git a/tests/onehex.c b/tests/onehex.c
new file mode 100644
index 0000000..86b52a0
--- /dev/null
+++ b/tests/onehex.c
@@ -0,0 +1,335 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <float.h>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+#include <std.c>
+
+/******************************************************************************
+ * Modifications:
+ *   Mark C. Miller, Tue Mar  9 17:16:17 PST 2010
+ *   Added explicit logic to set split vfd as an example of how to do it.
+ *   Added missing DBFreeFacelist() so valgrind reports no leaks.
+ *
+ *   Mark C. Miller, Wed Jul 14 15:43:10 PDT 2010
+ *   Changed name of 'example' option to 'split'. Added code to Unregister
+ *   option sets.
+ * 
+ *****************************************************************************/
+
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             nodelist[8];
+    float           x[8], y[8], z[8];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             matnos[1], matlist[1], dims[1];
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           var[8];
+    int		    driver = DB_PDB;
+    int             setinf = 0;
+    int             setnan = 0;
+    char 	    *filename = "onehex.silo";
+    int             show_all_errors = FALSE;
+    int             append = FALSE;
+
+    int alloc_inc, vfd, core_vfd;
+    char *mext, *rext;
+    int meta_opts_id, raw_opts_id, split_opts_id;
+    DBoptlist *core_opts = 0, *split_opts = 0;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_", 3)) {
+	    driver = StringToDriver(argv[i]);
+	} else if (!strcmp(argv[i], "split")) {
+
+            /* set up the meta file options for core vfd with 1K alloc */
+            core_opts = DBMakeOptlist(10);
+
+            /* indicate the vfd is core */
+            core_vfd = DB_H5VFD_CORE;
+            DBAddOption(core_opts, DBOPT_H5_VFD, &core_vfd);
+
+            /* indicate the allocation increment is 1K */
+            alloc_inc = 1<<10;
+            DBAddOption(core_opts, DBOPT_H5_CORE_ALLOC_INC, &alloc_inc);
+
+            /* register the core file options set with the library */
+            meta_opts_id = DBRegisterFileOptionsSet(core_opts); 
+           
+            /* set up the raw file options */
+            /* We're using pre-defined default file options for the raw part */
+            raw_opts_id = DB_FILE_OPTS_H5_DEFAULT_SEC2;
+
+            /* now, set up the split file options */
+            split_opts = DBMakeOptlist(10);
+
+            /* indicate the vfd is split */
+            vfd = DB_H5VFD_SPLIT;
+            DBAddOption(split_opts, DBOPT_H5_VFD, &vfd);
+
+            /* indicate the meta file options set */
+            DBAddOption(split_opts, DBOPT_H5_META_FILE_OPTS, &meta_opts_id);
+
+            /* indicate the meta file extension */
+            mext = "silo-meta";
+            DBAddOption(split_opts, DBOPT_H5_META_EXTENSION, mext);
+
+            /* indicate the raw file options set */
+            DBAddOption(split_opts, DBOPT_H5_RAW_FILE_OPTS, &raw_opts_id);
+
+            /* indicate the raw file extension */
+            /* Note, this is NOT an extension but an sprintf name pattern */
+            rext = "silo_%s_raw.dat";
+            DBAddOption(split_opts, DBOPT_H5_RAW_EXTENSION, rext);
+
+            /* register the split file options set with the library */
+            split_opts_id = DBRegisterFileOptionsSet(split_opts); 
+
+            /* set the 'driver' */
+            driver = DB_HDF5_OPTS(split_opts_id);
+
+            /* DO NOT FREE THE ASSOCIATED OPTLIST UNTIL AFTER OPEN/CREATE */
+
+	} else if (!strcmp(argv[i], "append")) {
+            append = TRUE;
+	} else if (!strcmp(argv[i], "inf")) {
+            setinf = 1;
+	} else if (!strcmp(argv[i], "nan")) {
+            setnan = 1;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    if (append)
+    {
+        dbfile = DBOpen(filename, driver, DB_APPEND);
+        DBMkDir(dbfile, "dir1");
+        DBSetDir(dbfile, "dir1");
+    }
+    else
+        dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd hex", driver);
+
+    /* Ok, now we can safely free the file options sets optlists */
+    if (core_opts)
+    {
+        DBUnregisterFileOptionsSet(meta_opts_id);
+        DBFreeOptlist(core_opts);
+    }
+    if (split_opts)
+    {
+        DBUnregisterFileOptionsSet(split_opts_id);
+        DBFreeOptlist(split_opts);
+    }
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    x[0] = 0; y[0] = 0; z[0] = 0;
+    x[1] = 1; y[1] = 0; z[1] = 0;
+    x[2] = 1; y[2] = 0; z[2] = 1;
+    x[3] = 0; y[3] = 0; z[3] = 1;
+    x[4] = 0; y[4] = 1; z[4] = 0;
+    x[5] = 1; y[5] = 1; z[5] = 0;
+    x[6] = 1; y[6] = 1; z[6] = 1;
+    x[7] = 0; y[7] = 1; z[7] = 1;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 45;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    for (i = 0; i < 8; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        var[i] = x[i]+y[i]*z[i];
+    }
+
+    DBPutUcdmesh(dbfile, "hex", 3, coordnames, coords, 8, 1, "zonelist",
+                 "facelist", DB_FLOAT, NULL);
+
+    matnos[0] = 1;
+    matlist[0] = 1;
+    dims[0] = 1;
+
+    DBPutMaterial(dbfile, "mat", "hex", 1, matnos, matlist, dims,
+                  1, NULL, NULL, NULL, NULL, 0, DB_FLOAT, NULL);
+
+    if (setinf)
+    {
+        double d = 2.0;
+        var[7] = FLT_MAX*d; 
+    }
+    if (setnan)
+    {
+        double d = -1.0;
+        var[0] = sqrt(d);
+    }
+    DBPutUcdvar1(dbfile, "v", "hex", var, 8, NULL, 0, DB_FLOAT, DB_NODECENT,
+                 NULL);
+
+    nodelist[0] = 0;
+    nodelist[1] = 1;
+    nodelist[2] = 2;
+    nodelist[3] = 3;
+    nodelist[4] = 4;
+    nodelist[5] = 5;
+    nodelist[6] = 6;
+    nodelist[7] = 7;
+
+    shapesize[0] = 8;
+    shapecnt[0] = 1;
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", 1, 3, nodelist, 8, 0, shapesize,
+                  shapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, 8, 0, shapesize, shapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+               facelist->nodelist, facelist->lnodelist, facelist->origin,
+               facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    DBFreeFacelist(facelist);
+    sprintf(mesh_command, "mesh hex; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+
+    return 0;
+}
diff --git a/tests/oneprism.c b/tests/oneprism.c
new file mode 100644
index 0000000..c50cc25
--- /dev/null
+++ b/tests/oneprism.c
@@ -0,0 +1,237 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+/*-------------------------------------------------------------------------
+ * Modifications:
+ *    Hank Childs, Wed Feb 16 15:35:56 PST 2005
+ *    Prism is inside out.  Correct it.
+ *-------------------------------------------------------------------------*/
+
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             nodelist[6];
+    float           x[6], y[6], z[6];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             matnos[1], matlist[1], dims[1];
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           var[6];
+    int		    driver=DB_PDB;
+    char	    *filename = "oneprism.silo";
+    int             show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "oneprism.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "oneprism.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd prism", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    /* This prism has the exact same shape and coordinates as zone 40 in 
+     * globe.silo.  However, the variable stored across it is not the same as 
+     * any globe.silo variables. */
+
+    x[0] = 0.515; y[3] = 0; z[3] = 1.585;
+    x[1] = 1.030; y[2] = 0; z[2] = 3.170;
+    x[2] = 0; y[1] = 0; z[1] = 3.333;
+    x[3] = 0; y[0] = 0; z[0] = 1.667;
+    x[4] = 0.490; y[4] = 0.159; z[4] = 1.585;
+    x[5] = 0.980; y[5] = 0.318; z[5] = 3.170;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 0;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    for (i = 0; i < 6; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        var[i] = x[i]+y[i]*z[i];
+    }
+
+    DBPutUcdmesh(dbfile, "prism", 3, coordnames, coords, 6, 1, "zonelist",
+                 "facelist", DB_FLOAT, NULL);
+
+    matnos[0] = 1;
+    matlist[0] = 1;
+    dims[0] = 1;
+
+    DBPutMaterial(dbfile, "mat", "prism", 1, matnos, matlist, dims,
+                  1, NULL, NULL, NULL, NULL, 0, DB_FLOAT, NULL);
+
+    DBPutUcdvar1(dbfile, "v", "prism", var, 6, NULL, 0, DB_FLOAT, DB_NODECENT,
+                 NULL);
+
+    nodelist[0] = 0;
+    nodelist[1] = 1;
+    nodelist[2] = 2;
+    nodelist[3] = 3;
+    nodelist[4] = 4;
+    nodelist[5] = 5;
+
+    shapesize[0] = 6;
+    shapecnt[0] = 1;
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", 1, 3, nodelist, 6, 0, shapesize,
+                  shapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, 6, 0, shapesize, shapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+                  facelist->nodelist, facelist->lnodelist, facelist->origin,
+                  facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    sprintf(mesh_command, "mesh prism; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/onepyramid.c b/tests/onepyramid.c
new file mode 100644
index 0000000..8745aed
--- /dev/null
+++ b/tests/onepyramid.c
@@ -0,0 +1,225 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             nodelist[5];
+    float           x[5], y[5], z[5];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             matnos[1], matlist[1], dims[1];
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           var[5];
+    int		    driver=DB_PDB;
+    char	    *filename="onepyramid.silo";
+    int             show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "onepyramid.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "onepyramid.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd pyramid",
+                      driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    x[0] = 0; y[0] = 0; z[0] = 0;
+    x[1] = 1; y[1] = 0; z[1] = 0;
+    x[2] = 1; y[2] = 0; z[2] = 1;
+    x[3] = 0; y[3] = 0; z[3] = 1;
+    x[4] = 0.5; y[4] = 0.5; z[4] = 0.5;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 45;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    for (i = 0; i < 5; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        var[i] = x[i]+y[i]*z[i];
+    }
+
+    DBPutUcdmesh(dbfile, "pyramid", 3, coordnames, coords, 5, 1, "zonelist",
+                 "facelist", DB_FLOAT, NULL);
+
+    matnos[0] = 1;
+    matlist[0] = 1;
+    dims[0] = 1;
+
+    DBPutMaterial(dbfile, "mat", "pyramid", 1, matnos, matlist, dims,
+                  1, NULL, NULL, NULL, NULL, 0, DB_FLOAT, NULL);
+
+    DBPutUcdvar1(dbfile, "v", "pyramid", var, 5, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    nodelist[0] = 0;
+    nodelist[1] = 1;
+    nodelist[2] = 2;
+    nodelist[3] = 3;
+    nodelist[4] = 4;
+
+    shapesize[0] = 5;
+    shapecnt[0] = 1;
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", 1, 3, nodelist, 5, 0, shapesize,
+                  shapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, 5, 0, shapesize, shapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+                  facelist->nodelist, facelist->lnodelist, facelist->origin,
+                  facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    sprintf(mesh_command, "mesh pyramid; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/onetet.c b/tests/onetet.c
new file mode 100644
index 0000000..0aea943
--- /dev/null
+++ b/tests/onetet.c
@@ -0,0 +1,223 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             nodelist[4];
+    float           x[4], y[4], z[4];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             matnos[1], matlist[1], dims[1];
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           var[4];
+    int		    driver=DB_PDB;
+    char            *filename = "onetet.silo";
+    int             show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "onetet.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "onetet.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd tet", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    x[0] = 0; y[0] = 0; z[0] = 0;
+    x[1] = 1; y[1] = 0; z[1] = 0;
+    x[2] = 0.5; y[2] = 0; z[2] = 1;
+    x[3] = 0.5; y[3] = 1; z[3] = 1;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 45;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    for (i = 0; i < 4; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        var[i] = x[i]+y[i]*z[i];
+    }
+
+    DBPutUcdmesh(dbfile, "tet", 3, coordnames, coords, 4, 1, "zonelist",
+                 "facelist", DB_FLOAT, NULL);
+
+    matnos[0] = 1;
+    matlist[0] = 1;
+    dims[0] = 1;
+
+    DBPutMaterial(dbfile, "mat", "tet", 1, matnos, matlist, dims,
+                  1, NULL, NULL, NULL, NULL, 0, DB_FLOAT, NULL);
+
+    DBPutUcdvar1(dbfile, "v", "tet", var, 4, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+
+    nodelist[0] = 0;
+    nodelist[1] = 1;
+    nodelist[2] = 2;
+    nodelist[3] = 3;
+
+    shapesize[0] = 4;
+    shapecnt[0] = 1;
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", 1, 3, nodelist, 4, 0, shapesize,
+                  shapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, 4, 0, shapesize, shapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+                  facelist->nodelist, facelist->lnodelist, facelist->origin,
+                  facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    sprintf(mesh_command, "mesh tet; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/package.m4 b/tests/package.m4
new file mode 100644
index 0000000..42c40bd
--- /dev/null
+++ b/tests/package.m4
@@ -0,0 +1,6 @@
+# Signature of the current package.
+m4_define([AT_PACKAGE_NAME],      [silo])
+m4_define([AT_PACKAGE_TARNAME],   [silo])
+m4_define([AT_PACKAGE_VERSION],   [4.8])
+m4_define([AT_PACKAGE_STRING],    [silo 4.8])
+m4_define([AT_PACKAGE_BUGREPORT], [visit-users at email.ornl.gov])
diff --git a/tests/partial_io.c b/tests/partial_io.c
new file mode 100644
index 0000000..85c2634
--- /dev/null
+++ b/tests/partial_io.c
@@ -0,0 +1,379 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <string.h>
+#include <stdlib.h>     /* For abort() */
+#include <std.c>
+
+#define NX	10
+#define NY	3
+
+#define TEST_ERROR
+
+static char	*Expected ;	/*expected error message*/
+
+

+/*-------------------------------------------------------------------------
+ * Function:	err_handler
+ *
+ * Purpose:	Prints an error message.
+ *
+ * Return:	void
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.nuance.com
+ *		May 14, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+err_handler (char *mesg) {
+
+   int		ok = strstr(mesg,Expected) != 0;
+   
+   printf ("Got error%s: %s: %s: %s\n",
+	   ok?"[OK]":"", DBErrFuncname(), DBErrString(), mesg) ;
+   if (!ok) {
+      printf ("Aborting... [That was an unexpected error]\n") ;
+      fflush (stdout) ;
+      fflush (stderr) ;
+      abort () ;
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	check
+ *
+ * Purpose:	Compares N values from REFERENCE and VALUES and aborts
+ *		with a message if they are not the same.
+ *
+ * Return:	void
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.nuance.com
+ *		May 14, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+check (char *mesg, float *reference, float *values, int n) {
+
+   int		i ;
+
+   for (i=0; i<n; i++) {
+      if (reference[i]!=values[i]) {
+	 printf ("%s reference[%d]=%g but input[%d]=%g   [aborting...]\n",
+		 mesg, i, reference[i], i, values[i]) ;
+	 abort () ;
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	Opens `partial.pdb' and writes a variable, then closes
+ *		the file, opens it for reading, and reads the varaible.
+ *		All I/O is in chunks.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	1
+ *
+ * Programmer:	Robb Matzke
+ *		robb at callisto.nuance.com
+ *		May 13, 1996
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ * 	Robb Matzke, 2000-01-12
+ *	Added a call to DBForceSingle(1) so all our data in memory is `float'
+ *	instead of `double'.
+ *-------------------------------------------------------------------------
+ */
+int
+main (int argc, char *argv[]) {
+   
+   DBfile	*db ;
+   float	values[NX][NY], buf[NX][NY] ;
+   int		i, j ;
+   int		offset[2], length[2], stride[2], dims[2] ;
+   char		vname[8], mesg[64] ;
+   int		driver = DB_PDB;
+   char		*filename = "partial.pdb";
+   int          show_all_errors = FALSE;
+
+   /* Parse command-line */
+   for (i=1; i<argc; i++) {
+       if (!strncmp(argv[i], "DB_PDB", 6)) {
+	   driver = StringToDriver(argv[i]);
+	   filename = "partial.pdb";
+       } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+           driver = StringToDriver(argv[i]);
+	   filename = "partial.h5";
+       } else if (!strcmp(argv[i], "show-all-errors")) {
+           show_all_errors = 1;
+       } else if (argv[i][0] != '\0') {
+	   fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+       }
+   }
+    
+   DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+   DBForceSingle(1);
+
+
+
+   db = DBCreate (filename, 0, DB_LOCAL, "Partial I/O test file", driver);
+   dims[0] = NX ;
+   dims[1] = NY ;
+
+   /*
+    * Compute the values.  The thousands will be the 1-origin row
+    * number (first index) and the ones will be the 1-origin column
+    * number (second index).
+    */
+   for (i=0; i<NX; i++) {
+      for (j=0; j<NY; j++) {
+	 values[i][j] = (i+1)*1000 + j+1 ;
+      }
+   }
+
+   /*
+    * Write the full output...
+    */
+   DBWrite (db, "reference", values, dims, 2, DB_FLOAT) ;
+
+
+   /*
+    * Write the full output again as a single slice.
+    */
+   stride[0] = stride[1] = 1 ;
+   offset[0] = offset[1] = 0 ;
+   length[0] = NX ;
+   length[1] = NY ;
+   DBWriteSlice (db, "slice", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+
+
+   /*
+    * Write one row at a time to different variables.
+    */
+   for (i=0; i<NX; i++) {
+      /*** A single row ***/
+      offset[0] = i ;
+      length[0] = 1 ;
+      stride[0] = 1 ;
+
+      /*** All columns of that row ***/
+      offset[1] = 0 ;
+      length[1] = NY ;
+      stride[1] = 1 ;
+
+      sprintf (vname, "row%d", i+1) ;
+      DBWriteSlice (db, vname, values[i], DB_FLOAT,
+		    offset, length, stride, dims, 2) ;
+   }
+
+	 
+   /*
+    * Write the entire array in three slices a row at a time.
+    */
+   for (i=0; i<NX; i++) {
+      /*** A single row ***/
+      offset[0] = i ;
+      length[0] = 1 ;
+      stride[0] = 1 ;
+
+      /*** All columns of that row ***/
+      offset[1] = 0 ;
+      length[1] = NY ;
+      stride[1] = 1 ;
+      
+      DBWriteSlice (db, "sliced", values[i], DB_FLOAT,
+		    offset, length, stride, dims, 2) ;
+   }
+
+
+   
+
+   
+   /*-------------------------------------------------------------------------
+    * THE FOLLOWING TESTS GENERATE ERRORS ON PURPOSE!
+    * The errors will be trapped and should not cause this test program
+    * to abort.
+    *-------------------------------------------------------------------------
+    */
+   DBShowErrors (show_all_errors?DB_ALL_AND_DRVR:DB_TOP, err_handler) ;
+
+   /*
+    * Specify invalid offsets.
+    */
+   offset[0] = 0 ;
+   length[0] = NX ;
+   stride[0] = 1 ;
+
+   offset[1] = NY ; /* <------------- CAUSES AN ERROR!			*/
+   length[1] = 1 ;
+   stride[1] = 1 ;
+
+   Expected = "offset" ;
+   DBWriteSlice (db, "error_test_1", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+
+   /*
+    * Speicify invalid length.
+    */
+   offset[0] = 0 ;
+   length[0] = NX ;
+   stride[0] = 1 ;
+
+   offset[1] = 0 ;
+   length[1] = NY+1 ; /* <----------------- CAUSUES AN ERROR!		*/
+   stride[1] = 1 ;
+
+   Expected = "length" ;
+   DBWriteSlice (db, "error_test_2", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+
+   /*
+    * Specify an offset and length combination that is too large.
+    */
+   offset[0] = 0 ;
+   length[0] = NX ;
+   stride[0] = 1 ;
+
+   offset[1] = 1 ; /* <--------------- CAUSES AN ERROR WHEN COMBINED	*/
+   length[1] = NY ;/* <--------------- WITH THE LENGTH!			*/
+   stride[1] = 1 ;
+   
+   Expected = "offset+length" ;
+   DBWriteSlice (db, "error_test_3", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+
+
+   /*
+    * Do a partial write but use the wrong dimensions the second time.
+    */
+   offset[0] = 0 ;
+   length[0] = 1 ;
+   stride[0] = 1 ;
+
+   offset[1] = 0 ;
+   length[1] = NY ;
+   stride[1] = 1 ;
+
+   Expected = "" ;
+   DBWriteSlice (db, "error_test_4", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+   
+   dims[0] -= 1 ; /* <----------------- THIS CAUSES AN ERROR!		*/
+   Expected = "dims" ;
+   DBWriteSlice (db, "error_test_4", values, DB_FLOAT,
+		 offset, length, stride, dims, 2) ;
+
+   DBClose (db) ;
+
+
+   /*-------------------------------------------------------------------------
+    * Now read the variables in various ways.
+    *-------------------------------------------------------------------------
+    */
+   DBShowErrors (show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL) ;
+   db = DBOpen (filename, driver, DB_READ) ;
+
+   /*
+    * Read the whole variable.
+    */
+   memset (buf, 0, sizeof(buf)) ;
+   DBReadVar (db, "reference", buf) ;
+   check ("when reading entire variable", values[0], buf[0], NX*NY) ;
+
+   /*
+    * Read each row separately.
+    */
+   for (i=0; i<NX; i++) {
+      memset (buf, 0, sizeof(buf)) ;	/*just to be sure*/
+      
+      offset[0] = i ;
+      length[0] = 1 ;
+      stride[0] = 1 ;
+
+      offset[1] = 0 ;
+      length[1] = NY ;
+      stride[1] = 1 ;
+      
+      DBReadVarSlice (db, "reference", offset, length, stride, 2, buf[i]) ;
+      sprintf (mesg, "when reading row %d", i+1) ;
+      check (mesg, values[i], buf[i], NY) ;
+   }
+      
+   
+   DBClose(db);
+
+   printf ("test passed, but check `%s' anyway with the browser.\n",
+	   filename) ;
+
+   CleanupDriverStuff();
+   return 0 ;
+}
+
+
+   
+   
diff --git a/tests/pdbcmp.csh b/tests/pdbcmp.csh
new file mode 100755
index 0000000..e4f6aae
--- /dev/null
+++ b/tests/pdbcmp.csh
@@ -0,0 +1,106 @@
+#!/bin/csh -f
+########################################################################
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+########################################################################
+
+set host = `uname`
+if ($host == IRIX) then
+   set pdbdiff = /usr/local/bin/pdbdiff
+else if ($host == SunOs) then
+   set pdbdiff = /usr/local/bin/pdbdiff
+else
+   set pdbdiff = pdbdiff
+endif
+
+set result = 0
+
+if ($#argv == 0) then
+   echo USAGE: pdbcmp file1_set1 file2_set1 ... file1_set2 file2_set2 ...
+   exit (1)
+endif
+set files = ($argv[*])
+
+@ num_files = $#files / 2
+
+set fileset1 = ( )
+set fileset2 = ( )
+
+@ ifile = 1
+while ($ifile <= $num_files)
+   set fileset1 = ($fileset1 $files[$ifile])
+
+   @ ifileset2  = $ifile + $num_files
+   set fileset2 = ($fileset2 $files[$ifileset2])
+
+   @ ifile = $ifile + 1
+end
+
+@ ifile = 1
+while ($ifile <= $num_files)
+   echo "Comparing $fileset1[$ifile] and $fileset2[$ifile] ..."
+
+   $pdbdiff $fileset1[$ifile] $fileset2[$ifile]
+
+   if ($status) then
+      echo Files did not compare.
+      set result = 1
+   else
+      echo Files compared ok.
+   endif
+
+   @ ifile = $ifile + 1
+end
+
+exit ($result)
+
+end
diff --git a/tests/pion0244.silo b/tests/pion0244.silo
new file mode 100644
index 0000000..211458a
Binary files /dev/null and b/tests/pion0244.silo differ
diff --git a/tests/pmpio_hdf5_test.c b/tests/pmpio_hdf5_test.c
new file mode 100644
index 0000000..1059f01
--- /dev/null
+++ b/tests/pmpio_hdf5_test.c
@@ -0,0 +1,207 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <mpi.h>
+#include <pmpio.h>
+#include <string.h>
+#include <stdlib.h>
+/* Define this symbol BEFORE including hdf5.h to indicate the HDF5 code
+   in this file uses version 1.6 of the HDF5 API. This is harmless for
+   versions of HDF5 before 1.8 and ensures correct compilation with
+   version 1.8 and thereafter. When, and if, the HDF5 code in this file
+   is explicitly upgraded to the 1.8 API, this symbol should be removed. */
+#define H5_USE_16_API
+#include <hdf5.h>
+
+typedef struct _user_data {
+    hid_t groupId;
+} user_data_t;
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks 
+ * Purpose:     Impliment the create callback
+ *-----------------------------------------------------------------------------
+ */
+void *CreateHDF5File(const char *fname, const char *nsname, void *userData)
+{
+    hid_t *retval = 0;
+    hid_t h5File = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+    if (h5File >= 0)
+    {
+        user_data_t *ud = (user_data_t *) userData;
+        ud->groupId = H5Gcreate(h5File, nsname, 0);
+        retval = (hid_t *) malloc(sizeof(hid_t));
+        *retval = h5File;
+    }
+    return (void *) retval;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks 
+ * Purpose:     Impliment the open callback
+ *-----------------------------------------------------------------------------
+ */
+void *OpenHDF5File(const char *fname, const char *nsname,
+                   PMPIO_iomode_t ioMode, void *userData)
+{
+    hid_t *retval;
+    hid_t h5File = H5Fopen(fname,
+                       ioMode == PMPIO_WRITE ? H5F_ACC_RDWR : H5F_ACC_RDONLY,
+                       H5P_DEFAULT);
+    if (h5File >= 0)
+    {
+        if (ioMode == PMPIO_WRITE)
+        {
+            user_data_t *ud = (user_data_t *) userData;
+            ud->groupId = H5Gcreate(h5File, nsname, 0);
+        }
+        retval = (hid_t *) malloc(sizeof(hid_t));
+        *retval = h5File;
+    }
+    return (void *) retval;
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Callbacks 
+ * Purpose:     Impliment the close callback
+ *-----------------------------------------------------------------------------
+ */
+void CloseHDF5File(void *file, void *userData)
+{
+    user_data_t *ud = (user_data_t *) userData;
+    H5Gclose(ud->groupId);
+    H5Fclose(*((hid_t*) file));
+    free(file);
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Main 
+ * Purpose:     Demonstrate use of PMPIO 
+ * Description:
+ * This simple program demonstrates the use of PMPIO to write a set of hdf5
+ * files. Each processor will write a randomly sized array of at most 1024
+ * intergers to its own sub-directory in a HDF5 file. By default, this program
+ * will generate 3 hdf5 files, regardless of the number of processors it is
+ * run on. You can change the number of files generated by passing an integer
+ * as an argument to the program. The following line will compile this example.
+ *
+ *     mpicc -g -I. -I/usr/gapps/hdf5/1.6.5/LinuxE3/serial/64/optim/include
+ *     pmpio_hdf5_test.c -o pmpio_hdf5_test
+ *     -L/usr/gapps/hdf5/1.6.5/LinuxE3/serial/64/optim/lib -lhdf5 -lz -lm
+ *
+ * To run it, try something like...
+ *
+ *     mpirun -np 17 pmpio_hdf5_test 3
+ *-----------------------------------------------------------------------------
+ */
+int main(int argc, char **argv)
+{
+    int size, rank;
+    int numGroups = 3;
+    hid_t *h5File_ptr;
+    hid_t h5File;
+    hid_t h5Group;
+    char fileName[256], nsName[256];
+    int i, len;
+    int *theData;
+    user_data_t userData;
+
+    if (argc >= 2)
+        numGroups = atoi(argv[1]);
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+
+    PMPIO_baton_t *bat = PMPIO_Init(numGroups, PMPIO_WRITE, MPI_COMM_WORLD, 1,
+        CreateHDF5File, OpenHDF5File, CloseHDF5File, &userData);
+
+    sprintf(fileName, "pmpio_hdf5_data_%03d.h5", bat->groupRank);
+    sprintf(nsName, "domain_%03d", bat->rankInComm);
+
+    h5File_ptr = (hid_t *) PMPIO_WaitForBaton(bat, fileName, nsName);
+    h5File = *h5File_ptr;
+    h5Group = userData.groupId;
+
+    /* this processor's local work on the file */
+    /* note: libhdf5 futz's with srand during initialization. Putting
+       the srand call here AFTER the first HDF5 calls, fixes that. */
+    srand(rank*13371);
+    len = rand() % 1024;
+    theData = (int *) malloc(len * sizeof(int));
+    for (i = 0; i < len; i++)
+        theData[i] = i;
+
+    /* new scope for local dataset vars */
+    /* note: use the group id as the loc-id for the H5Dcreate call */
+    {
+        hsize_t hlen = (hsize_t) len;
+        hid_t spaceId = H5Screate_simple(1, &hlen, 0);
+        hid_t dataId = H5Dcreate(h5Group, "theData", H5T_NATIVE_INT,
+                                 spaceId, H5P_DEFAULT);
+        H5Dwrite(dataId, H5T_NATIVE_INT, spaceId, spaceId,
+                    H5P_DEFAULT, theData);
+        H5Sclose(spaceId);
+        H5Dclose(dataId);
+    }
+
+    PMPIO_HandOffBaton(bat, h5File_ptr);
+
+    PMPIO_Finish(bat);
+
+    MPI_Finalize();
+
+    return 0;
+}
diff --git a/tests/pmpio_silo_test_mesh.c b/tests/pmpio_silo_test_mesh.c
new file mode 100644
index 0000000..658aae1
--- /dev/null
+++ b/tests/pmpio_silo_test_mesh.c
@@ -0,0 +1,346 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <mpi.h>
+#include <silo.h>
+#include <pmpio.h>
+#include <string.h>
+#include <stdlib.h>
+
+void WriteMultiXXXObjects(DBfile *siloFile, PMPIO_baton_t *bat, int size,
+    const char *file_ext);
+
+
+/*-----------------------------------------------------------------------------
+ * Purpose:     Impliment the create callback to initialize pmpio
+ *              Will create the silo file and the 'first' directory (namespace)
+ *              in it. The driver type (DB_PDB or DB_HDF5) is passed as user
+ *              data; a void pointer to the driver determined in main.
+ *-----------------------------------------------------------------------------
+ */
+void *CreateSiloFile(const char *fname, const char *nsname, void *userData)
+{
+    int driver = *((int*) userData);
+    DBfile *siloFile = DBCreate(fname, DB_CLOBBER, DB_LOCAL, "pmpio testing", driver);
+    if (siloFile)
+    {
+        DBMkDir(siloFile, nsname);
+        DBSetDir(siloFile, nsname);
+    }
+    return (void *) siloFile;
+}
+
+/*-----------------------------------------------------------------------------
+ * Purpose:     Impliment the open callback to initialize pmpio
+ *              Will open the silo file and, for write, create the new
+ *              directory or, for read, just cd into the right directory.
+ *-----------------------------------------------------------------------------
+ */
+void *OpenSiloFile(const char *fname, const char *nsname, PMPIO_iomode_t ioMode,
+    void *userData)
+{
+    DBfile *siloFile = DBOpen(fname, DB_UNKNOWN,
+        ioMode == PMPIO_WRITE ? DB_APPEND : DB_READ);
+    if (siloFile)
+    {
+        if (ioMode == PMPIO_WRITE)
+            DBMkDir(siloFile, nsname);
+        DBSetDir(siloFile, nsname);
+    }
+    return (void *) siloFile;
+}
+
+/*-----------------------------------------------------------------------------
+ * Purpose:     Impliment the close callback for pmpio
+ *-----------------------------------------------------------------------------
+ */
+void CloseSiloFile(void *file, void *userData)
+{
+    DBfile *siloFile = (DBfile *) file;
+    if (siloFile)
+        DBClose(siloFile);
+}
+
+/*-----------------------------------------------------------------------------
+ * Audience:    Public
+ * Chapter:     Main 
+ * Purpose:     Demonstrate use of PMPIO 
+ * Description:
+ * This simple program demonstrates the use of PMPIO to write a set of silo
+ * files for a very simple quad mesh. The mesh will be N x N where N is the
+ * number of processors. Each processor will write a single 1 x N strip of
+ * zones (2 nodes and 1 zone wide). The second command line argument 
+ * indicates the total number of files that will be produced. Note that this
+ * is totally independent of the number of processors. The resulting silo
+ * file can be visualized, in parallel, in VisIt by opening the 'root' file
+ * named "silo_000". Note that PMPIO's role is merely to coordinate and
+ * manage access to the silo file(s) that get created.
+ *
+ * By default, this example will use Silo's PDB driver. However, if you pass
+ * "DB_HDF5" anywhere on the command line, it will use the HDF5 driver. Any
+ * integer appearing on the command line is taken to be the total number of
+ * files.
+ *
+ * An example of how you would invoke this example is...
+ *
+ *     mpirun -np 17 pmpio_silo_test_mesh 3 DB_HDF5     
+ *
+ * which would run on 17 processors, creating a 17x17 mesh but writing it to
+ * 3 files using the HDF5 driver.
+ *-----------------------------------------------------------------------------
+ */
+int main(int argc, char **argv)
+{
+    int size, rank;
+    int numGroups = -1;
+    int driver = DB_PDB;
+    DBfile *siloFile;
+    char *file_ext = "pdb";
+    char fileName[256], nsName[256];
+    int i, j, dims[2], ndims = 2;
+    char *coordnames[2], *varnames[2];
+    float *x, *y, *coords[2], *vars[2];
+    float *vx, *vy;
+    float *temp;
+    PMPIO_baton_t *bat; 
+
+    /* specify the number of Silo files to create and driver */
+    for (i = 1; i < argc; i++)
+    {
+        if (!strcmp(argv[i], "DB_HDF5"))
+        {
+            driver = DB_HDF5;
+            file_ext = "h5";
+        }
+        else if (strtol(argv[i], 0, 10) > 0)
+        {
+            numGroups = strtol(argv[i], 0, 10);
+        }
+	else if (argv[i][0] != '\0')
+        {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    /* standard MPI initialization stuff */
+    MPI_Init(&argc, &argv);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    if (rank == 0)
+    {
+        if (numGroups < 0)
+            numGroups = 3; 
+    }
+
+    /* Ensure all procs agree on numGroups, driver and file_ext */
+    MPI_Bcast(&numGroups, 1, MPI_INT, 0, MPI_COMM_WORLD);
+    MPI_Bcast(&driver, 1, MPI_INT, 0, MPI_COMM_WORLD);
+    if (driver == DB_HDF5)
+        file_ext = "h5";
+
+    /* Initialize PMPIO, pass a pointer to the driver type as the
+       user data. */
+    bat = PMPIO_Init(numGroups, PMPIO_WRITE, MPI_COMM_WORLD, 1,
+        CreateSiloFile, OpenSiloFile, CloseSiloFile, &driver);
+
+    /* Construct names for the silo files and the directories in them */
+    sprintf(fileName, "silo_%03d.%s", PMPIO_GroupRank(bat, rank), file_ext);
+    sprintf(nsName, "domain_%03d", rank);
+
+    /* Wait for write access to the file. All processors call this.
+     * Some processors (the first in each group) return immediately
+     * with write access to the file. Other processors wind up waiting
+     * until they are given control by the preceeding processor in 
+     * the group when that processor calls "HandOffBaton" */
+    siloFile = (DBfile *) PMPIO_WaitForBaton(bat, fileName, nsName);
+
+    /* Do some work to construct the mesh data for this processor. */
+    dims[0] = 2;
+    dims[1] = size;
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    x = (float *) malloc(2 * sizeof(float));
+    x[0] = (float) rank;
+    x[1] = (float) rank+1;
+    y = (float *) malloc(size * sizeof(float));
+    for (i = 0; i < size; i++)
+        y[i] = (float) i;
+    coords[0] = x;
+    coords[1] = y;
+
+    /* Do some work to create some simple variable data for this processor. */
+    vx = (float *) malloc(2 * size * sizeof(float));
+    vy = (float *) malloc(2 * size * sizeof(float));
+    for (j = 0; j < size; j++)
+    {
+        for (i = 0; i < 2; i++)
+        {
+            vx[j*2+i] = ((float) (size-(rank+i)))/((float) (2*size));
+            vy[j*2+i] = ((float) ((size/2) - (rank+i))) / ((float) size);
+        }
+    }
+    temp = (float *) malloc(size * sizeof(float));
+    for (i = 0; i < size; i++)
+        temp[i] = (float) i * rank;
+
+    /*
+     *
+     * BEGIN THIS PROCESSOR'S LOCAL WORK ON A SILO FILE
+     *
+     */
+
+    /* This processor's local work on the file */
+    DBPutQuadmesh(siloFile, "qmesh", coordnames, coords, dims, ndims,
+        DB_FLOAT, DB_COLLINEAR, 0);
+    free(x);
+    free(y);
+
+    /* Output velocity on the mesh */
+    vars[0] = vx;
+    vars[1] = vy;
+    varnames[0] = "vx";
+    varnames[1] = "vy";
+    DBPutQuadvar(siloFile, "velocity", "qmesh", 2, varnames, vars,
+        dims, ndims, NULL, 0, DB_FLOAT, DB_NODECENT, 0);
+    free(vx);
+    free(vy);
+
+    /* Output temp on the mesh */
+    dims[0] = 1;
+    dims[1] = size-1;
+    DBPutQuadvar1(siloFile, "temp", "qmesh", temp, dims, ndims,
+        NULL, 0, DB_FLOAT, DB_ZONECENT, 0);
+    free(temp);
+
+    /*
+     *
+     * END THIS PROCESSORS LOCAL WORK ON THE FILE
+     *
+     */
+
+    /* If this is the 'root' processor, also write Silo's multi-XXX objects */
+    if (rank == 0)
+        WriteMultiXXXObjects(siloFile, bat, size, file_ext);
+
+    /* Hand off the baton to the next processor. This winds up closing
+     * the file so that the next processor that opens it can be assured
+     * of getting a consistent and up to date view of the file's contents. */
+    PMPIO_HandOffBaton(bat, siloFile);
+
+    /* We're done using PMPIO, so finish it off */
+    PMPIO_Finish(bat);
+
+    /* Standard MPI finalization */
+    MPI_Finalize();
+
+    return 0;
+}
+
+
+void WriteMultiXXXObjects(DBfile *siloFile, PMPIO_baton_t *bat, int size,
+    const char *file_ext)
+{
+    int i;
+    char **meshBlockNames = (char **) malloc(size * sizeof(char*));
+    char **tempBlockNames = (char **) malloc(size * sizeof(char*));
+    char **velBlockNames = (char **) malloc(size * sizeof(char*));
+    int *blockTypes = (int *) malloc(size * sizeof(int));
+    int *varTypes = (int *) malloc(size * sizeof(int));
+
+    /* Go to root directory in the silo file */
+    DBSetDir(siloFile, "/");
+
+    /* Construct the lists of individual object names */
+    for (i = 0; i < size; i++)
+    {
+        int groupRank = PMPIO_GroupRank(bat, i);
+        meshBlockNames[i] = (char *) malloc(1024);
+        velBlockNames[i] = (char *) malloc(1024);
+        tempBlockNames[i] = (char *) malloc(1024);
+        if (groupRank == 0)
+        {
+            /* this mesh block is in the file 'root' owns */
+            sprintf(meshBlockNames[i], "/domain_%03d/qmesh", i);
+            sprintf(velBlockNames[i], "/domain_%03d/velocity", i);
+            sprintf(tempBlockNames[i], "/domain_%03d/temp", i);
+        }
+        else
+        {
+            /* this mesh block is another file */ 
+            sprintf(meshBlockNames[i], "silo_%03d.%s:/domain_%03d/qmesh",
+                groupRank, file_ext, i);
+            sprintf(velBlockNames[i], "silo_%03d.%s:/domain_%03d/velocity",
+                groupRank, file_ext, i);
+            sprintf(tempBlockNames[i], "silo_%03d.%s:/domain_%03d/temp",
+                groupRank, file_ext, i);
+        }
+        blockTypes[i] = DB_QUADMESH;
+        varTypes[i] = DB_QUADVAR;
+    }
+
+    /* Write the multi-block objects */
+    DBPutMultimesh(siloFile, "multi_qmesh", size, meshBlockNames, blockTypes, 0);
+    DBPutMultivar(siloFile, "multi_velocity", size, velBlockNames, varTypes, 0);
+    DBPutMultivar(siloFile, "multi_temp", size, tempBlockNames, varTypes, 0);
+
+    /* Clean up */
+    for (i = 0; i < size; i++)
+    {
+        free(meshBlockNames[i]);
+        free(velBlockNames[i]);
+        free(tempBlockNames[i]);
+    }
+    free(meshBlockNames);
+    free(velBlockNames);
+    free(tempBlockNames);
+    free(blockTypes);
+    free(varTypes);
+}
diff --git a/tests/point.c b/tests/point.c
new file mode 100644
index 0000000..43e2a79
--- /dev/null
+++ b/tests/point.c
@@ -0,0 +1,429 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"
+#include <math.h>
+#include <stdlib.h>
+#ifdef WIN32
+#include <string.h>
+#endif
+#include <std.c>
+
+#ifndef PI
+#  define PI    3.141592653589793238
+#endif
+#define TwoPI (2*PI)
+
+#define ALLOC(t,n)  (t*)calloc(n,sizeof(t))
+#define FREE(x) free((void*)(x)); (x)=NULL
+#define assert(x)   if (!(x)) \
+                    { \
+                        fprintf(stderr,"point: assertion failed at line %d.\n",__LINE__); \
+                        exit(1); \
+                    }
+#define assert_mem(x)   if ((x) == NULL) \
+                        { \
+                            fprintf(stderr,"point: out of memory at line %d.\n",__LINE__); \
+                            exit(1); \
+                        }
+
+
+/* Local static functions */
+static void build_point(DBfile *dbfile, char *name, int N, int dims);
+static void build_defvars(DBfile *dbfile, int dims);
+
+/* Other functions */
+#ifndef randf
+/*-------------------------------------------------------------------------
+ * Function:    randf
+ * 
+ * Purpose:     Generates random numbers between RMIN (inclusive) and
+ *              RMAX (exclusive).  RMIN should be smaller than RMAX.
+ * 
+ * Return:      A pseudo-random number
+ * 
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.mdn.com
+ *              Jul  9, 1996
+ * 
+ * Modifications:
+ *       Thomas R. Treadway, Wed Nov 28 15:25:53 PST 2007
+ *       Moved from src/swat/randf.c
+ *
+ *       Mark C. Miller, Wed Jun 30 09:43:10 PDT 2010
+ *       Moved here from src/silo/silo.c
+ *-------------------------------------------------------------------------
+ */
+double
+randf(rmin, rmax)
+    double          rmin;
+    double          rmax;
+{   
+    unsigned long   acc;
+    static double   divisor = 0;
+
+    if (divisor < 1)
+        divisor = pow(2.0, 30);
+
+    rmax -= rmin;
+    acc = ((rand() & 0x7fff) << 15) | (rand() & 0x7fff);
+
+    return (rmax * (acc / divisor) + rmin);
+}
+#endif
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char **argv)
+{
+    
+    DBfile         *dbfile = NULL;
+    DBpointmesh    *pm = NULL;
+    DBmeshvar      *pv = NULL;
+    static char     meshname[] = {"pmesh"};
+    int		    i, driver=DB_PDB;
+    char	    filename[256], *file_ext=".pdb";
+    int             show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    file_ext = ".pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    file_ext = ".h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    /* Check 2D point meshes */
+    sprintf(filename, "point2d%s", file_ext);
+    printf("Creating file: '%s'...\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "point test file", driver);
+    assert(dbfile != NULL);
+
+    build_point(dbfile, meshname, 100, 2);
+    DBClose(dbfile);
+
+    printf("Opening file for reading.....\n");
+    dbfile = DBOpen(filename, driver, DB_READ);
+    assert(dbfile != NULL);
+    DBSetDir(dbfile, "/dir1");
+
+    pm = DBGetPointmesh(dbfile, meshname);
+    pv = DBGetPointvar(dbfile, "d");
+    DBClose(dbfile);
+    DBFreePointmesh(pm);
+    DBFreeMeshvar(pv);
+
+    /* Check 3D point meshes */
+    sprintf(filename, "point3d%s", file_ext);
+    printf("Creating file: '%s'...\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "point test file", driver);
+    assert(dbfile != NULL);
+
+    build_point(dbfile, meshname, 100, 3);
+    DBClose(dbfile);
+
+    printf("Opening file for reading.....\n");
+    dbfile = DBOpen(filename, DB_UNKNOWN, DB_READ);
+    assert(dbfile != NULL);
+    DBSetDir(dbfile, "/dir1");
+
+    pm = DBGetPointmesh(dbfile, meshname);
+    pv = DBGetPointvar(dbfile, "d");
+    DBClose(dbfile);
+    DBFreePointmesh(pm);
+    DBFreeMeshvar(pv);
+
+    CleanupDriverStuff();
+    return(0);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                  build_point
+ *
+ *  Purpose
+ *
+ *      Build point-mesh and point-vars and return the mesh ID.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 10:30:29 PDT 2000
+ *    Removed radius and theta, which were unused.
+ *
+ *    Mark C. Miller, Wed Sep 23 11:54:56 PDT 2009
+ *    Added logic to test long long global node numbers option.
+ *--------------------------------------------------------------------*/
+static void
+build_point(DBfile *dbfile, char *name, int N, int dims)
+{
+    float          *x = NULL, *y = NULL, *z = NULL;
+    float          *u = NULL, *v = NULL, *w = NULL;
+    float          *d = NULL, *t = NULL;
+    int            *itype = NULL;
+    long long      *litype = NULL;
+    int             i;
+    float          *coords[3], *vars[3];
+    DBoptlist      *optlist = NULL;
+    DBoptlist      *optlist1 = NULL;
+
+    int             one = 1;
+    int             cycle = 44;
+    float           time = 4.4;
+    double          dtime = 4.4;
+
+    x = ALLOC(float,N); assert_mem(x);
+    y = ALLOC(float,N); assert_mem(y);
+    z = ALLOC(float,N); assert_mem(y);
+    u = ALLOC(float,N); assert_mem(u);
+    v = ALLOC(float,N); assert_mem(v);
+    w = ALLOC(float,N); assert_mem(w);
+    d = ALLOC(float,N); assert_mem(d);
+    t = ALLOC(float,N); assert_mem(t);
+    itype = ALLOC(int,N); assert_mem(itype);
+    litype = ALLOC(long long,N); assert_mem(litype);
+
+    optlist = DBMakeOptlist(10);
+    optlist1 = DBMakeOptlist(10);
+
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_NODENUM, itype);
+    DBAddOption(optlist1, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist1, DBOPT_TIME, &time);
+    DBAddOption(optlist1, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist1, DBOPT_HIDE_FROM_GUI, &one);
+
+    DBMkDir(dbfile, "dir1");
+    DBMkDir(dbfile, "dir2");
+
+    /*
+     * Do some random data
+     */
+    DBSetDir(dbfile, "/dir1");
+    for (i = 0; i < N; ++i)
+    {
+        double          f;
+
+        f = i / (double)(N - 1);
+        x[i] = randf(-1.0,1.0);
+        y[i] = randf(-1.0,1.0);
+        z[i] = randf(-1.0,1.0);
+        if (dims == 2)
+            d[i] = sqrt(x[i]*x[i] + y[i]*y[i]);
+        else
+            d[i] = sqrt(x[i]*x[i] + y[i]*y[i] + z[i]*z[i]);
+        u[i] = x[i] / TwoPI;
+        v[i] = y[i] / TwoPI;
+        w[i] = w[i] / TwoPI;
+        t[i] = pow(10., 5. * f * f);
+        itype[i] = i;
+    }
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    DBPutPointmesh(dbfile, name, dims, coords, N, DB_FLOAT, optlist);
+
+    vars[0] = d;
+    DBPutPointvar(dbfile, "d", name, 1, vars, N, DB_FLOAT, optlist);
+
+    vars[0] = u;
+    DBPutPointvar(dbfile, "u", name, 1, vars, N, DB_FLOAT, optlist);
+
+    vars[0] = v;
+    DBPutPointvar(dbfile, "v", name, 1, vars, N, DB_FLOAT, optlist);
+
+    if(dims == 3)
+    {
+        vars[0] = w;
+        DBPutPointvar(dbfile, "w", name, 1, vars, N, DB_FLOAT, optlist);
+    }
+
+    vars[0] = (float *)itype;
+    DBPutPointvar(dbfile, "itype", name, 1, vars, N, DB_INT, optlist);
+    
+    vars[0] = t;
+    DBPutPointvar(dbfile, "t", name, 1, vars, N, DB_FLOAT, optlist1);
+
+    build_defvars(dbfile, dims);
+
+    /*
+     * Do something a little prettier
+     */
+    DBSetDir(dbfile, "/dir2");
+    for (i = 0; i < N; ++i)
+    {
+        double          f;
+        double          radius;
+        double          theta;
+
+        f = i / (double)(N - 1);
+        theta = TwoPI * f;
+        radius = theta;
+        x[i] = (float) radius * cos(theta);
+        y[i] = (float) radius * sin(theta);
+        z[i] = randf(-1.0,1.0);
+        if (dims == 2)
+            d[i] = sqrt(x[i]*x[i] + y[i]*y[i]);
+        else
+            d[i] = sqrt(x[i]*x[i] + y[i]*y[i] + z[i]*z[i]);
+        u[i] = x[i] / TwoPI;
+        v[i] = y[i] / TwoPI;
+        w[i] = w[i] / TwoPI;
+        t[i] = pow(10., 5. * f * f);
+        itype[i] = i;
+        litype[i] = ((long long)1<<35) + i;
+    }
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+   
+    DBClearOption(optlist, DBOPT_NODENUM);
+    DBAddOption(optlist, DBOPT_NODENUM, litype);
+    DBAddOption(optlist, DBOPT_LLONGNZNUM, &one);
+    DBPutPointmesh(dbfile, name, dims, coords, N, DB_FLOAT, optlist);
+
+    vars[0] = d;
+    DBPutPointvar(dbfile, "d", name, 1, vars, N, DB_FLOAT, optlist);
+
+    vars[0] = u;
+    DBPutPointvar(dbfile, "u", name, 1, vars, N, DB_FLOAT, optlist);
+
+    vars[0] = v;
+    DBPutPointvar(dbfile, "v", name, 1, vars, N, DB_FLOAT, optlist);
+
+    if(dims == 3)
+    {
+        vars[0] = w;
+        DBPutPointvar(dbfile, "w", name, 1, vars, N, DB_FLOAT, optlist);
+    }
+
+    vars[0] = (float *)itype;
+    DBPutPointvar(dbfile, "itype", name, 1, vars, N, DB_INT, optlist);
+    
+    vars[0] = t;
+    DBPutPointvar(dbfile, "t", name, 1, vars, N, DB_FLOAT, optlist);
+
+    build_defvars(dbfile, dims);
+
+    /*
+     * The defvar's have to be printed out in every directory.
+     */
+    DBSetDir(dbfile, "/");
+    build_defvars(dbfile, dims);
+
+    DBFreeOptlist(optlist);
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(d);
+    FREE(t);
+    FREE(itype);
+}
+
+static void
+build_defvars(DBfile *dbfile, int dims)
+{
+    int i;
+
+    if (dims == 2)
+    {
+        /*
+         * Put out the vector variables.
+         */
+         i = 44;
+         DBWrite (dbfile, "_meshtv_defvars",
+                  "vel vector {u,v};speed scalar sqrt(u*u+v*v)",
+                  &i, 1, DB_CHAR);
+    }
+    else
+    {
+        /*
+         * Put out the vector variables.
+         */
+        i = 50;
+        DBWrite (dbfile, "_meshtv_defvars",
+                 "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+                 &i, 1, DB_CHAR);
+    }
+}
diff --git a/tests/pointf77.f b/tests/pointf77.f
new file mode 100644
index 0000000..02362c1
--- /dev/null
+++ b/tests/pointf77.f
@@ -0,0 +1,165 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+c
+c   Program
+c
+c       testpoint
+c
+c   Purpose
+c
+c       Test program illustrating use of SILO from Fortran
+c       for writing point data.
+c       This particular program also uses SILO's "EZ" interface to
+c       write simple scalars and arrays with.
+c
+c   Programmer
+c
+c       Jeff Long, NSSD/B, 11/02/92
+c
+c   Notes
+c
+c       For more info on calling sequences, see the "SILO User's
+c       Manual".
+c
+c          ierr = dbcreate (filename, len_filename, filemode, target,
+c                           file_info_string, len_file_info_string,
+c                           filetype, DBID)
+c
+c          ierr = dbputpm (dbid, meshname, len_meshname, num_dims,
+c                          xcoords, ycoords, zcoords, npts, datatype,
+c                          option_list, MESHID)
+c
+c          ierr = dbputpv1 (dbid, varname, len_varname, meshname,
+c                           len_meshname,
+c                           var, npts, datatype, option_list, VARID)
+c
+c          ierr = ezwrite (silo_id, name, lname, data, len_data,
+c                          datatype, ierr)
+c
+c
+
+      program main
+
+c ..Don't forget to include this file!
+
+      include "silo.inc"
+
+      integer  dirid, dbid, meshid, varid, silo_id, optlistid
+      integer  varid1
+      real     x(5), y(5), z(5), foo(5)
+      real     d(5), ttime
+      integer  itype(5), tcycle
+      real     ftype(5)
+      double precision dttime
+
+c...Generate some data to write out.
+
+      do i = 1 , 5
+         x(i) = i
+         y(i) = i
+         z(i) = i
+         d(i) = 10 * i
+         itype(i) = i
+         ftype(i) = i
+         foo(i)   = i
+      enddo
+
+      npts = 5
+      lfoo = 5
+
+      ttime  = 0.123
+      tcycle = 123
+      dttime = 0.123
+c...Create the file (using the SILO interface)
+
+      ierr =  dbcreate ("pointf77.pdb", 12, DB_CLOBBER, DB_LOCAL,
+     .                 "file info goes here", 19, DB_PDB, dbid)
+      if (ierr .ne. 0) then
+         print *, 'dbcreate had error'
+      else
+         print *, 'created file pointf77.pdb'
+      endif
+
+c...Create an option list containing time and cyle info.
+
+      ierr = dbmkoptlist(3, optlistid)                   ! Create the option list
+      ierr = dbaddiopt  (optlistid, DBOPT_CYCLE, tcycle) ! Add integer opt
+      ierr = dbaddropt  (optlistid, DBOPT_TIME, ttime)   ! Add real opt
+      ierr = dbadddopt  (optlistid, DBOPT_DTIME, dttime)   ! Add double opt
+
+
+c...Write out the point mesh.
+
+      ierr = dbputpm (dbid, 'pmesh', 5, 2, x, y, z, npts, DB_FLOAT,
+     .                optlistid, meshid)
+
+
+c...Write out the point variables
+
+      ierr = dbputpv1 (dbid, 'd', 1, 'pmesh', 5, d, npts, DB_FLOAT,
+     .                 optlistid, varid)
+
+c     ierr = dbputpv1 (dbid, 'ftype', 5, 'pmesh', 5, ftype, npts, DB_FLOAT,
+c    .                 optlistid, varid1)
+
+
+
+
+      ierr = dbclose (dbid)
+      if (ierr .ne. 0) print *, 'dbclose had error'
+
+
+      stop
+      end
diff --git a/tests/polyzl.c b/tests/polyzl.c
new file mode 100644
index 0000000..c72088b
--- /dev/null
+++ b/tests/polyzl.c
@@ -0,0 +1,161 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo           */
+
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define NNODES 12
+#define NZONES 2
+#define NFACES 11
+
+

+/*-------------------------------------------------------------------------
+ * Function:        main
+ *
+ * Purpose:        Test writing a polyhedral zonelist
+ *
+ *                 Writes two hexes sharing a common face using a 
+ *                 polyhedral zonelist
+ *
+ * Return:        0
+ *
+ * Programmer:        Mark C. Miller, July 27, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    
+    int            i, driver=DB_PDB;
+    char          *filename="polyzl.pdb";
+    DBfile        *dbfile;
+
+    DBoptlist     *optlist;
+
+    char *xname = "xcoords";
+    char *yname = "ycoords";
+    char *zname = "zcoords";
+
+    float x[NNODES] = {0.0, 1.0, 2.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0};
+    float y[NNODES] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
+    float z[NNODES] = {0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0};
+
+    int nodecnt[NFACES] = {4,4,4,4,4,4,4,4,4,4,4};
+    int lnodelist = 4 * NFACES;
+    int nodelist[4*NFACES] = {0,1,7,6,    1,2,8,7,    1,0,3,4,
+                              2,1,4,5,    4,3,9,10,   5,4,10,11, 
+                              6,7,10,9,   7,8,11,10,  0,6,9,3,
+                              1,7,10,4,   2,5,11,8};
+
+    int facecnt[NZONES] = {6,6};
+    int lfacelist = 6 * NZONES;
+    int facelist[6*NZONES] = {0,2,4,6,8,-9,   1,3,5,7,9,10};
+
+    float *coords[3];
+    char *coordnames[3];
+    int show_all_errors = FALSE;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    coordnames[0] = xname;
+    coordnames[1] = yname;
+    coordnames[2] = zname;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "polyzl.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "polyzl.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_TOP, NULL);
+    DBForceSingle(1);
+
+    /*
+     * Create a file that contains a simple mesh of 2 hexes 
+     */
+    printf("Creating file: `%s'\n", filename);
+    dbfile = DBCreate(filename,0,DB_LOCAL,"Polyhedral Zonelist Test",driver);
+
+    optlist = DBMakeOptlist(3);
+    DBAddOption(optlist, DBOPT_PHZONELIST, "polyzl");
+
+    DBPutUcdmesh(dbfile, "ucdmesh", 3, coordnames, coords, NNODES, NZONES,
+        NULL, NULL, DB_FLOAT, optlist);
+
+    DBPutPHZonelist(dbfile, "polyzl",
+        NFACES, nodecnt, lnodelist, nodelist, NULL,
+        NZONES, facecnt, lfacelist, facelist, 
+        0, 0, NZONES-1, NULL);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return 0;
+
+}
diff --git a/tests/quad.c b/tests/quad.c
new file mode 100644
index 0000000..9eb1501
--- /dev/null
+++ b/tests/quad.c
@@ -0,0 +1,114 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include "silo.h"
+#include <std.c>
+
+extern int build_quad(DBfile *dbfile, char *name);
+
+int
+main (int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    int		  i, driver=DB_PDB;
+    static char	  *filename="quad.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "quad.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "quad.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+
+#if 1
+    dbfile = DBCreate(filename, 0, DB_LOCAL,
+                      "quad test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+#endif
+
+    DBMkDir (dbfile, "/dir1");
+    DBSetDir (dbfile, "/dir1");
+    (void)build_quad (dbfile, "quadmesh");
+
+    DBMkDir (dbfile, "/dir2");
+    DBSetDir (dbfile, "/dir2");
+    (void)build_quad (dbfile, "quadmesh");
+
+    
+#if 0
+    meshtypes[0] = DB_QUAD_RECT;
+    meshnames[0] = "quadmesh";
+    nmesh = 1;
+
+    mmid = DBPutMultimesh(dbfile, "mmesh", nmesh, meshnames,
+                          meshtypes, NULL);
+#endif
+
+    DBClose(dbfile);
+    CleanupDriverStuff();
+    exit(0);
+}
diff --git a/tests/quadf77.f b/tests/quadf77.f
new file mode 100644
index 0000000..b775f96
--- /dev/null
+++ b/tests/quadf77.f
@@ -0,0 +1,257 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+c...............................................................................
+c   Program
+c
+c       testquadf77.f
+c
+c   Purpose
+c
+c       Test program illustrating use of SILO from Fortran for
+c       writing quad mesh and variable data.
+c
+c   Programmer
+c
+c       Jeff Long, NSSD/B, 11/24/92
+c
+c   Notes
+c
+c       For more info on calling sequences, see the "SILO User's Manual".
+c...............................................................................
+
+
+      program main
+
+      implicit none
+      include "silo.inc"
+
+      integer  buildquad
+      integer  dbid, meshid, err
+      integer  iarr(20)
+      real*8   darr(20)
+      character*8 cname
+
+c...Create PDB flavor file.
+      err = dbcreate("quadf77.pdb", 11, DB_CLOBBER, DB_LOCAL,
+     .               "file info", 9, DB_PDB, dbid)
+
+      meshid = buildquad (dbid, "quad", 4)
+      meshid = buildquad (dbid, "quad2", 5)
+
+      call testdb (dbid)
+
+      err = dbclose(dbid)
+
+      print *,'Created file: quadf77.pdb'
+
+
+
+
+c...Read PDB stuff.
+      err = dbopen ("quadf77.pdb", 11, DB_PDB, DB_READ, dbid)
+
+      err = dbrdvar (dbid, "hcom2", 5, iarr)
+      if (err .ne. 0) print *, 'Error reading hcom2'
+
+      err = dbrdvar (dbid, "hcom3", 5, darr)
+      if (err .ne. 0) print *, 'Error reading hcom3'
+
+      err = dbrdvar (dbid, "namebase", 8, cname)
+      if (err .ne. 0) print *, 'Error reading namebase'
+
+c     err = dbrdvar (dbid, "junk", 4, cname)
+c     if (err .ne. 0) print *, 'Error reading junk'
+
+
+
+      stop
+      end
+
+      integer function buildquad (dbid, name, lname)
+c----------------------------------------------------------------------
+c  Routine						      buildquad
+c
+c  Purpose
+c
+c	Build quad-mesh, quad-var and return the mesh ID.
+c
+c  Modifications:
+c    Kathleen Bonnell, Wed Sep 2 16:12:15 PDT 20099
+c    Changed 'character*8 name' to 'character*(*) name' to remove 
+c    'Character length argument mismatch' compiler error.
+c
+c----------------------------------------------------------------------
+
+      integer  dbid, lname
+      character*(*) name
+
+      parameter  (NX     = 4)
+      parameter  (NY     = 3)
+      parameter  (NZONES = 6)
+      parameter  (NNODES = 12)
+
+      include 'silo.inc'
+
+      integer    i, meshid, varid
+      integer    tcycle, mixlen, optlistid
+      integer    dims(3), ndims
+      real       x(NX), y(NY), d(NZONES)
+      real       ttime
+      double precision dttime
+
+
+c...Initializations.
+
+      data  x/1.,2.,3.,4./
+      data  y/1.,2.,3./
+      data  d/1.,2.,3.,4.,5.,6./
+
+      ttime     = 2.345
+      dttime    = 2.345
+      tcycle    = 200
+
+
+
+c...Create an option list containing time and cycle information. Note
+c...that the function names are different depending on the data type
+c...of the option value. The variable 'optlistid' is used as a handle
+c...to this option list in future function invocations.
+
+      ierr = dbmkoptlist (5, optlistid)
+      ierr = dbaddropt   (optlistid, DBOPT_TIME, ttime)    ! real
+      ierr = dbaddiopt   (optlistid, DBOPT_CYCLE, tcycle)  ! integer
+      ierr = dbadddopt   (optlistid, DBOPT_DTIME, dttime)  ! double
+
+c...The following option would change the major order for multi-
+c...dimensional arrays from row-major (default) to column-major.
+c...If you have arrays defined like:  real  x(300,200) you might
+c...need this.
+
+c     ierr = dbaddiopt   (optlistid, DBOPT_MAJORORDER, DB_COLMAJOR)
+
+
+c...Write simple 2-D quad mesh. Dims defines number of NODES. The
+c...parameter 'meshid' is returned and should be used on future
+c...writes of quad variables.
+
+      ndims     = 2
+      dims(1)   = NX
+      dims(2)   = NY
+
+
+      err = dbputqm(dbid, name, lname,
+     .              "X", 1, "Y", 1, DB_F77NULLSTRING, 0,
+     .              x, y, -1, dims, ndims, DB_FLOAT, DB_COLLINEAR,
+     .              optlistid, meshid)
+
+
+c...Write quad variable. Dims defines number of ZONES (since zone-centered).
+c...Possible values for centering are: DB_ZONECENT, DB_NODECENT, DB_NOTCENT.
+
+      ndims   = 2
+      dims(1) = NX - 1
+      dims(2) = NY - 1
+
+c...Hack to make sure we don't wind up writing same variable name twice to
+c...two different meshes
+      if (lname .eq. 4) err = dbputqv1 (dbid, "d", 1, name,
+     .                lname, d, dims, ndims,
+     .                DB_F77NULL, 0, DB_FLOAT, DB_ZONECENT,
+     .                optlistid, varid)
+      if (lname .eq. 5) err = dbputqv1 (dbid, "e", 1, name,
+     .                lname, d, dims, ndims,
+     .                DB_F77NULL, 0, DB_FLOAT, DB_ZONECENT,
+     .                optlistid, varid)
+
+      buildquad = meshid
+
+      return
+      end
+
+c************************************************************
+c************************************************************
+      subroutine testdb (dbid)
+      integer dbid
+
+      include 'silo.inc'
+
+      character*8 namebase
+      integer  ilen, ihfirst(10)
+      real*8   rhfirst(15)
+
+      do i = 1 , 10
+         ihfirst(i) = i
+      enddo
+      do i = 1 , 15
+         rhfirst(i) = dble(i)
+      enddo
+      namebase = 'abcdefgh'
+      ilen     = 10
+
+
+      ierr = dbwrite ( dbid, "namebase", 8, namebase, 8, 1, DB_CHAR )
+      ierr = dbwrite ( dbid, "ilen",     4, ilen,     1, 1, DB_INT )
+
+c                       write integer hydro common to dump
+      ialen = 10
+      ierr = dbwrite ( dbid, "hcom2", 5, ihfirst, ialen, 1, DB_INT )
+
+c                       write real hydro common to dump
+      ialen = 15
+      ierr = dbwrite ( dbid, "hcom3", 5, rhfirst, ialen, 1,DB_DOUBLE)
+
+
+      return
+      end
diff --git a/tests/readstuff.c b/tests/readstuff.c
new file mode 100644
index 0000000..7a0b65b
--- /dev/null
+++ b/tests/readstuff.c
@@ -0,0 +1,126 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo           */
+#include "std.c"
+
+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose: Test various read operations.	
+ *
+ * Return:	0
+ *
+ * Programmer:Mark C. Miller, Thu Jul 15 08:23:56 PDT 2010
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    int            driver = DB_PDB, driverType = DB_PDB;
+    int            i, err = 0;
+    DBfile        *dbfile;
+    int            show_all_errors = FALSE;
+    char           filename[256];
+    char          *obj_names[13];
+    int            ordering[13];
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            driverType = DB_PDB;
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            driverType = DB_HDF5;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_TOP, NULL);
+    DBForceSingle(1);
+
+    sprintf(filename, "multi_rect2d.%s", driverType==DB_PDB?"pdb":"h5");
+    dbfile = DBOpen(filename, DB_UNKNOWN, DB_READ);
+    DBSetDir(dbfile, "block7");
+
+    obj_names[0] = "cycle";
+    obj_names[1] = "d";
+    obj_names[2] = "../_fileinfo";
+    obj_names[3] = "otherfile:block7/u";
+    obj_names[4] = "v";
+    obj_names[5] = "u";
+    obj_names[6] = "/.silo/#000005";
+    obj_names[7] = "../block7/d";
+    obj_names[8] = "../block9/d";
+    obj_names[9] = "../block4/d";
+    obj_names[10] = "../mesh1_hidden";
+    obj_names[11] = "../mesh1";
+    obj_names[12] = "../block11/u";
+
+    DBSortObjectsByOffset(dbfile, 13, obj_names, ordering);
+    printf("UNsorted objects...\n");
+    for (i = 0; i < 13; i++)
+        printf("\t\"%s\"\n", obj_names[i]);
+    printf("Sorted objects...\n");
+    for (i = 0; i < 13; i++)
+        printf("\t\"%s\"\n", obj_names[ordering[i]]);
+
+    DBClose(dbfile);
+
+    return err;
+}
diff --git a/tests/rocket.cpp b/tests/rocket.cpp
new file mode 100644
index 0000000..1b4e3a9
--- /dev/null
+++ b/tests/rocket.cpp
@@ -0,0 +1,1750 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+#ifdef __sgi    /* IRIX C++ bug */
+#include <math.h>
+#else
+#include <cmath>
+#endif
+#include <cstdio>
+#include <cstdlib>
+#include <map>
+#include <vector>
+#include <string>
+#include <cstring>
+#include <iostream>
+
+#include <silo.h>
+#include <std.c>
+
+#ifdef HAVE_IMESH
+#include <iBase.h>
+#include <iMesh.h>
+#endif
+
+using std::map;
+using std::vector;
+using std::string;
+using std::cerr;
+using std::endl;
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+//
+// The following static arrays of data describe a single, 2D, 'layer'
+// of the rocket body. They are used in the build_body() functions to
+// build several layers of the 3D rocket body.
+//
+static const float cX = (float) sqrt(2.0);
+
+                          //  0     1     2     3     4     5     6     7     8
+static float layerXVals[] = {0.0, -1.0, -1.0,  0.0,  1.0,  1.0,  1.0,  0.0, -1.0,
+                          //  9    10    11    12    13    14    15    16
+                            -2.0, -cX,   0.0,  cX,   2.0,  cX,   0.0, -cX};
+
+                          //  0     1     2     3     4     5     6     7     8
+static float layerYVals[] = {0.0,  0.0,  1.0,  1.0,  1.0,  0.0, -1.0, -1.0, -1.0,
+                          //  9    10    11    12    13    14    15    16
+                             0.0,   cX,  2.0,  cX,   0.0, -cX,  -2.0, -cX};
+
+const static int layerNNodes = sizeof(layerXVals) / sizeof(layerXVals[0]);
+
+                             //  0             1             2             3 
+static int layerNodelist[] = {0,3,2,1,      0,5,4,3,      7,6,5,0,      8,7,0,1,
+                             //  4             5             6             7 
+                              1,2,10,9,     2,3,11,10,    3,4,12,11,    4,5,13,12,
+                             //  8             9             10            11 
+                              5,6,14,13,    6,7,15,14,    7,8,16,15,    8,1,9,16};
+
+const static int layerNZones = sizeof(layerNodelist) / (4*sizeof(layerNodelist[0]));
+
+//
+// Material names and numbers
+// 
+static int matnos[] = {1,2,3,4,5};
+static char *matNames[] = {"High Explosive", "Solid Propellant",
+                           "Liquid Propellant", "Electronics", "Body"};
+static map<string, int> matMap;
+
+// global zone ids for which lighting time is a variable
+int ltZones[] = {0,1,2,3};
+
+// global node ids of hold-down points
+static int holdDownNodes[] = {0,2,4,6,8,10,12,14,16};
+
+// boundary conditions on hold-down points (zero accel)
+static float xddHoldDownNodes[] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
+static float yddHoldDownNodes[] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
+static float zddHoldDownNodes[] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
+
+// global node ids of high dynamic pressure points
+static int maxQNodes[] = {43,44,45,46,47,48,49,50,145,146,147,148,149,150,151,152,
+                          162,167,168,169,170};
+
+// global node ids of edge endpts for umbilical hookups
+static int umbilicalEdges[] = {66,83, 83,100, 100,117, 117,134};
+static int umbilicalEdgesSizes[] = {2};
+static int umbilicalEdgesShapetypes[] = {DB_ZONETYPE_BEAM};
+static int umbilicalEdgesCounts[] = {4};
+
+// boundary condition on umbilical edges (only z-accel allowed)
+static float xddUmbilicalEdges[] = {0.0,0.0,0.0,0.0};
+static float yddUmbilicalEdges[] = {0.0,0.0,0.0,0.0};
+
+// global node ids of faces in contact with launch tube
+static int launchContactFacesTemplate[4] = {10,27,28,11};
+static int launchContactFaces[32*4];
+static int launchContactFacesSizes[] = {4};
+static int launchContactFacesShapetypes[] = {DB_ZONETYPE_QUAD};
+static int launchContactFacesCounts[] = {32};
+
+// global node ids of control surfaces
+static int controlSurfaceFaces[] = {
+        9,26,167,165,   27,10,163,167,  146,145,154,155,
+        11,28,168,164,  29,12,164,168,  148,147,156,157,
+        13,30,169,165,  150,149,158,159,  31,14,165,169,
+        15,32,170,166,  33,15,166,170,  152,151,160,161,
+
+        26,43,167,   43,44,167,   44,27,167,   155,154,162,
+        28,45,168,   45,46,168,   46,29,168,   157,156,162,
+        30,47,169,   47,48,169,   48,31,169,   159,158,162,
+        32,49,170,   49,50,170,   50,33,170,   161,160,162};
+static int controlSurfaceSizes[] = {4,3};
+static int controlSurfaceShapetypes[] = {DB_ZONETYPE_QUAD, DB_ZONETYPE_TRIANGLE};
+static int controlSurfaceCounts[] = {12,16};
+
+//
+// Bit fields used in enumerating different subsets in the
+// rocket 'assembly'
+//
+#define BOOSTER  0x00000001
+#define NOSE     0x00000002
+#define STAGE1   0x00000004
+#define STAGE2   0x00000008
+#define MIRVS    0x00000010
+#define BUS      0x00000020
+#define STAGE3   0x00000040
+#define FINS     0x00000080
+#define MIRV(I) (0x00000100 << I)  // 0 <= I <= 3
+#define FIN(I)  (0x00001000 << I)  // 0 <= I <= 3
+
+static int assnos[] = {BOOSTER, NOSE, STAGE1, STAGE2, MIRVS, BUS, STAGE3, FINS,
+                       MIRV(0), MIRV(1), MIRV(2), MIRV(3),
+                       FIN(0), FIN(1), FIN(2), FIN(3)};
+static char *assNames[] = {"booster","nose","stage_1","stage_2","mirvs","bus","stage_3","fins",
+                         "mirv_1","mirv_2","mirv_3","mirv_4",
+                         "fin_1","fin_2","fin_3","fin_4"};
+
+typedef struct _field_t {
+    string name;
+    int type;
+    int cent;
+    int ncomps;
+    vector<string> compnames;
+    vector<void*> data;
+} field_t;
+
+//
+// Global variables used in many of the methods. '_g' in the
+// name indicates a global variable.
+//
+static vector<float> xvals_g, yvals_g, zvals_g;
+static vector<int> nodelist_g;
+static vector<int> matlist_g;
+static vector<int> procid_g;
+static vector<float> nodalv_g;
+static vector<int> bitmap_g;
+static vector<field_t> fields_g;
+
+static int nzones_g =  9 * 12 + 4 + 4 + 4;
+static int zshapetype_g[] = {DB_ZONETYPE_HEX,       // main body + inner nose' first layer
+                             DB_ZONETYPE_PRISM,     // outer nose first layer
+                             DB_ZONETYPE_PYRAMID,   // upper layer of nose,
+                             DB_ZONETYPE_PRISM,     // lower parts of each fin
+                             DB_ZONETYPE_PYRAMID};  // upper parts of each fin
+static int zshapesize_g[] = {8, 6, 5, 6, 5};
+static int zshapecnt_g[] = {8*12+4, 8, 4, 4, 4};
+
+static DBmrgtree *topTree;
+
+#define SET_CLASS_DOMAINS 1
+#define SET_CLASS_MATERIALS 2
+#define SET_CLASS_ASSEMBLY 3
+#define SET_CLASS_NODESETS 4
+#define SET_CLASS_EDGESETS 5
+#define SET_CLASS_FACESETS 6
+
+#ifdef HAVE_IMESH
+#define CheckITAPSError2(IMI, ERR, FN, THELINE, THEFILE)                                        \
+    if (ERR != 0)                                                                               \
+    {                                                                                           \
+        char msg[1024];                                                                         \
+        char desc[256];                                                                         \
+        for (int i = 0; i < sizeof(desc); i++) desc[i] = '\0';                                  \
+        int dummyError = ERR;                                                                   \
+        iMesh_getDescription(IMI, desc, &dummyError, sizeof(desc));                             \
+        snprintf(msg, sizeof(msg), "Encountered ITAPS error (%d) after call to \"%s\""          \
+            " at line %d in file \"%s\"\nThe description is...\n"                               \
+            "    \"%s\"\n", ERR, #FN, THELINE, THEFILE, desc);                                  \
+        cerr << msg << endl;                                                                    \
+    }                                                                                           \
+    else                                                                                        \
+    {                                                                                           \
+        cerr << "Made it past call to \"" << #FN << "\" at line "                               \
+             << THELINE << " in file " << THEFILE << endl;                                      \
+    }
+
+#define CheckITAPSError(FN) CheckITAPSError2(mesh->theMesh, mesh->error, FN, __LINE__, __FILE__)
+#endif
+
+typedef struct siloimesh_struct_t {
+    DBfile *dbfile;
+#ifdef HAVE_IMESH
+    iMesh_Instance theMesh;
+    iBase_EntitySetHandle rootSet;
+    iBase_EntitySetHandle cwdSet;
+    iBase_EntityHandle *verts;
+    iBase_EntityHandle *zones;
+    int error;
+#endif
+} siloimesh_struct_t;
+typedef siloimesh_struct_t* siloimesh_t;
+
+//
+// Implement the part of the Silo API we need here but for both Silo
+// and iMesh.
+//
+static void
+SetDir(siloimesh_t mesh, const char *dirname)
+{
+    // Check if dir already exists
+    if (DBInqVarExists(mesh->dbfile, dirname) == 0)
+        DBMkDir(mesh->dbfile, dirname);
+
+    // Set the dir
+    DBSetDir(mesh->dbfile, dirname);
+
+#if !defined(_WIN32)
+#warning NEED TO IMPLEMENT .. SETTING
+#endif
+
+#ifdef HAVE_IMESH
+    // Obtain the SET_NAME tag handle (create if doesn't already exist)
+    iBase_TagHandle snTag, scTag; 
+    iMesh_getTagHandle(mesh->theMesh, "SET_NAME", &snTag, &(mesh->error), 9);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_NAME", 64, iBase_BYTES,
+            &snTag, &(mesh->error), 9);
+    iMesh_getTagHandle(mesh->theMesh, "SET_CLASS", &scTag, &(mesh->error), 10);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_CLASS", 1, iBase_INTEGER,
+            &scTag, &(mesh->error), 10);
+
+    // Check if ent set already exists
+    bool alreadyHaveSet = false;
+    iBase_EntitySetHandle theSet;
+    iBase_EntitySetHandle *subsets;
+    int subsets_alloc = 0, subsets_size = 0;
+    iMesh_getEntSets(mesh->theMesh, mesh->cwdSet, 1,
+        &subsets, &subsets_alloc, &subsets_size, &(mesh->error));
+    CheckITAPSError(getEntSets);
+    if (mesh->error == iBase_SUCCESS && subsets_size>0)
+    {
+        // Loop over all ent sets looking for one whose
+        // SET_NAME tag value is same as dirname
+        for (int i = 0; i < subsets_size; i++)
+        {
+            char *sn;
+            int sn_alloc = 0, sn_size = 0;
+            iMesh_getEntSetData(mesh->theMesh, subsets[i], snTag,
+                &sn, &sn_alloc, &sn_size, &(mesh->error));
+            CheckITAPSError(getEntSetData);
+            if (mesh->error == iBase_SUCCESS &&
+                !strncmp(sn, dirname, sn_size))
+            {
+                alreadyHaveSet = true;
+                theSet = subsets[i];
+                break;
+            }
+        }
+    }
+
+    // If set didn't exist, create it and set its SET_NAME tag 
+    if (!alreadyHaveSet)
+    {
+        int setClass = SET_CLASS_DOMAINS;
+        char tmp[64];
+        memset(tmp, '\0', sizeof(tmp));
+        strcpy(tmp, dirname);
+        iMesh_createEntSet(mesh->theMesh, 0, &theSet, &(mesh->error));
+        CheckITAPSError(createEntSet);
+        iMesh_setEntSetData(mesh->theMesh, theSet, snTag,
+            tmp, sizeof(tmp), &(mesh->error));
+        CheckITAPSError(setEntSetData);
+        iMesh_setEntSetIntData(mesh->theMesh, theSet, scTag,
+            setClass, &(mesh->error));
+        CheckITAPSError(createEntSet);
+    }
+
+    // Set the cwd set
+    mesh->cwdSet = theSet;
+#endif
+}
+
+static void
+PutMesh(siloimesh_t mesh, const char *name, int ndims,
+             char *coordnames[], float **coords, int nnodes,
+             int nzones, const char *zonel_name, const char *facel_name,
+             int datatype, DBoptlist *optlist)
+{
+    DBPutUcdmesh(mesh->dbfile, name, ndims, coordnames, coords, nnodes, nzones,
+        zonel_name, facel_name, datatype, optlist);
+
+#ifdef HAVE_IMESH
+    // Convert coordinate array to an interleaved array that iMesh
+    // can understand. Note iBase_INTERLEAVED is probably more
+    // portable than iBase_BLOCKED.
+    double *imcoords = new double[nnodes*3];
+    for (int k = 0; k < nnodes; k++)
+    {
+        imcoords[3*k+0] = coords[0][k];
+        imcoords[3*k+1] = coords[1][k];
+        imcoords[3*k+2] = coords[2][k];
+    }
+    iBase_EntityHandle *vertHdls = new iBase_EntityHandle[nnodes];
+    int vertHdls_alloc = nnodes, vertHdls_size = 0;
+
+    // Create vertex entities. Note, don't really know in which entity set
+    // these wind up getting created. I assume its the root set.
+    iMesh_createVtxArr(mesh->theMesh, nnodes, iBase_INTERLEAVED, imcoords, nnodes*3,
+        &vertHdls, &vertHdls_alloc, &vertHdls_size, &(mesh->error));
+    CheckITAPSError(createVtxArr);
+    delete [] imcoords;
+
+#if 0
+    // Stick these vertex entities in the cwd set 
+    iMesh_addEntArrToSet(mesh->theMesh, vertHdls, nnodes, mesh->cwdSet, &(mesh->error));
+    CheckITAPSError(addEntArrToSet);
+
+    // Remove these entites from the root set
+    // Apparently, when the entities are first created, they do not exist in
+    // any set in the mesh object. What would happen if you save then? Note
+    // that when I save the mesh, even though
+    iMesh_rmvEntArrFromSet(mesh->theMesh, vertHdls, nnodes, mesh->rootSet, &(mesh->error));
+    CheckITAPSError(rmvEntArrFromSet);
+#endif
+    mesh->verts = vertHdls; // Hold on to these for later 
+#endif
+}
+
+static void
+PutZonelist(siloimesh_t mesh, const char *name, int nzones, int ndims,
+               int *nodelist, int lnodelist, int origin, int lo_offset,
+               int hi_offset, int *shapetype, int *shapesize, int *shapecnt,
+               int nshapes, DBoptlist *optlist)
+{
+    if (name)
+        DBPutZonelist2(mesh->dbfile, name, nzones, ndims, nodelist, lnodelist, origin,
+            lo_offset, hi_offset, shapetype, shapesize, shapecnt, nshapes, optlist);
+
+#ifdef HAVE_IMESH
+    int i, nlidx = 0;
+    int zncnt = 0;
+    iBase_EntityHandle *vertHdls = mesh->verts;
+    iBase_EntityHandle *zoneHdls = new iBase_EntityHandle[nzones];
+    for (i = 0; i < nshapes; i++)
+    {
+        int segnl = shapesize[i] * shapecnt[i];
+        iBase_EntityHandle *imvertlist = new iBase_EntityHandle[segnl];
+        int *status = new int[segnl];
+        int status_alloc = segnl, status_size = 0;
+
+        int ent_topo;
+        switch (shapetype[i])
+        {
+            case DB_ZONETYPE_BEAM: ent_topo = iMesh_LINE_SEGMENT; break;
+            case DB_ZONETYPE_POLYGON: ent_topo = iMesh_POLYGON; break;
+            case DB_ZONETYPE_TRIANGLE: ent_topo = iMesh_TRIANGLE; break;
+            case DB_ZONETYPE_QUAD: ent_topo = iMesh_QUADRILATERAL; break;
+            case DB_ZONETYPE_POLYHEDRON: ent_topo = iMesh_POLYHEDRON; break;
+            case DB_ZONETYPE_TET: ent_topo = iMesh_TETRAHEDRON; break;
+            case DB_ZONETYPE_PYRAMID: ent_topo = iMesh_PYRAMID; break;
+            case DB_ZONETYPE_PRISM: ent_topo = iMesh_PRISM; break;
+            case DB_ZONETYPE_HEX: ent_topo = iMesh_HEXAHEDRON; break;
+        }
+
+        int segnlidx = 0;
+        for (int j = 0; j < shapecnt[i]; j++)
+            for (int k = 0; k < shapesize[i]; k++)
+                imvertlist[segnlidx++] = vertHdls[nodelist[nlidx++]];
+
+        iBase_EntityHandle *pzoneHdls = &zoneHdls[zncnt];
+        int zoneHdls_alloc = shapecnt[i], zoneHdls_size = 0;
+        iMesh_createEntArr(mesh->theMesh, ent_topo, imvertlist, segnl, 
+            &pzoneHdls, &zoneHdls_alloc, &zoneHdls_size,
+            &status, &status_alloc, &status_size,
+            &(mesh->error));
+        CheckITAPSError(createEntArr);
+
+        delete [] imvertlist;
+        delete [] status;
+        zncnt += shapecnt[i];
+    }
+
+    mesh->zones = zoneHdls;
+#endif
+}
+
+static void
+PutMaterial(siloimesh_t mesh, const char *name, const char *meshname, int nmat,
+              int matnos[], int matlist[], int dims[], int ndims,
+              int mix_next[], int mix_mat[], int mix_zone[], DB_DTPTR1 mix_vf,
+              int mixlen, int datatype, DBoptlist *optlist, int set_class)
+{
+    if (name)
+        DBPutMaterial(mesh->dbfile, name, meshname, nmat, matnos, matlist, dims, ndims,
+            mix_next, mix_mat, mix_zone, mix_vf, mixlen, datatype, optlist);
+
+#ifdef HAVE_IMESH
+    // Obtain the SET_NAME tag handle
+    iBase_TagHandle snTag, scTag; 
+    iMesh_getTagHandle(mesh->theMesh, "SET_NAME", &snTag, &(mesh->error), 9);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_NAME", 64, iBase_BYTES,
+            &snTag, &(mesh->error), 9);
+    iMesh_getTagHandle(mesh->theMesh, "SET_CLASS", &scTag, &(mesh->error), 10);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_CLASS", 1, iBase_INTEGER,
+            &scTag, &(mesh->error), 10);
+    
+    int lmatlist = 1;
+    for (int i = 0; i < ndims; i++)
+        lmatlist *= dims[i];
+
+    for (int m = 0; m < nmat; m++)
+    {
+        vector<iBase_EntityHandle> matZones;
+        for (int i = 0; i < lmatlist; i++)
+            if (matlist[i] == matnos[m]) matZones.push_back(mesh->zones[i]); 
+
+        if (matZones.size() == 0)
+            continue;
+
+        iBase_EntitySetHandle matSet;
+        iMesh_createEntSet(mesh->theMesh, 0, &matSet, &(mesh->error));
+        CheckITAPSError(createEntSet);
+        iMesh_addEntArrToSet(mesh->theMesh, &matZones[0], matZones.size(), matSet, &(mesh->error));
+        CheckITAPSError(addEntArrToSet);
+
+        void *p = DBGetOption(optlist, DBOPT_MATNAMES);
+        if (p)
+        {
+            char **matnames = (char **) p;
+            char tmp[64];
+            memset(tmp, '\0', sizeof(tmp));
+            strcpy(tmp, matnames[m]);
+            iMesh_setEntSetData(mesh->theMesh, matSet, snTag,
+                tmp, sizeof(tmp), &(mesh->error));
+            CheckITAPSError(setEntSetData);
+        }
+        iMesh_setEntSetIntData(mesh->theMesh, matSet, scTag,
+            set_class, &(mesh->error));
+        CheckITAPSError(setEntSetData);
+    }
+#endif
+}
+
+#define CONV_LOOP(dtype)                        \
+{                                               \
+    dtype **tmpvars = (dtype **) vars;          \
+    for (int i = 0; i < nels; i++)              \
+    {                                           \
+        for (int j = 0; j < nvars; j++)         \
+        {                                       \
+            tmpvals[i*nvars+j] = tmpvars[j][i]; \
+        }                                       \
+    }                                           \
+    break;					\
+}
+
+template <typename T>
+static void ConvertAndInterleave(DB_DTPTR2 vars, int nvars, int nels, int dt, T* tmpvals)
+{
+    switch (dt)
+    {
+        case DB_FLOAT: CONV_LOOP(float);
+        case DB_DOUBLE: CONV_LOOP(double);
+        case DB_INT: CONV_LOOP(int);
+        case DB_SHORT: CONV_LOOP(short);
+        case DB_LONG: CONV_LOOP(long);
+        case DB_LONG_LONG: CONV_LOOP(long long);
+        case DB_CHAR: CONV_LOOP(char);
+    }
+}
+
+static void
+PutVar(siloimesh_t mesh, const char *vname, const char *mname, int nvars,
+            char *varnames[], DB_DTPTR2 vars, int nels, DB_DTPTR2 mixvars,
+            int mixlen, int datatype, int centering, DBoptlist *optlist)
+{
+    DBPutUcdvar(mesh->dbfile, vname, mname, nvars, varnames, vars, nels, mixvars,
+        mixlen, datatype, centering, optlist);
+
+#if HAVE_IMESH
+    void *p = DBGetOption(optlist, DBOPT_MATNAMES);
+    int nregs = 0;
+    if (p)
+    {
+        char **reg_names = (char **) p;
+        while (reg_names[nregs]) nregs++;
+    }
+
+    iBase_EntityHandle *entHdls;
+    int nEnts;
+    if (centering == DB_NODECENT)
+    {
+        entHdls = mesh->verts;
+        iMesh_getNumOfType(mesh->theMesh, mesh->rootSet, iBase_VERTEX, &nEnts, &(mesh->error));
+        CheckITAPSError(getNumOfType);
+    }
+    else
+    {
+        entHdls = mesh->zones;
+        iMesh_getNumOfType(mesh->theMesh, mesh->rootSet, iBase_REGION, &nEnts, &(mesh->error));
+        CheckITAPSError(getNumOfType);
+    }
+    assert(p || nEnts == nels);
+
+    iBase_TagHandle theTag;
+    if (datatype == DB_FLOAT || datatype == DB_DOUBLE)
+    {
+        iMesh_createTag(mesh->theMesh, vname, nvars, iBase_DOUBLE,
+            &theTag, &(mesh->error), strlen(vname)+1);
+        CheckITAPSError(createTag);
+
+        double *tmpvals = new double[nvars*nels];
+        ConvertAndInterleave(vars, nvars, nels, datatype, tmpvals);
+        iMesh_setDblArrData(mesh->theMesh, entHdls, nEnts, theTag, tmpvals, nvars*nels, &(mesh->error));
+        CheckITAPSError(setDblArrData);
+        delete [] tmpvals;
+    }
+    else if (datatype == DB_SHORT || datatype == DB_INT ||
+             datatype == DB_LONG || datatype == DB_LONG_LONG)
+    {
+        iMesh_createTag(mesh->theMesh, vname, nvars, iBase_INTEGER,
+            &theTag, &(mesh->error), strlen(vname)+1);
+        CheckITAPSError(createTag);
+
+        int *tmpvals = new int[nvars*nels];
+        ConvertAndInterleave(vars, nvars, nels, datatype, tmpvals);
+        iMesh_setIntArrData(mesh->theMesh, entHdls, nEnts, theTag, tmpvals, nvars*nels, &(mesh->error));
+        CheckITAPSError(setIntArrData);
+        delete [] tmpvals;
+    }
+    else
+    {
+        iMesh_createTag(mesh->theMesh, vname, nvars, iBase_BYTES,
+            &theTag, &(mesh->error), strlen(vname)+1);
+        CheckITAPSError(createTag);
+
+        char *tmpvals = new char[nvars*nels];
+        ConvertAndInterleave(vars, nvars, nels, datatype, tmpvals);
+        iMesh_setArrData(mesh->theMesh, entHdls, nEnts, theTag, tmpvals, nvars*nels, &(mesh->error));
+        CheckITAPSError(setArrData);
+        delete [] tmpvals;
+    }
+
+
+#endif
+}
+
+
+//
+// Given a single, monolithic whole mesh where each zone
+// is assigned to a given processor in the 'procid' array,
+// write a piece of it for the processor, 'proc', specified
+// here to the specified dir within the Silo file.
+//
+// colist is either a coloring of the mesh (and then color
+// indicates which color to build here) or a list of zones
+// to build here. A color value less than zero indicates the
+// latter.
+//
+void write_a_block(const vector<int> &colist, int color, siloimesh_t mesh,
+    const char *const dirname)
+{
+    int j, k;
+
+    vector<int> tmpcnt;
+    vector<int> tmpsize;
+    vector<int> tmptype;
+
+    //
+    // Iterate over zones and for each zone in the output, over its nodes.
+    // At completion of this loop, the g2lnode map will, given a global 
+    // node that is in the output mesh, return its local node id in that
+    // mesh. The nodelist_l will be the nodelist for the zones but in
+    // terms of global node numbers
+    //
+    //
+    map<int, int> g2lnode;
+    vector<int> zonelist_l;
+    vector<int> nodelist_l;
+    int gzoneid = 0;
+    int lzoneid = 0;
+    int gnodeidx = 0;
+    int lnodeidx = 0;
+    for (j = 0; j < sizeof(zshapesize_g)/sizeof(zshapesize_g[0]); j++)
+    {
+        int shapeCnt = 0;
+        for (int k = 0; k < zshapecnt_g[j]; k++)
+        {
+
+            //
+            // Decide if we should include this zone
+            //
+            bool useThisZone = false;
+            if (color < 0)
+            {
+                for (unsigned int jj = 0; jj < colist.size(); jj++)
+                {
+                    if (gzoneid == colist[jj])
+                    {
+                        useThisZone = true;
+                        break;
+                    }
+                }
+            }
+            else
+            {
+                if (colist[gzoneid] == color)
+                    useThisZone = true;
+            }
+
+            //
+            // If we use this zone, then get its list of nodes
+            //
+            if (useThisZone)
+            {
+                zonelist_l.push_back(gzoneid);
+                if (shapeCnt == 0)
+                {
+                    tmpsize.push_back(zshapesize_g[j]);
+                    tmptype.push_back(zshapetype_g[j]);
+                }
+                for (int kk = 0; kk < zshapesize_g[j]; kk++)
+                {
+                    int gnodeid = nodelist_g[gnodeidx++];
+                    if (g2lnode.find(gnodeid) == g2lnode.end())
+                        g2lnode[gnodeid] = lnodeidx++;
+                    nodelist_l.push_back(gnodeid);
+                }
+                shapeCnt++;
+            }
+            else
+            {
+                gnodeidx += zshapesize_g[j];
+            }
+
+            gzoneid++;
+        }
+        if (shapeCnt)
+            tmpcnt.push_back(shapeCnt);
+    }
+
+    int nlnodes = lnodeidx;
+    int nlzones = zonelist_l.size();
+
+    //
+    // Initialize local field headers
+    //
+    vector<field_t> fields_l(fields_g.size());
+    for (unsigned int i = 0; i < fields_g.size(); i++)
+    {
+        fields_l[i] = fields_g[i];
+        int nvals = fields_l[i].cent == DB_NODECENT ? nlnodes : nlzones;
+        if (fields_l[i].type == DB_INT)
+        {
+            for (j = 0; j < fields_l[i].ncomps; j++)
+                fields_l[i].data[j] = new int[nvals];
+        }
+        else if (fields_l[i].type == DB_FLOAT)
+        {
+            for (j = 0; j < fields_l[i].ncomps; j++)
+                fields_l[i].data[j] = new float[nvals];
+        }
+    }
+
+    //
+    // Build local coordinate arrays and other node-centered fields
+    //
+    vector<float> txvals(nlnodes), tyvals(nlnodes), tzvals(nlnodes);
+    map<int, int>::const_iterator lnit;
+    for (lnit = g2lnode.begin(); lnit != g2lnode.end(); lnit++)
+    {
+        txvals[lnit->second] = xvals_g[lnit->first];
+        tyvals[lnit->second] = yvals_g[lnit->first];
+        tzvals[lnit->second] = zvals_g[lnit->first];
+
+        for (unsigned int i = 0; i < fields_l.size(); i++)
+        {
+            if (fields_l[i].cent != DB_NODECENT)
+                continue;
+
+            if (fields_l[i].type == DB_INT)
+            {
+                for (j = 0; j < fields_l[i].ncomps; j++)
+                {
+                    int *lvals = (int *) fields_l[i].data[j];
+                    int *gvals = (int *) fields_g[i].data[j];
+                    lvals[lnit->second] = gvals[lnit->first];
+                }
+            }
+            else if (fields_l[i].type == DB_FLOAT)
+            {
+                for (j = 0; j < fields_l[i].ncomps; j++)
+                {
+                    float *lvals = (float *) fields_l[i].data[j];
+                    float *gvals = (float *) fields_g[i].data[j];
+                    lvals[lnit->second] = gvals[lnit->first];
+                }
+            }
+        }
+    }
+
+    //
+    // Build zone-centered fields (including materials)
+    //
+    for (unsigned int i = 0; i < fields_l.size(); i++)
+    {
+        if (fields_l[i].cent != DB_ZONECENT)
+            continue;
+
+        if (fields_l[i].type == DB_INT)
+        {
+            for (j = 0; j < fields_l[i].ncomps; j++)
+            {
+                int *lvals = (int *) fields_l[i].data[j];
+                int *gvals = (int *) fields_g[i].data[j];
+                for (k = 0; k < nlzones; k++)
+                    lvals[k] = gvals[zonelist_l[k]];
+            }
+        }
+        else if (fields_l[i].type == DB_FLOAT)
+        {
+            for (j = 0; j < fields_l[i].ncomps; j++)
+            {
+                float *lvals = (float *) fields_l[i].data[j];
+                float *gvals = (float *) fields_g[i].data[j];
+                for (k = 0; k < nlzones; k++)
+                    lvals[k] = gvals[zonelist_l[k]];
+            }
+        }
+    }
+
+    vector<int> tmatlist;
+    for (k = 0; k < nlzones; k++)
+        tmatlist.push_back(matlist_g[zonelist_l[k]]);
+
+    //
+    // Convert global node numbers in nodelist_l to local
+    //
+    for (unsigned int i = 0; i < nodelist_l.size(); i++)
+        nodelist_l[i] = g2lnode[nodelist_l[i]];
+
+    // make and set the local dir
+    DBMkDir(mesh->dbfile, dirname);
+    DBSetDir(mesh->dbfile, dirname);
+
+    DBoptlist *opts = DBMakeOptlist(2);
+    char *mrgname = "mrg_tree";
+    DBAddOption(opts, DBOPT_MRGTREE_NAME, mrgname);
+
+    // output the mesh
+    float *coords[3];
+    coords[0] = &txvals[0];
+    coords[1] = &tyvals[0];
+    coords[2] = &tzvals[0];
+    char *coordnames[3];
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    coordnames[2] = "Z";
+    DBPutUcdmesh(mesh->dbfile, "mesh", 3, coordnames, coords, txvals.size(), nlzones,
+        "zl", 0, DB_FLOAT, opts);
+    DBFreeOptlist(opts);
+
+    // output the zonelist
+    DBPutZonelist2(mesh->dbfile, "zl", nlzones, 3, &nodelist_l[0], nodelist_l.size(),
+                0, 0, 0, &tmptype[0], &tmpsize[0], &tmpcnt[0], tmpcnt.size(), NULL); 
+
+    // output the materials
+    opts = DBMakeOptlist(2);
+    DBAddOption(opts, DBOPT_MATNAMES, matNames);
+    DBPutMaterial(mesh->dbfile, "materials", "mesh", 5, matnos,
+        &tmatlist[0], &nlzones, 1, 0, 0, 0, 0, 0, DB_FLOAT, opts);
+    DBFreeOptlist(opts);
+
+    DBSetDir(mesh->dbfile, "..");
+}
+
+//
+// Makes the bottom layer of nodes
+//
+void make_base_layer()
+{
+    for (int i = 0; i < layerNNodes; i++)
+    {
+        xvals_g.push_back(layerXVals[i]);
+        yvals_g.push_back(layerYVals[i]);
+        zvals_g.push_back(0.0);
+        nodalv_g.push_back(i<=8?400.0:0.0);
+    }
+}
+
+//
+// Adds a layer of nodes and then connects them to
+// the previous layer making hex elements
+//
+void add_layer(int zval)
+{
+    int i;
+
+    for (i = 0; i < layerNNodes; i++)
+    {
+        xvals_g.push_back(layerXVals[i]);
+        yvals_g.push_back(layerYVals[i]);
+        zvals_g.push_back((float)zval);
+        nodalv_g.push_back(i<=8?(zval<4?(4-zval)*100:10.0):0.0);
+    }
+    for (i = 0; i < layerNZones; i++)
+    {
+        int j;
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+j] + (zval-1)*layerNNodes);
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+j] + zval*layerNNodes);
+        if (i < 4)
+        {
+            matlist_g.push_back(matMap["Solid Propellant"]);
+            procid_g.push_back(0);
+        }
+        else
+        {
+            matlist_g.push_back(matMap["Body"]);
+            procid_g.push_back(zval < 6 ? 1 : 2);
+        }
+        if (zval < 5)
+            bitmap_g.push_back(BOOSTER|STAGE1);
+        else
+            bitmap_g.push_back(BOOSTER|STAGE2); // booster & stage 2
+    }
+}
+
+//
+// Adds pyramid elements that taper to a single apex which is
+// the nose of the rocket.
+//
+void add_nose(int zval)
+{
+    int i,j;
+
+    // add central core nodes at this zval
+    int layer1NoseStart = xvals_g.size();
+    for (i = 0; i < 9; i++)
+    {
+        xvals_g.push_back(layerXVals[i]);
+        yvals_g.push_back(layerYVals[i]);
+        zvals_g.push_back((float)zval);
+        nodalv_g.push_back(0.0);
+    }
+
+    // add nose end node at zval + 1
+    int noseApex = xvals_g.size();
+    xvals_g.push_back(0.0);
+    yvals_g.push_back(0.0);
+    zvals_g.push_back((float)zval+1.0);
+    nodalv_g.push_back(0.0);
+
+    // add central core hexes
+    for (i = 0; i < 4; i++)
+    {
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+j] + (zval-1)*layerNNodes);
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+j] + zval*layerNNodes);
+        matlist_g.push_back(matMap["Liquid Propellant"]);
+        procid_g.push_back(0);
+        bitmap_g.push_back(STAGE3|NOSE);
+    }
+
+    // add external wedges
+    int permute[] = {1, 0, 3, 2}; // wedge base is permuted from hex
+    int k = layer1NoseStart + 1;
+    for (i = 4; i < layerNZones; i++) // just the outher layer of hex bases
+    {
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+permute[j]] + (zval-1)*layerNNodes);
+        if (i == layerNZones - 1)
+        {
+            nodelist_g.push_back(layer1NoseStart+1);
+            nodelist_g.push_back(k);
+        }
+        else
+        {
+            nodelist_g.push_back(k+1);
+            nodelist_g.push_back(k);
+        }
+        matlist_g.push_back(matMap[i%2 ? "Electronics" : "Body"]);
+        procid_g.push_back(2);
+        k++;
+        bitmap_g.push_back(STAGE3|NOSE|BUS);
+    }
+
+    // add top-level pyramids
+    for (i = 0; i < 4; i++)
+    {
+        for (j = 0; j < 4; j++)
+            nodelist_g.push_back(layerNodelist[i*4+permute[j]] + layer1NoseStart);
+        nodelist_g.push_back(noseApex);
+        matlist_g.push_back(matMap["High Explosive"]);
+        procid_g.push_back(0);
+        bitmap_g.push_back(NOSE|MIRVS|MIRV(i));
+    }
+}
+
+//
+// Adds the fins of the rocket around the bottom two layers
+//
+void add_fins()
+{
+    int i;
+    float finX = 4 * cos(22.5 / 180.0 * M_PI);
+    float finY = 4 * sin(22.5 / 180.0 * M_PI);
+
+    // add layer 0 and 1 fin tip nodes
+    int finNodesStart = xvals_g.size();
+    for (i = 0; i < 2; i++)
+    {
+        xvals_g.push_back(-finX);
+        yvals_g.push_back(finY);
+        zvals_g.push_back((float)i);
+        nodalv_g.push_back(0.0);
+
+        xvals_g.push_back(finY);
+        yvals_g.push_back(finX);
+        zvals_g.push_back((float)i);
+        nodalv_g.push_back(0.0);
+
+        xvals_g.push_back(finX);
+        yvals_g.push_back(-finY);
+        zvals_g.push_back((float)i);
+        nodalv_g.push_back(0.0);
+
+        xvals_g.push_back(-finY);
+        yvals_g.push_back(-finX);
+        zvals_g.push_back((float)i);
+        nodalv_g.push_back(0.0);
+    }
+
+    // add fin bottoms (wedges) on layer 0
+    int startNodes[] = {9, 11, 13, 15};
+    for (i = 0; i < 4; i++)
+    {
+        int n = startNodes[i];
+        nodelist_g.push_back(n+1);
+        nodelist_g.push_back(n+1+layerNNodes);
+        nodelist_g.push_back(n+layerNNodes);
+        nodelist_g.push_back(n);
+        nodelist_g.push_back(finNodesStart+i);
+        nodelist_g.push_back(finNodesStart+i+4);
+        matlist_g.push_back(matMap["Body"]);
+        procid_g.push_back(1);
+        bitmap_g.push_back(BOOSTER|STAGE1|FINS|FIN(i));
+    }
+
+    // add fin tops (pyramids) on layer 1
+    for (i = 0; i < 4; i++)
+    {
+        int n = startNodes[i]+layerNNodes;
+        nodelist_g.push_back(n+1);
+        nodelist_g.push_back(n+1+layerNNodes);
+        nodelist_g.push_back(n+layerNNodes);
+        nodelist_g.push_back(n);
+        nodelist_g.push_back(finNodesStart+i+4);
+        matlist_g.push_back(matMap["Body"]);
+        procid_g.push_back(1);
+        bitmap_g.push_back(BOOSTER|STAGE1|FINS|FIN(i));
+    }
+}
+
+//
+// Build the rocket from the simple 2D description of a
+// single layer of nodal positions.
+//
+void build_body()
+{
+    int i;
+    make_base_layer();
+    for (i = 1; i < 9; i++)
+        add_layer(i);
+    add_nose(i);
+    add_fins();
+}
+
+#ifdef HAVE_IMESH
+static iBase_EntitySetHandle
+CreateSet(siloimesh_t mesh, iBase_EntitySetHandle parent, const char *name, int set_class)
+{
+    // Obtain the SET_NAME tag handle (create if doesn't already exist)
+    iBase_TagHandle snTag, scTag; 
+    iMesh_getTagHandle(mesh->theMesh, "SET_NAME", &snTag, &(mesh->error), 9);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_NAME", 64, iBase_BYTES,
+            &snTag, &(mesh->error), 9);
+    iMesh_getTagHandle(mesh->theMesh, "SET_CLASS", &scTag, &(mesh->error), 10);
+    CheckITAPSError(getTagHandle);
+    if (mesh->error != iBase_SUCCESS)
+        iMesh_createTag(mesh->theMesh, "SET_CLASS", 1, iBase_INTEGER,
+            &scTag, &(mesh->error), 10);
+
+    char tmp[64];
+    memset(tmp, '\0', sizeof(tmp));
+    strcpy(tmp, name);
+    iBase_EntitySetHandle theSet;
+    iMesh_createEntSet(mesh->theMesh, 0, &theSet, &(mesh->error));
+    CheckITAPSError(createEntSet);
+    iMesh_setEntSetData(mesh->theMesh, theSet, snTag,
+        tmp, sizeof(tmp), &(mesh->error));
+    CheckITAPSError(setEntSetData);
+    iMesh_setEntSetIntData(mesh->theMesh, theSet, scTag,
+        set_class, &(mesh->error));
+    CheckITAPSError(setEntSetData);
+
+    if (parent != mesh->rootSet)
+    {
+        iMesh_addEntSet(mesh->theMesh, theSet, parent, &(mesh->error));
+        CheckITAPSError(addEntSet);
+    }
+
+    return theSet;
+}
+
+static void
+PutEnts(siloimesh_t mesh, iBase_EntitySetHandle theSet, int mask,
+    const vector<int> &bitmap)
+{
+    vector<iBase_EntityHandle> ents;
+    for (int i = 0; i < (int) bitmap.size(); i++)
+        if (bitmap[i]&mask) ents.push_back(mesh->zones[i]);
+
+    if (ents.size() == 0)
+        return;
+
+    iMesh_addEntArrToSet(mesh->theMesh, &ents[0], ents.size(), theSet, &(mesh->error));
+    CheckITAPSError(addEntArrToSet);
+}
+
+static void
+PutEntsByIndex(siloimesh_t mesh, iBase_EntitySetHandle theSet, int centering, int nents,
+    const int *ids)
+{
+    vector<iBase_EntityHandle> ents;
+    if (centering == DB_NODECENT)
+        for (int i = 0; i < nents; i++)
+            ents.push_back(mesh->verts[ids[i]]);
+    else
+        for (int i = 0; i < nents; i++)
+            ents.push_back(mesh->zones[ids[i]]);
+
+    iMesh_addEntArrToSet(mesh->theMesh, &ents[0], ents.size(), theSet, &(mesh->error));
+    CheckITAPSError(addEntArrToSet);
+}
+
+#endif
+
+void write_rocket(siloimesh_t mesh)
+{
+    // output rocket as monolithic, single mesh
+    char *coordnames[3];
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    coordnames[2] = "Z";
+    float *coords[3];
+    coords[0] = &xvals_g[0];
+    coords[1] = &yvals_g[0];
+    coords[2] = &zvals_g[0];
+
+    PutMesh(mesh, "rocket", 3, coordnames, coords, xvals_g.size(), nzones_g,
+        "zl", 0, DB_FLOAT, 0);
+
+    PutZonelist(mesh, "zl", nzones_g, 3, &nodelist_g[0], nodelist_g.size(),
+                    0, 0, 0, zshapetype_g, zshapesize_g, zshapecnt_g,
+                    sizeof(zshapetype_g)/sizeof(zshapetype_g[0]), NULL); 
+
+    DBoptlist *opts = DBMakeOptlist(2);
+    DBAddOption(opts, DBOPT_MATNAMES, matNames);
+    PutMaterial(mesh, "materials", "mesh", 5, matnos,
+        &matlist_g[0], &nzones_g, 1, 0, 0, 0, 0, 0, DB_FLOAT, opts, SET_CLASS_MATERIALS);
+    DBFreeOptlist(opts);
+
+    {   char *varnames[1];
+        varnames[0] = "procid";
+        float *vars[1];
+        vars[0] = (float*) &procid_g[0];
+        PutVar(mesh, "procid", "rocket", 1, varnames, vars,
+            nzones_g, NULL, 0, DB_INT, DB_ZONECENT, 0);
+    }
+
+    {   char *varnames[1];
+        varnames[0] = "bitmap";
+        float *vars[1];
+        vars[0] = (float*) &bitmap_g[0];
+        PutVar(mesh, "bitmap", "rocket", 1, varnames, vars,
+            nzones_g, NULL, 0, DB_INT, DB_ZONECENT, 0);
+    }
+
+    {   char *varnames[1];
+        varnames[0] = "tempc";
+        float *vars[1];
+        vars[0] = (float*) &nodalv_g[0];
+        PutVar(mesh, "temp", "rocket", 1, varnames, vars,
+            xvals_g.size(), NULL, 0, DB_FLOAT, DB_NODECENT, 0);
+    }
+
+#ifdef HAVE_IMESH
+    // Ok, we're going to use PutMaterial here to do something similar
+    // except that we're outputting the domain decomposition.
+    {
+        char *subsetnames[3] = {"domain_0","domain_1","domain_2"};
+        int subsetnos[3] = {0, 1, 2};
+        DBoptlist *opts = DBMakeOptlist(2);
+        DBAddOption(opts, DBOPT_MATNAMES, subsetnames);
+        PutMaterial(mesh, 0, "mesh", 3, subsetnos,
+            &procid_g[0], &nzones_g, 1, 0, 0, 0, 0, 0, DB_FLOAT, opts, SET_CLASS_DOMAINS);
+        DBFreeOptlist(opts);
+    }
+
+    // Ok, now output the assembly hierarchy using bitmap_g as our guide.
+    iBase_EntitySetHandle assmSet = CreateSet(mesh, mesh->rootSet, "Assembly", SET_CLASS_ASSEMBLY);
+    PutEnts(mesh, assmSet, 0xFFFFFFFF, bitmap_g);
+        iBase_EntitySetHandle boostSet = CreateSet(mesh, assmSet, "Booster", SET_CLASS_ASSEMBLY);
+        PutEnts(mesh, boostSet, BOOSTER, bitmap_g);
+            iBase_EntitySetHandle s1Set = CreateSet(mesh, boostSet, "Stage1", SET_CLASS_ASSEMBLY);
+            PutEnts(mesh, s1Set, STAGE1, bitmap_g);
+                iBase_EntitySetHandle finsSet = CreateSet(mesh, s1Set, "Fins", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, finsSet, FINS, bitmap_g);
+                    iBase_EntitySetHandle fin1Set = CreateSet(mesh, finsSet, "Fin1", SET_CLASS_ASSEMBLY);
+                    PutEnts(mesh, fin1Set, FIN(0), bitmap_g);
+                    iBase_EntitySetHandle fin2Set = CreateSet(mesh, finsSet, "Fin2", SET_CLASS_ASSEMBLY);
+                    PutEnts(mesh, fin2Set, FIN(1), bitmap_g);
+                    iBase_EntitySetHandle fin3Set = CreateSet(mesh, finsSet, "Fin3", SET_CLASS_ASSEMBLY);
+                    PutEnts(mesh, fin3Set, FIN(2), bitmap_g);
+                    iBase_EntitySetHandle fin4Set = CreateSet(mesh, finsSet, "Fin4", SET_CLASS_ASSEMBLY);
+                    PutEnts(mesh, fin4Set, FIN(3), bitmap_g);
+            iBase_EntitySetHandle s2Set = CreateSet(mesh, boostSet, "Stage2", SET_CLASS_ASSEMBLY);
+            PutEnts(mesh, s2Set, STAGE2, bitmap_g);
+        iBase_EntitySetHandle noseSet = CreateSet(mesh, assmSet, "Nose", SET_CLASS_ASSEMBLY);
+        PutEnts(mesh, noseSet, NOSE, bitmap_g);
+            iBase_EntitySetHandle s3Set = CreateSet(mesh, noseSet, "Stage 3", SET_CLASS_ASSEMBLY);
+            PutEnts(mesh, s3Set, STAGE3, bitmap_g);
+                iBase_EntitySetHandle busSet = CreateSet(mesh, s3Set, "Bus", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, busSet, BUS, bitmap_g);
+            iBase_EntitySetHandle mirvsSet = CreateSet(mesh, noseSet, "Mirvs", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, mirvsSet, MIRVS, bitmap_g);
+                iBase_EntitySetHandle mirv1Set = CreateSet(mesh, mirvsSet, "Mirv1", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, mirv1Set, MIRV(0), bitmap_g);
+                iBase_EntitySetHandle mirv2Set = CreateSet(mesh, mirvsSet, "Mirv2", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, mirv2Set, MIRV(1), bitmap_g);
+                iBase_EntitySetHandle mirv3Set = CreateSet(mesh, mirvsSet, "Mirv3", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, mirv3Set, MIRV(2), bitmap_g);
+                iBase_EntitySetHandle mirv4Set = CreateSet(mesh, mirvsSet, "Mirv4", SET_CLASS_ASSEMBLY);
+                PutEnts(mesh, mirv4Set, MIRV(3), bitmap_g);
+
+    // Some special subsets
+
+    // lighting time nodes
+    iBase_EntitySetHandle ltZonesSet = CreateSet(mesh, mesh->rootSet, "ltZones", SET_CLASS_NODESETS);
+    PutEntsByIndex(mesh, ltZonesSet, DB_ZONECENT, 4, ltZones);
+
+    // hold down nodes
+    iBase_EntitySetHandle holdDownSet = CreateSet(mesh, mesh->rootSet, "Hold Down", SET_CLASS_NODESETS);
+    PutEntsByIndex(mesh, holdDownSet, DB_NODECENT, 9, holdDownNodes);
+
+    // high dynamic pressure points
+    iBase_EntitySetHandle highQSet = CreateSet(mesh, mesh->rootSet, "Max Q", SET_CLASS_NODESETS);
+    PutEntsByIndex(mesh, highQSet, DB_NODECENT, sizeof(maxQNodes)/sizeof(maxQNodes[0]), maxQNodes);
+
+    // Using PutZonelist here will corrupt 'zones' member of mesh object.
+    // We don't intend to need that any further so its ok.
+    // We use PutZonelist here as a utility to output groups of other
+    // types of edge and face zones.
+    int identity[32];
+    for (int i = 0; i < 32; i++) identity[i] = i;
+    PutZonelist(mesh, 0, 4, 3, umbilicalEdges, sizeof(umbilicalEdges)/sizeof(umbilicalEdges[0]),
+                    0, 0, 0, umbilicalEdgesShapetypes, umbilicalEdgesSizes, umbilicalEdgesCounts,
+                    1, NULL);
+    iBase_EntitySetHandle umbilicalSet = CreateSet(mesh, mesh->rootSet, "Umbilicals", SET_CLASS_EDGESETS);
+    PutEntsByIndex(mesh, umbilicalSet, DB_ZONECENT, 4, identity);
+
+    PutZonelist(mesh, 0, 32, 3, launchContactFaces, sizeof(launchContactFaces)/sizeof(launchContactFaces[0]),
+                    0, 0, 0, launchContactFacesShapetypes, launchContactFacesSizes, launchContactFacesCounts,
+                    1, NULL);
+    iBase_EntitySetHandle launchFaces = CreateSet(mesh, mesh->rootSet, "Launch Tube Contacts", SET_CLASS_FACESETS);
+    PutEntsByIndex(mesh, launchFaces, DB_ZONECENT, 32, identity);
+
+    PutZonelist(mesh, 0, 16+12, 3, controlSurfaceFaces, sizeof(controlSurfaceFaces)/sizeof(controlSurfaceFaces[0]),
+                    0, 0, 0, controlSurfaceShapetypes, controlSurfaceSizes, controlSurfaceCounts,
+                    2, NULL);
+    iBase_EntitySetHandle controlSurfaces = CreateSet(mesh, mesh->rootSet, "Control Surfaces", SET_CLASS_FACESETS);
+    PutEntsByIndex(mesh, controlSurfaces, DB_ZONECENT, 16+12, identity);
+#endif
+}
+
+void write_mrocket(siloimesh_t mesh)
+{
+    //
+    // Output rocket in blocks
+    //
+    for (int i = 0; i < 3; i++)
+    {
+        char tmpName[256];
+        sprintf(tmpName, "domain_%d", i);
+        write_a_block(procid_g, i, mesh, tmpName);
+    }
+
+    char *mbitmapnames[3];
+    mbitmapnames[0] = "domain_0/bitmap";
+    mbitmapnames[1] = "domain_1/bitmap";
+    mbitmapnames[2] = "domain_2/bitmap";
+    char *mmatnames[3];
+    mmatnames[0] = "domain_0/materials";
+    mmatnames[1] = "domain_1/materials";
+    mmatnames[2] = "domain_2/materials";
+    char *mmeshnames[3];
+    mmeshnames[0] = "domain_0/mesh";
+    mmeshnames[1] = "domain_1/mesh";
+    mmeshnames[2] = "domain_2/mesh";
+    int meshtypes[3] = {DB_UCDMESH, DB_UCDMESH, DB_UCDMESH};
+    int vartypes[3] = {DB_UCDVAR, DB_UCDVAR, DB_UCDVAR};
+
+    DBoptlist *opts = DBMakeOptlist(2);
+    char *mrgname = "mrg_tree";
+    DBAddOption(opts, DBOPT_MRGTREE_NAME, mrgname);
+
+    DBPutMultimesh(mesh->dbfile, "mrocket", 3, mmeshnames, meshtypes, opts);
+    DBPutMultimat(mesh->dbfile, "mmaterials", 3, mmatnames, 0);
+    DBPutMultivar(mesh->dbfile, "mbitmap", 3, mbitmapnames, vartypes, 0);
+
+    DBFreeOptlist(opts);
+}
+
+void write_top_mrgtree(siloimesh_t mesh)
+{
+
+    topTree = DBMakeMrgtree(DB_MULTIMESH, 0, 5, 0);
+
+    //
+    // Material info at MM level
+    //
+
+    // groupel map indicating which materials appear in which blocks
+    int b2m_lens[] = {1, 1, 1, 1, 2};
+    int b2m_data[] = {0, 0, 0, 2, 1, 2};
+    int *b2m_map[] = {&b2m_data[0], &b2m_data[1], &b2m_data[2], &b2m_data[3], &b2m_data[4]};
+    int b2m_segids[] = {0, 1, 2, 3, 4};
+    int b2m_types[] = {DB_BLOCKCENT, DB_BLOCKCENT, DB_BLOCKCENT, DB_BLOCKCENT, DB_BLOCKCENT};
+    DBPutGroupelmap(mesh->dbfile, "block_to_mat", 5, b2m_types, b2m_lens, b2m_segids,
+        b2m_map, 0, DB_FLOAT, 0);
+
+    // material regions
+    DBAddRegion(topTree, "materials", 0, 5, "block_to_mat", 0, 0, 0, 0, 0);
+    DBSetCwr(topTree, "materials");
+    const char *mapnames[1];
+    mapnames[0] = "block_to_mat";
+    for (int i = 0; i < 5; i++)
+        DBAddRegion(topTree, matNames[i], 0, 0, 0, 1, &i, &b2m_lens[i], &b2m_types[i], 0);
+    DBSetCwr(topTree, "..");
+
+    //
+    // Assembly info at MM level, no maps
+    //
+
+    int b2a_lens[] = {2, 2, 1, 1};
+    int b2a_data[] = {1, 3, 1, 2, 1, 3};
+    int *b2a_map[] = {&b2a_data[0], &b2a_data[2], &b2a_data[4], &b2a_data[5]};
+    int b2a_segids[] = {0, 1, 2, 3};
+    int b2a_types[] = {DB_BLOCKCENT, DB_BLOCKCENT, DB_BLOCKCENT, DB_BLOCKCENT};
+    DBPutGroupelmap(mesh->dbfile, "block_to_assembly", 4, b2a_types, b2a_lens, b2a_segids,
+        b2a_map, 0, DB_FLOAT, 0);
+
+    //
+    // The region representing the entire assembly is equal to top.
+    // Although a map name is specified here, none of its segments are
+    // enumerated. This has the effect of attaching the map object name at
+    // this point in the MRG tree but does not actually specify a map for
+    // this region. The implied map is the identity. 
+    //
+    DBAddRegion(topTree, "assembly", 0, 2, "block_to_assembly", 0, 0, 0, 0, 0);
+    DBSetCwr(topTree, "assembly");
+
+    // No map is specified here so it is whatever is above it in the tree
+    DBAddRegion(topTree, "booster", 0, 2, 0, 0, 0, 0, 0, 0);
+    DBSetCwr(topTree, "booster");
+
+    // stage_1 exists only on blocks 1,2, which is the 2nd segment (id=1) of the map
+    DBAddRegion(topTree, "stage_1", 0, 2, 0, 1, &b2a_segids[1], &b2a_lens[1], &b2a_types[1], 0);
+    DBSetCwr(topTree, "stage_1");
+
+    // all the fins exist only on block 1, which is the 3rd segment (id=2) of the map
+    DBAddRegion(topTree, "fins", 0, 4, 0, 1, &b2a_segids[2], &b2a_lens[2], &b2a_types[2], 0);
+    DBSetCwr(topTree, "fins");
+
+    // the map to the 'fins' region is sufficient for all fins 
+    DBAddRegion(topTree, "fin_1", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "fin_2", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "fin_3", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "fin_4", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBSetCwr(topTree, ".."); // to 'fins' group
+    DBSetCwr(topTree, ".."); // to booster group
+
+    // stage_2 exists only on blocks 1,3, which is the 1rst (id=0) segment of the map
+    DBAddRegion(topTree, "stage_2", 0, 0, 0, 1, &b2a_segids[0], &b2a_lens[0], &b2a_types[0], 0);
+    DBSetCwr(topTree, ".."); // to assembly top
+
+    // nose exists only on blocks 1,3, which is the 1rst (id=0) segment of the map
+    DBAddRegion(topTree, "nose", 0, 2, 0, 1, &b2a_segids[0], &b2a_lens[0], &b2a_types[0], 0);
+    DBSetCwr(topTree, "nose");
+
+    // the bus exists only on block 3 of the mesh which is the 4th (id=3) segment
+    DBAddRegion(topTree, "bus", 0, 1, 0, 1, &b2a_segids[3], &b2a_lens[3], &b2a_types[3], 0);
+
+    // the mirvs exist only on block 1 of the mesh which is the 3rd (id=2) segment of the map
+    DBAddRegion(topTree, "mirvs", 0, 4, 0, 1, &b2a_segids[2], &b2a_lens[2], &b2a_types[2], 0);
+    DBSetCwr(topTree, "mirvs");
+
+    DBAddRegion(topTree, "mirv_1", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "mirv_2", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "mirv_3", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBAddRegion(topTree, "mirv_4", 0, 0, 0, 0, 0, 0, 0, 0);
+    DBSetCwr(topTree, ".."); // to mirvs group
+    DBSetCwr(topTree, ".."); // to nose group
+    DBSetCwr(topTree, ".."); // to top 
+
+    // define a simple mrgvar on this tree
+    {
+        int c1[] = {1, 2, 3, 4};
+	int c2[] = {20, 40, 60, 80};
+	void *vals[] ={(void*)c1,(void*)c2};
+	char *parent_name = "/assembly/nose/mirvs";
+	char *reg_names[] = {parent_name, 0, 0, 0};
+	DBPutMrgvar(mesh->dbfile, "some_ints", "mrg_tree", 2, 0, 4, reg_names, DB_INT, vals, 0);
+    }
+
+    DBPutMrgtree(mesh->dbfile, "mrg_tree", "mrocket", topTree, 0); 
+
+    /* output MRG tree info for testing */
+    FILE *outfile = fopen("mrg_tree_b4save.txt","w");
+    DBWalkMrgtree(topTree, DBPrintMrgtree, outfile, DB_PREORDER);
+    fclose(outfile);
+}
+
+static void
+CreateBlockTree(DBmrgtnode *tnode, int walk_order, void *data)
+{
+    void **walk_data = (void**) data;
+    DBmrgtree *tree = (DBmrgtree*) walk_data[0];
+    int num_segments = *((int*) walk_data[1]);
+    int *ass_map_lens = (int*) walk_data[2];
+    int *ass_map_segids = (int*) walk_data[3];
+    int *ass_map_types = (int*) walk_data[4];
+    int **ass_map_data = (int**) walk_data[5];
+    int *ass_map_assids = (int*) walk_data[6];
+    int i;
+
+    //printf("Working at region \"%s\"\n", tree->cwr->name);
+    for (i = 0; i < num_segments; i++)
+    {
+        char *seg_assName = assNames[ass_map_assids[i]];
+        if (strcmp(seg_assName, tnode->name) == 0)
+        {
+            //printf("    Adding region \"%s\"\n", seg_assName);
+            while (strcmp(tree->cwr->name, tnode->parent->name) != 0)
+            {
+                DBSetCwr(tree, "..");
+                //printf("    Backing off to \"%s\"\n", tree->cwr->name);
+            }
+            DBAddRegion(tree, seg_assName, 0, tnode->num_children,
+                "ass_maps", 1, &i, &ass_map_lens[i], &ass_map_types[i], 0);
+            if (tnode->num_children > 0)
+                DBSetCwr(tree, seg_assName);
+            break;
+        }
+    }
+}
+
+void write_block_mrgtree(siloimesh_t mesh, int proc_id)
+{
+    int i,j;
+    char domName[64];
+
+    sprintf(domName, "/domain_%d", proc_id);
+    DBSetDir(mesh->dbfile, domName); 
+
+    DBmrgtree *tree = DBMakeMrgtree(DB_UCDMESH, 0, 5, 0);
+
+    /* get list of zones on this domain */
+    vector<int> matzones[5];
+    vector<int> asszones[16];
+    for (unsigned int i = 0; i < procid_g.size(); i++)
+    {
+        if (procid_g[i] == proc_id)
+        {
+            for (j = 1; j < 6; j++)
+            {
+                if (matlist_g[i] == j)
+                    matzones[j-1].push_back(i);
+            }
+            for (j = 0; j < 16; j++)
+            {
+                if ((bitmap_g[i] & assnos[j]) != 0)
+                    asszones[j].push_back(i);
+            }
+        }
+    }
+
+    /* there are a maximum of 5 materials */
+    DBAddRegion(tree, "materials", 0, 5, 0, 0, 0, 0, 0, 0);
+    DBSetCwr(tree, "materials");
+    int mat_map_lens[5];
+    int *mat_map_data[5];
+    int mat_map_segids[5];
+    int mat_map_types[5] = {DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT};
+    j = 0;
+    for (i = 0; i < 5; i++)
+    {
+        if (matzones[i].size())
+        {
+            mat_map_lens[j] = matzones[i].size();
+            mat_map_data[j] = &(matzones[i][0]);
+            mat_map_segids[j] = j;
+            DBAddRegion(tree, matNames[i], 0, 0, "mat_maps", 1, &j, &mat_map_lens[j], &mat_map_types[j], 0);
+            j++;
+        }
+    }
+    DBPutGroupelmap(mesh->dbfile, "mat_maps", j, mat_map_types, mat_map_lens, mat_map_segids,
+        mat_map_data, 0, DB_FLOAT, 0);
+    DBSetCwr(tree, "..");
+
+    /* build groupel maps for the assembly */ 
+    int ass_map_lens[16];
+    int *ass_map_data[16];
+    int ass_map_segids[16];
+    int ass_map_assids[16];
+    int ass_map_types[16] = {DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT,
+                             DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT,
+                             DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT, DB_ZONECENT};
+    j = 0;
+    for (i = 0; i < 16; i++)
+    {
+        if (asszones[i].size())
+        {
+            ass_map_lens[j] = asszones[i].size();
+            ass_map_data[j] = &(asszones[i][0]);
+            ass_map_segids[j] = j;
+            ass_map_assids[j] = i;
+            //printf("Including \"%s\"\n", assNames[i]);
+            j++;
+        }
+    }
+    DBPutGroupelmap(mesh->dbfile, "ass_maps", j, ass_map_types, ass_map_lens, ass_map_segids,
+        ass_map_data, 0, DB_FLOAT, 0);
+
+    //printf("Starting new walk\n");
+
+    /* ok, walk the top tree and emit any portions of it that are also
+       on this block */
+    void *walk_data[] = {tree, &j, ass_map_lens, ass_map_segids, ass_map_types, ass_map_data,
+                         ass_map_assids};
+    DBAddRegion(tree, "assembly", 0, 5, 0, 0, 0, 0, 0, 0);
+    DBSetCwr(tree, "assembly");
+    DBSetCwr(topTree, "assembly");
+    DBWalkMrgtree(topTree, CreateBlockTree, walk_data, DB_PREORDER|DB_FROMCWR);
+    DBSetCwr(topTree, "..");
+
+    /* output the mrgtree for this block */
+    DBPutMrgtree(mesh->dbfile, "mrg_tree", "mesh", tree, 0); 
+    DBFreeMrgtree(tree);
+
+    DBSetDir(mesh->dbfile, "..");
+}
+
+
+#if 0
+void
+db_StringArrayToStringList(const char *const *const strArray, int n,
+                           char **strList, int *m)
+{
+    int i, len;
+    char *s = NULL;
+
+    /* if n is unspecified, determine it by counting forward until
+       we get a null pointer */
+    if (n < 0)
+    {
+        n = 0;
+        while (strArray[n] != 0)
+            n++;
+    }
+
+    /*
+     * Create a string which is a semi-colon separated list of strings
+     */
+     for (i=len=0; i<n; i++)
+     {
+         if (strArray[i])
+             len += strlen(strArray[i])+1;
+         else
+             len += 2;
+     }
+     s = (char*) malloc(len+1);
+     for (i=len=0; i<n; i++) {
+         if (i) s[len++] = ';';
+         if (strArray[i])
+         {
+             strcpy(s+len, strArray[i]);
+             len += strlen(strArray[i]);
+         }
+         else
+         {
+             s[len++] = '\n';
+         }
+     }
+     len++; /*count last null*/
+
+     *strList = s;
+     *m = len;
+}
+
+char **
+db_StringListToStringArray(char *strList, int n)
+{
+    int i,l, add1 = 0;
+    char **retval;
+
+    /* if n is unspecified (<0), compute it by counting semicolons */
+    if (n < 0)
+    {
+        add1 = 1;
+        n = 1;
+        while (strList[i] != '\0')
+        {
+            if (strList[i] == ';')
+                n++;
+            i++;
+        }
+    }
+
+    retval = (char**) calloc(n+add1, sizeof(char*));
+    for (i=0, l=0; i<n; i++) {
+        if (strList[l] == ';')
+        {
+            retval[i] = strdup("");
+            l += 1;
+        }
+        else if (strList[l] == '\n')
+        {
+            retval[i] = 0;
+            l += 2;
+        }
+        else
+        {
+            int lstart = l;
+            while (strList[l] != ';' && strList[l] != '\0')
+                l++;
+            strList[l] = '\0';
+            retval[i] = strdup(&strList[lstart]);
+            l++;
+        }
+    }
+    if (add1) retval[i] = 0;
+    return retval;
+}
+#endif
+
+//
+// Purpose: Build a simple, 3D mesh with a lot of interesting subsets
+// to serve as a talking point for VisIt's subsetting functionality.
+//
+// Modifications:
+//    Mark C. Miller, Wed Jul 14 15:33:02 PDT 2010
+//    Added show-all-errors option.
+//
+
+int
+main(int argc, char **argv)
+{
+    FILE *outfile;
+    DBfile *dbfile;
+    siloimesh_struct_t mesh_struct;
+    siloimesh_t mesh = &mesh_struct;
+    int driver = DB_PDB;
+    int show_all_errors = FALSE;
+
+    int j, i = 1;
+    while (i < argc)
+    {
+        if (strncmp(argv[i], "DB_HDF5", 7) == 0)
+        {
+            driver = StringToDriver(argv[i]);
+        }
+        else if (strncmp(argv[i], "DB_PDB", 6) == 0)
+        {
+            driver = StringToDriver(argv[i]);
+        }
+        else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+        }
+	else if (argv[i][0] != '\0')
+        {
+            fprintf(stderr,"Uncrecognized driver name \"%s\"\n",
+                argv[i]);
+            exit(-1);
+        }
+        i++;
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+
+    /* initialize some global data */
+    for (i = 0; i < 5; i++)
+        matMap[matNames[i]] = i+1;
+
+    int launchLayer = 0;
+    for (i = 0; i < 8; i++)
+    {
+        for (j = 0; j < 4; j++)
+        {
+            for (int k = 0; k < 4; k++)
+                launchContactFaces[(i*4+j)*4+k] =
+                    launchContactFacesTemplate[k] + 2*j + launchLayer;
+        }
+        launchContactFaces[(i*4+3)*4+2] = launchContactFaces[(i*4+3)*4+2] - 8;
+        launchContactFaces[(i*4+3)*4+3] = launchContactFaces[(i*4+3)*4+3] - 8;
+
+        launchLayer += layerNNodes;
+    }
+
+    /* build the monolithic, single domain rocket geometry, etc */
+    build_body();
+
+    /* create the file */
+    printf("Creating test file: \"rocket.silo\".\n");
+    mesh->dbfile = DBCreate("rocket.silo", DB_CLOBBER, DB_LOCAL,
+                      "3D mesh with many interesting subsets", driver);
+#ifdef HAVE_IMESH
+    iMesh_newMesh("", &(mesh->theMesh), &(mesh->error), 0);
+    CheckITAPSError(newMesh);
+    iMesh_getRootSet(mesh->theMesh, &(mesh->rootSet), &(mesh->error));
+    mesh->cwdSet = mesh->rootSet;
+    CheckITAPSError(getRootSet);
+#endif
+
+    /* output the single domain rocket mesh, etc. */
+    write_rocket(mesh);
+
+    /* output multi-block representation for rocket */
+    write_mrocket(mesh);
+
+    /* write out the top-level mrg tree (and groupel maps) for multi-block case */
+    write_top_mrgtree(mesh);
+
+    /* write out mrg trees (and groupel maps) on each block */
+    for (i = 0; i < 3; i++)
+        write_block_mrgtree(mesh, i);
+
+    DBFreeMrgtree(topTree);
+
+    /* close the file */
+    DBClose(mesh->dbfile);
+#ifdef HAVE_IMESH
+    {
+        char *imeshFilename = "rocket.h5m";
+        iMesh_save(mesh->theMesh, mesh->rootSet, imeshFilename, "",
+            &(mesh->error), strlen(imeshFilename), 0);
+        CheckITAPSError(save);
+    }
+#endif
+
+    /* open the file and examine the MRG tree again */
+    mesh->dbfile = DBOpen("rocket.silo", driver, DB_READ);
+
+    /* read the top level mrg tree and write it to a text file */
+    DBmrgtree *tree = DBGetMrgtree(mesh->dbfile, "mrg_tree");
+    outfile = fopen("mrg_tree_afsave.txt","w");
+    DBWalkMrgtree(tree, DBPrintMrgtree, outfile, DB_PREORDER);
+    fclose(outfile);
+    DBFreeMrgtree(tree);
+
+    DBgroupelmap *map = DBGetGroupelmap(mesh->dbfile, "block_to_mat");
+    DBFreeGroupelmap(map);
+
+    DBClose(mesh->dbfile);
+    return 0;
+}
diff --git a/tests/sami.c b/tests/sami.c
new file mode 100644
index 0000000..3e97d55
--- /dev/null
+++ b/tests/sami.c
@@ -0,0 +1,1243 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*
+ * Programmer:  Robb Matzke <matzke at llnl.gov>
+ *              Tuesday, February  9, 1999
+ *
+ * Purpose:	Tests reading and writing SAMI files using the HDF5 driver
+ *		under silo.
+ */
+#include <silo.h>
+#include <stdlib.h>
+#include <std.c>
+
+#include <config.h>
+#ifdef HAVE_HDF5_H
+#include <hdf5.h>
+#endif
+
+#ifdef WIN32
+#include <string.h>
+#endif
+
+#define TEST_NELMTS	(1*720)		/*multiple of 6!		*/
+
+
+#define FALSE		0
+#define TRUE		1
+#define NELMTS(X)	(sizeof(X)/sizeof(*(X)))
+
+static int	cntr_g;
+static int	arch_g=DB_LOCAL;	/*target architecture		*/
+
+/* Memory versions of what appears in the file */
+static char	cdata_g[TEST_NELMTS];
+static short	sdata_g[TEST_NELMTS];
+static int	idata_g[TEST_NELMTS];
+static long	ldata_g[TEST_NELMTS];
+static float	fdata_g[TEST_NELMTS];
+static double	ddata_g[TEST_NELMTS];
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_write_all
+ *
+ * Purpose:	Write complete arrays from file to disk with DBWrite(). This
+ *		only tests that DBWrite() returns success -- it doesn't
+ *		attempt to read the data and compare it to what was written.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_write_all(DBfile *dbfile)
+{
+    int		i, dims[5], nerrors=0;
+
+    puts("DBWrite():");
+    
+    /* Initialize output arrays */
+    for (i=0; i<TEST_NELMTS; i++, cntr_g++) {
+	cdata_g[i] = cntr_g%128; /*`char' has unknown sign so play it safe*/
+	sdata_g[i] = cntr_g-TEST_NELMTS/2;
+	idata_g[i] = cntr_g-TEST_NELMTS/2;
+	ldata_g[i] = cntr_g-TEST_NELMTS/2;
+	fdata_g[i] = (cntr_g-TEST_NELMTS/2)/10.0;
+	ddata_g[i] = (cntr_g-TEST_NELMTS/2)/10.0;
+    }
+    
+    /* 1d char */
+    puts("    1d_char");
+    dims[0] = TEST_NELMTS;
+    if (DBWrite(dbfile, "1d_char", cdata_g, dims, 1, DB_CHAR)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+
+    /* 2d short */
+    puts("    2d_short");
+    dims[0] = 2;
+    dims[1] = TEST_NELMTS/dims[0];
+    if (DBWrite(dbfile, "2d_short", sdata_g, dims, 2, DB_SHORT)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+
+    /* 3d int */
+    puts("    3d_int");
+    dims[0] = 12;
+    dims[1] = 30;
+    dims[2] = TEST_NELMTS/(dims[0]*dims[1]);
+    if (DBWrite(dbfile, "3d_int", idata_g, dims, 3, DB_INT)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+
+    /* 3d long */
+    puts("    3d_long");
+    dims[0] = 5;
+    dims[1] = 6;
+    dims[2] = TEST_NELMTS/(dims[0]*dims[1]);
+    if (DBWrite(dbfile, "3d_long", ldata_g, dims, 3, DB_LONG)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+
+    /* 4d float */
+    DBForceSingle(TRUE);
+    puts("    4d_float");
+    dims[0] = 6;
+    dims[1] = 5;
+    dims[2] = 4;
+    dims[3] = TEST_NELMTS/(dims[0]*dims[1]*dims[2]);
+    if (DBWrite(dbfile, "4d_float", fdata_g, dims, 4, DB_FLOAT)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+    DBForceSingle(FALSE);
+
+    /* 5d double */
+    puts("    5d_double");
+    dims[0] = 3;
+    dims[1] = 2;
+    dims[2] = 6;
+    dims[3] = 5;
+    dims[4] = TEST_NELMTS/(dims[0]*dims[1]*dims[2]*dims[3]);
+    if (DBWrite(dbfile, "5d_double", ddata_g, dims, 5, DB_DOUBLE)<0) {
+	puts("        DBWrite() failed");
+	nerrors++;
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_read_all
+ *
+ * Purpose:	Tests DBReadVar() by reading each of the variables that were
+ *		written by test_write_all() and comparing the results to what
+ *		is stored in memory.
+ *
+ *		This step is skipped if the architecture is not DB_LOCAL
+ *		because the data might be read back as some other type than
+ *		what was written. Unfortunately silo doesn't give the caller
+ *		any control over how data is read.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_read_all(DBfile *dbfile)
+{
+    int		i, nerrors=0;
+    char	cdata_in[TEST_NELMTS];
+    short	sdata_in[TEST_NELMTS];
+    int		idata_in[TEST_NELMTS];
+    long	ldata_in[TEST_NELMTS];
+    float	fdata_in[TEST_NELMTS];
+    double	ddata_in[TEST_NELMTS];
+
+    puts("DBReadVar():");
+    if (DB_LOCAL!=arch_g) {
+	puts("    Skipped because target is not DB_LOCAL"
+	     " -- use browser instead");
+	return 0;
+    }
+    
+    /* 1d char */
+    puts("    1d_char");
+    memset(cdata_in, 0xff, sizeof cdata_in);
+    if (DBReadVar(dbfile, "1d_char", cdata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (cdata_g[i]!=cdata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, cdata_g[i], cdata_in[i]);
+		nerrors++;
+	    }
+	}
+    }
+
+    /* 2d short */
+    puts("    2d_short");
+    memset(sdata_in, 0xff, sizeof sdata_in);
+    if (DBReadVar(dbfile, "2d_short", sdata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (sdata_g[i]!=sdata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, sdata_g[i], sdata_in[i]);
+		nerrors++;
+	    }
+	}
+    }
+
+
+    /* 3d int */
+    puts("    3d_int");
+    memset(idata_in, 0xff, sizeof idata_in);
+    if (DBReadVar(dbfile, "3d_int", idata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (idata_g[i]!=idata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, idata_g[i], idata_in[i]);
+	    }
+	}
+    }
+
+    /* 3d long */
+    puts("    3d_long");
+    memset(ldata_in, 0xff, sizeof ldata_in);
+    if (DBReadVar(dbfile, "3d_long", ldata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (ldata_g[i]!=ldata_in[i]) {
+		printf("        failed at i=%d: out=%ld, in=%ld\n",
+		       i, ldata_g[i], ldata_in[i]);
+	    }
+	}
+    }
+
+    /* 4d float */
+    DBForceSingle(TRUE);
+    puts("    4d_float");
+    memset(fdata_in, 0xff, sizeof fdata_in);
+    if (DBReadVar(dbfile, "4d_float", fdata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+        printf("checking read of first 4d_float\n");
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (fdata_g[i]!=fdata_in[i]) {
+		printf("        failed at i=%d: out=%g, in=%g\n",
+		       i, fdata_g[i], fdata_in[i]);
+	    }
+	}
+    }
+    DBForceSingle(FALSE);
+
+    /* 5d double */
+    puts("    5d_double");
+    memset(ddata_in, 0xff, sizeof ddata_in);
+    if (DBReadVar(dbfile, "5d_double", ddata_in)<0) {
+	puts("        DBReadVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (ddata_g[i]!=ddata_in[i]) {
+		printf("        failed at i=%d: out=%g, in=%g\n",
+		       i, ddata_g[i], ddata_in[i]);
+	    }
+	}
+    }
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_get_all
+ *
+ * Purpose:	Tests DBGetVar() by reading each of the variables that were
+ *		written by test_write_all() and comparing the results to what
+ *		is stored in memory.
+ *
+ *		This step is skipped if the architecture is not DB_LOCAL
+ *		because the data might be read back as some other type than
+ *		what was written. Unfortunately silo doesn't give the caller
+ *		any control over how data is read.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_get_all(DBfile *dbfile)
+{
+    int		i, nerrors=0;
+
+    char	*cdata_in=NULL;
+    short	*sdata_in=NULL;
+    int		*idata_in=NULL;
+    long	*ldata_in=NULL;
+    float	*fdata_in=NULL;
+    double	*ddata_in=NULL;
+
+    puts("DBGetVar():");
+    if (DB_LOCAL!=arch_g) {
+	puts("    Skipped because target is not DB_LOCAL"
+	     " -- use browser instead");
+	return 0;
+    }
+    
+    /* 1d char */
+    puts("    1d_char");
+    if (NULL==(cdata_in=DBGetVar(dbfile, "1d_char"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (cdata_g[i]!=cdata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, cdata_g[i], cdata_in[i]);
+		nerrors++;
+	    }
+	}
+	free(cdata_in);
+    }
+
+    /* 2d short */
+    puts("    2d_short");
+    if (NULL==(sdata_in=DBGetVar(dbfile, "2d_short"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (sdata_g[i]!=sdata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, sdata_g[i], sdata_in[i]);
+		nerrors++;
+	    }
+	}
+	free(sdata_in);
+    }
+
+
+    /* 3d int */
+    puts("    3d_int");
+    if (NULL==(idata_in=DBGetVar(dbfile, "3d_int"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (idata_g[i]!=idata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, idata_g[i], idata_in[i]);
+	    }
+	}
+	free(idata_in);
+    }
+
+    /* 3d long */
+    puts("    3d_long");
+    if (NULL==(ldata_in=DBGetVar(dbfile, "3d_long"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (ldata_g[i]!=ldata_in[i]) {
+		printf("        failed at i=%d: out=%ld, in=%ld\n",
+		       i, ldata_g[i], ldata_in[i]);
+	    }
+	}
+	free(ldata_in);
+    }
+
+    /* 4d float */
+    DBForceSingle(TRUE);
+    puts("    4d_float");
+    if (NULL==(fdata_in=DBGetVar(dbfile, "4d_float"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+        printf("testing DBGetVar of 4d_float\n");
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (fdata_g[i]!=fdata_in[i]) {
+		printf("        failed at i=%d: out=%g, in=%g\n",
+		       i, fdata_g[i], fdata_in[i]);
+	    }
+	}
+	free(fdata_in);
+    }
+    DBForceSingle(FALSE);
+
+    /* 5d double */
+    puts("    5d_double");
+    if (NULL==(ddata_in=DBGetVar(dbfile, "5d_double"))) {
+	puts("        DBGetVar() failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (ddata_g[i]!=ddata_in[i]) {
+		printf("        failed at i=%d: out=%g, in=%g\n",
+		       i, ddata_g[i], ddata_in[i]);
+	    }
+	}
+	free(ddata_in);
+    }
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_inqvar
+ *
+ * Purpose:	Tests variable inquiry functions.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, February 11, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_inqvar(DBfile *dbfile)
+{
+    int		nerrors=0;
+    
+    puts("DBGetVarLength()");
+    
+    puts("    1d_char");
+    if (DBGetVarLength(dbfile, "1d_char")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+    
+    
+    puts("    2d_short");
+    if (DBGetVarLength(dbfile, "2d_short")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+    
+    
+    puts("    3d_int");
+    if (DBGetVarLength(dbfile, "3d_int")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+    
+    
+    puts("    3d_long");
+    if (DBGetVarLength(dbfile, "3d_long")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+    
+    
+    puts("    4d_float");
+    if (DBGetVarLength(dbfile, "4d_float")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+    
+    
+    puts("    5d_double");
+    if (DBGetVarLength(dbfile, "5d_double")!=TEST_NELMTS) {
+	puts("        failed");
+	nerrors++;
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_write_slice
+ *
+ * Purpose:	Writes to just certain parts of an array. We only test this
+ *		for the 3d_int case.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_write_slice(DBfile *dbfile)
+{
+    int		dims[3], i, j, n, nerrors=0;
+    int		idata_out[6*10];
+    int		offset[3], length[3], stride[3];
+
+    puts("DBWriteSlice()");
+
+    dims[0] = 12;
+    dims[1] = 30;
+    dims[2] = TEST_NELMTS/(dims[0]*dims[1]);
+
+    /*
+     * Write to elements (I,J,0) for all I=0 (mod 2) and J=1 (mod 3). That is,
+     * all combinations of I and J such that I is from the set {0,2,4,6,8,10}
+     * and J from {1,4,7,10,13,16,19,22,25,28}.
+     */
+    puts("   3d_int");
+    for (i=n=0; i<12; i+=2) {
+	for (j=1; j<30; j+=3) {
+#if 0
+	    idata_g[i*dims[1]*dims[2]+j*dims[2]] = idata_out[n++] = cntr_g++;
+#else
+	    idata_g[i*dims[1]*dims[2]+j*dims[2]] = idata_out[n++] = 0;
+#endif
+	}
+    }
+    offset[0] = 0;
+    offset[1] = 1;
+    offset[2] = 0;
+    
+    length[0] = dims[0]-offset[0];
+    length[1] = dims[1]-offset[1];
+    length[2] = 1;
+    
+    stride[0] = 2;
+    stride[1] = 3;
+    stride[2] = 1; /*don't care*/
+    
+    if (DBWriteSlice(dbfile, "3d_int", idata_out, DB_INT, offset, length,
+		     stride, dims, 3)<0) {
+	puts("        failed");
+	nerrors++;
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_read_slice
+ *
+ * Purpose:	Reads just certain parts of an array. We only test this for
+ *		the 3d_int case.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Wednesday, February 10, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_read_slice(DBfile *dbfile)
+{
+    int		dims[3], i, j, n, nerrors=0;
+    int		idata_in[12*30];
+    int		offset[3], length[3], stride[3];
+
+    puts("DBReadSlice()");
+    puts("    3d_int");
+
+    dims[0] = 12;
+    dims[1] = 30;
+    dims[2] = TEST_NELMTS/(dims[0]*dims[1]);
+
+    /* Read elements (I,J,0) for I in {5,7,9}, J in {9,18,27} */
+    offset[0] = 5;
+    offset[1] = 9;
+    offset[2] = 0;
+
+    length[0] = (9-5)+1; /*one method*/
+    length[1] = 9*3;	/*another method*/
+    length[2] = 1;
+
+    stride[0] = 2;
+    stride[1] = 9;
+    stride[2] = 1; /*don't care -- only one value being read */
+
+    if (DBReadVarSlice(dbfile, "3d_int", offset, length, stride, 3,
+		       idata_in)<0) {
+	puts("        failed");
+	nerrors++;
+    }
+
+    /* Check */
+    for (i=n=0; i<3; i++) {
+	for (j=0; j<3; j++, n++) {
+	    int v = idata_g[(offset[0]+stride[0]*i)*dims[1]*dims[2] +
+			    (offset[1]+stride[1]*j)*dims[2]];
+	    if (v!=idata_in[n]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       n, v, idata_in[n]);
+		nerrors++;
+	    }
+	}
+    }
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_type_conv
+ *
+ * Purpose:	If we call DBWrite() for an existing variable but the memory
+ *		data type is different than what was previously registered
+ *		then a type conversion should occur.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors.
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_type_conv(DBfile *dbfile)
+{
+    char	cdata_out[TEST_NELMTS];
+    int		i, dims[3], nerrors=0, idata_in[TEST_NELMTS];
+
+    puts("=== Type conversions ===");
+    
+    /* Initialize output arrays */
+    for (i=0; i<TEST_NELMTS; i++, cntr_g++) {
+	idata_g[i] = cdata_out[i] = cntr_g%128;
+    }
+
+    /* Write char data to the 3d_int array */
+    puts("DBWrite()");
+    puts("    3d_int");
+    dims[0] = 12;
+    dims[1] = 30;
+    dims[2] = TEST_NELMTS/(dims[0]*dims[1]);
+    if (DBWrite(dbfile, "3d_int", cdata_out, dims, 3, DB_CHAR)<0) {
+	puts("        failed");
+	nerrors++;
+    }
+
+    /* Read integer data back out */
+    puts("DBRead()");
+    puts("    3d_int");
+    memset(idata_in, 0xff, sizeof idata_in);
+    if (DBReadVar(dbfile, "3d_int", idata_in)<0) {
+	puts("        failed");
+	nerrors++;
+    } else {
+	for (i=0; i<TEST_NELMTS; i++) {
+	    if (idata_g[i]!=idata_in[i]) {
+		printf("        failed at i=%d: out=%d, in=%d\n",
+		       i, idata_g[i], idata_in[i]);
+	    }
+	}
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_write_bad
+ *
+ * Purpose:	Try writing to an existing data but using an incompatible
+ *		size or data type.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors.
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_write_bad(DBfile *dbfile)
+{
+    int		i, data[TEST_NELMTS], dims[4], nerrors=0;
+
+#ifdef HAVE_HDF5_H
+    H5E_BEGIN_TRY {
+#endif
+
+	puts("=== Error conditions ===");
+
+	for (i=0; i<TEST_NELMTS; i++) data[i] = 911;
+
+	/* Write to "3d_int" but supply only 1 dimension */
+	dims[0] = TEST_NELMTS;
+	if (DBWrite(dbfile, "3d_int", data, dims, 1, DB_INT)>=0) {
+	    puts("DBWrite() to 3d_int with 1d data should have failed");
+	    nerrors++;
+	}
+
+	/* Write to "3d_int" but with the wrong sizes */
+	dims[0] = 3;
+	dims[2] = 4;
+	dims[1] = TEST_NELMTS/(dims[0]*dims[2]);
+	if (DBWrite(dbfile, "3d_int", data, dims, 3, DB_INT)>=0) {
+	    puts("DBWrite() to 3d_int with wrong dims should have faild");
+	    nerrors++;
+	}
+
+	/* Write to "4d_float" but with integer data */
+	DBForceSingle(TRUE);
+	dims[0] = 6;
+	dims[1] = 5;
+	dims[2] = 4;
+	dims[3] = TEST_NELMTS/(dims[0]*dims[1]*dims[2]);
+	if (DBWrite(dbfile, "4d_float", data, dims, 4, DB_INT)>=0) {
+	    puts("DBWrite() to 4d_float with integer data should have failed");
+	    nerrors++;
+	}
+	DBForceSingle(FALSE);
+
+#ifdef HAVE_HDF5_H
+    } H5E_END_TRY;
+#endif
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_dirs
+ *
+ * Purpose:	Test directory operations
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Wednesday, February 10, 1999
+ *
+ * Modifications:
+ *		Robb Matzke, 2000-01-12
+ *		Changed hyphens to underscores in object names because silo
+ *		now fails when underscores are present in the name.
+ *-------------------------------------------------------------------------
+ */
+static int
+test_dirs(DBfile *dbfile)
+{
+    int		nerrors=0;
+    char	curdir[1024];
+    static int	in[1]={911}, value[1]={0};
+    static int	dims[1]={1};
+
+    puts("=== Directories ===");
+
+    /* Make some directories */
+    if (DBMkDir(dbfile, "dir1")<0) {
+	puts("DBMkDir(dir1) failed");
+	nerrors++;
+    }
+    if (DBMkDir(dbfile, "dir1/d1a")<0) {
+	puts("DBMkDir(dir1/d1a) failed");
+	nerrors++;
+    }
+    if (DBMkDir(dbfile, "/dir1/d1b")<0) {
+	puts("DBMkDir(dir1/d1b) failed");
+	nerrors++;
+    }
+    if (DBMkDir(dbfile, "/dir1/d1c/")<0) {
+	puts("DBMkDir(dir1/d1c) failed");
+	nerrors++;
+    }
+    if (DBMkdir(dbfile, "//dir2//")<0) {
+	puts("DBMkDir(dir2) failed");
+	nerrors++;
+    }
+
+    /* Set the CWD to /dir1/d1c and write a variable */
+    if (DBSetDir(dbfile, "//dir1//d1c//")<0) {
+	puts("DBSetDir(/dir1/d1c) failed");
+	nerrors++;
+    }
+    if (DBWrite(dbfile, "d1c_A", value, dims, 1, DB_INT)<0) {
+	puts("DBWrite(d1c_A) failed");
+	nerrors++;
+    }
+    if (DBGetDir(dbfile, curdir)<0 || strcmp(curdir, "/dir1/d1c")) {
+	puts("DBGetDir() failed");
+	nerrors++;
+    }
+    if (DBReadVar(dbfile, "../d1c/..//..////dir1/d1c//d1c_A", in)<0 ||
+	in[0]!=value[0]) {
+	puts("DBReadVar(d1c_A) failed");
+	nerrors++;
+    }
+
+    /* Test table of contents */
+    if (NULL==DBGetToc(dbfile)) {
+	puts("DBGetToc() failed");
+	nerrors++;
+    }
+    
+    /* Set CWD to top */
+    if (DBSetDir(dbfile, "/")<0) {
+	puts("DBSetDir(/) failed");
+	nerrors++;
+    }
+    if (DBGetDir(dbfile, curdir)<0 || strcmp(curdir, "/")) {
+	puts("DBetDir() failed");
+	nerrors++;
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_curve
+ *
+ * Purpose:	Tests reading and writing DBcurve objects.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, March 23, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_curve(DBfile *dbfile)
+{
+    int			nerrors = 0;
+    static double	xvals_d[] = { 1.1,   2.2,   3.3,   4.4,   5.5 };
+    static double	yvals_d[] = {10.01, 20.02, 30.03, 40.04, 50.05};
+    
+    puts("=== Curves ===");
+
+    DBMkDir(dbfile, "/curves");
+    DBSetDir(dbfile, "/curves");
+
+    /* Write an initial curve along with its X and Y arrays */
+    if (DBPutCurve(dbfile, "curve1", xvals_d, yvals_d, DB_DOUBLE,
+		   NELMTS(xvals_d), NULL)<0) {
+	puts("DBPutCurve(curve1) failed");
+	nerrors++;
+    }
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_quadmesh
+ *
+ * Purpose:	Tests reading and writing DBquadmesh objects.
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, March 30, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_quadmesh(DBfile *dbfile)
+{
+    int			nerrors=0;
+    static int		dims[] = {5, 5};
+    static float	coords0[] = {0.11, 0.12, 0.13, 0.14, 0.15};
+    static float	coords1[] = {0.21, 0.22, 0.23, 0.24, 0.25};
+    static float	*coords[] = {coords0, coords1};
+    static double	varA[] = {10, 11, 12, 13, 14,
+				  15, 16, 17, 18, 19,
+				  20, 21, 22, 23, 24,
+				  25, 26, 27, 28, 29,
+				  30, 31, 32, 33, 34};
+    static double	varB[] = {35, 36, 37, 38, 39,
+				  40, 41, 42, 43, 44,
+				  45, 46, 47, 48, 49,
+				  50, 51, 52, 53, 54,
+				  55, 56, 57, 58, 59};
+    static double	varC[] = {60, 61, 62, 63, 64,
+				  65, 66, 67, 68, 69,
+				  70, 71, 72, 73, 74,
+				  75, 76, 77, 78, 79,
+				  80, 81, 82, 83, 84};
+    static double	*vars[] = {varA, varB, varC};
+    static char		*varnames[] = {"varA", "varB", "varC"};
+	
+    puts("=== Quadmesh ===");
+
+    DBMkDir(dbfile, "/quad");
+    DBSetDir(dbfile, "/quad");
+
+    if (DBPutQuadmesh(dbfile, "qm1", NULL, coords, dims, 2, DB_FLOAT,
+		      DB_COLLINEAR, NULL)<0) {
+	puts("DBPutQuadmesh(qm1) failed");
+	nerrors++;
+    }
+
+    if (DBPutQuadvar(dbfile, "qv1", "qm1", 3, varnames, (float**)vars, dims, 2,
+		     NULL, 0, DB_DOUBLE, DB_NODECENT, NULL)<0) {
+	puts("DBPutQuadmesh(qv1) failed");
+	nerrors++;
+    }
+    
+
+    return nerrors;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:	test_ucdmesh
+ *
+ * Purpose:	Test unstructured mesh functions.
+ *
+ * Return:	Success:	0
+ *
+ *		Failure:	number of errors
+ *
+ * Programmer:	Robb Matzke
+ *              Thursday, April  1, 1999
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_ucdmesh(DBfile *dbfile)
+{
+    int			nerrors = 0;
+    static double	coordA[] = {101, 102, 103, 104, 105};
+    static double	coordB[] = {201, 202, 203, 204, 205};
+    static double	coordC[] = {301, 302, 303, 304, 305};
+    static double	*coords[] = {coordA, coordB, coordC};
+    static char		*coordnames[] = {"coordA", "coordB", "coordC"};
+    static int		nnodes = NELMTS(coordA);
+    static int		ndims = NELMTS(coords);
+    static int		nzones = 3;
+    static float	varA[] = {1,  2,  3,  4,  5, 6, 7, 8};
+    static float	*vars[] = {varA};
+    static char		*varnames[] = {"varA"};
+    static int		nels = NELMTS(varA);
+    static int		nvars = NELMTS(vars);
+    static float	mixA[] = {0.1, 0.2, 0.3};
+    static float	*mixvars[] = {mixA};
+    static int		mixlen = NELMTS(mixA);
+    static int		nodelist[] = {500, 501, 502, 503, 504, 505, 506, 507};
+    static int		lnodelist = NELMTS(nodelist);
+    static int		shapecnt[] = {1,  1,  2,  2,  3,  3,  4,  4,  5,  5};
+    static int		shapesize[]= {5,  5,  4,  4,  3,  3,  2,  2,  1,  1};
+    static int		nshapes = NELMTS(shapecnt);
+    static int		typelist[] = {99, 98, 97, 96, 95, 94};
+    static int		ntypes = NELMTS(typelist);
+    static int		types[]    = {193, 192, 191, 190, 189, 187, 186};
+    static int		zoneno[]   = {185, 184, 183, 182, 181, 180, 179};
+    static int		nfaces = NELMTS(types);
+    static int		origin = 1;
+
+    puts("=== Ucdmesh ===");
+
+    DBMkDir(dbfile, "/ucd");
+    DBSetDir(dbfile, "/ucd");
+
+    /* Mesh */
+    if (DBPutUcdmesh(dbfile, "um1", ndims, coordnames, (float**)coords, nnodes,
+		     nzones, "zl1", "fl1", DB_DOUBLE,
+		     NULL)<0) {
+	puts("DBPutUcdmesh(um1) failed");
+	nerrors++;
+    }
+    if (DBPutUcdsubmesh(dbfile, "um2", "um1", nzones, "zl1", "fl1", NULL)<0) {
+	puts("DBPutUcdsubmesh(um2) failed");
+	nerrors++;
+    }
+    
+    /* Variable */
+    if (DBPutUcdvar(dbfile, "uv1", "um1", nvars, varnames, vars, nels, mixvars,
+		    mixlen, DB_FLOAT, DB_NODECENT, NULL)<0) {
+	puts("DBPutUcdvar(uv1) failed");
+	nerrors++;
+    }
+
+    /* Facelist */
+    if (DBPutFacelist(dbfile, "fl1", nfaces, ndims, nodelist, lnodelist,
+		      origin, zoneno, shapesize, shapecnt, nshapes, types,
+		      typelist, ntypes)<0) {
+	puts("DBPutFacelist(fl1) failed");
+	nerrors++;
+    }
+
+    /* Zonelist */
+    if (DBPutZonelist(dbfile, "zl1", nzones, ndims, nodelist, lnodelist,
+		      origin, shapesize, shapecnt, nshapes)<0) {
+	puts("DBPutZonelist(zl1) failed");
+	nerrors++;
+    }
+
+    
+    return nerrors;
+}
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	Success:	
+ *
+ *		Failure:	
+ *
+ * Programmer:	Robb Matzke
+ *              Tuesday, February  9, 1999
+ *
+ * Modifications:
+ *    Eric Brugger, Fri Apr 14 09:30:47 PDT 2000
+ *    I modified the routine to not perform some tests that are not valid
+ *    when using the PDB driver.  There was already code to not do those
+ *    tests when using the pdb driver but it wasn't quite correct.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    DBfile		*dbfile;
+    int			i, nerrors=0,  driver=DB_PDB;
+    char		*filename="sami.silo";
+    int                 show_all_errors = FALSE;
+    
+    for (i=1; i<argc; i++) {
+	if (!strcmp(argv[i], "DB_LOCAL")) {
+	    arch_g = DB_LOCAL;
+	} else if (!strcmp(argv[i], "DB_SUN3")) {
+	    arch_g = DB_SUN3;
+	} else if (!strcmp(argv[i], "DB_SUN4")) {
+	    arch_g = DB_SUN4;
+	} else if (!strcmp(argv[i], "DB_SGI")) {
+	    arch_g = DB_SGI;
+	} else if (!strcmp(argv[i], "DB_RS6000")) {
+	    arch_g = DB_RS6000;
+	} else if (!strcmp(argv[i], "DB_CRAY")) {
+	    arch_g = DB_CRAY;
+	} else if (!strncmp(argv[i], "DB_",3)) {
+            driver = StringToDriver(argv[i]);
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    /* turn of deprecate warnings */
+    DBSetDeprecateWarnings(0);
+
+    /*
+     * Create a new file (clobbering any old file), write some variables to
+     * the file, then read them and compare with what was written.
+     */
+    puts("=== Creating file ===");
+    if (NULL==(dbfile=DBCreate(filename, DB_CLOBBER, arch_g,
+			       "testing SAMI HDF5 silo driver", driver))) {
+	puts("DBCreate() failed");
+	nerrors++;
+    }
+
+    /* Write the first time, creating variables */
+    nerrors += test_write_all(dbfile);
+    nerrors += test_read_all(dbfile);
+    
+    nerrors += test_get_all(dbfile);
+    nerrors += test_inqvar(dbfile);
+
+    /* Write a second time, writing new values to existing variables */
+    nerrors += test_write_all(dbfile);
+    nerrors += test_read_all(dbfile);
+
+    /* Rewrite with different memory data type and verify results */
+    if (DB_PDB != (driver&0xF) && DB_PDBP != (driver&0xF))
+    {
+        nerrors += test_type_conv(dbfile);
+    }
+
+    /*
+     * Do some illegal things to make sure they fail. Make sure we can still
+     * read data.
+     */
+    if (DB_PDB != (driver&0xF) && DB_PDBP != (driver&0xF))
+    {
+        nerrors += test_write_bad(dbfile);
+        nerrors += test_read_all(dbfile);
+    }
+    
+    if (DBClose(dbfile)<0) {
+	puts("DBClose() failed");
+	nerrors++;
+    }
+
+    /* Open the file for read only and read all variables */
+    puts("=== Opening for read-only ===");
+    if (NULL==(dbfile=DBOpen(filename, DB_UNKNOWN, DB_READ))) {
+	puts("DBOpen() failed for read-only access");
+	nerrors++;
+    }
+    nerrors += test_read_all(dbfile);
+    if (DBClose(dbfile)<0) {
+	puts("DBClose() failed");
+	nerrors++;
+    }
+    
+    /* Open the file for read-write and test slicing */
+    puts("=== Opening for read-write ===");
+    if (NULL==(dbfile=DBOpen(filename, driver, DB_APPEND))) {
+	puts("DBOpen() failed for read-write access");
+	nerrors++;
+    }
+    
+    nerrors += test_read_all(dbfile);
+    nerrors += test_write_slice(dbfile);
+    nerrors += test_read_all(dbfile);
+    nerrors += test_read_slice(dbfile);
+    nerrors += test_dirs(dbfile);
+    nerrors += test_curve(dbfile);
+    nerrors += test_quadmesh(dbfile);
+    nerrors += test_ucdmesh(dbfile);
+
+    if (DBClose(dbfile)<0) {
+	puts("DBClose() failed");
+	nerrors++;
+    }
+
+    if (nerrors) {
+	printf("*** %d error%s detected ***\n", nerrors, 1==nerrors?"":"s");
+    } else {
+	puts("All sami tests passed.");
+    }
+    CleanupDriverStuff();
+    return nerrors?1:0;
+}
diff --git a/tests/simple.c b/tests/simple.c
new file mode 100644
index 0000000..c37c8d8
--- /dev/null
+++ b/tests/simple.c
@@ -0,0 +1,254 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include "silo.h"               /*include public silo           */
+
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+#include <std.c>
+
+#undef NX
+#define NX 10
+#undef NY
+#define NY 15
+#undef NZ
+#define NZ 20
+
+#define NX2 3
+#define NY2 5
+#define NZ2 14
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *      Mark C. Miller, Mon Sep 21 15:20:30 PDT 2009
+ *      Added code to test long long type.
+ *
+ *      Mark C. Miller, Wed Sep 23 11:57:24 PDT 2009
+ *      Added logic to test DBInqFile.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:40:35 PST 2009
+ *      Test long long on PDB driver too.
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    
+    int            i, j, k;
+    int            ndims, dims[3];
+    float          val[NX * NY * NZ];
+    long long      lval[NX * NY * NZ];
+    int            offset[3], length[3], stride[3];
+    float          val2[NX * NY * NZ];
+    long long      *lval2 = 0;
+    int            cnt, driver=DB_PDB;
+    char	  *filename="simple.pdb";
+    int            k1, k2;
+    int            err = 0;
+    int            inqval;
+    DBfile        *dbfile;
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "simple.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "simple.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_TOP, NULL);
+    DBForceSingle(1);
+
+    /*
+     * Build a simple variables.
+     */
+    ndims = 3;
+
+    dims[0] = NZ;
+    dims[1] = NY;
+    dims[2] = NX;
+
+    for (k = 0; k < NZ; k++) {
+        for (j = 0; j < NY; j++) {
+            for (i = 0; i < NX; i++) {
+                val[i + j * NX + k * NX * NY] = i + j * NX + k * NX * NY;
+                lval[i + j * NX + k * NX * NY] = ((long long) 1 << 35) + i + j * NX + k * NX * NY;
+            }
+        }
+    }
+
+    /* Test InqFile on a PDB (but not Silo) file */
+    if (driver == DB_PDB)
+        inqval = DBInqFile("not_a_silo_file.pdb");
+    else
+        inqval = DBInqFile("not_a_silo_file.h5");
+    if (inqval < 0)
+    {
+        fprintf(stderr, "Error in InqFile attempting to identify not_a_silo_file");
+        err = 1;
+    }
+    else if (inqval > 0)
+    {
+        fprintf(stderr, "InqFile incorrectly identified not_a_silo_file");
+        err = 1;
+    }
+
+    /* Create empty silo file to test InqFile */
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "Empty Silo File", driver);
+    DBClose(dbfile);
+    if (DBInqFile(filename) <= 0)
+    {
+        fprintf(stderr, "InqFile says file created via DBCreate is NOT a silo file");
+        err = 1;
+    }
+    unlink(filename);
+
+    /*
+     * Create a file that contains a simple variables.
+     */
+    printf("Creating file: `%s'\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "Simple Test", driver);
+
+    DBWrite(dbfile, "simple", val, dims, ndims, DB_FLOAT);
+    DBWrite(dbfile, "longlong", lval, dims, ndims, DB_LONG_LONG);
+
+    DBClose(dbfile);
+
+    /*
+     * Now try opening the file again and reading the simple
+     * variable.
+     */
+    printf("Reopening `%s'\n", filename);
+    dbfile = DBOpen(filename, driver, DB_READ);
+
+    offset[0] = 0;
+    offset[1] = 0;
+    offset[2] = 0;
+    length[0] = NZ2;
+    length[1] = NY2;
+    length[2] = NX2;
+    stride[0] = 1;
+    stride[1] = 1;
+    stride[2] = 1;
+
+    for (i = 0; i < NX * NY * NZ; i++)
+        val2[i] = 0;
+
+    DBReadVarSlice(dbfile, "simple", offset, length, stride, ndims, val2);
+    lval2 = DBGetVar(dbfile, "longlong");
+
+    DBClose(dbfile);
+
+    /*
+     * Check the data.
+     */
+    cnt = 0;
+    for (k = 0; k < NZ2; k++) {
+        for (j = 0; j < NY2; j++) {
+            for (i = 0; i < NX2; i++) {
+                if (val2[i + j * NX2 + k * NX2 * NY2] != val[i + j * NX + k * NX * NY])
+                    cnt++;
+            }
+        }
+    }
+    err += cnt;
+    printf("%d values don't match\n", cnt);
+
+    cnt = 0;
+    k1 = NX2 * NY2 * NZ2;
+    k2 = NX * NY * NZ;
+    for (i = k1; i < k2; i++)
+        if (val2[i] != 0)
+            cnt++;
+    printf("%d values were overwritten\n", cnt);
+
+    cnt = 0;
+    for (k = 0; k < NZ && lval2; k++) {
+        for (j = 0; j < NY; j++) {
+            for (i = 0; i < NX; i++) {
+                if (lval2[i + j * NX + k * NX * NY] != lval[i + j * NX + k * NX * NY])
+                    cnt++;
+            }
+        }
+    }
+    err += cnt;
+        printf("%d long long values don't match\n", cnt);
+
+    if (lval2) free(lval2);
+
+    CleanupDriverStuff();
+    return err;
+}
diff --git a/tests/spec.c b/tests/spec.c
new file mode 100644
index 0000000..4c22ae0
--- /dev/null
+++ b/tests/spec.c
@@ -0,0 +1,307 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <stdlib.h>
+#include "silo.h"
+#include <std.c>
+
+#define NX 10                   /* Number of zones in x direction */
+#define NY 3                   /* Number of zones in y direction */
+#define MAX_MIX_LEN NX*NY*3     /* Max length of the mix_stuff arrays */
+#define SAMPLE 20.0             /* Sample size of each zone */
+#define SCALE (3.1415926*5.0)   /* Scale of the float variable */
+#define DAMP 2.0                /* Damping of the float variable */
+#define VARIANCE 5.0            /* "Randomness" of the mesh */
+
+double distance(double,double,double,double);
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    int            i,j;
+    DBfile        *file = NULL;
+    char          *coordnames[2];  /* Name the axes */
+    float          xcoords[NX + 1];
+    float          ycoords[NY + 1];
+    float         *coordinates[2];
+    int            dims[2];
+    float          float_var[NX*NY];
+    float          dist_var[NX*NY];
+    float          density_var[NX*NY];
+    float          total_length, frac_length;
+    int            matnos[2];
+    int            nmatspec[2];
+    float          species_mf[MAX_MIX_LEN];
+    int            matlist[MAX_MIX_LEN];
+    int            speclist[MAX_MIX_LEN];
+    int            nspecies_mf;
+    float          dist;
+    DBoptlist      *optlist;
+    int            value;
+    int		   driver=DB_PDB;
+    char	   *filename="species.silo";
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "species.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "species.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    printf("Creating a 2D rectilinear SILO file `%s'...\n", filename);
+
+    /* Create the SILO file */
+    if ((file = DBCreate(filename, DB_CLOBBER, DB_LOCAL, NULL,
+			 driver)) == NULL)
+    {
+        fprintf(stderr, "Unable to create SILO file\n");
+        exit(1);
+    }
+
+    /* Name the coordinate axes 'X' and 'Y' */
+    coordnames[0] = (char *) safe_strdup("X");
+    coordnames[1] = (char *) safe_strdup("Y");
+
+    /* Set up the coordinate values */
+
+    /* X Coordinates */
+    for(i=0;i<NX+1;i++)
+        xcoords[i] = ((double)i)/NX;
+
+    /* Y Coordinates */
+    for(j=0;j<NY+1;j++)
+        ycoords[j] = ((double)j)/NY;
+
+    coordinates[0] = xcoords;
+    coordinates[1] = ycoords;
+
+    /* Enumerate the dimensions (4 values in x direction, 3 in y) */
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+
+    /* Write out the mesh to the file */
+    DBPutQuadmesh(file, "quad_mesh", coordnames, coordinates, dims, 2,
+                  DB_FLOAT, DB_COLLINEAR, NULL);
+
+    /* Set up the material and species information */
+
+    /* Material numbers */
+    matnos[0] = 1;
+    matnos[1] = 2;
+
+    /* Material species numbers */
+    nmatspec[0] = 3;
+    nmatspec[1] = 1;
+
+    printf("Calculating material information.\n");
+    /* Mixed species array */
+    nspecies_mf = 0;
+    for(j=0;j<NY;j++)
+    {
+        for(i=0;i<NX;i++)
+        {
+            if (xcoords[i] >= 0.8)
+            {
+                matlist[j*NX+i] = 2;
+
+                /* All one species */
+                speclist[j*NX+i] = nspecies_mf + 1;
+                species_mf[nspecies_mf++] = 1.0;
+            }
+            else
+            {
+                matlist[j*NX+i] = 1;
+
+                speclist[j*NX+i] = nspecies_mf + 1;
+
+                if (xcoords[i+1] < (1.0/3.0))
+                {
+                    /* All on left - All species 1 */
+                    species_mf[nspecies_mf++] = 1.0;
+                    species_mf[nspecies_mf++] = 0.0;
+                    species_mf[nspecies_mf++] = 0.0;
+                } else if ((xcoords[i] > (1.0/3.0)) && (xcoords[i+1] < (2.0/3.0)))
+                {
+                    /* All in middle - All species 2 */
+                    species_mf[nspecies_mf++] = 0.0;
+                    species_mf[nspecies_mf++] = 1.0;
+                    species_mf[nspecies_mf++] = 0.0;
+                } else if (xcoords[i] > (2.0/3.0))
+                {
+                    /* All on right - All species 3 */
+                    species_mf[nspecies_mf++] = 0.0;
+                    species_mf[nspecies_mf++] = 0.0;
+                    species_mf[nspecies_mf++] = 1.0;
+                } else
+                {
+                    /* Somewhere on a boundary */
+                    if (xcoords[i] < (1.0/3.0))
+                    {
+                        /* Left boundary */
+                        total_length = (xcoords[i+1] - xcoords[i]);
+                        frac_length = ((1.0/3.0) - xcoords[i]);
+                        species_mf[nspecies_mf++] = (frac_length/total_length);
+                        species_mf[nspecies_mf++] = 1 - (frac_length/total_length);
+                        species_mf[nspecies_mf++] = 0.0;
+                    } else
+                    {
+                        /* Right boundary */
+                        total_length = (xcoords[i+1] - xcoords[i]);
+                        frac_length = ((2.0/3.0) - xcoords[i]);
+                        species_mf[nspecies_mf++] = 0.0;
+                        species_mf[nspecies_mf++] = (frac_length/total_length);
+                        species_mf[nspecies_mf++] = 1 - (frac_length/total_length);
+                    }
+                }
+            }
+        }
+    }
+
+    /* The dimensions have changed since materials are defined for zones,
+     * not for nodes */
+    dims[0] = NX;
+    dims[1] = NY;
+
+    if (nspecies_mf>MAX_MIX_LEN)
+    {
+        fprintf(stderr,"Length %d of mixed species arrays exceeds the max %d.\n",
+            nspecies_mf,MAX_MIX_LEN);
+        fprintf(stderr,"Memory may have been corrupted, and the SILO\n");
+        fprintf(stderr,"file may be invalid.\n");
+    }
+
+    /* Write out the material to the file */
+    DBPutMaterial(file, "mat1", "quad_mesh", 2, matnos, matlist, dims, 2, NULL,
+                  NULL, NULL, NULL, 0, DB_FLOAT, NULL);
+
+    /* Write out the material species to the file */
+    DBPutMatspecies(file, "matspec1", "mat1", 2, nmatspec, speclist, dims,
+                    2, nspecies_mf, species_mf, NULL, 0, DB_FLOAT, NULL);
+
+    free(coordnames[0]);
+    free(coordnames[1]);
+
+    printf("Calculating variables.\n");
+    /* Set up the variables */
+    for(j=0;j<NY;j++)
+        for(i=0;i<NX;i++)
+        {
+            dist = distance((xcoords[i]+xcoords[i+1])/2,(ycoords[j]+ycoords[j+1])/2,0.5,0.5);
+            float_var[j*NX+i] = cos(SCALE*dist)/exp(dist*DAMP);
+            dist_var[j*NX+i] = dist;
+            if (xcoords[i]<(1.0/3.0))
+                density_var[j*NX+i] = 30.0;
+            else if ((xcoords[i]<(2.0/3.0)) || (xcoords[i] >= 0.8))
+                density_var[j*NX+i] = 1000.0;
+            else
+                density_var[j*NX+i] = 200.0;
+        }
+
+    /* Make a DBoptlist so that we can tell the variables to use the
+       material species stuff */
+
+    optlist = DBMakeOptlist(1);
+    value = DB_ON;
+    DBAddOption(optlist, DBOPT_USESPECMF, &value);
+
+    /* Write the data variables to the file */
+    DBPutQuadvar1(file, "float_var", "quad_mesh", float_var, dims, 2, NULL,
+                  0, DB_FLOAT, DB_ZONECENT, optlist);
+    DBPutQuadvar1(file, "dist_var", "quad_mesh", dist_var, dims, 2, NULL,
+                  0, DB_FLOAT, DB_ZONECENT, optlist);
+    DBPutQuadvar1(file, "density_var", "quad_mesh", density_var, dims, 2, NULL,
+                  0, DB_FLOAT, DB_ZONECENT, optlist);
+
+    DBFreeOptlist(optlist);
+    DBClose(file);
+
+    printf("Finished.\n");
+
+    CleanupDriverStuff();
+    return (0);
+}
+
+double
+distance(double x, double y, double cx, double cy)
+{
+
+    return(sqrt((x-cx)*(x-cx) + (y-cy)*(y-cy)));
+}
diff --git a/tests/specmix.c b/tests/specmix.c
new file mode 100644
index 0000000..bd352a9
--- /dev/null
+++ b/tests/specmix.c
@@ -0,0 +1,983 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*------------------------------------------------------------------------
+ * specmix.c -- Species over mixed-material zones.
+ *
+ * Programmer:  Jeremy Meredith, Feb 17, 1999
+ *
+ *  This test case creates identical structured and unstructured problems.
+ *  Each has several materials, including mixed zones, and material-species
+ *  information distributed over these materials (note the mixed zones).
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Thu Feb 11 09:56:05 PST 2010
+ *  Added test for vars with 8 subcomponents.
+ *   Mark C. Miller, Mon Feb  1 17:08:45 PST 2010
+ *   Added stuff to output all silo data types.
+ *-----------------------------------------------------------------------*/
+#include <math.h>
+#include <silo.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <std.c>
+
+#define MAXVAR  4
+#define MAXMAT  5
+#define MAXSPEC 5
+
+#define NEW(t,n)   (t*)calloc(n,sizeof(t))
+#ifndef min
+#define min(a,b)   ((a)<(b) ? (a) : (b))
+#endif
+#ifndef max
+#define max(a,b)   ((a)>(b) ? (a) : (b))
+#endif
+#define lim(a,l,h) (max(min((a),(h)),(l)))
+#define lim01(a)   (lim((a),0,1))
+
+/* Structures for a 2-d problem domain: */
+
+/* Struct: Node */
+typedef struct {
+  int   c;
+  int   i,j;
+  float x,y;
+  float vars[MAXVAR];
+} Node;
+
+/* Struct: Zone */
+typedef struct {
+  float vars[MAXVAR];
+  int   nmats;
+  int   mats[MAXMAT+1];
+  float matvf[MAXMAT+1];
+  float specmf[MAXMAT+1][MAXSPEC];
+  Node *n[2][2];  /* the four nodes at the corners of this zone*/
+} Zone;
+
+/* Struct: Mesh */
+typedef struct {
+  int nx;
+  int ny;
+  int zx;
+  int zy;
+  Node **node;
+  Zone **zone;
+} Mesh;
+void Mesh_Create(Mesh*,int,int); /* constructor */
+
+/* file-writing functions */
+void writemesh_curv2d(DBfile*,int,int);
+void writemesh_ucd2d(DBfile*,int,int);
+int writematspec(DBfile*);
+
+/* problem specifics */
+enum ZVARS { ZV_P, ZV_D };
+enum NVARS { NV_U, NV_V };
+int nmat = 4;
+int nspec[]={2,4,5,1};
+int matnos[]={1,2,3,4};
+char *matnames[]={"Top", "Lower right", "Bottom", "Left"};
+char *specnames[]={"Brad","Kathleen","Mark","Hank","Eric",
+                   "Jeremy","Cyrus","Sean","Dave","Randy",
+                   "Gunther","Tom"};
+char *speccolors[]={"Red","Green","Blue","Cyan","Magenta",
+                   "Yellow","Black","Orange","Brown","Purple",
+                   "White","Pink"};
+
+Mesh mesh;
+
+/*----------------------------------------------------------------------------
+ * Constructor: Mesh_Create()
+ *
+ * Inputs:   mesh   (Mesh*): The mesh to construct
+ *           zx_, zy_ (int): The x & y size of the mesh in zones
+ *
+ * Abstract: initialize and allocate space for the problem mesh
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+void Mesh_Create(Mesh *mesh,int zx_,int zy_) {
+  int x,y;
+  int c;
+  mesh->nx=zx_+1;
+  mesh->ny=zy_+1;
+  mesh->zx=zx_;
+  mesh->zy=zy_;
+  
+  c=0;
+  mesh->node=NEW(Node*,mesh->nx);
+  for (x=0;x<mesh->nx;x++) {
+    mesh->node[x]=NEW(Node,mesh->ny);
+    for (y=0;y<mesh->ny;y++) {
+      mesh->node[x][y].c=c++;
+      mesh->node[x][y].i=x;
+      mesh->node[x][y].j=y;
+    }
+  }
+  
+  mesh->zone=NEW(Zone*,mesh->zx);
+  for (x=0;x<mesh->zx;x++) {
+    mesh->zone[x]=NEW(Zone,mesh->zy);
+    for (y=0;y<mesh->zy;y++) {
+      mesh->zone[x][y].n[0][0]=&mesh->node[x][y];
+      mesh->zone[x][y].n[1][0]=&mesh->node[x+1][y];
+      mesh->zone[x][y].n[0][1]=&mesh->node[x][y+1];
+      mesh->zone[x][y].n[1][1]=&mesh->node[x+1][y+1];
+    }
+  }
+}
+
+
+/*----------------------------------------------------------------------------
+ *----------------------------------------------------------------------------
+ *                              Main Program
+ *----------------------------------------------------------------------------
+ *----------------------------------------------------------------------------
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *---------------------------------------------------------------------------*/
+int main(int argc, char *argv[]) {
+  int x,y;
+  int m,s;
+  int err, mixc;
+  int i, driver=DB_PDB, reorder=0;
+  char filename[64], *file_ext=".pdb";
+  int show_all_errors = FALSE;
+  DBfile *db;
+
+  /* Parse command-line */
+  for (i=1; i<argc; i++) {
+      if (!strncmp(argv[i], "DB_PDB", 6)) {
+	  driver = StringToDriver(argv[i]);
+	  file_ext = ".pdb";
+      } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+          driver = StringToDriver(argv[i]);
+	  file_ext = ".h5";
+      } else if (!strcmp(argv[i], "reorder")) {
+	  reorder = 1;
+      } else if (!strcmp(argv[i], "show-all-errors")) {
+          show_all_errors = 1;
+      } else if (argv[i][0] != '\0') {
+	  fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+      }
+  }
+    
+  if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+  Mesh_Create(&mesh,20,20);
+  
+  /* -=-=-=-=-=-=-=-=-=- */
+  /*  Setup Coordinates  */
+  /* -=-=-=-=-=-=-=-=-=- */
+  printf("Creating the mesh\n");
+
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      float xx = (x-10);
+      float yy = ((xx-8.5)*xx*(xx+8.5))/40. + (y-10);
+      mesh.node[x][y].x = xx*2+(yy*yy/50 - 3);
+      mesh.node[x][y].y = yy;
+    }
+  }
+
+
+  /* -=-=-=-=-=-=-=-=-=- */
+  /*  Do Mesh Variables  */
+  /* -=-=-=-=-=-=-=-=-=- */
+  printf("Creating the variables\n");
+
+  /* do zone vars */
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      mesh.zone[x][y].vars[ZV_P] = sqrt((mesh.node[x][y].x*mesh.node[x][y].x) +
+                                        (mesh.node[x][y].y*mesh.node[x][y].y));
+      mesh.zone[x][y].vars[ZV_D] = 10. / (mesh.zone[x][y].vars[ZV_P]+5);
+    }
+  }
+
+  /* do node vars */
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      mesh.node[x][y].vars[NV_U] = mesh.node[x][y].x;
+      mesh.node[x][y].vars[NV_V] = mesh.node[x][y].y;
+    }
+  }
+
+
+  /* -=-=-=-=-=-=-=-=-=- */
+  /*    Do Materials     */
+  /* -=-=-=-=-=-=-=-=-=- */
+  printf("Overlaying materials\n");
+
+
+  /* initialize */
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      mesh.zone[x][y].nmats=0;
+    }
+  }
+	  
+  /* do it */
+  for (m=1; m<=nmat; m++) {
+    for (x=0;x<mesh.zx;x++) {
+      for (y=0;y<mesh.zy;y++) {
+	float x00=mesh.zone[x][y].n[0][0]->x;
+	float y00=mesh.zone[x][y].n[0][0]->y;
+	float x10=mesh.zone[x][y].n[1][0]->x;
+	float y10=mesh.zone[x][y].n[1][0]->y;
+	float x01=mesh.zone[x][y].n[0][1]->x;
+	float y01=mesh.zone[x][y].n[0][1]->y;
+	float x11=mesh.zone[x][y].n[1][1]->x;
+	float y11=mesh.zone[x][y].n[1][1]->y;
+
+	int   i,j;
+	int   c=0;
+	float vf=0.;
+	const int RES=40; /* subsampling resolution */
+
+	/* Subsample the zone at RESxRES to    *
+	 * get a more accurate volume fraction */
+	for (i=0;i<=RES;i++) {
+	  for (j=0;j<=RES;j++) {
+	    float ii=(float)i/(float)RES;
+	    float jj=(float)j/(float)RES;
+	    float xc = (x00*ii + x10*(1.-ii))*jj + 
+	               (x01*ii + x11*(1.-ii))*(1.-jj);
+	    float yc = (y00*ii + y10*(1.-ii))*jj + 
+                       (y01*ii + y11*(1.-ii))*(1.-jj);
+
+	    switch (m) {
+	    case 1:
+	      if (xc>-15 && yc>2) vf++;
+	      break;
+	    case 2:
+	      if (xc>-15 && yc<=2 && xc-5>yc) vf++;
+	      break;
+	    case 3:
+	      if (xc>-15 && yc<=2 && xc-5<=yc) vf++;
+	      break;
+	    case 4:
+	      if (xc<= -15) vf++;
+	      break;
+	    default:
+	      break;
+	    }
+
+	    c++;
+	  }
+	}
+
+	vf /= (float)c;
+
+	mesh.zone[x][y].matvf[m]=vf;
+	if (vf)
+	  mesh.zone[x][y].nmats++;
+      }
+    }
+  }
+  
+  /* check for errors in mat-assigning code! */
+  err=0;
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      float vf=0;
+      for (m=1; m<=nmat; m++) {
+	vf += mesh.zone[x][y].matvf[m];
+      }
+      if (vf<.99 || vf>1.01) {
+	printf("Error in zone x=%d y=%d: vf = %f\n",x,y,vf);
+	err++;
+      }
+    }
+  }
+  if (err) exit(err);
+
+
+  /* -=-=-=-=-=-=-=-=-=- */
+  /*  do species stuff!  */
+  /* -=-=-=-=-=-=-=-=-=- */
+  printf("Overlaying material species\n");
+
+
+  err=0;
+  for (m=1;m<=nmat;m++) {
+    for (x=0;x<mesh.zx;x++) {
+      for (y=0;y<mesh.zy;y++) {
+	if (mesh.zone[x][y].matvf[m]>0.) {
+	  float mftot=0.;
+	  for (s=0; s<nspec[m-1]; s++) {
+	    float x00=mesh.zone[x][y].n[0][0]->x;
+	    float y00=mesh.zone[x][y].n[0][0]->y;
+	    float x10=mesh.zone[x][y].n[1][0]->x;
+	    float y10=mesh.zone[x][y].n[1][0]->y;
+	    float x01=mesh.zone[x][y].n[0][1]->x;
+	    float y01=mesh.zone[x][y].n[0][1]->y;
+	    float x11=mesh.zone[x][y].n[1][1]->x;
+	    float y11=mesh.zone[x][y].n[1][1]->y;
+	    float xx=(x00+x10+x01+x11)/4.;
+	    float yy=(y00+y10+y01+y11)/4.;
+	    
+	    float mf=0;
+	    float g,g1,g2; /* gradient values */
+	    switch (m) {
+	    case 1:
+	      g=lim01((xx+20.)/40.);
+	      switch (s) {
+	      case 0: mf=g;	      break;
+	      case 1: mf=1.-g;	      break;
+	      default: exit(-1);
+	      }
+	      break;
+	    case 2:
+	      g=lim01((yy+20.)/40.);
+	      switch (s) {
+	      case 0: mf=.2+g/2.;     break;
+	      case 1: mf=.5-g/2.;     break;
+	      case 2: mf=.2;	      break;
+	      case 3: mf=.1;	      break;
+	      default: exit(-1);
+	      }
+	      break;
+	    case 3:
+	      g1=lim01((xx-5+yy+40.)/80.);
+	      g2=lim01((xx-5-yy+40.)/80.);
+	      switch (s) {
+	      case 0: mf=g1/2.;	      break;
+	      case 1: mf=g2/4.;	      break;
+	      case 2: mf=.5-g1/2.;    break;
+	      case 3: mf=.25-g2/4.;   break;
+	      case 4: mf=.25;	      break;
+	      default: exit(-1);
+	      }
+	      break;
+	    case 4:
+	      switch (s) {
+	      case 0: mf=1.0;	      break;
+	      default: exit(-1);
+	      }
+	      break;
+	    default:
+		exit(-1);
+	      break;
+	    }
+	    
+	    mesh.zone[x][y].specmf[m][s] = mf;
+	    mftot += mf;
+	  }
+	  if (mftot < .99 || mftot > 1.01) {
+	    printf("Error in zone x=%d y=%d mat=%d: mf = %f\n",x,y,m,mftot);
+	    err++;
+	  }
+	}
+      }
+    }
+  }
+  if (err) exit(err);
+
+
+  /* -=-=-=-=-=-=-=-=-=- */
+  /* write to silo files */
+  /* -=-=-=-=-=-=-=-=-=- */
+
+  sprintf(filename, "specmix_quad%s", file_ext);
+  printf("Writing %s using curvilinear mesh.\n", filename);
+  db=DBCreate(filename, DB_CLOBBER, DB_LOCAL, "Mixed zone species test", driver);
+  mixc=writematspec(db);
+  writemesh_curv2d(db,mixc,reorder);
+  DBClose(db);
+
+  sprintf(filename, "specmix_ucd%s", file_ext);
+  printf("Writing %s using unstructured mesh.\n", filename);
+  db=DBCreate(filename, DB_CLOBBER, DB_LOCAL, "Mixed zone species test", driver);
+  mixc=writematspec(db);
+  writemesh_ucd2d(db,mixc,reorder);
+  DBClose(db);
+
+  printf("Done!\n");
+
+  CleanupDriverStuff();
+  return 0;
+}
+
+/*----------------------------------------------------------------------------
+ * Function: writemesh_curv2d()
+ *
+ * Inputs:   db (DBfile*): the Silo file handle
+ *
+ * Returns:  (void)
+ *
+ * Abstract: Write the mesh and variables stored in the global Mesh 
+ *           to the Silo file as a quadmesh and quadvars
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+void writemesh_curv2d(DBfile *db, int mixc, int reorder) {
+
+  float f1[1000],f2[1000], fm[1000];
+  int x,y,c;
+
+  char  *coordnames[2];
+  char  *varnames[6];
+  void *varbufs[6];
+  float *coord[2];
+  int dims[2];
+
+  char *cnvar, *czvar;
+  short *snvar, *szvar;
+  int *invar, *izvar;
+  long *lnvar, *lzvar;
+  long long *Lnvar, *Lzvar;
+  float *fnvar, *fzvar;
+  double *dnvar, *dzvar;
+
+  int nnodes=mesh.nx*mesh.ny;
+  int nzones=mesh.zx*mesh.zy;
+  
+  /* do mesh */
+  c=0;
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      f1[c]=mesh.node[x][y].x;
+      f2[c]=mesh.node[x][y].y;
+      c++;
+    }
+  }
+
+  coordnames[0]=NEW(char,20);
+  coordnames[1]=NEW(char,20);
+  strcpy(coordnames[0],"x");
+  strcpy(coordnames[1],"y");
+
+  coord[0]=f1;
+  coord[1]=f2;
+
+  dims[0]=mesh.nx;
+  dims[1]=mesh.ny;
+
+  DBPutQuadmesh(db, "Mesh", coordnames, coord, dims, 2, 
+		DB_FLOAT, DB_NONCOLLINEAR, NULL);
+
+
+  /* do Node vars */
+
+  cnvar = (char *)        malloc(sizeof(char)*nnodes); 
+  snvar = (short *)       malloc(sizeof(short)*nnodes); 
+  invar = (int *)         malloc(sizeof(int)*nnodes); 
+  lnvar = (long *)        malloc(sizeof(long)*nnodes); 
+  Lnvar = (long long *)   malloc(sizeof(long long)*nnodes); 
+  fnvar = (float *)       malloc(sizeof(float)*nnodes); 
+  dnvar = (double *)      malloc(sizeof(double)*nnodes); 
+  c=0;
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      f1[c]=mesh.node[x][y].vars[NV_U];
+      f2[c]=mesh.node[x][y].vars[NV_V];
+      cnvar[c] = (char)        (x<y?x:y);
+      snvar[c] = (short)       (x<y?x:y);
+      invar[c] = (int)         (x<y?x:y);
+      lnvar[c] = (long)        (x<y?x:y);
+      Lnvar[c] = (long long)   (x<y?x:y);
+      fnvar[c] = (float)       (x<y?x:y);
+      dnvar[c] = (double)      (x<y?x:y);
+      c++;
+    }
+  }
+
+  DBPutQuadvar1(db, "u", "Mesh", f1, dims, 2, NULL, 0, DB_FLOAT, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "v", "Mesh", f2, dims, 2, NULL, 0, DB_FLOAT, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "cnvar", "Mesh", cnvar, dims, 2, NULL, 0, DB_CHAR, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "snvar", "Mesh", snvar, dims, 2, NULL, 0, DB_SHORT, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "invar", "Mesh", invar, dims, 2, NULL, 0, DB_INT, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "lnvar", "Mesh", lnvar, dims, 2, NULL, 0, DB_LONG, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "Lnvar", "Mesh", Lnvar, dims, 2, NULL, 0, DB_LONG_LONG, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "fnvar", "Mesh", fnvar, dims, 2, NULL, 0, DB_FLOAT, DB_NODECENT, NULL);
+  DBPutQuadvar1(db, "dnvar", "Mesh", dnvar, dims, 2, NULL, 0, DB_DOUBLE, DB_NODECENT, NULL);
+  free(cnvar);
+  free(snvar);
+  free(invar);
+  free(lnvar);
+  free(Lnvar);
+  free(fnvar);
+  free(dnvar);
+
+  /* test writing a quadvar with many components */
+  varnames[0] = "u0";
+  varnames[1] = "v0";
+  varnames[2] = "u1";
+  varnames[3] = "v1";
+  varnames[4] = "u2";
+  varnames[5] = "v2";
+  varbufs[0] = f1;
+  varbufs[1] = f2;
+  varbufs[2] = f1;
+  varbufs[3] = f2;
+  varbufs[4] = f1;
+  varbufs[5] = f2;
+  DBPutQuadvar(db, "manyc", "Mesh", 6, varnames, varbufs, dims, 2, NULL, 0,
+    DB_FLOAT, DB_NODECENT, NULL);
+
+  /* do Zone vars */
+
+  dims[0]--;
+  dims[1]--;
+
+  czvar = (char *)        malloc(sizeof(char)*nzones); 
+  szvar = (short *)       malloc(sizeof(short)*nzones); 
+  izvar = (int *)         malloc(sizeof(int)*nzones); 
+  lzvar = (long *)        malloc(sizeof(long)*nzones); 
+  Lzvar = (long long *)   malloc(sizeof(long long)*nzones); 
+  fzvar = (float *)       malloc(sizeof(float)*nzones); 
+  dzvar = (double *)      malloc(sizeof(double)*nzones); 
+  c=0;
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      f1[c]=mesh.zone[x][y].vars[ZV_P];
+      f2[c]=mesh.zone[x][y].vars[ZV_D];
+      czvar[c] = (char)        (x<y?x:y);
+      szvar[c] = (short)       (x<y?x:y);
+      izvar[c] = (int)         (x<y?x:y);
+      lzvar[c] = (long)        (x<y?x:y);
+      Lzvar[c] = (long long)   (x<y?x:y);
+      fzvar[c] = (float)       (x<y?x:y);
+      dzvar[c] = (double)      (x<y?x:y);
+      c++;
+    }
+  }
+
+  for (c=0; c<mixc; c++)
+      fm[c] = 2.0/mixc*c;
+  if (reorder)
+  {
+    float tmp=fm[mixc-1];
+    fm[mixc-1]=fm[mixc-2];
+    fm[mixc-2]=tmp;
+  }
+
+  DBPutQuadvar1(db, "p", "Mesh", f1, dims, 2, NULL, 0, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "d", "Mesh", f2, dims, 2, fm, mixc, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "czvar", "Mesh", czvar, dims, 2, NULL, 0, DB_CHAR, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "szvar", "Mesh", szvar, dims, 2, NULL, 0, DB_SHORT, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "izvar", "Mesh", izvar, dims, 2, NULL, 0, DB_INT, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "lzvar", "Mesh", lzvar, dims, 2, NULL, 0, DB_LONG, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "Lzvar", "Mesh", Lzvar, dims, 2, NULL, 0, DB_LONG_LONG, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "fzvar", "Mesh", fzvar, dims, 2, NULL, 0, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutQuadvar1(db, "dzvar", "Mesh", dzvar, dims, 2, NULL, 0, DB_DOUBLE, DB_ZONECENT, NULL);
+  free(czvar);
+  free(szvar);
+  free(izvar);
+  free(lzvar);
+  free(Lzvar);
+  free(fzvar);
+  free(dzvar);
+}
+
+/*----------------------------------------------------------------------------
+ * Function: writemesh_ucd2d()
+ *
+ * Inputs:   db (DBfile*): the Silo file handle
+ *
+ * Returns:  (void)
+ *
+ * Abstract: Write the mesh and variables stored in the global Mesh 
+ *           to the Silo file as a UCDmesh and UCDvars
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+void writemesh_ucd2d(DBfile *db, int mixc, int reorder) {
+
+  int   nl[5000];
+  float f1[1000],f2[1000], fm[1000];
+  int x,y,c;
+  char  *coordnames[2];
+  float *coord[2];
+  int dims[2];
+  char *cnvar, *czvar;
+  short *snvar, *szvar;
+  int *invar, *izvar;
+  long *lnvar, *lzvar;
+  long long *Lnvar, *Lzvar;
+  float *fnvar, *fzvar;
+  double *dnvar, *dzvar;
+
+  int lnodelist;
+  int nnodes;
+  int nzones;
+  int shapesize[1];
+  int shapecnt[1];
+
+  /* do mesh */
+  c=0;
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      f1[c]=mesh.node[x][y].x;
+      f2[c]=mesh.node[x][y].y;
+      if (mesh.node[x][y].c != c) {
+	printf("Node mismatch! mesh.c=%d c=%d\n",mesh.node[x][y].c,c);
+	exit(-1);
+      }
+      c++;
+    }
+  }
+
+  coordnames[0]=NEW(char,20);
+  coordnames[1]=NEW(char,20);
+  strcpy(coordnames[0],"x");
+  strcpy(coordnames[1],"y");
+
+  coord[0]=f1;
+  coord[1]=f2;
+
+  dims[0]=mesh.nx;
+  dims[1]=mesh.ny;
+
+  /* create the zonelist */
+  c=0;
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      nl[c++] = mesh.zone[x][y].n[0][0]->c;
+      nl[c++] = mesh.zone[x][y].n[1][0]->c;
+      nl[c++] = mesh.zone[x][y].n[1][1]->c;
+      nl[c++] = mesh.zone[x][y].n[0][1]->c;
+    }
+  }
+  lnodelist=c;
+
+  nnodes=mesh.nx*mesh.ny;
+  nzones=mesh.zx*mesh.zy;
+  shapesize[0]=4;
+  shapecnt[0]=nzones;
+
+  DBSetDeprecateWarnings(0);
+  DBPutZonelist(db,"Mesh_zonelist",nzones,2,nl,lnodelist,0,shapesize,shapecnt,1);
+  DBSetDeprecateWarnings(3);
+  DBPutUcdmesh (db,"Mesh",2,NULL,coord,nnodes,nzones,"Mesh_zonelist",NULL,DB_FLOAT,NULL);
+
+  /* do Node vars */
+
+  cnvar = (char *)        malloc(sizeof(char)*nnodes); 
+  snvar = (short *)       malloc(sizeof(short)*nnodes); 
+  invar = (int *)         malloc(sizeof(int)*nnodes); 
+  lnvar = (long *)        malloc(sizeof(long)*nnodes); 
+  Lnvar = (long long *)   malloc(sizeof(long long)*nnodes); 
+  fnvar = (float *)       malloc(sizeof(float)*nnodes); 
+  dnvar = (double *)      malloc(sizeof(double)*nnodes); 
+  c=0;
+  for (x=0;x<mesh.nx;x++) {
+    for (y=0;y<mesh.ny;y++) {
+      f1[c]=mesh.node[x][y].vars[NV_U];
+      f2[c]=mesh.node[x][y].vars[NV_V];
+      cnvar[c] = (char)        (x<y?x:y);
+      snvar[c] = (short)       (x<y?x:y);
+      invar[c] = (int)         (x<y?x:y);
+      lnvar[c] = (long)        (x<y?x:y);
+      Lnvar[c] = (long long)   (x<y?x:y);
+      fnvar[c] = (float)       (x<y?x:y);
+      dnvar[c] = (double)      (x<y?x:y);
+      c++;
+    }
+  }
+
+  
+  {
+    DBoptlist *opt = DBMakeOptlist(1);
+    int val = DB_ON;
+
+    DBAddOption(opt,DBOPT_USESPECMF,&val);
+    DBPutUcdvar1(db, "u", "Mesh", f1, nnodes, NULL, 0, DB_FLOAT,
+        DB_NODECENT, opt);
+    DBPutUcdvar1(db, "v", "Mesh", f2, nnodes, NULL, 0, DB_FLOAT,
+        DB_NODECENT, opt);
+    DBPutUcdvar1(db, "u", "Mesh", f1, nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "v", "Mesh", f2, nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "cnvar", "Mesh", cnvar, nnodes, NULL, 0, DB_CHAR, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "snvar", "Mesh", snvar, nnodes, NULL, 0, DB_SHORT, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "invar", "Mesh", invar, nnodes, NULL, 0, DB_INT, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "lnvar", "Mesh", lnvar, nnodes, NULL, 0, DB_LONG, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "Lnvar", "Mesh", Lnvar, nnodes, NULL, 0, DB_LONG_LONG, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "fnvar", "Mesh", fnvar, nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, opt);
+    DBPutUcdvar1(db, "dnvar", "Mesh", dnvar, nnodes, NULL, 0, DB_DOUBLE, DB_NODECENT, opt);
+    DBFreeOptlist(opt);
+  }
+  free(cnvar);
+  free(snvar);
+  free(invar);
+  free(lnvar);
+  free(Lnvar);
+  free(fnvar);
+  free(dnvar);
+
+  /* do Zone vars */
+
+  dims[0]--;
+  dims[1]--;
+
+  czvar = (char *)        malloc(sizeof(char)*nzones); 
+  szvar = (short *)       malloc(sizeof(short)*nzones); 
+  izvar = (int *)         malloc(sizeof(int)*nzones); 
+  lzvar = (long *)        malloc(sizeof(long)*nzones); 
+  Lzvar = (long long *)   malloc(sizeof(long long)*nzones); 
+  fzvar = (float *)       malloc(sizeof(float)*nzones); 
+  dzvar = (double *)      malloc(sizeof(double)*nzones); 
+  c=0;
+  for (x=0;x<mesh.zx;x++) {
+    for (y=0;y<mesh.zy;y++) {
+      f1[c]=mesh.zone[x][y].vars[ZV_P];
+      f2[c]=mesh.zone[x][y].vars[ZV_D];
+      czvar[c] = (char)        (x<y?x:y);
+      szvar[c] = (short)       (x<y?x:y);
+      izvar[c] = (int)         (x<y?x:y);
+      lzvar[c] = (long)        (x<y?x:y);
+      Lzvar[c] = (long long)   (x<y?x:y);
+      fzvar[c] = (float)       (x<y?x:y);
+      dzvar[c] = (double)      (x<y?x:y);
+      c++;
+    }
+  }
+
+  for (c=0; c<mixc; c++)
+      fm[c] = 2.0/mixc*c;
+  if (reorder)
+  {
+    float tmp=fm[mixc-1];
+    fm[mixc-1]=fm[mixc-2];
+    fm[mixc-2]=tmp;
+  }
+
+  DBPutUcdvar1(db, "p", "Mesh", f1, nzones, NULL, 0, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "d", "Mesh", f2, nzones, fm, mixc, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "czvar", "Mesh", czvar, nzones, NULL, 0, DB_CHAR, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "szvar", "Mesh", szvar, nzones, NULL, 0, DB_SHORT, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "izvar", "Mesh", izvar, nzones, NULL, 0, DB_INT, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "lzvar", "Mesh", lzvar, nzones, NULL, 0, DB_LONG, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "Lzvar", "Mesh", Lzvar, nzones, NULL, 0, DB_LONG_LONG, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "fzvar", "Mesh", fzvar, nzones, NULL, 0, DB_FLOAT, DB_ZONECENT, NULL);
+  DBPutUcdvar1(db, "dzvar", "Mesh", dzvar, nzones, NULL, 0, DB_DOUBLE, DB_ZONECENT, NULL);
+  free(czvar);
+  free(szvar);
+  free(izvar);
+  free(lzvar);
+  free(Lzvar);
+  free(fzvar);
+  free(dzvar);
+}
+
+
+/*----------------------------------------------------------------------------
+ * Function: writematspec
+ *
+ * Inputs:   db (DBfile*): the Silo file handle
+ *
+ * Returns:  (void)
+ *
+ * Abstract: Write the material and species info stored in the global Mesh 
+ *           to the Silo file.  Handle mixed zones properly for both.
+ *
+ * Modifications:
+ *    Sean Ahern, Wed Feb  6 16:32:35 PST 2002
+ *    Added material names.
+ *---------------------------------------------------------------------------*/
+int
+writematspec(DBfile *db)
+{
+    int     x, y, c;
+    int     dims[2];
+    int     matlist[1000];
+    int     mix_mat[1000];
+    int     mix_zone[1000];
+    int     mix_next[1000];
+    float   mix_vf[1000];
+    int     mixc;
+    int     mfc;
+    int     speclist[1000];
+    int     mixspeclist[1000];
+    float   specmf[10000];
+    DBoptlist      *optlist;
+
+    dims[0] = mesh.zx;
+    dims[1] = mesh.zy;
+
+    /* do Materials */
+
+    c = 0;
+    mixc = 0;
+    for (x = 0; x < mesh.zx; x++)
+    {
+        for (y = 0; y < mesh.zy; y++)
+        {
+            int     nmats = mesh.zone[x][y].nmats;
+            if (nmats == 1)
+            {
+                /* clean zone */
+                int     m = -1;
+                int     i;
+                for (i = 1; i <= nmat; i++)
+                    if (mesh.zone[x][y].matvf[i] > 0)
+                        m = i;
+                if (m < 0)
+                {
+                    printf("Internal error!\n");
+                    exit(-1);
+                };
+                matlist[c] = m;
+                c++;
+            } else
+            {
+                /* mixed zone */
+                int     m = 0;
+                matlist[c] = -mixc - 1;
+                for (m = 1; m <= nmat && nmats > 0; m++)
+                {
+                    if (mesh.zone[x][y].matvf[m] > 0)
+                    {
+                        mix_mat[mixc] = m;
+                        mix_vf[mixc] = mesh.zone[x][y].matvf[m];
+                        mix_zone[mixc] = c + 1; /* 1-origin */
+                        nmats--;
+                        if (nmats)
+                            mix_next[mixc] = mixc + 2; /* next + 1-origin */
+                        else
+                            mix_next[mixc] = 0;
+                        mixc++;
+                    }
+                }
+                c++;
+            }
+        }
+    }
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+
+    DBPutMaterial(db, "Material", "Mesh", nmat, matnos, matlist, dims, 2,
+                  mix_next, mix_mat, mix_zone, mix_vf, mixc, DB_FLOAT,
+                  optlist);
+
+    /* Okay! Now for the species! */
+
+    c = 0;
+    mixc = 0;
+    mfc = 0;
+    for (x = 0; x < mesh.zx; x++)
+    {
+        for (y = 0; y < mesh.zy; y++)
+        {
+            if (mesh.zone[x][y].nmats == 1)
+            {
+                int     m = -1;
+                int     i, s;
+                for (i = 1; i <= nmat; i++)
+                    if (mesh.zone[x][y].matvf[i] > 0)
+                        m = i;
+                if (m < 0)
+                {
+                    printf("Internal error!\n");
+                    exit(-1);
+                };
+
+                if (nspec[m - 1] == 1)
+                {
+                    speclist[c] = 0;   /* no mf for this mat: only 1 species */
+                } else
+                {
+                    speclist[c] = mfc + 1; /* 1-origin */
+                    for (s = 0; s < nspec[m - 1]; s++)
+                    {
+                        specmf[mfc] = mesh.zone[x][y].specmf[m][s];
+                        mfc++;
+                    }
+                }
+                c++;
+            } else
+            {
+                int     m;
+                speclist[c] = -mixc - 1;
+
+                for (m = 1; m <= nmat; m++)
+                {
+                    if (mesh.zone[x][y].matvf[m] > 0)
+                    {
+                        if (nspec[m - 1] == 1)
+                        {
+                            mixspeclist[mixc] = 0; /* no mf for this mat:
+                                                    * only 1 species */
+                        } else
+                        {
+                            int     s;
+                            mixspeclist[mixc] = mfc + 1; /* 1-origin */
+                            for (s = 0; s < nspec[m - 1]; s++)
+                            {
+                                specmf[mfc] = mesh.zone[x][y].specmf[m][s];
+                                mfc++;
+                            }
+                        }
+                        mixc++;
+                    }
+                }
+                c++;
+            }
+        }
+    }
+
+    DBClearOptlist(optlist);
+    DBAddOption(optlist, DBOPT_SPECNAMES, specnames);
+    DBAddOption(optlist, DBOPT_SPECCOLORS, speccolors);
+
+    DBPutMatspecies(db, "Species", "Material", nmat, nspec, speclist, dims, 2,
+                    mfc, specmf, mixspeclist, mixc, DB_FLOAT, optlist);
+
+    return mixc;
+}
diff --git a/tests/std.c b/tests/std.c
new file mode 100644
index 0000000..4640d1f
--- /dev/null
+++ b/tests/std.c
@@ -0,0 +1,250 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#ifdef _WIN32
+  #ifndef WINDOWS_LEAN_AND_MEAN
+    #define WINDOWS_LEAN_AND_MEAN
+  #endif
+  #include <windows.h>
+#endif
+
+#define CHECK_SYMBOL(A)  if (!strncmp(str, #A, strlen(str))) return A
+
+#define CHECK_SYMBOLN_INT(A)				\
+if (!strncmp(tok, #A, strlen(#A)))			\
+{							\
+    int n = sscanf(tok, #A"=%d", &driver_ints[driver_nints]);\
+    if (n == 1)						\
+    {							\
+        DBAddOption(opts, A, &driver_ints[driver_nints]);\
+        driver_nints++;					\
+        got_it = 1;					\
+    }							\
+}
+
+#define CHECK_SYMBOLN_STR(A)				\
+if (!strncmp(tok, #A, strlen(#A)))			\
+{							\
+    driver_strs[driver_nstrs] = strdup(&tok[strlen(#A)]+1);\
+    DBAddOption(opts, A, driver_strs[driver_nstrs]);	\
+    driver_nstrs++;					\
+    got_it = 1;						\
+}
+
+#define CHECK_SYMBOLN_SYM(A)				\
+if (!strncmp(tok, #A, strlen(#A)))			\
+{							\
+    driver_ints[driver_nints] = StringToDriver(&tok[strlen(#A)]+1);\
+    DBAddOption(opts, A, &driver_ints[driver_nints]);	\
+    driver_nints++;					\
+    got_it = 1;						\
+}
+
+
+static DBoptlist *driver_opts[] = {0,0,0,0,0,0,0,0,0,0};
+static int driver_opts_ids[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
+static int driver_ints[100];
+static int driver_nints = 0;
+static char *driver_strs[] = {0,0,0,0,0,0,0,0,0,0};
+static int driver_nstrs = 0;
+static const int driver_nopts = sizeof(driver_opts)/sizeof(driver_opts[0]);
+
+static void CleanupDriverStuff()
+{
+    int i;
+    for (i = 0; i < driver_nopts; i++)
+    {
+        if (driver_opts_ids[i] != -1) DBUnregisterFileOptionsSet(driver_opts_ids[i]);
+        if (driver_opts[i]) DBFreeOptlist(driver_opts[i]);
+    }
+    for (i = 0; i < sizeof(driver_strs)/sizeof(driver_strs[0]); i++)
+        if (driver_strs[i]) free(driver_strs[i]);
+}
+
+static void MakeDriverOpts(DBoptlist **_opts, int *opts_id)
+{
+    DBoptlist *opts = DBMakeOptlist(30);
+    int i;
+
+    for (i = 0; i < driver_nopts; i++)
+    {
+        if (driver_opts[i] == 0)
+        {
+            driver_opts[i] = opts;
+            break;
+        }
+    }
+
+    *_opts = opts;
+    *opts_id = DBRegisterFileOptionsSet(opts);
+     driver_opts_ids[i] = *opts_id;
+}
+
+static int StringToDriver(const char *str)
+{
+    DBoptlist *opts = 0;
+    int opts_id = -1;
+
+    CHECK_SYMBOL(DB_PDB);
+    CHECK_SYMBOL(DB_PDBP);
+    CHECK_SYMBOL(DB_HDF5);
+    CHECK_SYMBOL(DB_HDF5_SEC2);
+    CHECK_SYMBOL(DB_HDF5_STDIO);
+    CHECK_SYMBOL(DB_HDF5_CORE);
+    CHECK_SYMBOL(DB_HDF5_SPLIT);
+    CHECK_SYMBOL(DB_HDF5_MPIO);
+    CHECK_SYMBOL(DB_HDF5_MPIP);
+    CHECK_SYMBOL(DB_HDF5_LOG);
+    CHECK_SYMBOL(DB_HDF5_DIRECT);
+    CHECK_SYMBOL(DB_HDF5_FAMILY);
+    CHECK_SYMBOL(DB_HDF5_SILO);
+    
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_DEFAULT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SEC2);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_STDIO);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_CORE);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_LOG);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SPLIT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_DIRECT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_FAMILY);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_MPIP);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_MPIO);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SILO);
+
+    CHECK_SYMBOL(DB_H5VFD_DEFAULT);
+    CHECK_SYMBOL(DB_H5VFD_SEC2);
+    CHECK_SYMBOL(DB_H5VFD_STDIO);
+    CHECK_SYMBOL(DB_H5VFD_CORE);
+    CHECK_SYMBOL(DB_H5VFD_LOG);
+    CHECK_SYMBOL(DB_H5VFD_SPLIT);
+    CHECK_SYMBOL(DB_H5VFD_DIRECT);
+    CHECK_SYMBOL(DB_H5VFD_FAMILY);
+    CHECK_SYMBOL(DB_H5VFD_MPIO);
+    CHECK_SYMBOL(DB_H5VFD_MPIP);
+    CHECK_SYMBOL(DB_H5VFD_SILO);
+
+    if (!strncmp(str, "DB_HDF5_OPTS(", 13))
+    {
+        char *tok, *tmpstr;;
+
+        MakeDriverOpts(&opts, &opts_id);
+
+	tmpstr = strdup(&str[13]);
+	errno = 0;
+	tok = strtok(tmpstr, ",)");
+
+        while (tok)
+        {
+            int got_it = 0;
+
+            CHECK_SYMBOLN_SYM(DBOPT_H5_VFD)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_RAW_FILE_OPTS)
+            CHECK_SYMBOLN_STR(DBOPT_H5_RAW_EXTENSION)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_META_FILE_OPTS)
+            CHECK_SYMBOLN_STR(DBOPT_H5_META_EXTENSION)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CORE_ALLOC_INC)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CORE_NO_BACK_STORE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_META_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SMALL_RAW_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_ALIGN_MIN)
+            CHECK_SYMBOLN_INT(DBOPT_H5_ALIGN_VAL)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_MEM_ALIGN)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_BUF_SIZE)
+            CHECK_SYMBOLN_STR(DBOPT_H5_LOG_NAME)
+            CHECK_SYMBOLN_INT(DBOPT_H5_LOG_BUF_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SIEVE_BUF_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CACHE_NELMTS)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CACHE_NBYTES)
+            CHECK_SYMBOLN_INT(DBOPT_H5_FAM_SIZE)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_FAM_FILE_OPTS)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_BLOCK_COUNT)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_LOG_STATS)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_USE_DIRECT)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_DEFAULT)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_SEC2)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_STDIO)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_CORE)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_LOG)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_SPLIT)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_DIRECT)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_FAMILY)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_MPIP)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_MPIO)
+            CHECK_SYMBOLN_STR(DB_FILE_OPTS_H5_DEFAULT_SILO)
+
+            if (!got_it)
+            {
+                fprintf(stderr, "Unable to determine driver from string \"%s\"\n", tok);
+	        exit(-1);
+            }
+
+	    tok = strtok(0, ",)");
+	    if (errno != 0)
+	    {
+                fprintf(stderr, "Unable to determine driver from string \"%s\"\n", tok);
+	        exit(-1);
+	    }
+        }
+
+        free(tmpstr);
+
+        return DB_HDF5_OPTS(opts_id);
+    }
+
+    fprintf(stderr, "Unable to determine driver from string \"%s\"\n", str);
+    exit(-1);
+}
diff --git a/tests/subhex.c b/tests/subhex.c
new file mode 100644
index 0000000..fe3f99c
--- /dev/null
+++ b/tests/subhex.c
@@ -0,0 +1,323 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *      Mark C. Miller, Mon Jan 11 16:27:38 PST 2010
+ *      Added missing call to DBFreeFacelist.
+ *
+ *      Mark C. Miller, Tue Sep 14 20:50:10 PDT 2010
+ *      Fixed uninitialized write for Cvar by assigning a value. Fixed
+ *      another missing call to DBFreeFacelist.
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             Pnodelist[16];
+    int             Cnodelist[8];
+    float           x[12], y[12], z[12];
+    int             Pshapesize[1];
+    int             Pshapecnt[1];
+    int             Cshapesize[1];
+    int             Cshapecnt[1];
+    DBfacelist     *Pfacelist = NULL;
+    DBfacelist     *Cfacelist = NULL;
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           Cvar[1] = {3.141592678};
+    float           Pvar[12];
+    int		    driver=DB_PDB;
+    char	   *filename="subhex.silo";
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "subhex.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "subhex.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd hex", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    /*
+     * The coordinates of the 12 nodes...
+     */
+
+    x[0]  = 0; y[0]  = 0; z[0]  = 0;
+    x[1]  = 1; y[1]  = 0; z[1]  = 0;
+    x[2]  = 1; y[2]  = 0; z[2]  = 1;
+    x[3]  = 0; y[3]  = 0; z[3]  = 1;
+    x[4]  = 0; y[4]  = 1; z[4]  = 0;
+    x[5]  = 1; y[5]  = 1; z[5]  = 0;
+    x[6]  = 1; y[6]  = 1; z[6]  = 1;
+    x[7]  = 0; y[7]  = 1; z[7]  = 1;
+
+    x[8]  = 2; y[8]  = 0; z[8]  = 0;
+    x[9]  = 2; y[9]  = 0; z[9]  = 1;
+    x[10] = 2; y[10] = 1; z[10] = 0;
+    x[11] = 2; y[11] = 1; z[11] = 1;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 45;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    /*--------------------------------------
+    |
+    |   "All" nodes...
+    |
+    +-------------------------------------*/
+
+    for (i = 0; i < 12; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        Pvar[i] = x[i]+y[i]*z[i];
+    }
+
+    /*--------------------------------------
+    |
+    |   The parent mesh...
+    |
+    +-------------------------------------*/
+
+    DBPutUcdmesh(dbfile, "parent", 3, coordnames, coords, 12, 2, "Pzonelist",
+                 "Pfacelist", DB_FLOAT, NULL);
+
+    DBPutUcdvar1(dbfile, "v", "parent", Pvar, 12, NULL, 0, DB_FLOAT, DB_NODECENT,
+                 NULL);
+
+    Pnodelist[ 0] =  0;	/* The first hex */
+    Pnodelist[ 1] =  1;
+    Pnodelist[ 2] =  2;
+    Pnodelist[ 3] =  3;
+    Pnodelist[ 4] =  4;
+    Pnodelist[ 5] =  5;
+    Pnodelist[ 6] =  6;
+    Pnodelist[ 7] =  7;
+
+    Pnodelist[ 8] =  1;	/* The second hex */
+    Pnodelist[ 9] =  8;
+    Pnodelist[10] =  9;
+    Pnodelist[11] =  2;
+    Pnodelist[12] =  5;
+    Pnodelist[13] = 10;
+    Pnodelist[14] = 11;
+    Pnodelist[15] =  6;
+
+    Pshapecnt[0]  = 2;	/* There are 2... */
+    Pshapesize[0] = 8;	/* ...hexes */
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "Pzonelist", 2, 3, Pnodelist, 12, 0, Pshapesize,
+                  Pshapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    Pfacelist = DBCalcExternalFacelist(Pnodelist, 12, 0, Pshapesize, Pshapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "Pfacelist", Pfacelist->nfaces, Pfacelist->ndims,
+               Pfacelist->nodelist, Pfacelist->lnodelist, Pfacelist->origin,
+               Pfacelist->zoneno, Pfacelist->shapesize, Pfacelist->shapecnt,
+                  Pfacelist->nshapes, Pfacelist->types, Pfacelist->typelist,
+                  Pfacelist->ntypes);
+
+    DBFreeFacelist(Pfacelist);
+
+    sprintf(mesh_command, "mesh hex; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    /*--------------------------------------
+    |
+    |   The subset...
+    |
+    +-------------------------------------*/
+
+    DBSetDeprecateWarnings(0);
+    DBPutUcdsubmesh(dbfile, "child", "parent", 1, "Czonelist",
+                 "Cfacelist", NULL);
+    DBSetDeprecateWarnings(3);
+
+    Cnodelist[ 0] =  1;	/* Just one hex, refering to parent nodes */
+    Cnodelist[ 1] =  8;
+    Cnodelist[ 2] =  9;
+    Cnodelist[ 3] =  2;
+    Cnodelist[ 4] =  5;
+    Cnodelist[ 5] = 10;
+    Cnodelist[ 6] = 11;
+    Cnodelist[ 7] =  6;
+
+    Cshapecnt[0]  = 1;	/* There is 1... */
+    Cshapesize[0] = 8;	/* ...hex */
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "Czonelist", 1, 3, Cnodelist, 8, 0, Cshapesize,
+                  Cshapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    Cfacelist = DBCalcExternalFacelist(Cnodelist, 8, 0, Cshapesize, Cshapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "Cfacelist", Cfacelist->nfaces, Cfacelist->ndims,
+               Cfacelist->nodelist, Cfacelist->lnodelist, Cfacelist->origin,
+               Cfacelist->zoneno, Cfacelist->shapesize, Cfacelist->shapecnt,
+                  Cfacelist->nshapes, Cfacelist->types, Cfacelist->typelist,
+                  Cfacelist->ntypes);
+
+    DBFreeFacelist(Cfacelist);
+
+    DBPutUcdvar1(dbfile, "u", "child", Cvar, 1, NULL, 0, DB_FLOAT, DB_ZONECENT,
+                 NULL);
+
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/test_error.py b/tests/test_error.py
new file mode 100644
index 0000000..3c6eb0d
--- /dev/null
+++ b/tests/test_error.py
@@ -0,0 +1,88 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+import os
+import Silo
+
+if os.access("multi_ucd3d.pdb",os.R_OK):
+    file = "multi_ucd3d.pdb"
+elif os.access("multi_ucd3d.h5",os.R_OK):
+    file = "multi_ucd3d.h5"
+
+db = Silo.Open(file)
+print "db = ",db
+
+try:
+    print "Trying to set a bad directory"
+    db.SetDir("Magrathea")
+except:
+    print "    -- Caught error"
+
+try:
+    print "Trying to read a bad variable"
+    db.GetVar("Arkleseizure")
+except:
+    print "    -- Caught error"
+
+print "Closing...."
+db.Close()
+
+print "db = ",db
+
+try:
+    print "Trying to set a directory on a closed file"
+    db.SetDir("domain0")
+except:
+    print "    -- Caught error"
+
+try:
+    print "Trying to read a variable on a closed file"
+    db.SetDir("dtime")
+except:
+    print "    -- Caught error"
diff --git a/tests/test_read.py b/tests/test_read.py
new file mode 100644
index 0000000..fe3b6f3
--- /dev/null
+++ b/tests/test_read.py
@@ -0,0 +1,112 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+import os
+import Silo
+
+# ---- file 1 ----
+if os.access("multi_ucd3d.pdb",os.R_OK):
+    file = "multi_ucd3d.pdb"
+elif os.access("multi_ucd3d.h5",os.R_OK):
+    file = "multi_ucd3d.h5"
+
+db = Silo.Open(file)
+print "db = ",db
+print "db.filename = '%s'"%db.filename
+
+toc = db.GetToc()
+print "\n-- TOC --\n",toc
+
+print "cycle='%d'"%db.GetVar("cycle")
+print "dtime='%f'"%db.GetVar("dtime")
+print "_fileinfo='%s'"%db.GetVar("_fileinfo")
+print "d_vartypes=",db.GetVar("d_vartypes")
+print "d_varnames=",db.GetVar("d_varnames")
+
+db.SetDir("block0")
+toc = db.GetToc()
+print "mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10]
+print "v_data=",db.GetVar("v_data")[1:10]
+
+db.SetDir("../block7")
+toc = db.GetToc()
+print "mesh1_coord0=",db.GetVar("mesh1_coord0")[1:10]
+print "v_data=",db.GetVar("v_data")[1:10]
+
+db.Close()
+
+print "\n"
+
+# ---- file 2 ----
+if os.access("multi_rect3d.pdb",os.R_OK):
+    file = "multi_rect3d.pdb"
+elif os.access("multi_rect3d.h5",os.R_OK):
+    file = "multi_rect3d.h5"
+
+db = Silo.Open(file)
+print "db = ",db
+
+toc = db.GetToc()
+print "\n-- TOC --\n",toc
+
+print "cycle='%d'"%db.GetVar("cycle")
+print "time='%f'"%db.GetVar("time")
+print "_fileinfo='%s'"%db.GetVar("_fileinfo")
+print "defvars_defns='%s'"%db.GetVar("defvars_defns")
+
+db.SetDir("block0")
+toc = db.GetToc()
+print "mesh1_coord0=",db.GetVar("mesh1_coord0")
+
+db.SetDir("/block7")
+toc = db.GetToc()
+print "mesh1_coord0=",db.GetVar("mesh1_coord0")
+
+db.SetDir("/")
+toc = db.GetToc()
diff --git a/tests/test_write.py b/tests/test_write.py
new file mode 100644
index 0000000..fc38ec2
--- /dev/null
+++ b/tests/test_write.py
@@ -0,0 +1,78 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+import Silo
+
+db = Silo.Create("foo.silo", "test file")
+db.Write("t1", 12)
+db.Write("t2", "hello")
+db.Write("t3", (13,))
+db.Write("t4", 14.5)
+db.Write("t5", (1.2, 10))
+db.Write("t6", (1.2, 10.2))
+db.Write("t7", (10, 1.2))
+db.Write("t8", "a")
+db.MkDir("a")
+db.Write("a/t8", "x2")
+db.SetDir("a")
+db.Write("t9", "x3")
+db.Write("../t10", "x4")
+db.SetDir("..")
+db.Write("t11", "x5")
+db.Close()
+
+db2=Silo.Open("foo.silo")
+print "toc=%s"%db2.GetToc()
+print "t2='%s'"%db2.GetVar("t2")
+print "t6=",db2.GetVar("t6")
+print "a/t8='%s'"%db2.GetVar("a/t8")
+db2.SetDir("a")
+print "t9=%s"%db2.GetVar("t9")
+print "/t5=",db2.GetVar("../t5")
+db2.Close()
diff --git a/tests/testall.c b/tests/testall.c
new file mode 100644
index 0000000..e5362d8
--- /dev/null
+++ b/tests/testall.c
@@ -0,0 +1,3423 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+/* File-wide modifications:
+ *
+ *     Sean Ahern, Wed Jan 22 15:11:09 PST 1997
+ *     I reformated whitespace:  got rid of tabs and ending whitespace.  I
+ *     added inclusion of standard include files to get the prototypes for
+ *     standard functions.  I added prototypes for the functions defined here
+ *     and made them static.  I changed all function definitions to be ANSI.
+ *     I ran the file through "lint" and made appropriate changes.
+ *
+ *     Sean Ahern, Mon Oct 12 17:38:36 PDT 1998
+ *     Removed use of the AIO library, since it's no longer supported.
+ *
+ *     Sean Ahern, Mon Nov  2 17:59:23 PST 1998
+ *     Removed use of the coordnames in the DBPutQuadmesh and DBPutUcdmesh 
+ *     calls since the parameter is ignored anyway.
+ *
+ *     Eric Brugger, Mon Feb 22 14:21:13 PST 1999
+ *     I changed all floats used for storing intermediate values to doubles
+ *     to reduce numeric errors.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <math.h>
+#include <stdlib.h>
+#ifdef WIN32
+#include <stdio.h>
+#include <io.h>
+#endif
+#include <string.h>
+#include "silo.h"
+#include <std.c>
+
+#define false   0
+#define true    1
+
+#define Min(A,B) (((A)<(B))?(A):(B))
+#define Max(A,B) (((A)<(B))?(B):(A))
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define  ALLOC_N(x,n)     (x *) calloc (n, sizeof (x))
+#define  FREE(x)          if ( (x) != NULL) {free(x);(x)=NULL;}
+
+/* Local function prototypes */
+static void     fill_rect2d_bkgr(int matlist[], int nx, int ny, int matno);
+static void     fill_rect2d_mat(float x[], float y[], int matlist[], int nx,
+                                int ny, int mix_next[], int mix_mat[],
+                                int mix_zone[], float mix_vf[], int *mixlen,
+                                int matno, double radius);
+static void     fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz,
+                                 int matno);
+static void     fill_rect3d_mat(float x[], float y[], float z[], int matlist[],
+                                int nx, int ny, int nz, int mix_next[],
+                                int mix_mat[], int mix_zone[], float mix_vf[],
+                                int *mixlen, int matno, double radius);
+static void     build_rect2d(DBfile * dbfile, int size, int order);
+static void     build_curv2d(DBfile * dbfile, int size, int order);
+static void     build_ucd2d(DBfile * dbfile, int size, int order);
+static void     build_rect3d(DBfile * dbfile, int size, int order);
+static void     build_curv3d(DBfile * dbfile, int size, int order);
+static void     build_ucd3d(DBfile * dbfile, int size, int order);
+static void     build_poly3d(DBfile * dbfile, int size, int order);
+static void     build_carray(DBfile * dbfile);
+static void     build_curve(DBfile * dbfile, int driver);
+static void     MakeFiles(char *suffix, int size, int order, int type);
+
+static void
+fill_rect2d_bkgr(int matlist[], int nx, int ny, int matno)
+{
+    int       i, j;
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            matlist[j * nx + i] = matno;
+        }
+    }
+}
+
+static void
+fill_rect2d_mat(float x[], float y[], int matlist[], int nx, int ny, int
+                mix_next[], int mix_mat[], int mix_zone[], float mix_vf[], int
+                *mixlen, int matno, double radius)
+{
+    int       i, j, k, l;
+    double    xcenter, ycenter;
+    double    dist;
+    int       cnt;
+    int       mixlen2;
+    int       *itemp;
+    double    dx, dy;
+    double    xx[20], yy[20];
+
+    mixlen2 = *mixlen;
+
+    itemp = ALLOC_N (int, (nx + 1) * (ny + 1));
+
+    xcenter = .5;
+    ycenter = .5;
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < ny + 1; j++) {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            itemp[j * (nx + 1) + i] = (dist < radius) ? 1 : 0;
+        }
+    }
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            cnt = itemp[(j) * (nx + 1) + (i)] +
+                itemp[(j + 1) * (nx + 1) + (i)] +
+                itemp[(j + 1) * (nx + 1) + (i + 1)] +
+                itemp[(j) * (nx + 1) + (i + 1)];
+            if (cnt == 0) {
+                /* EMPTY */
+            }
+            else if (cnt == 4) {
+                matlist[j * nx + i] = matno;
+            }
+            else {
+                dx = (x[i + 1] - x[i]) / 21.;
+                dy = (y[j + 1] - y[j]) / 21.;
+                for (k = 0; k < 20; k++) {
+                    xx[k] = x[i] + (dx / 2.) + (k * dx);
+                    yy[k] = y[j] + (dy / 2.) + (k * dy);
+                }
+                cnt = 0;
+                for (k = 0; k < 20; k++) {
+                    for (l = 0; l < 20; l++) {
+                        dist = sqrt((xx[k] - xcenter) *
+                                    (xx[k] - xcenter) +
+                                    (yy[l] - ycenter) *
+                                    (yy[l] - ycenter));
+                        cnt += (dist < radius) ? 1 : 0;
+                    }
+                }
+                mix_mat[mixlen2] = matlist[j * nx + i];
+                mix_mat[mixlen2 + 1] = matno;
+                mix_next[mixlen2] = mixlen2 + 2;
+                mix_next[mixlen2 + 1] = 0;
+                mix_zone[mixlen2] = j * nx + i;
+                mix_zone[mixlen2 + 1] = j * nx + i;
+                mix_vf[mixlen2] = 1. - (((double)cnt) / 400.);
+                mix_vf[mixlen2 + 1] = ((double)cnt) / 400.;
+                matlist[j * nx + i] = - (mixlen2 + 1);
+                mixlen2 += 2;
+            }
+        }
+    }
+
+    FREE (itemp);
+
+    *mixlen = mixlen2;
+}
+
+static void
+fill_rect3d_bkgr(int matlist[], int nx, int ny, int nz, int matno)
+{
+    int       i, j, k;
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++) {
+                matlist[k * nx * ny + j * nx + i] = matno;
+            }
+        }
+    }
+}
+
+static void
+fill_rect3d_mat(float x[], float y[], float z[], int matlist[], int nx,
+                int ny, int nz, int mix_next[], int mix_mat[], int mix_zone[],
+                float mix_vf[], int *mixlen, int matno, double radius)
+{
+    int       i, j, k, l, m, n;
+    double    xcenter, ycenter, zcenter;
+    double    dist;
+    int       cnt;
+    int       mixlen2;
+    int       *itemp;
+    double    dx, dy, dz;
+    double    xx[10], yy[10], zz[10];
+
+    mixlen2 = *mixlen;
+
+    itemp = ALLOC_N (int, (nx + 1) * (ny + 1) * (nz + 1));
+
+    xcenter = .5;
+    ycenter = .5;
+    zcenter = .5;
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < ny + 1; j++) {
+            for (k = 0; k < nz + 1; k++) {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                itemp[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] =
+                    (dist < radius) ? 1 : 0;
+            }
+        }
+    }
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++) {
+                cnt = itemp[(i) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k + 1] +
+                    itemp[(i) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k + 1] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j + 1) * (nx + 1) + k + 1] +
+                    itemp[(i + 1) * (nx + 1) * (ny + 1) + (j) * (nx + 1) + k + 1];
+                if (cnt == 0) {
+                    /* EMPTY */
+                }
+                else if (cnt == 8) {
+                    matlist[i * nx * ny + j * nx + k] = matno;
+                }
+                else {
+                    dx = (x[i + 1] - x[i]) / 11.;
+                    dy = (y[j + 1] - y[j]) / 11.;
+                    dz = (z[k + 1] - z[k]) / 11.;
+                    for (l = 0; l < 10; l++) {
+                        xx[l] = x[i] + (dx / 2.) + (l * dx);
+                        yy[l] = y[j] + (dy / 2.) + (l * dy);
+                        zz[l] = z[k] + (dz / 2.) + (l * dz);
+                    }
+                    cnt = 0;
+                    for (l = 0; l < 10; l++) {
+                        for (m = 0; m < 10; m++) {
+                            for (n = 0; n < 10; n++) {
+                                dist = sqrt((xx[l] - xcenter) *
+                                            (xx[l] - xcenter) +
+                                            (yy[m] - ycenter) *
+                                            (yy[m] - ycenter) +
+                                            (zz[n] - zcenter) *
+                                            (zz[n] - zcenter));
+                                cnt += (dist < radius) ? 1 : 0;
+                            }
+                        }
+                    }
+                    mix_mat[mixlen2] = matlist[i * nx * ny + j * nx + k];
+                    mix_mat[mixlen2 + 1] = matno;
+                    mix_next[mixlen2] = mixlen2 + 2;
+                    mix_next[mixlen2 + 1] = 0;
+                    mix_zone[mixlen2] = i * nx * ny + j * nx + k;
+                    mix_zone[mixlen2 + 1] = i * nx * ny + j * nx + k;
+                    mix_vf[mixlen2] = 1. - (((double)cnt) / 1000.);
+                    mix_vf[mixlen2 + 1] = ((double)cnt) / 1000.;
+                    matlist[i * nx * ny + j * nx + k] = -(mixlen2 + 1);
+                    mixlen2 += 2;
+                }
+            }
+        }
+    }
+
+    FREE (itemp);
+
+    *mixlen = mixlen2;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_rect2d
+ *
+ * Purpose:     Builds a rectilinear 2-d mesh and places it in the open
+ *              data file.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov 23 10:13:51 EST 1994
+ *
+ * Modifications:
+ *     Sean Ahern, Thu Jun 20 08:53:11 PDT 1996
+ *     Changed the mesh name to be more mnemonic.
+ *
+ *     Sean Ahern, Fri Oct 11 17:08:42 PDT 1996
+ *     Changed the mesh name in the _meshtvinfo variable.
+ *
+ *     Jim Reus, Wed Nov 13 07:24:24 PST 1996
+ *     Added temperature (t) variable to demonstrate logplots.
+ *     ...temperature is positive non-zero, linear in x and
+ *        exponential in y.
+ *
+ *     Eric Brugger, Tue Nov 26 11:42:47 PST 1996
+ *     I added the outputing of some meshtv defvars to the silo file.
+ *
+ *     Sean Ahern, Wed Jan 22 15:16:58 PST 1997
+ *     Initialized some local pointer variables to NULL.  Got rid of unused
+ *     variables and variables that were being set but not used.
+ *
+ *     Robb Matzke, Wed Jun 18 11:02:17 EST 1997
+ *     Added the `ascii' variable to check labeling by ascii value in
+ *     meshtvx.
+ *
+ *     Eric Brugger, Mon Sep 20 19:10:11 PDT 1999
+ *     I modified the material numbers so that they are no longer
+ *     numbered consecutively.
+ *
+ *     Sean Ahern, Thu Feb  7 13:49:18 PST 2002
+ *     Added material names.
+ *
+ *-------------------------------------------------------------------------*/
+/*ARGSUSED*/
+static void
+build_rect2d(DBfile * dbfile, int size, int order)
+{
+    int            cycle;
+    float          time;
+    double         dtime;
+    int            ndims;
+    int            nx, ny;
+    int            dims[3], zdims[3];
+    float         *coords[3];
+    float         *x = NULL, *y = NULL;
+
+    char          *meshname = NULL, *var1name = NULL, *var2name = NULL;
+    char          *var3name = NULL, *var4name = NULL, *matname = NULL;
+
+    float         *d=NULL, *p=NULL, *u=NULL, *v=NULL, *t=NULL, *ascii=NULL;
+
+    int            nmats;
+    int            matnos[9];
+    int           *matlist = NULL;
+    int            dims2[3];
+    int            mixlen;
+    int           *mix_next = NULL, *mix_mat = NULL, *mix_zone = NULL;
+    float         *mix_vf = NULL;
+
+    DBoptlist     *optlist = NULL;
+    char **matnames = NULL;
+    char **matcolors = NULL;
+
+    int            one = 1;
+    int            i, j;
+    double         xave, yave;
+    double         xcenter, ycenter;
+    double         dist;
+
+    switch (size) {
+        case 1:
+            nx = 30;
+            ny = 40;
+            break;
+        case 2:
+            nx = 300;
+            ny = 400;
+            break;
+        case 3:
+            nx = 1000;
+            ny = 1200;
+            break;
+    }
+
+    x = ALLOC_N (float, nx + 1);
+    y = ALLOC_N (float, ny + 1);
+    d = ALLOC_N (float, nx * ny);
+    p = ALLOC_N (float, nx * ny);
+    u = ALLOC_N (float, (nx + 1) * (ny + 1));
+    v = ALLOC_N (float, (nx + 1) * (ny + 1));
+    t = ALLOC_N (float, (nx + 1) * (ny + 1));
+    ascii = ALLOC_N (float, nx * ny);
+    matlist = ALLOC_N (int, nx * ny);
+    mix_next = ALLOC_N (int, 40 * ny);
+    mix_mat  = ALLOC_N (int, 40 * ny);
+    mix_zone = ALLOC_N (int, 40 * ny);
+    mix_vf   = ALLOC_N (float, 40 * ny);
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "quadmesh2d";
+    coords[0] = x;
+    coords[1] = y;
+    ndims = 2;
+    dims[0] = nx + 1;
+    dims[1] = ny + 1;
+    for (i = 0; i < nx + 1; i++)
+        x[i] = i * (1. / nx);
+    for (i = 0; i < ny + 1; i++)
+        y[i] = i * (1. / nx);
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = .5;
+    ycenter = .5;
+    zdims[0] = nx;
+    zdims[1] = ny;
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            xave = (x[i]+x[i+1]) / 2.0 ;
+            yave = (y[j]+y[j+1]) / 2.0 ;
+
+            dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                        (yave - ycenter) * (yave - ycenter));
+
+            d[j * nx + i] = dist;
+            p[j * nx + i] = 1 / (dist + 0.0001);
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    xcenter = .5001;
+    ycenter = .5001;
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < ny + 1; j++) {
+            dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                        (y[j] - ycenter) * (y[j] - ycenter));
+            u[j * (nx + 1) + i] = (x[i] - xcenter) / dist;
+            v[j * (nx + 1) + i] = (y[j] - ycenter) / dist;
+        }
+    }
+
+    /*
+     * Create the temperature array.
+     */
+    if (t != NULL)
+    {
+       double a,b,c,d;
+
+       a = 1.;
+       b = 3.;
+       c = 5.;
+       d = 7.;
+       for (i=0; i<=nx; ++i)
+       {
+          double x;
+
+          x = i / (double) nx;
+          for (j=0; j<=ny; ++j)
+          {
+             double y;
+
+             y = j / (double) ny;
+             t[j*(nx+1) + i] = a + b*x + c*exp(d*y);
+          }
+       }
+    }
+
+    /*
+     * Create the ascii label array.  The center of the mesh is labeled
+     * `A' and the furthest from the center is labeled `Z'.
+     */
+    if (ascii) {
+       double maxdist = 0.0;
+       xcenter = .5;
+       ycenter = .5;
+       for (i=0; i<nx; i++) {
+          for (j=0; j<ny; j++) {
+            dist = sqrt ((x[i] - xcenter) * (x[i] - xcenter) +
+                         (y[j] - ycenter) * (y[j] - ycenter));
+            ascii[j*nx+i] = dist;
+            if (dist>maxdist) maxdist = dist;
+          }
+       }
+       for (i=0; i<nx*ny; i++) {
+          ascii[i] = 'A' + 26*ascii[i]/maxdist;
+       }
+    }
+
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 9;
+    matnos[0] = 1;
+    matnos[1] = 3;
+    matnos[2] = 6;
+    matnos[3] = 7;
+    matnos[4] = 8;
+    matnos[5] = 11;
+    matnos[6] = 12;
+    matnos[7] = 16;
+    matnos[8] = 18;
+    dims2[0] = nx;
+    dims2[1] = ny;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("Green eggs");
+    matnames[1] = safe_strdup("Ham");
+    matnames[2] = safe_strdup("Air");
+    matnames[3] = safe_strdup("Ozone");
+    matnames[4] = safe_strdup("Diamond");
+    matnames[5] = safe_strdup("Pure water");
+    matnames[6] = safe_strdup("C8H10N4O2");
+    matnames[7] = safe_strdup("Wood");
+    matnames[8] = safe_strdup("Nothing important");
+
+    matcolors = (char**)malloc(sizeof(char*)*nmats);
+    matcolors[0] = safe_strdup("Green");
+    matcolors[1] = safe_strdup("Red");
+    matcolors[2] = safe_strdup("Light Blue");
+    matcolors[3] = safe_strdup("Yellow");
+    matcolors[4] = safe_strdup("White");
+    matcolors[5] = safe_strdup("Blue");
+    matcolors[6] = safe_strdup("Black");
+    matcolors[7] = safe_strdup("Light Brown");
+    matcolors[8] = safe_strdup("#fcfcfc");
+
+    /*
+     * Put in material 1 as the background then overlay materials
+     * 2 through 9.
+     */
+    fill_rect2d_bkgr (matlist, nx, ny, 1);
+
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 3, 0.8);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 6, 0.7);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 7, 0.6);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 8, 0.5);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 11, 0.4);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 12, 0.3);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 16, 0.2);
+    fill_rect2d_mat (x, y, matlist, nx, ny, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 18, 0.1);
+
+    if (mixlen > 40 * ny) {
+        printf ("mixlen = %d\n", mixlen);
+        exit (1);
+    }
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 30;
+    DBWrite (dbfile, "_meshtvinfo", "mesh quadmesh2d;pseudocolor d",
+             &i, 1, DB_CHAR);
+    i = 44;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v};speed scalar sqrt(u*u+v*v)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(15);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_ALLOWMAT0, &one);
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+    DBAddOption(optlist, DBOPT_MATCOLORS, matcolors);
+#if 0
+    i = DB_COLMAJOR;
+    DBAddOption(optlist, DBOPT_MAJORORDER, &i);
+#endif
+
+    DBPutQuadmesh(dbfile, meshname, NULL, coords, dims, ndims,
+                  DB_FLOAT, DB_COLLINEAR, optlist);
+    DBPutQuadvar1(dbfile, var1name, meshname, d, zdims, ndims, NULL, 0,
+                           DB_FLOAT, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var2name, meshname, p, zdims, ndims, NULL, 0,
+                  DB_FLOAT, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var3name, meshname, u, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var4name, meshname, v, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1(dbfile, "t", meshname, t, dims, ndims, NULL, 0, DB_FLOAT,
+                  DB_NODECENT, optlist);
+
+    DBPutMaterial(dbfile, matname, meshname, nmats, matnos, matlist, dims2,
+                  ndims, mix_next, mix_mat, mix_zone, mix_vf, mixlen,
+                  DB_FLOAT, optlist);
+
+    if (ascii) {
+       j = true;
+       DBAddOption (optlist, DBOPT_ASCII_LABEL, &j);
+       DBPutQuadvar1(dbfile, "ascii", meshname, ascii, zdims, ndims, NULL, 0,
+                     DB_FLOAT, DB_ZONECENT, optlist);
+    }
+
+    DBFreeOptlist(optlist);
+
+    /*
+     * Free the temporary storage.
+     */
+    FREE (x);
+    FREE (y);
+    FREE (d);
+    FREE (p);
+    FREE (u);
+    FREE (v);
+    FREE (t);
+    FREE (ascii);
+    FREE (matlist);
+    FREE (mix_next);
+    FREE (mix_mat);
+    FREE (mix_zone);
+    FREE (mix_vf);
+    for(i=0;i<nmats;i++)
+    {
+        FREE(matnames[i]);
+        FREE(matcolors[i]);
+    }
+    FREE(matnames);
+    FREE(matcolors);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_curv2d
+ *
+ * Purpose:     Build a 2-d curvilinear mesh and place it in the open
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *    Robb Matzke, Sun Dec 18 17:39:27 EST 1994
+ *    Fixed memory leak.
+ *
+ *    Eric Brugger, Fri Mar 15 09:54:58 PST 1996
+ *    I added upper and lower offsets to the mesh and variables.
+ *
+ *    Sean Ahern, Thu Jun 20 08:53:11 PDT 1996
+ *    Changed the mesh name to be more mnemonic.
+ *
+ *    Eric Brugger, Tue Jun 25 08:07:36 PDT 1996
+ *    I added mixed zones to the material variable.
+ *
+ *    Eric Brugger, Tue Nov 26 11:42:47 PST 1996
+ *    I added the outputing of some meshtv defvars to the silo file.
+ *
+ *    Sean Ahern, Wed Jan 22 15:16:58 PST 1997
+ *    Got rid of unused variables and variables that were being set but not
+ *    used.
+ *
+ *    Sean Ahern, Thu Feb  7 13:56:32 PST 2002
+ *    Added material names.
+ *
+ *-------------------------------------------------------------------------*/
+static void
+build_curv2d(DBfile * dbfile, int size, int order)
+{
+    int            cycle;
+    float          time;
+    double         dtime;
+    int            ndims;
+    int            nx, ny;
+    int            sn1, sn2, sz1, sz2;
+    int            dims[3], zdims[3];
+    int            lo_off[3], hi_off[3];
+    float         *coords[3];
+    float         *x, *y;
+
+    char          *meshname, *var1name, *var2name, *var3name;
+    char          *var4name, *matname;
+    double        *d, *p;
+    float         *u, *v;
+
+    int            nmats;
+    int            matnos[3];
+    int           *matlist;
+    int            dims2[3];
+    int            mixlen;
+    int           *mix_next, *mix_mat, *mix_zone;
+    float         *mix_vf;
+
+    DBoptlist     *optlist;
+    char **matnames = NULL;
+
+    int            i, j;
+    double         xave, yave;
+    double         xcenter, ycenter;
+    double         theta, dtheta;
+    double         r, dr;
+    double         dist;
+    float         *xx, *yy;
+
+    switch (size) {
+        case 1:
+            nx = 30;
+            ny = 40;
+            break;
+        case 2:
+            nx = 300;
+            ny = 400;
+            break;
+        case 3:
+            nx = 1000;
+            ny = 1200;
+            break;
+    }
+
+    if (order == DB_ROWMAJOR) {
+        sz1 = 1;
+        sz2 = nx;
+        sn1 = 1;
+        sn2 = nx + 1;
+    }
+    else {
+        sz1 = ny;
+        sz2 = 1;
+        sn1 = ny + 1;
+        sn2 = 1;
+    }
+
+    x = ALLOC_N (float, (nx + 1) * (ny + 1));
+    y = ALLOC_N (float, (nx + 1) * (ny + 1));
+    d = ALLOC_N (double, nx * ny);
+    p = ALLOC_N (double, nx * ny);
+    u = ALLOC_N (float, (nx + 1) * (ny + 1));
+    v = ALLOC_N (float, (nx + 1) * (ny + 1));
+    xx = ALLOC_N (float, (nx + 1) * 2);
+    yy = ALLOC_N (float, (nx + 1) * 2);
+    matlist = ALLOC_N (int, nx * ny);
+    mix_next = ALLOC_N (int, 2 * nx);
+    mix_mat  = ALLOC_N (int, 2 * nx);
+    mix_zone = ALLOC_N (int, 2 * nx);
+    mix_vf   = ALLOC_N (float, 2 * nx);
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "curvmesh2d";
+    coords[0] = x;
+    coords[1] = y;
+    ndims = 2;
+    dims[0] = nx + 1;
+    dims[1] = ny + 1;
+    dtheta = (180. / nx) * (3.1415926 / 180.);
+    dr = 3. / ny;
+    theta = 0;
+    for (i = 0; i < nx + 1; i++) {
+        r = 2.;
+        for (j = 0; j < ny + 1; j++) {
+            x[j * sn2 + i * sn1] = r * cos(theta);
+            y[j * sn2 + i * sn1] = r * sin(theta);
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = nx;
+    zdims[1] = ny;
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            xave = (x[j * sn2 + i * sn1] +
+                    x[j * sn2 + (i + 1) * sn1] +
+                    x[(j + 1) * sn2 + (i + 1) * sn1] +
+                    x[(j + 1) * sn2 + i * sn1]) / 4.;
+            yave = (y[j * sn2 + i * sn1] +
+                    y[j * sn2 + (i + 1) * sn1] +
+                    y[(j + 1) * sn2 + (i + 1) * sn1] +
+                    y[(j + 1) * sn2 + i * sn1]) / 4.;
+            dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                        (yave - ycenter) * (yave - ycenter));
+            d[j * sz2 + i * sz1] = dist;
+            p[j * sz2 + i * sz1] = 1. / (dist + .0001);
+        }
+    }
+
+    /*
+     * Create the velocity component arrays. The values from the
+     * first 2 rows of the x and y arrays are first copied into the
+     * arrays xx and yy which are stored in the fortran order.  The
+     * indexing on the xx and yy arrays is then done for rectilinear
+     * meshes. This generates an interesting vector field.
+     */
+    var3name = "u";
+    var4name = "v";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < 2; j++) {
+            xx [j * (nx + 1) + i] = x [j * sn2 + i * sn1];
+            yy [j * (nx + 1) + i] = y [j * sn2 + i * sn1];
+        }
+    }
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < ny + 1; j++) {
+            dist = sqrt((xx[i] - xcenter) * (xx[i] - xcenter) +
+                        (yy[j] - ycenter) * (yy[j] - ycenter));
+            u[j * sn2 + i * sn1] = (xx[i] - xcenter) / dist;
+            v[j * sn2 + i * sn1] = (yy[j] - ycenter) / dist;
+        }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = nx;
+    dims2[1] = ny;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("First circle of Hell");
+    matnames[1] = safe_strdup("Second circle of Hell");
+    matnames[2] = safe_strdup("Third circle of Hell");
+
+    /*
+     * Put in the material in 3 shells.
+     */
+    for (i = 0; i < nx; i++) {
+        /*
+         * Add 9 layers of material 1.
+         */
+        for (j = 0; j < 9; j++) {
+            matlist[j * sz2 + i * sz1] = 1;
+        }
+
+        /*
+         * Add a layer of mixed material zones.
+         */
+        j = 9;
+        matlist[j * sz2 + i * sz1] = - mixlen - 1;
+        mix_next [mixlen]     = mixlen + 2;
+        mix_next [mixlen + 1] = 0;
+        mix_mat  [mixlen]     = 1;
+        mix_mat  [mixlen + 1] = 2;
+        mix_zone [mixlen]     = j * sz2 + i * sz1;
+        mix_zone [mixlen + 1] = j * sz2 + i * sz1;
+        mix_vf   [mixlen]     = 0.4;
+        mix_vf   [mixlen + 1] = 0.6;
+        mixlen += 2;
+
+        /*
+         * Add 10 layers of material 2.
+         */
+        for (j = 10; j < 20; j++) {
+            matlist[j * sz2 + i * sz1] = 2;
+        }
+
+        /*
+         * Make the remainder of layers material 3.
+         */
+        for (j = 20; j < ny; j++) {
+            matlist[j * sz2 + i * sz1] = 3;
+        }
+    }
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+    lo_off [0] = 1;
+    lo_off [1] = 1;
+    hi_off [0] = 3;
+    hi_off [1] = 1;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 30;
+    DBWrite (dbfile, "_meshtvinfo", "mesh curvmesh2d;pseudocolor d",
+             &i, 1, DB_CHAR);
+    i = 44;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v};speed scalar sqrt(u*u+v*v)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(11);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_LO_OFFSET, &lo_off);
+    DBAddOption(optlist, DBOPT_HI_OFFSET, &hi_off);
+    DBAddOption(optlist, DBOPT_MAJORORDER, &order);
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+
+    DBPutQuadmesh(dbfile, meshname, NULL, coords, dims, ndims, DB_FLOAT,
+                  DB_NONCOLLINEAR, optlist);
+
+    DBPutQuadvar1(dbfile, var1name, meshname, (float *)d, zdims, ndims, NULL,
+                  0, DB_DOUBLE, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var2name, meshname, (float *)p, zdims, ndims, NULL,
+                  0, DB_DOUBLE, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var3name, meshname, u, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1(dbfile, var4name, meshname, v, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutMaterial(dbfile, matname, meshname, nmats, matnos, matlist, dims2,
+                  ndims, mix_next, mix_mat, mix_zone, mix_vf, mixlen,
+                  DB_FLOAT, optlist);
+
+    DBFreeOptlist(optlist);
+
+    /*
+     * Free the temporary storage.
+     */
+    FREE (x);
+    FREE (y);
+    FREE (d);
+    FREE (p);
+    FREE (u);
+    FREE (v);
+    FREE (xx);
+    FREE (yy);
+    FREE (matlist);
+    FREE (mix_vf);
+    FREE (mix_zone);
+    FREE (mix_mat);
+    FREE (mix_next);
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_ucd2d
+ *
+ * Purpose:     Build a 2-d UCD mesh and add it to the open database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  Sean Ahern, Tue Mar 24 16:09:06 PST 1998
+ *
+ * Modifications:
+ *  Sean Ahern, Thu Feb  7 14:22:40 PST 2002
+ *  Added material names.
+ *
+ *-------------------------------------------------------------------------*/
+/*ARGSUSED*/
+static void
+build_ucd2d(DBfile * dbfile, int size, int order)
+{
+    int             cycle;
+    float           time;
+    double          dtime;
+    int             td;
+    float          *coords[2];
+    int             dims[1];
+    float           x[13], y[13];
+    float           d[13],u[13],v[13];
+    float           p[12];
+    int             matlist[12];
+    char          **matnames = NULL;
+    int             materials[4];
+    float           mix_vf[50];
+    int             mix_next[50];
+    int             mix_mat[50];
+    int             mix_zone[50];
+    int             current_mix;
+    int             nzones, nnodes;
+    int             zonelist[44];
+    int             zonelist_length;
+    int             shapesize[2];
+    int             shapecount[2];
+    DBoptlist      *optlist = NULL;
+
+    int             i;
+    char            buf[256];
+    int             topo_dim;
+
+    /* Create the mesh */
+    coords[0] = x;
+    coords[1] = y;
+
+    nnodes = 13;
+    nzones = 12;
+
+    td = 2;
+    /* Set up the coordinates */
+
+    x[0] = 0.0;     y[0] = 2.0;
+    x[1] = 2.0;     y[1] = 0.0;
+    x[2] = 1.5;     y[2] = 1.5;
+    x[3] = 2.5;     y[3] = 1.5;
+    x[4] = 4.0;     y[4] = 2.0;
+    x[5] = 2.0;     y[5] = 1.5;
+    x[6] = 1.5;     y[6] = 2.0;
+    x[7] = 2.0;     y[7] = 2.0;
+    x[8] = 2.5;     y[8] = 2.0;
+    x[9] = 1.5;     y[9] = 2.5;
+    x[10] = 2.0;     y[10] = 2.5;
+    x[11] = 2.5;     y[11] = 2.5;
+    x[12] = 2.0;     y[12] = 4.0;
+
+    /* Set up the zonelist */
+    i=0;
+    /* Zone 0 */
+    zonelist[i++] = 0;
+    zonelist[i++] = 1;
+    zonelist[i++] = 2;
+
+    /* Zone 1 */
+    zonelist[i++] = 1;
+    zonelist[i++] = 4;
+    zonelist[i++] = 3;
+
+    /* Zone 2 */
+    zonelist[i++] = 0;
+    zonelist[i++] = 9;
+    zonelist[i++] = 12;
+
+    /* Zone 3 */
+    zonelist[i++] = 12;
+    zonelist[i++] = 11;
+    zonelist[i++] = 4;
+
+    /* Zone 4 */
+    zonelist[i++] = 0;
+    zonelist[i++] = 2;
+    zonelist[i++] = 6;
+    zonelist[i++] = 9;
+
+    /* Zone 5 */
+    zonelist[i++] = 2;
+    zonelist[i++] = 1;
+    zonelist[i++] = 3;
+    zonelist[i++] = 5;
+
+    /* Zone 6 */
+    zonelist[i++] = 3;
+    zonelist[i++] = 4;
+    zonelist[i++] = 11;
+    zonelist[i++] = 8;
+
+    /* Zone 7 */
+    zonelist[i++] = 9;
+    zonelist[i++] = 10;
+    zonelist[i++] = 11;
+    zonelist[i++] = 12;
+
+    /* Zone 8 */
+    zonelist[i++] = 2;
+    zonelist[i++] = 5;
+    zonelist[i++] = 7;
+    zonelist[i++] = 6;
+
+    /* Zone 9 */
+    zonelist[i++] = 5;
+    zonelist[i++] = 3;
+    zonelist[i++] = 8;
+    zonelist[i++] = 7;
+
+    /* Zone 10 */
+    zonelist[i++] = 6;
+    zonelist[i++] = 7;
+    zonelist[i++] = 10;
+    zonelist[i++] = 9;
+
+    /* Zone 11 */
+    zonelist[i++] = 7;
+    zonelist[i++] = 8;
+    zonelist[i++] = 11;
+    zonelist[i++] = 10;
+
+    zonelist_length = i;
+
+    shapesize[0] = 3;
+    shapesize[1] = 4;
+
+    shapecount[0] = 4;
+    shapecount[1] = 8;
+
+    /* Set up data variables */
+    for(i=0;i<nnodes;i++)
+    {
+        double xl,yl;
+
+        xl= x[i] - 2.0;
+        yl= y[i] - 2.0;
+
+        d[i] = sqrt(xl*xl+yl*yl);
+        u[i] = xl;
+        v[i] = yl;
+    }
+    for(i=0;i<nzones;i++)
+    {
+        if (i<shapecount[0])
+        {
+            int index;
+            double xavg, yavg;
+
+            index = (i*shapesize[0]);
+            xavg = (x[zonelist[index]] + x[zonelist[index+1]] + x[zonelist[index+2]])/3;
+            yavg = (y[zonelist[index]] + y[zonelist[index+1]] + y[zonelist[index+2]])/3;
+
+            xavg -= 2.0;
+            yavg -= 2.0;
+
+            p[i] = sqrt(xavg*xavg+yavg*yavg);
+        } else
+        {
+            int index;
+            double xavg, yavg;
+
+            index = shapecount[0]*shapesize[0]+(i-shapecount[0])*shapesize[1];
+
+            xavg = (x[zonelist[index]] + x[zonelist[index+1]] +
+                    x[zonelist[index+2]] + x[zonelist[index+3]])/4;
+            yavg = (y[zonelist[index]] + y[zonelist[index+1]] +
+                    y[zonelist[index+2]] + y[zonelist[index+3]])/4;
+
+            xavg -= 2.0;
+            yavg -= 2.0;
+
+            p[i] = sqrt(xavg*xavg+yavg*yavg);
+        }
+    }
+
+    /* Set up the materials */
+    materials[0] = 1;
+    materials[1] = 2;
+    materials[2] = 3;
+    materials[3] = 4;
+    matnames = (char**)malloc(sizeof(char*)*4);
+    matnames[0] = safe_strdup("Bottom");
+    matnames[1] = safe_strdup("Right");
+    matnames[2] = safe_strdup("Top");
+    matnames[3] = safe_strdup("Left");
+
+#define SET_MIX(mat1,mat2) \
+    matlist[i] = -(current_mix+1); \
+    mix_mat[current_mix] = mat1; \
+    mix_vf[current_mix] = 0.5; \
+    mix_zone[current_mix] = i; \
+    mix_next[current_mix] = current_mix + 2; \
+    current_mix++; \
+    mix_mat[current_mix] = mat2; \
+    mix_vf[current_mix] = 0.5; \
+    mix_zone[current_mix] = i; \
+    mix_next[current_mix] = 0; \
+    current_mix++
+
+    current_mix = 0;
+    for(i=0;i<nzones;i++)
+    {
+        if (i==5) {
+            matlist[i] = 1;
+        } else if (i==4) {
+            matlist[i] = 4;
+        } else if (i==6) {
+            matlist[i] = 2;
+        } else if (i==7) {
+            matlist[i] = 3;
+        } else if ((i==0) || (i==8)) {
+            SET_MIX(1,4);
+        } else if ((i==1) || (i==9)) {
+            SET_MIX(1,2);
+        } else if ((i==3) || (i==11)) {
+            SET_MIX(2,3);
+        } else if ((i==2) || (i==10)) {
+            SET_MIX(4,3);
+        }
+    }
+
+    /* Write out the variables */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /* The length includes the terminating NULL character. */
+    strcpy(buf, "mesh ucdmesh2d;pseudocolor d");
+    i = strlen(buf);
+    DBWrite(dbfile, "_meshtvinfo", buf, &i, 1, DB_CHAR);
+
+    strcpy(buf,"vel vector {u,v};speed scalar sqrt(u*u+v*v)");
+    i = strlen(buf);
+    DBWrite(dbfile, "_meshtv_defvars", buf, &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(12);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_TOPO_DIM, (void *)&td);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+    topo_dim = 2;
+    DBAddOption(optlist, DBOPT_TOPO_DIM, &topo_dim);
+
+    /* Write out the mesh */
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "ucd2d_zonelist", nzones, 2, zonelist,
+                  zonelist_length, 0, shapesize, shapecount, 2);
+    DBSetDeprecateWarnings(3);
+
+    DBPutUcdmesh(dbfile, "ucdmesh2d", 2, NULL, coords, nnodes, nzones,
+                 "ucd2d_zonelist", NULL, DB_FLOAT, optlist);
+
+    /* Write out the material */
+    dims[0] = nzones;
+    DBPutMaterial(dbfile, "mat1", "ucdmesh2d", 4, materials, matlist, dims, 1,
+                  mix_next, mix_mat, mix_zone, mix_vf, current_mix, DB_FLOAT,
+                  optlist);
+
+    /* Write out the variables */
+    DBPutUcdvar1(dbfile, "d", "ucdmesh2d", d, nnodes, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+    DBPutUcdvar1(dbfile, "u", "ucdmesh2d", u, nnodes, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+    DBPutUcdvar1(dbfile, "v", "ucdmesh2d", v, nnodes, NULL, 0, DB_FLOAT,
+                 DB_NODECENT, NULL);
+    DBPutUcdvar1(dbfile, "p", "ucdmesh2d", p, nzones, NULL, 0, DB_FLOAT,
+                 DB_ZONECENT, NULL);
+
+    /* Free memory */
+    DBFreeOptlist(optlist);
+    for(i=0;i<4;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_rect3d
+ *
+ * Purpose:     Build a 3-d rectilinear mesh and add it to the open database.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *     Robb Matzke, Sun Dec 18 17:39:58 EST 1994
+ *     Fixed memory leak.
+ *
+ *     Sean Ahern, Thu Jun 20 08:53:11 PDT 1996
+ *     Changed the mesh name to be more mnemonic.
+ *
+ *     Eric Brugger, Tue Nov 26 11:42:47 PST 1996
+ *     I added the outputing of some meshtv defvars to the silo file.
+ *
+ *     Jim Reus, Wed Nov 13 07:24:24 PST 1996
+ *     Added temperature (t) variable to demonstrate logplots.
+ *     ...temperature is positive non-zero, constant in x, linear
+ *        in y and exponential in z.
+ *
+ *     Eric Brugger, Fri Dec 13 16:51:36 PST 1996
+ *     I modified the routine to not use NX, NY, and NZ.
+ *
+ *     Eric Brugger, Wed Dec 18 14:50:48 PST 1996
+ *     Changed the `p' variable so that it is one smaller than the
+ *     mesh, since meshtv does not currently handle this case.
+ *
+ *     Sean Ahern, Wed Jan 22 15:16:58 PST 1997
+ *     Got rid of unused variables and variables that were being set but not
+ *     used.
+ *
+ *     Sean Ahern, Thu Feb  7 14:02:36 PST 2002
+ *     Added material names.
+ *
+ *-------------------------------------------------------------------------*/
+/*ARGSUSED*/
+static void
+build_rect3d(DBfile * dbfile, int size, int order)
+{
+    int            cycle;
+    float          time;
+    double         dtime;
+    int            nx, ny, nz;
+    int            ndims;
+    int            dims[3], zdims[3];
+    float         *coords[3];
+    float         *x, *y, *z;
+
+    char          *meshname, *var1name, *var2name, *var3name, *var4name;
+    char          *var5name, *matname;
+    float         *d, *p;
+    float         *u, *v, *w;
+    float         *t;
+
+    int            nmats;
+    int            matnos[9];
+    int           *matlist;
+    int            dims2[3];
+    int            mixlen;
+    int           *mix_next, *mix_mat, *mix_zone;
+    float         *mix_vf;
+
+    DBoptlist     *optlist;
+    char         **matnames = NULL;
+
+    int            i, j, k;
+    double         xave, yave, zave;
+    double         xcenter, ycenter, zcenter;
+    double         dist;
+
+    int            binf;
+
+    switch (size) {
+        case 1:
+            nx = 30;
+            ny = 40;
+            nz = 30;
+            break;
+        case 2:
+            nx = 60;
+            ny = 80;
+            nz = 60;
+            break;
+        case 3:
+            nx = 120;
+            ny = 160;
+            nz = 120;
+            break;
+    }
+
+    x = ALLOC_N (float, nx + 1);
+    y = ALLOC_N (float, ny + 1);
+    z = ALLOC_N (float, nz + 1);
+    d = ALLOC_N (float, nx * ny * nz);
+    p = ALLOC_N (float, nx * ny * nz);
+    u = ALLOC_N (float, (nx + 1) * (ny + 1) * (nz + 1));
+    v = ALLOC_N (float, (nx + 1) * (ny + 1) * (nz + 1));
+    w = ALLOC_N (float, (nx + 1) * (ny + 1) * (nz + 1));
+    matlist = ALLOC_N (int, nx * ny * nz);
+    mix_next = ALLOC_N (int, 50 * nx * ny);
+    mix_mat  = ALLOC_N (int, 50 * nx * ny);
+    mix_zone = ALLOC_N (int, 50 * nx * ny);
+    mix_vf   = ALLOC_N (float, 50 * nx * ny);
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "quadmesh3d";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    ndims = 3;
+    dims[0] = nx + 1;
+    dims[1] = ny + 1;
+    dims[2] = nz + 1;
+    for (i = 0; i < nx + 1; i++)
+        x[i] = i * (1. / nx);
+    for (i = 0; i < ny + 1; i++)
+        y[i] = i * (1. / ny);
+    for (i = 0; i < nz + 1; i++)
+        z[i] = i * (1. / nz);
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = .5;
+    ycenter = .5;
+    zcenter = .5;
+    zdims[0] = nx;
+    zdims[1] = ny;
+    zdims[2] = nz;
+    for (i = 0; i < nx; i++)
+    {
+        for (j = 0; j < ny; j++)
+        {
+            for (k = 0; k < nz; k++)
+            {
+                xave = (x[i]+x[i+1]) / 2.0 ;
+                yave = (y[j]+y[j+1]) / 2.0 ;
+                zave = (z[k]+z[k+1]) / 2.0 ;
+
+                dist = sqrt((xave - xcenter) * (xave - xcenter) +
+                            (yave - ycenter) * (yave - ycenter) +
+                            (zave - zcenter) * (zave - zcenter));
+
+                d[k*nx*ny + j*nx + i] = dist;
+
+                p[k*nx*ny + j*nx + i] = 1 / (dist + 0.0001);
+            }
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = .5001;
+    ycenter = .5001;
+    zcenter = .5001;
+    for (i = 0; i < nx + 1; i++) {
+        for (j = 0; j < ny + 1; j++) {
+            for (k = 0; k < nz + 1; k++) {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter) +
+                            (z[k] - zcenter) * (z[k] - zcenter));
+                u[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] = (x[i] - xcenter) / dist;
+                v[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] = (y[j] - ycenter) / dist;
+                w[k * (nx + 1) * (ny + 1) + j * (nx + 1) + i] = (z[k] - zcenter) / dist;
+            }
+        }
+    }
+
+
+    /*
+     * Create the temperature array.
+     */
+    if ((t=ALLOC_N(float,(nx+1)*(ny+1)*(nz+1))) != NULL)
+    {
+       double a,b,c,d;
+
+       a = 1.;
+       b = 3.;
+       c = 5.;
+       d = 7.;
+       for (i=0; i<nx+1; i++)
+          for (j=0; j<ny+1; j++)
+          {
+             double y;
+
+             y = j / (float) ny;
+             for (k=0; k<nz+1; k++)
+             {
+                double z;
+
+                z = k / (float) nz;
+                t[k*(nx+1)*(ny+1) + j*(nx+1) + i] = a + b*y + c*exp(d*z);
+             }
+          }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 8;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    matnos[3] = 4;
+    matnos[4] = 5;
+    matnos[5] = 6;
+    matnos[6] = 7;
+    matnos[7] = 8;
+    dims2[0] = nx;
+    dims2[1] = ny;
+    dims2[2] = nz;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("Brocolli/Cheddar soup");
+    matnames[1] = safe_strdup("Beef");
+    matnames[2] = safe_strdup("Gray smoke");
+    matnames[3] = safe_strdup("Wax");
+    matnames[4] = safe_strdup("Soapstone");
+    matnames[5] = safe_strdup("Bubble gum");
+    matnames[6] = safe_strdup("Platinum");
+    matnames[7] = safe_strdup("Nitrozanium");
+
+    /*
+     * Put in material 1 as the background then overlay materials
+     * 2 through 9.
+     */
+    fill_rect3d_bkgr (matlist, nx, ny, nz, 1);
+
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 2, 0.7);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 3, 0.6);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 4, 0.5);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 5, 0.4);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 6, 0.3);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 7, 0.2);
+    fill_rect3d_mat (x, y, z, matlist, nx, ny, nz, mix_next, mix_mat, mix_zone,
+                     mix_vf, &mixlen, 8, 0.1);
+
+    if (mixlen > 50 * nx * ny) {
+        printf ("mixlen = %d\n", mixlen);
+        exit (1);
+    }
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 30;
+    DBWrite (dbfile, "_meshtvinfo", "mesh quadmesh3d;pseudocolor d", &i, 1, DB_CHAR);
+    i = 50;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(11);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+#if 0
+    i = DB_COLMAJOR;
+    DBAddOption(optlist, DBOPT_MAJORORDER, &i);
+#endif
+
+    DBPutQuadmesh(dbfile, meshname, NULL, coords, dims, ndims, DB_FLOAT,
+                  DB_COLLINEAR, optlist);
+#ifndef WIN32
+    binf = open("rect3dz.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR);
+#else
+    binf = open("rect3dz.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE);
+#endif
+
+
+    DBPutQuadvar1(dbfile, var1name, meshname, d, zdims, ndims, NULL, 0,
+                  DB_FLOAT, DB_ZONECENT, optlist);
+    write(binf, d, zdims[0]*zdims[1]*zdims[2]*sizeof(float));
+
+    DBPutQuadvar1(dbfile, var2name, meshname, p, zdims, ndims, NULL, 0,
+                  DB_FLOAT, DB_ZONECENT, optlist);
+    write(binf, p, zdims[0]*zdims[1]*zdims[2]*sizeof(float));
+    close(binf);
+    printf("zsize = nz=%d, ny=%d, nx=%d\n", zdims[2], zdims[1], zdims[0]);
+
+#ifndef WIN32
+    binf = open("rect3dn.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR);
+#else
+    binf = open("rect3dn.bin", O_CREAT|O_TRUNC|O_WRONLY, S_IREAD|S_IWRITE);
+#endif
+
+    DBPutQuadvar1(dbfile, var3name, meshname, u, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+    write(binf, u, dims[0]*dims[1]*dims[2]*sizeof(float));
+
+    DBPutQuadvar1(dbfile, var4name, meshname, v, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+    /*write(binf, v, dims[0]*dims[1]*dims[2]*sizeof(float));*/
+
+    DBPutQuadvar1(dbfile, var5name, meshname, w, dims, ndims, NULL, 0,
+                  DB_FLOAT, DB_NODECENT, optlist);
+    /*write(binf, w, dims[0]*dims[1]*dims[2]*sizeof(float));*/
+#if 0
+    { int i, j, k;
+        for (k = 0; k < dims[2]; k++)
+        {
+            for (j = 0; j < dims[1]; j++)
+            {
+                for (i = 0; i < dims[0]; i++)
+                {
+                    write(binf, &u[k*dims[1]*dims[0]+j*dims[0]+i], sizeof(float));
+                    write(binf, &v[k*dims[1]*dims[0]+j*dims[0]+i], sizeof(float));
+                    write(binf, &w[k*dims[1]*dims[0]+j*dims[0]+i], sizeof(float));
+                }
+            }
+        }
+    }
+#endif
+    close(binf);
+    printf("size = nz=%d, ny=%d, nx=%d\n", dims[2], dims[1], dims[0]);
+
+    if (t != NULL)
+       DBPutQuadvar1(dbfile, "t", meshname, t
+                    ,dims, ndims, NULL, 0, DB_FLOAT, DB_NODECENT
+                    ,optlist
+                    );
+
+    DBPutMaterial(dbfile, matname, meshname, nmats, matnos, matlist, dims2,
+                  ndims, mix_next, mix_mat, mix_zone, mix_vf, mixlen, DB_FLOAT,
+                  optlist);
+
+    DBFreeOptlist(optlist);
+
+    /*
+     * Free the temporary storage.
+     */
+    FREE (x);
+    FREE (y);
+    FREE (z);
+    FREE (d);
+    FREE (p);
+    FREE (u);
+    FREE (v);
+    FREE (w);
+    FREE (t);
+    FREE (matlist);
+    FREE (mix_next);
+    FREE (mix_mat);
+    FREE (mix_zone);
+    FREE (mix_vf);
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_curv3d
+ *
+ * Purpose:     Build a 3-d Curvillinear  mesh and add it to the open
+ *              database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:  Tony L. Jones
+ *              May 30, 1995
+ *
+ * Modifications:
+ *     Tony Jones      June 15, 1995
+ *     Density and Pressure calculation was in err.  Previous
+ *     algorithm was passing non-existent values to the mentioned
+ *     arrays.  Problem fixed by decrementing the max loop index.
+ *
+ *     Sean Ahern, Thu Jun 20 08:53:11 PDT 1996
+ *     Changed the mesh name to be more mnemonic.
+ *
+ *     Eric Brugger, Tue Nov 26 11:42:47 PST 1996
+ *     I added the outputing of some meshtv defvars to the silo file.
+ *
+ *
+ *     Jim Reus, Wed Nov 13 07:24:24 PST 1996
+ *     Added temperature (t) variable to demonstrate logplots.
+ *     ...temperature is positive non-zero, constant in x, linear
+ *        in y and exponential in z.
+ *
+ *     Sean Ahern, Tue Jan  7 15:30:43 PST 1997
+ *     Removed dependence on NX, NY, and NZ.
+ *
+ *     Sean Ahern, Wed Jan 22 15:16:58 PST 1997
+ *     Initialized some pointer variables to NULL.  Got rid of unused
+ *     variables and variables that were being set but not used.
+ *
+ *     Eric Brugger, Mon Feb 22 14:21:13 PST 1999
+ *     Added code to force the y coordinates to be exactly zero on the
+ *     y = 0 symmetry plane.
+ *
+ *     Jeremy Meredith, Thu Sep  2 11:58:13 PDT 1999
+ *     Reversed the angular coordinates so they conform to the right
+ *     hand rule.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*ARGSUSED*/
+static void
+build_curv3d(DBfile * dbfile, int size, int order)
+{
+    int       cycle;
+    float     time;
+    double    dtime;
+    float    *coords[3];
+
+    float     *x = NULL;
+    float     *y = NULL;
+    float     *z = NULL;
+    double    Xmin,Ymin,Zmin;
+    double    Xmax,Ymax,Zmax;
+
+    int       ndims, zdims[3];
+    int       dims[3], dims2[3];
+
+    char     *meshname, *var1name, *var2name, *var3name, *var4name;
+    char     *var5name, *matname;
+
+    float    *d = NULL, *p = NULL;
+    float    *u = NULL;
+    float    *v = NULL;
+    float    *w = NULL;
+    float    *t = NULL;
+
+    int       first;
+    int       nmats;
+    int       matnos[3];
+    int      *matlist = NULL;
+    int       mixlen;
+    int      *mix_next = NULL, *mix_mat = NULL;
+    int      *mix_zone = NULL;
+    float    *mix_vf = NULL;
+
+    DBoptlist *optlist = NULL;
+    char    **matnames = NULL;
+
+    int       i, j, k, l;
+
+    double    xave, yave;
+    double    xcenter, ycenter;
+    int       nx, ny, nz;
+
+    double    theta, dtheta;
+    double    r, dr;
+    double    h, dh;
+    double    dist;
+
+    switch (size) {
+        case 1:
+            nx = 30;
+            ny = 40;
+            nz = 30;
+            break;
+        case 2:
+            nx = 60;
+            ny = 80;
+            nz = 60;
+            break;
+        case 3:
+            nx = 120;
+            ny = 160;
+            nz = 120;
+            break;
+    }
+
+    x = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    y = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    z = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    d = ALLOC_N(float,nx*ny*nz);
+    p = ALLOC_N(float,nx*ny*nz);
+    u = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    v = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    w = ALLOC_N(float,(nx+1)*(ny+1)*(nz+1));
+    matlist = ALLOC_N(int,nx*ny*nz);
+    mix_next = ALLOC_N(int,50 * nx*ny*nz);
+    mix_mat = ALLOC_N(int,50 * nx*ny*nz);
+    mix_vf = ALLOC_N(float,50 * nx*ny*nz);
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "curvmesh3d";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    ndims = 3;
+    dims[0] = nx+1;
+    dims[1] = ny+1;
+    dims[2] = nz+1;
+
+    dtheta = -(180. / nx) * (3.1415926536 / 180.);
+    dh = 1;
+    dr = 3. / ny;
+    theta = 3.1415926536;
+
+    first = 1;
+    for (i = 0; i < nx+1; i++) {
+        r = 2.;
+        for (j = 0; j < ny+1; j++) {
+            h = 0.;
+            for (k = 0; k < nz+1; k++)
+            {
+               double Xp,Yp,Zp;
+               int    a;
+
+               Xp = r * cos(theta);
+               Yp = r * sin(theta);
+               Zp = h;
+               if (first)
+               {
+                  Xmin  = Xp;
+                  Xmax  = Xp;
+                  Ymin  = Yp;
+                  Ymax  = Yp;
+                  Zmin  = Zp;
+                  Zmax  = Zp;
+                  first = 0;
+               }
+               else
+               {
+                  Xmin  = Min(Xmin,Xp);
+                  Xmax  = Max(Xmax,Xp);
+                  Ymin  = Min(Ymin,Yp);
+                  Ymax  = Max(Ymax,Yp);
+                  Zmin  = Min(Zmin,Zp);
+                  Zmax  = Max(Zmax,Zp);
+               }
+               a        = k*(nx+1)*(ny+1) + j*(nx+1) + i;
+               x[a]     = Xp;
+               y[a]     = Yp;
+               z[a]     = Zp;
+               h       += dh;
+            }
+            r += dr;
+        }
+        theta += dtheta;
+    }
+
+    /*
+     * Force the y values to be greater than or equal to zero so that
+     * the y values are all planar on the y = 0 symmetry boundary.
+     */
+    for (i = 0; i < nx+1; i += nx)
+    {
+        for (j = 0; j < ny+1; j++)
+        {
+            for (k = 0; k < nz+1; k++)
+            {
+                l = k*(nx+1)*(ny+1) + j*(nx+1) + i;
+                y[l] = 0.;
+            }
+        }
+    }
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    zdims[0] = nx;
+    zdims[1] = ny;
+    zdims[2] = nz;
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz; k++){
+                xave = (x[k*(nx+1)*(ny+1) + j*(nx+1)+i]       +
+                        x[k*(nx+1)*(ny+1) + j*(nx+1)+i+1]     +
+                        x[k*(nx+1)*(ny+1) + (j+1)*(nx+1)+i+1] +
+                        x[k*(nx+1)*(ny+1) + (j+1)*(nx+1)+i])  / 4.;
+
+                yave = (y[k*(nx+1)*(ny+1) + j*(nx+1)+i]       +
+                        y[k*(nx+1)*(ny+1) + j*(nx+1)+i+1]     +
+                        y[k*(nx+1)*(ny+1) + (j+1)*(nx+1)+i+1] +
+                        y[k*(nx+1)*(ny+1) + (j+1)*(nx+1)+i])  / 4.;
+
+                 dist = sqrt ((xave - xcenter) * (xave - xcenter) +
+                              (yave - ycenter) * (yave - ycenter) );
+                d[k*(nx)*(ny) + j*(nx)+i] = dist;
+                p[k*(nx)*(ny) + j*(nx)+i] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    xcenter = 0.;
+    ycenter = 0.;
+
+    for (i = 0; i < nx+1; i++) {
+         for (j = 0; j < ny+1; j++) {
+             for (k = 0; k < nz+1; k++){
+                 dist = sqrt ((x[i] - xcenter) * (x[i] - xcenter) +
+                              (y[j] - ycenter) * (y[j] - ycenter));
+                 u[k*(nx+1)*(ny+1)+j*(nx+1)+i] = (x[i] - xcenter) / dist;
+                 v[k*(nx+1)*(ny+1)+j*(nx+1)+i] = (y[j] - ycenter) / dist;
+                 w[k*(nx+1)*(ny+1)+j*(nx+1)+i] = 0.;
+             }
+         }
+    }
+
+    /*
+     * Create the temperature array.
+     */
+    if ((t=ALLOC_N(float,(nx+1)*(ny+1)*(nz+1))) != NULL)
+    {
+       double Ca,Cb,Cc,Cd;
+
+       Ca = 1.;
+       Cb = 3.;
+       Cc = 5.;
+       Cd = 7.;
+       for (i=0; i<=nx; ++i)
+          for (j=0; j<=ny; ++j)
+             for (k=0; k<=nz; ++k)
+             {
+                double Yv,Zv;
+                int    a;
+
+                a    = k*(nx+1)*(ny+1) + j*(nx+1) + i;
+                Yv   = (y[a]-Ymin) / (Ymax-Ymin);
+                Zv   = (z[a]-Zmin) / (Zmax-Zmin);
+                t[a] = Ca + Cb*Yv + Cc*exp(Cd*Zv);
+             }
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    dims2[0] = nx;
+    dims2[1] = ny;
+    dims2[2] = nz;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("Greed");
+    matnames[1] = safe_strdup("Charity");
+    matnames[2] = safe_strdup("Apathy");
+
+    mixlen = 0;
+
+    /*
+     * Put in the material in 3 shells.
+     */
+    for (i = 0; i < nx; i++) {
+        for (k = 0; k < nz; k++){
+            for (j = 0; j < 10; j++){
+                matlist[k*nx*ny+j*nx+i] = 1;
+            }
+            for (j = 10; j < 20; j++) {
+                matlist[k*nx*ny+j*nx+i] = 2;
+            }
+            for (j = 20; j < ny; j++) {
+                matlist[k*nx*ny+j*nx+i] = 3;
+            }
+        }
+    }
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time  = 4.8;
+    dtime = 4.8;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 30;
+    DBWrite (dbfile, "_meshtvinfo", "mesh curvmesh3d;pseudocolor d",
+             &i, 1, DB_CHAR);
+    i = 50;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist (11);
+    DBAddOption (optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption (optlist, DBOPT_TIME , &time);
+    DBAddOption (optlist, DBOPT_DTIME, &dtime);
+    DBAddOption (optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption (optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption (optlist, DBOPT_ZLABEL, "Z Axis");
+    DBAddOption (optlist, DBOPT_XUNITS, "cm");
+    DBAddOption (optlist, DBOPT_YUNITS, "cm");
+    DBAddOption (optlist, DBOPT_ZUNITS, "cm");
+    DBAddOption (optlist, DBOPT_MATNAMES, matnames);
+
+#if 0
+    i = DB_COLMAJOR;
+    DBAddOption (optlist, DBOPT_MAJORORDER, &i);
+#endif
+
+    DBPutQuadmesh (dbfile, meshname, NULL, coords, dims, ndims,
+                   DB_FLOAT, DB_NONCOLLINEAR, optlist);
+
+    DBPutQuadvar1 (dbfile, var1name, meshname, d, zdims, ndims, NULL, 0,
+                   DB_FLOAT, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1 (dbfile, var2name, meshname, p, zdims, ndims, NULL, 0,
+                   DB_FLOAT, DB_ZONECENT, optlist);
+
+    DBPutQuadvar1 (dbfile, var3name, meshname, u, dims, ndims, NULL, 0,
+                   DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1 (dbfile, var4name, meshname, v, dims, ndims, NULL, 0,
+                   DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1 (dbfile, var5name, meshname, w, dims, ndims, NULL, 0,
+                   DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutQuadvar1 (dbfile, "t", meshname, t, dims, ndims, NULL, 0, DB_FLOAT,
+                   DB_NODECENT, optlist);
+
+    DBPutMaterial (dbfile, matname, meshname, nmats, matnos, matlist, dims2,
+                   ndims, mix_next, mix_mat, mix_zone, mix_vf, mixlen,
+                   DB_FLOAT, optlist);
+
+    DBFreeOptlist (optlist);
+
+    /* Free the temporary storage.  */
+    FREE(x);
+    FREE(y);
+    FREE(z);
+    FREE(d);
+    FREE(p);
+    FREE(u);
+    FREE(v);
+    FREE(w);
+    FREE(t);
+    FREE(matlist);
+    FREE(mix_mat);
+    FREE(mix_next);
+    FREE(mix_zone);
+    FREE(mix_vf);
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_ucd3d
+ *
+ * Purpose:     Build a 3-d UCD mesh and add it to the open database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *     Mark Miller, Mon Oct  5 21:39:38 PDT 1998
+ *     Fixed node numbering to match pictures in Silo's user manual
+ *
+ *     Robb Matzke, Sun Dec 18 17:40:58 EST 1994
+ *     Fixed memory leak.
+ *
+ *     Sean Ahern, Thu Jun 20 08:53:11 PDT 1996
+ *     Changed the mesh name to be more mnemonic.
+ *
+ *     Eric Brugger, Tue Nov 26 11:42:47 PST 1996
+ *     I added the outputing of some meshtv defvars to the silo file.
+ *
+ *     Jim Reus, Wed Nov 13 07:24:24 PST 1996
+ *     Added temperature (t) variable to demonstrate logplots.
+ *     ...temperature is positive non-zero, constant in x, linear
+ *        in y and exponential in z.
+ *
+ *     Eric Brugger, Wed Dec 18 16:41:58 PST 1996
+ *     I corrected a bug with the initialization of the variable first.
+ *     It was changed from an initial value of 0 to 1.
+ *
+ *     Sean Ahern, Wed Jan 22 15:16:58 PST 1997
+ *     Got rid of unused variables and variables that were being set but not
+ *     used.
+ *
+ *     Eric Brugger, Mon Feb 22 14:21:13 PST 1999
+ *     Added code to force the y coordinates to be exactly zero on the
+ *     y = 0 symmetry plane.
+ *
+ *     Jeremy Meredith, Wed Apr 14 16:22:15 PDT 1999
+ *     Added mixed-material zones, and species, to this test case.
+ *
+ *     Lisa J. Roberts, Wed Jun 30 15:21:28 PDT 1999
+ *     Modified the DBCalcExternalFacelist() call to select the proper
+ *     bound method (due to the mixed-material change).
+ *
+ *     Eric Brugger, Mon Sep 20 19:10:11 PDT 1999
+ *     I modified the material numbers so that they are no longer
+ *     numbered consecutively.
+ *
+ *     Brad Whitlock, Wed Jan 18 16:21:11 PST 2006
+ *     I added a nodal "ascii" variable to the mesh.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*ARGSUSED*/
+static void
+build_ucd3d(DBfile * dbfile, int size, int order)
+{
+    int            cycle;
+    float          time;
+    double         dtime;
+    int            td;
+    float         *coords[3];
+    float          x[2646], y[2646], z[2646];
+    double         Xmin,Ymin,Zmin;
+    double         Xmax,Ymax,Zmax;
+    int            first;
+    int            nfaces, nzones, nnodes;
+    int            lfacelist, lzonelist;
+    int            fshapesize, fshapecnt, zshapesize, zshapecnt;
+    int            zonelist[16000];
+    int            facelist[11200];
+    int            zoneno[2800];
+
+    char          *meshname, *var1name, *var2name, *var3name, *var4name;
+    char          *var5name, *var6name, *matname;
+    float         *vars[1];
+    char          *varnames[1];
+    float          d[2646], p[2646], u[2646], v[2646], w[2646];
+    char           ascii[2646];
+    float         *t;
+    
+    int            nmats;
+    int            matnos[3];
+    int            matlist[2000];
+    int            mixlen;
+    int            mix_next[900], mix_mat[900], mix_zone[900];
+    float          mix_vf[900];
+
+    int            nmatspec[3];
+    float          specmf[5000];
+    int            speclist[2000];
+    int            mix_speclist[900];
+    int            nspecmf;
+
+    DBoptlist     *optlist;
+    char         **matnames = NULL;
+
+    DBfacelist    *fl;
+
+    int            i, j, k, l;
+    int            iz, onvalue = 1;
+    double         xcenter, ycenter;
+    double         theta, dtheta;
+    double         r, dr;
+    double         h, dh;
+    double         dist;
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "ucdmesh3d";
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    nnodes = 21 * 21 * 6;
+    nzones = 20 * 20 * 5;
+
+    lzonelist = (20 * 20 * 5) * 8;
+    zshapecnt = nzones;
+    zshapesize = 8;
+
+    td = 3;
+
+    dh = 20. / 20.;
+    dtheta = (180. / 20.) * (3.1415926 / 180.);
+    dr = 3. / 5.;
+    h = 0.;
+    first = 1;
+    for (i = 0; i < 21; i++) {
+        theta = 0.;
+        for (j = 0; j < 21; j++) {
+            r = 2.;
+            for (k = 0; k < 6; k++)
+            {
+               double Xv,Yv,Zv;
+               int    a;
+
+               Xv = r * cos(theta);
+               Yv = r * sin(theta);
+               Zv = h;
+               if (first)
+               {
+                  Xmin  = Xv;
+                  Xmax  = Xv;
+                  Ymin  = Yv;
+                  Ymax  = Yv;
+                  Zmin  = Zv;
+                  Zmax  = Zv;
+                  first = 0;
+               }
+               else
+               {
+                  Xmin  = Min(Xmin,Xv);
+                  Xmax  = Max(Xmax,Xv);
+                  Ymin  = Min(Ymin,Yv);
+                  Ymax  = Max(Ymax,Yv);
+                  Zmin  = Min(Zmin,Zv);
+                  Zmax  = Max(Zmax,Zv);
+               }
+               a        = i*126 + j*6 + k;
+               x[a]     = Xv;
+               y[a]     = Yv;
+               z[a]     = Zv;
+               r       += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    /*
+     * Force the y values to be greater than or equal to zero so that
+     * the y values are all planar on the y = 0 symmetry boundary.
+     */
+    for (i = 0; i < 21; i++)
+    {
+        for (j = 0; j < 21; j += 20)
+        {
+            for (k = 0; k < 6; k++)
+            {
+                l = i*126 + j*6 + k;
+                y[l] = 0.;
+            }
+        }
+    }
+
+    iz = 0;
+    for (i = 0; i < 20; i++) {
+        for (j = 0; j < 20; j++) {
+            for (k = 0; k < 5; k++) {
+                zonelist[iz    ] = (i + 0) * 126 + (j + 1) * 6 + k + 1;
+                zonelist[iz + 1] = (i + 0) * 126 + (j + 0) * 6 + k + 1;
+                zonelist[iz + 2] = (i + 1) * 126 + (j + 0) * 6 + k + 1;
+                zonelist[iz + 3] = (i + 1) * 126 + (j + 1) * 6 + k + 1;
+                zonelist[iz + 4] = (i + 0) * 126 + (j + 1) * 6 + k + 0;
+                zonelist[iz + 5] = (i + 0) * 126 + (j + 0) * 6 + k + 0;
+                zonelist[iz + 6] = (i + 1) * 126 + (j + 0) * 6 + k + 0;
+                zonelist[iz + 7] = (i + 1) * 126 + (j + 1) * 6 + k + 0;
+                iz += 8;
+            }
+        }
+    }
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < 21; i++) {
+        for (j = 0; j < 21; j++) {
+            for (k = 0; k < 6; k++) {
+                dist = sqrt((x[i * 126 + j * 6 + k] - xcenter) *
+                            (x[i * 126 + j * 6 + k] - xcenter) +
+                            (y[i * 126 + j * 6 + k] - ycenter) *
+                            (y[i * 126 + j * 6 + k] - ycenter));
+                d[i * 126 + j * 6 + k] = dist;
+                p[i * 126 + j * 6 + k] = 1. / (dist + .0001);
+            }
+        }
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    var6name = "ascii";
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < 21; i++) {
+        for (j = 0; j < 21; j++) {
+            for (k = 0; k < 6; k++) {
+                dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                            (y[j] - ycenter) * (y[j] - ycenter));
+                u[i * 126 + j * 6 + k] = (x[i] - xcenter) / dist;
+                v[i * 126 + j * 6 + k] = (y[j] - ycenter) / dist;
+                w[i * 126 + j * 6 + k] = 0.;
+
+                ascii[i * 126 + j * 6 + k] = (char)(65 + i);
+            }
+        }
+    }
+
+    /*
+     * Create the temperature array.
+     */
+    if ((t=ALLOC_N(float,21*21*6)) != NULL)
+    {
+       double Ca,Cb,Cc,Cd;
+
+       Ca = 1.;
+       Cb = 3.;
+       Cc = 5.;
+       Cd = 7.;
+       for (i=0; i<21; ++i)
+          for (j=0; j<21; ++j)
+             for (k=0; k<6; ++k)
+             {
+                double Yv,Zv;
+                int    a;
+
+                a    = i*21*6 + j*6 + k;
+                Yv   = (y[a]-Ymin) / (Ymax-Ymin);
+                Zv   = (z[a]-Zmin) / (Zmax-Zmin);
+                t[a] = Ca + Cb*Yv + Cc*exp(Cd*Zv);
+             }
+    }
+
+    /*
+     * Create the material and species arrays.
+     */
+    matname = "mat1";
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 4;
+    matnos[2] = 9;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*4);
+    matnames[0] = safe_strdup("Inner goop");
+    matnames[1] = safe_strdup("Middle stuff");
+    matnames[2] = safe_strdup("Outer junk");
+
+    /*
+     * Material 1 has 2 species at static concentrations 0.1 and 0.9
+     * Material 2 has 3 species at static concentrations 0.2, 0.3, and 0.5
+     * Material 3 has a single species
+     */
+    nmatspec[0] = 2;
+    nmatspec[1] = 3;
+    nmatspec[2] = 1;
+    nspecmf = 0;
+
+    /*
+     * Put in the material in 3 shells.
+     */
+    for (i = 0; i < 20; i++) {
+        for (j = 0; j < 20; j++) {
+            /* Clean zones, material 1 */
+            for (k = 0; k < 2; k++) {
+                int zone = i * 100 + j * 5 + k;
+
+                matlist[zone] = 1;
+                speclist[zone] = nspecmf + 1;
+                specmf[nspecmf++] = 0.1;
+                specmf[nspecmf++] = 0.9;
+            }
+            
+            /* Mixed zones, materials 1 and 4 */
+            for (k = 2; k < 3; k++) {
+                int zone = i * 100 + j * 5 + k;
+
+                matlist[zone] = -mixlen - 1;
+                speclist[zone]= -mixlen - 1;
+
+                /* material 1 */
+                mix_mat [mixlen]   = 1;
+                mix_next[mixlen]   = mixlen+2;
+                mix_zone[mixlen]   = zone + 1;
+                mix_vf  [mixlen]   = (float)i/20.;
+
+                mix_speclist[mixlen] = nspecmf + 1;
+                specmf[nspecmf++] = 0.1;
+                specmf[nspecmf++] = 0.9;
+
+                mixlen++;
+
+                /* material 4 */
+                mix_mat [mixlen] = 4;
+                mix_next[mixlen] = 0;
+                mix_zone[mixlen] = zone + 1;
+                mix_vf  [mixlen] = 1.0 - ((float)i/20.);
+
+                mix_speclist[mixlen] = nspecmf + 1;
+                specmf[nspecmf++] = 0.2;
+                specmf[nspecmf++] = 0.3;
+                specmf[nspecmf++] = 0.5;
+
+                mixlen++;
+            }
+
+            /* Clean zones, material 4 */
+            for (k = 3; k < 4; k++) {
+                int zone = i * 100 + j * 5 + k;
+                matlist[zone] = 4;
+                speclist[zone] = nspecmf + 1;
+                specmf[nspecmf++] = 0.2;
+                specmf[nspecmf++] = 0.3;
+                specmf[nspecmf++] = 0.5;
+            }
+
+            /* Clean zones, material 9 */
+            for (k = 4; k < 5; k++) {
+                int zone = i * 100 + j * 5 + k;
+                matlist[zone] = 9;
+                speclist[zone] = 0;
+            }
+        }
+    }
+
+    /*
+     * Calculate the external face list.
+     */
+    fl = DBCalcExternalFacelist(zonelist, nnodes, 0, &zshapesize,
+                                &zshapecnt, 1, matlist, 0);
+
+    nfaces = fl->nfaces;
+    fshapecnt = fl->nfaces;
+    fshapesize = 4;
+    lfacelist = fl->lnodelist;
+    for (i = 0; i < lfacelist; i++)
+        facelist[i] = fl->nodelist[i];
+    for (i = 0; i < nfaces; i++)
+        zoneno[i] = fl->zoneno[i];
+
+    DBFreeFacelist(fl);
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 29;
+    DBWrite (dbfile, "_meshtvinfo", "mesh ucdmesh3d;pseudocolor d",
+             &i, 1, DB_CHAR);
+    i = 50;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(12);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_TOPO_DIM, (void *)&td);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+
+    DBPutFacelist(dbfile, "fl1", nfaces, 3, facelist, lfacelist, 0, zoneno,
+                  &fshapesize, &fshapecnt, 1, NULL, NULL, 0);
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zl1", nzones, 3, zonelist, lzonelist, 0,
+                  &zshapesize, &zshapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    DBPutUcdmesh(dbfile, meshname, 3, NULL, coords, nnodes, nzones,
+                 "zl1", "fl1", DB_FLOAT, optlist);
+
+    vars[0] = d;
+    varnames[0] = var1name;
+
+    DBPutUcdvar(dbfile, var1name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = p;
+    varnames[0] = var2name;
+
+    DBPutUcdvar(dbfile, var2name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = u;
+    varnames[0] = var3name;
+
+    DBPutUcdvar(dbfile, var3name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = v;
+    varnames[0] = var4name;
+
+    DBPutUcdvar(dbfile, var4name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = w;
+    varnames[0] = var5name;
+
+    DBPutUcdvar(dbfile, var5name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0]     = t;
+    varnames[0] = "t";
+    DBPutUcdvar(dbfile, "t", meshname, 1, varnames, vars, nnodes, NULL, 0,
+                DB_FLOAT, DB_NODECENT, optlist);
+
+    DBPutMaterial(dbfile, matname, meshname, nmats, matnos, matlist, &nzones,
+                  1, mix_next, mix_mat, mix_zone, mix_vf, mixlen, DB_FLOAT,
+                  optlist);
+
+    DBPutMatspecies(dbfile, "species", matname, nmats, nmatspec, speclist,
+                    &nzones, 1, nspecmf, specmf, mix_speclist, mixlen, 
+                    DB_FLOAT, optlist);
+
+    vars[0] = (float*) ascii;
+    varnames[0] = var6name;
+    DBAddOption(optlist, DBOPT_ASCII_LABEL, &onvalue);
+    DBPutUcdvar(dbfile, var6name, meshname, 1, varnames, vars, nnodes, NULL,
+                0, DB_CHAR, DB_NODECENT, optlist);
+
+    DBFreeOptlist(optlist);
+
+    /* Free variables */
+    FREE(t);
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_poly3d
+ *
+ * Purpose:     Build a 3-d UCD mesh with polyhedra and add it to the
+ *              open database.
+ *
+ * Return:      Success:        void
+ *
+ *              Failure:
+ *
+ * Programmer:
+ *
+ * Modifications:
+ *
+ *    Jeremy Meredith, Tue May 25 09:41:21 PDT 1999
+ *    Added a (null) optlist to the call to PutZonelist2.
+ *
+ *    Lisa J. Roberts, Fri Apr  7 11:01:12 PDT 2000
+ *    Removed flid, zlid, matid, meshid, var1id, var2id, var3id,
+ *    var4id, var5id, and var6id, which were unused.
+ *
+ *    Sean Ahern, Thu Feb  7 14:07:41 PST 2002
+ *    Added material names.
+ *
+ *-------------------------------------------------------------------------*/
+/*ARGSUSED*/
+static void
+build_poly3d(DBfile *dbfile, int size, int order)
+{
+    int            cycle;
+    float          time;
+    double         dtime;
+    char          *coordnames[3];
+    float         *coords[3];
+    float         *x, *y, *z;
+    float          Ca, Cb, Cc, Cd;
+    float          Xmin,Ymin,Zmin;
+    float          Xmax,Ymax,Zmax;
+    int            nx, ny, nz;
+#if 0
+    int            ndims = 3;
+#endif
+    int            nfaces, nzone1, nzone2, nzone3, nzones, nnodes;
+    int            lo_offset, hi_offset;
+    int            lfacelist, lzonelist;
+    int            fshapesize[3], fshapecnt[3], nfshapes;
+    int            zshapetype[3], zshapesize[3], zshapecnt[3], nzshapes;
+    int           *zonelist;
+    int           *facelist;
+    int           *zoneno;
+
+    char          *meshname, *var1name, *var2name, *var3name, *var4name;
+    char          *var5name, *matname;
+    float         *vars[1];
+    char          *varnames[1];
+    float         *d, *p, *u, *v, *w, *t;
+
+    int            nmats;
+    int            matnos[3];
+    int           *matlist;
+    int            mixlen;
+
+    DBoptlist     *optlist;
+    char         **matnames = NULL;
+
+    DBfacelist    *fl;
+
+    int            i, j, k;
+    int            in, iz;
+    double         xcenter, ycenter, zcenter;
+    double         theta, dtheta;
+    double         r, dr;
+    double         h, dh;
+    double         dist;
+
+    switch (size) {
+        case 1:
+            nx = 20;
+            ny = 20;
+            nz = 10;
+            break;
+        case 2:
+            nx = 40;
+            ny = 40;
+            nz = 20;
+            break;
+        case 3:
+            nx = 80;
+            ny = 80;
+            nz = 40;
+            break;
+    }
+
+    /*
+     * Create the mesh.
+     */
+    meshname = "ucdmesh3d";
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    nnodes = (nx + 1) * ((ny / 2 + 1) * (nz / 2) + (ny + 1) * (nz / 2 + 1));
+    x = ALLOC_N (float, nnodes);
+    y = ALLOC_N (float, nnodes);
+    z = ALLOC_N (float, nnodes);
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    in = 0;
+
+    dh = 40. / nx;
+    dtheta = (180. / (ny / 2)) * (3.1415926 / 180.);
+    dr = 3. / nz;
+    h = 0.;
+    for (i = 0; i < nx + 1; i++) {
+        theta = 0.;
+        for (j = 0; j < ny / 2 + 1; j++) {
+            r = 2.;
+            for (k = 0; k < nz / 2; k++) {
+               x[in]    = r * cos(theta);
+               y[in]    = r * sin(theta);
+               z[in]    = h;
+               in++;
+               r       += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    dh = 40. / nx;
+    dtheta = (180. / ny) * (3.1415926 / 180.);
+    dr = 3. / nz;
+    h = 0.;
+    for (i = 0; i < nx + 1; i++) {
+        theta = 0.;
+        for (j = 0; j < ny + 1; j++) {
+            r = 2. + (3. / 2.);
+            for (k = nz / 2; k < nz + 1; k++) {
+               x[in]    = r * cos(theta);
+               y[in]    = r * sin(theta);
+               z[in]    = h;
+               in++;
+               r       += dr;
+            }
+            theta += dtheta;
+        }
+        h += dh;
+    }
+
+    Xmin = x[0];
+    Xmin = x[0];
+    Xmax = x[0];
+    Ymin = y[0];
+    Ymax = y[0];
+    Zmin = z[0];
+    Zmax = z[0];
+    for (i = 0; i < nnodes; i++) {
+        Xmin = Min(Xmin, x[i]);
+        Xmax = Max(Xmax, x[i]);
+        Ymin = Min(Ymin, y[i]);
+        Ymax = Max(Ymax, y[i]);
+        Zmin = Min(Zmin, z[i]);
+        Zmax = Max(Zmax, z[i]);
+    }
+
+    nzone1 = nx * (ny / 2) * (nz / 2 - 1);
+    nzone2 = nx * (ny / 2) * 1;
+    nzone3 = nx * ny * (nz / 2);
+    nzones = nzone1 + nzone2 + nzone3;
+    lo_offset = 0;
+    hi_offset = 0;
+    lzonelist = nzone1 * 8 + nzone2 * 38 + nzone3 * 8;
+    zonelist = ALLOC_N (int, lzonelist);
+    zshapecnt[0] = nzone1;
+    zshapecnt[1] = nzone2;
+    zshapecnt[2] = nzone3;
+    zshapesize[0] = 8;
+    zshapesize[1] = 38 * nzone2;
+    zshapesize[2] = 8;
+    zshapetype[0] = DB_ZONETYPE_HEX;
+    zshapetype[1] = DB_ZONETYPE_POLYHEDRON;
+    zshapetype[2] = DB_ZONETYPE_HEX;
+    nzshapes = 3;
+
+    iz = 0;
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny / 2; j++) {
+            for (k = 0; k < nz / 2 - 1; k++) {
+                zonelist[iz]     = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                   (j)     * (nz / 2) + k;
+                zonelist[iz + 1] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                   (j + 1) * (nz / 2) + k;
+                zonelist[iz + 2] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                   (j + 1) * (nz / 2) + k;
+                zonelist[iz + 3] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                   (j)     * (nz / 2) + k;
+                zonelist[iz + 4] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                   (j)     * (nz / 2) + k + 1;
+                zonelist[iz + 5] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                   (j + 1) * (nz / 2) + k + 1;
+                zonelist[iz + 6] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                   (j + 1) * (nz / 2) + k + 1;
+                zonelist[iz + 7] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                   (j)     * (nz / 2) + k + 1;
+                iz += 8;
+            }
+        }
+    }
+
+    in = (nx + 1) * (ny / 2 + 1) * (nz / 2);
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny / 2; j++) {
+            /* Number of faces */
+            zonelist[iz] = 7;
+
+            /* Bottom four sided face */
+            zonelist[iz + 1]  = 4;
+            zonelist[iz + 2]  = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 3]  = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 4]  = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 5]  = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+
+            /* Two five sided side faces */
+            zonelist[iz + 6]  = 5;
+            zonelist[iz + 7]  = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 8]  = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+            zonelist[iz + 9]  = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j) + 1) * (nz / 2 + 1);
+            zonelist[iz + 10] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+            zonelist[iz + 11] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 12] = 5;
+            zonelist[iz + 13] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 14] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 15] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+            zonelist[iz + 16] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j) + 1) * (nz / 2 + 1);
+            zonelist[iz + 17] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+
+            /* Two four sided side faces */
+            zonelist[iz + 18] = 4;
+            zonelist[iz + 19] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 20] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j)     * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 21] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+            zonelist[iz + 22] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+            zonelist[iz + 23] = 4;
+            zonelist[iz + 24] = (i)     * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+            zonelist[iz + 25] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+            zonelist[iz + 26] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+            zonelist[iz + 27] = (i + 1) * (ny / 2 + 1) * (nz / 2) +
+                                (j + 1) * (nz / 2) + (nz / 2) - 1;
+
+            /* Two four sided top faces */
+            zonelist[iz + 28] = 4;
+            zonelist[iz + 29] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+            zonelist[iz + 30] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j))     * (nz / 2 + 1);
+            zonelist[iz + 31] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j) + 1) * (nz / 2 + 1);
+            zonelist[iz + 32] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j) + 1) * (nz / 2 + 1);
+            zonelist[iz + 33] = 4;
+            zonelist[iz + 34] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1))     * (nz / 2 + 1);
+            zonelist[iz + 35] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1))     * (nz / 2 + 1);
+            zonelist[iz + 36] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+            zonelist[iz + 37] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                     ((2 * j + 1) + 1) * (nz / 2 + 1);
+
+            iz += 38;
+        }
+    }
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = 0; k < nz / 2; k++) {
+                zonelist[iz]     = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                        (j)     * (nz / 2 + 1) + k;
+                zonelist[iz + 1] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                        (j + 1) * (nz / 2 + 1) + k;
+                zonelist[iz + 2] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                        (j + 1) * (nz / 2 + 1) + k;
+                zonelist[iz + 3] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                        (j)     * (nz / 2 + 1) + k;
+                zonelist[iz + 4] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                        (j)     * (nz / 2 + 1) + k + 1;
+                zonelist[iz + 5] = in + (i)     * (ny + 1) * (nz / 2 + 1) +
+                                        (j + 1) * (nz / 2 + 1) + k + 1;
+                zonelist[iz + 6] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                        (j + 1) * (nz / 2 + 1) + k + 1;
+                zonelist[iz + 7] = in + (i + 1) * (ny + 1) * (nz / 2 + 1) +
+                                        (j)     * (nz / 2 + 1) + k + 1;
+                iz += 8;
+            }
+        }
+    }
+
+    /*
+     * Create the density and pressure arrays.
+     */
+    var1name = "d";
+    var2name = "p";
+    d = ALLOC_N (float, nnodes);
+    p = ALLOC_N (float, nnodes);
+
+    xcenter = 0.;
+    ycenter = 0.;
+    for (i = 0; i < nnodes; i++) {
+        dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                    (y[i] - ycenter) * (y[i] - ycenter));
+        d[i] = dist;
+        p[i] = 1. / (dist + .0001);
+    }
+
+    /*
+     * Create the velocity component arrays.
+     */
+    var3name = "u";
+    var4name = "v";
+    var5name = "w";
+    u = ALLOC_N (float, nnodes);
+    v = ALLOC_N (float, nnodes);
+    w = ALLOC_N (float, nnodes);
+
+    xcenter = 0.;
+    ycenter = 3.5;
+    zcenter = 20.;
+    for (i = 0; i < nnodes; i++) {
+        dist = sqrt((x[i] - xcenter) * (x[i] - xcenter) +
+                    (y[i] - ycenter) * (y[i] - ycenter) +
+                    (z[i] - zcenter) * (z[i] - zcenter));
+        u[i] = (x[i] - xcenter) / dist;
+        v[i] = (y[i] - ycenter) / dist;
+        w[i] = (z[i] - zcenter) / dist;
+    }
+
+    /*
+     * Create the temperature array.
+     */
+    t = ALLOC_N (float, nnodes);
+    Ca = 1.;
+    Cb = 3.;
+    Cc = 5.;
+    Cd = 7.;
+    for (i = 0; i < nnodes; i++) {
+        t[i] = Ca + Cb * ((y[i] - Ymin) / (Ymax - Ymin)) +
+                Cc * exp(Cd * ((z[i] - Zmin) / (Zmax - Zmin)));
+    }
+
+    /*
+     * Create the material array.
+     */
+    matname = "mat1";
+    matlist = ALLOC_N (int, nzones);
+    nmats = 3;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+    mixlen = 0;
+    matnames = (char**)malloc(sizeof(char*)*nmats);
+    matnames[0] = safe_strdup("Something important");
+    matnames[1] = safe_strdup("Of little interest");
+    matnames[2] = safe_strdup("Notable");
+
+    /*
+     * Put in the material in 3 shells.
+     */
+    in = 0;
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny / 2; j++) {
+            for (k = 0; k < nz / 2 - 1; k++) {
+                matlist[in] = 1;
+                in++;
+            }
+        }
+    }
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny / 2; j++) {
+            matlist[in] = 2;
+            in++;
+        }
+    }
+
+    for (i = 0; i < nx; i++) {
+        for (j = 0; j < ny; j++) {
+            for (k = nz / 2; k < nz; k++) {
+                matlist[in] = 3;
+                in++;
+            }
+        }
+    }
+
+    /*
+     * Calculate the external face list.
+     */
+    fl = DBCalcExternalFacelist2(zonelist, nnodes, lo_offset, hi_offset, 0,
+                                 zshapetype, zshapesize, zshapecnt, nzshapes,
+                                 matlist, 1);
+
+    nfaces = fl->nfaces;
+    nfshapes = fl->nshapes;
+    for (i = 0; i < nfshapes; i++) {
+        fshapecnt[i]  = fl->shapecnt[i];
+        fshapesize[i] = fl->shapesize[i];
+    }
+    lfacelist = fl->lnodelist;
+    facelist = ALLOC_N (int, lfacelist);
+    for (i = 0; i < lfacelist; i++)
+        facelist[i] = fl->nodelist[i];
+    zoneno = ALLOC_N (int, nfaces);
+    for (i = 0; i < nfaces; i++)
+        zoneno[i] = fl->zoneno[i];
+
+    DBFreeFacelist(fl);
+
+    /*
+     * Write out the variables.
+     */
+    cycle = 48;
+    time = 4.8;
+    dtime = 4.8;
+
+    /*
+     * The length includes the terminating NULL character.
+     */
+    i = 29;
+    DBWrite (dbfile, "_meshtvinfo", "mesh ucdmesh3d;pseudocolor d",
+             &i, 1, DB_CHAR);
+    i = 50;
+    DBWrite (dbfile, "_meshtv_defvars",
+             "vel vector {u,v,w};speed scalar sqrt(u*u+v*v+w*w)",
+             &i, 1, DB_CHAR);
+
+    optlist = DBMakeOptlist(11);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+    DBAddOption(optlist, DBOPT_XLABEL, "X Axis");
+    DBAddOption(optlist, DBOPT_YLABEL, "Y Axis");
+    DBAddOption(optlist, DBOPT_ZLABEL, "Z Axis");
+    DBAddOption(optlist, DBOPT_XUNITS, "cm");
+    DBAddOption(optlist, DBOPT_YUNITS, "cm");
+    DBAddOption(optlist, DBOPT_ZUNITS, "cm");
+    DBAddOption(optlist, DBOPT_MATNAMES, matnames);
+
+    (void)DBPutFacelist(dbfile, "fl1", nfaces, 3, facelist, lfacelist, 0,
+                        zoneno, fshapesize, fshapecnt, nfshapes,
+                        NULL, NULL, 0);
+
+    (void)DBPutZonelist2(dbfile, "zl1", nzones, 3, zonelist, lzonelist, 0,
+                         lo_offset, hi_offset, zshapetype, zshapesize,
+                         zshapecnt, nzshapes, NULL);
+
+    (void)DBPutUcdmesh(dbfile, meshname, 3, coordnames, coords,
+                       nnodes, nzones, "zl1", "fl1", DB_FLOAT, optlist);
+
+    vars[0] = d;
+    varnames[0] = var1name;
+
+    (void)DBPutUcdvar(dbfile, var1name, meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = p;
+    varnames[0] = var2name;
+
+    (void)DBPutUcdvar(dbfile, var2name, meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = u;
+    varnames[0] = var3name;
+
+    (void)DBPutUcdvar(dbfile, var3name, meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = v;
+    varnames[0] = var4name;
+
+    (void)DBPutUcdvar(dbfile, var4name, meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = w;
+    varnames[0] = var5name;
+
+    (void)DBPutUcdvar(dbfile, var5name, meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0]     = t;
+    varnames[0] = "t";
+    (void)DBPutUcdvar(dbfile, "t", meshname, 1, varnames, vars,
+                      nnodes, NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    (void)DBPutMaterial(dbfile, matname, meshname, nmats, matnos,
+                        matlist, &nzones, 1, NULL, NULL, NULL,
+                        NULL, mixlen, DB_FLOAT, optlist);
+
+    DBFreeOptlist(optlist);
+
+    /*
+     * Free the temporary storage.
+     */
+    FREE (x);
+    FREE (y);
+    FREE (z);
+    FREE (d);
+    FREE (p);
+    FREE (u);
+    FREE (v);
+    FREE (w);
+    FREE (t);
+    FREE (matlist);
+    FREE (zonelist);
+    FREE (facelist);
+    FREE (zoneno);
+    for(i=0;i<nmats;i++)
+        FREE(matnames[i]);
+    FREE(matnames);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_carray
+ *
+ * Purpose:     Build a compound array and add it to the open database.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov 23 10:18:41 EST 1994
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+build_carray(DBfile * dbfile)
+{
+    char          *ename[3];
+    int            esize[3];
+    float          val[18];
+    int            i;
+
+    ename[0] = "a";
+    esize[0] = 4;
+    ename[1] = "b";
+    esize[1] = 6;
+    ename[2] = "c";
+    esize[2] = 8;
+
+    for (i = 0; i < 18; i++)
+        val[i] = sin(6.28 * i / 18.0);
+
+    DBPutCompoundarray(dbfile, "carray",  /*array */
+                       ename, esize, 3,  /*simple arrays */
+                       val, 18, DB_FLOAT,  /*values */
+                       NULL);   /*options */
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    build_curve
+ *
+ * Purpose:     Build a couple of curves and add them to the open database.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.com
+ *              May 15, 1996
+ *
+ * Modifications:
+ *     Robb Matzke, 1999-04-12
+ *     The hdf5 driver allows the caller to specify the name of the supplied
+ *     data array, but the pdb driver makes the user know something about
+ *     the implementation of the pdb driver.
+ *
+ *     Mark C. Miller, Wed Jul 14 15:25:16 PDT 2010
+ *     Changed name for "sincurve_xvals" so that it does NOT collide with
+ *     'friendly' named versions of itself.
+ *-------------------------------------------------------------------------
+ */
+static void
+build_curve (DBfile *dbfile, int driver)
+{
+   float        x[20], y[2][20] ;
+   int          i, one=1;
+   DBoptlist    *opts ;
+
+   /*
+    * Sine and cosine for 1/2 cycle.  Both curves have the same
+    * X data points and share the data in the file.
+    */
+   for (i=0; i<20; i++) {
+      x[i] = i * M_PI / 20.0 ;
+      y[0][i] = sin (x[i]) ;
+      y[1][i] = cos (x[i]) ;
+   }
+
+   opts = DBMakeOptlist (10) ;
+   DBAddOption (opts, DBOPT_XLABEL, "X Axis") ;
+   DBAddOption (opts, DBOPT_YLABEL, "Y Axis") ;
+   DBAddOption (opts, DBOPT_XUNITS, "radians") ;
+   DBAddOption (opts, DBOPT_HIDE_FROM_GUI, &one) ;
+
+   /*
+    * Write the `sincurve' curve. The hdf5 driver allows the user to specify
+    * the name which will be used to store the x values, but the pdb driver
+    * requires us to know where the values were stored.
+    */
+   if (DB_HDF5==(driver&0xF)) DBAddOption(opts, DBOPT_XVARNAME, "sincurve_x");
+   DBPutCurve (dbfile, "sincurve", x, y[0], DB_FLOAT, 20, opts);
+   if (DB_HDF5!=(driver&0xF)) DBAddOption(opts, DBOPT_XVARNAME, "sincurve_x");
+
+   /*
+    * Write the `coscurve' curve. It shares x values with the `sincurve'
+    * curve.
+    */
+   DBPutCurve (dbfile, "coscurve", NULL, y[1], DB_FLOAT, 20, opts) ;
+   DBAddOption (opts, DBOPT_REFERENCE, "sincurve") ;
+   DBPutCurve (dbfile, "sincurv1", NULL, NULL, DB_FLOAT, 20, opts);
+   DBFreeOptlist (opts) ;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    MakeFiles
+ *
+ * Purpose:     Given a suffix and a file type, create a suite of data
+ *              files that can be used to test the specified driver.
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov 23 10:06:05 EST 1994
+ *
+ * Modifications:
+ *    Tony Jones, May 30, 1995
+ *    Added a Makefile for a 3D curvillinear mesh
+ *
+ *    Sean Ahern, Fri Feb  7 13:36:24 PST 1997
+ *    Removed the return value because it wasn't doing anything.
+ *
+ *    Sean Ahern, Tue Mar 24 16:08:11 PST 1998
+ *    Added a 2D ucd test case.
+ *
+ *    Eric Brugger, Thu Apr  1 13:54:49 PST 1999
+ *    Added a 3D polyhedra test case.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+MakeFiles(char *suffix, int size, int order, int type)
+{
+    DBfile        *dbfile;
+    char           filename[256];
+
+    /*
+     * Create the 2D rectilinear data file.
+     */
+    sprintf(filename, "rect2d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "2D rectilinear test file", type);
+    build_rect2d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the 2D curvilinear data file.
+     */
+    sprintf(filename, "curv2d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "2D curvilinear test file", type);
+    build_curv2d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the 2D ucd data file.
+     */
+    sprintf(filename, "ucd2d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "2D ucd test file", type);
+    build_ucd2d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the 3D rectilinear data file.
+     */
+    sprintf(filename, "rect3d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "3D rectilinear test file", type);
+    build_rect3d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the 3D curvillinear data file.
+     */
+    sprintf (filename, "curv3d.%s", suffix) ;
+    printf ("   %s\n", filename) ;
+    dbfile = DBCreate (filename, 0, DB_LOCAL, "3D curvilinear test file", type);
+    build_curv3d (dbfile, size, order) ;
+    DBClose (dbfile) ;
+
+    /*
+     * Create the 3D ucd data file.
+     */
+    sprintf(filename, "ucd3d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "3D ucd test file", type);
+    build_ucd3d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the 3d arbitrary polyhedra data file.
+     */
+    sprintf(filename, "poly3d.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "3D ucd test file", type);
+    build_poly3d(dbfile, size, order);
+    DBClose(dbfile);
+
+    /*
+     * Create the Compound Array data file.
+     */
+    sprintf(filename, "carray.%s", suffix);
+    printf("   %s\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "Compound Array test file", type);
+    build_carray(dbfile);
+    DBClose(dbfile);
+
+    /*
+     * Create curve data file.
+     */
+    sprintf (filename, "curve.%s", suffix);
+    printf ("   %s\n", filename) ;
+    dbfile = DBCreate (filename, 0, DB_LOCAL, "Curve test file", type) ;
+    build_curve (dbfile, type) ;
+    DBClose (dbfile) ;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     For each type of driver being tested (based on the
+ *              #define's at the top of this file) build the file and
+ *              put some things in it.
+ *
+ * Return:      Success:
+ *
+ *              Failure:
+ *
+ * Programmer:  robb at cloud
+ *              Wed Nov 23 10:03:35 EST 1994
+ *
+ * Modifications:
+ *     Robb Matzke, 2 Dec 1996
+ *     Added AIO tests.
+ *
+ *     Sean Ahern, Wed Jan 22 15:23:55 PST 1997
+ *     Got rid of the DEBUG driver testing.  Added a return value.
+ *
+ *     Robb Matzke, 1999-04-09
+ *     Added argument parsing to control the driver which is used.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    int            i;
+    int            size;
+    int            order;
+    int            ntests = 0;
+    int		   driver=DB_PDB;
+    char	   *file_ext = "pdb";
+    int            show_all_errors = FALSE;
+
+    /*
+     * parse the execute line.
+     */
+    size = 1;
+    order = DB_ROWMAJOR;
+    for (i = 1; i < argc; i++) {
+        if (strcmp (argv[i], "-small") == 0)
+            size = 1;
+        else if (strcmp (argv[i], "-medium") == 0)
+            size = 2;
+        else if (strcmp (argv[i], "-large") == 0)
+            size = 3;
+        else if (strcmp (argv[i], "-fortran") == 0)
+            order = DB_ROWMAJOR;
+        else if (strcmp (argv[i], "-c") == 0)
+            order = DB_COLMAJOR;
+	else if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    file_ext = "pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    file_ext = "h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            printf ("Unknown execute line option.\n");
+        }
+    }
+
+    /*
+     * Abort on any errors.
+     */
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ABORT, NULL);
+
+    printf("Testing %s driver...\n", file_ext);
+    MakeFiles(file_ext, size, order, driver);
+    ntests++;
+
+    if (!ntests)
+        printf("No tests performed.\n");
+
+    CleanupDriverStuff();
+    return(0);
+}
diff --git a/tests/testallf77.f b/tests/testallf77.f
new file mode 100644
index 0000000..f0d4b25
--- /dev/null
+++ b/tests/testallf77.f
@@ -0,0 +1,410 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* ***********************************************************************
+
+c---------------------------------------------------------------------
+c  Purpose
+c
+c     Demonstrate use of SILO for creating unstructured cell data
+c     (UCD) objects for viewing with MeshTV.
+c
+c---------------------------------------------------------------------
+      program main
+
+      implicit none
+
+      include "silo.inc"
+      integer  dbid, meshid, err
+
+      integer buildrect2d
+      integer builducd
+
+c...Create file named "rectf77.pdb". Database ID is returned in 'dbid'.
+
+      err = dbcreate("rectf77.pdb", 11, 0, DB_LOCAL,
+     .               "file info", 9, DB_PDB, dbid)
+
+
+c...Write out necessary objects for MeshTV.
+
+      err = buildrect2d(dbid, "rect", 4)
+
+
+c...Close data file.
+
+      err = dbclose(dbid)
+
+
+      print *,'Created file: rectf77.pdb'
+
+c...Create file named "ucdf77.pdb". Database ID is returned in 'dbid'.
+
+      err = dbcreate("ucdf77.pdb", 10, 0, DB_LOCAL,
+     .               "file info", 9, DB_PDB, dbid)
+
+
+c...Write out necessary objects for MeshTV.
+
+      err = builducd(dbid, "ucd", 3)
+
+
+c...Close data file.
+
+      err = dbclose(dbid)
+
+
+      print *,'Created file: ucdf77.pdb'
+
+      stop
+      end
+
+      integer function buildrect2d (dbid, name, lname)
+c----------------------------------------------------------------------
+c  Routine                                                 buildrect2d
+c
+c  Purpose
+c
+c       Build rect-mesh, rect-var, and return the mesh ID.
+c
+c  Modifications:
+c    Kathleen Bonnell, Wed Sep 2 16:12:15 PDT 20099
+c    Changed 'character*8 name' to 'character*(*) name' to remove 
+c    'Character length argument mismatch' compiler error.
+c
+c-----------------------------------------------------------------------
+
+      implicit none
+
+      integer        dbid            ! Database identifier
+      character*(*)  name            ! Name of mesh to build
+      integer        lname           ! Length of name
+
+      include        "silo.inc"      ! Don't forget to include this file
+
+      integer        err, ierr
+      integer        cycle
+      real           time
+      real           x(31), y(41)
+      integer        dims(2)
+      integer        ndims
+
+      integer        optlistid
+
+      integer        i
+
+c
+c     Create the mesh.
+c
+      ndims = 2
+      dims (1) = 30
+      dims (2) = 40
+      do 100 i = 1, 31
+          x(i) = (i - 1) * (1. / 30)
+100   continue
+      do 110 i = 1, 41
+          y(i) = (i - 1) * (1. / 40)
+110   continue
+
+
+c
+c     Write out the variables.
+c
+      cycle = 48
+      time = 4.8
+
+      ierr = dbmkoptlist(8, optlistid)
+      ierr = dbaddiopt  (optlistid, DBOPT_CYCLE, cycle)
+      ierr = dbaddropt  (optlistid, DBOPT_TIME, time)
+      ierr = dbaddcopt  (optlistid, DBOPT_XLABEL, "R", 1)
+      ierr = dbaddcopt  (optlistid, DBOPT_YLABEL, "Z", 1)
+      ierr = dbaddcopt  (optlistid, DBOPT_XUNITS, "cm", 2)
+      ierr = dbaddcopt  (optlistid, DBOPT_YUNITS, "cm", 2)
+
+      err = dbputqm (dbid, "mesh1", 5, "xcoords", 7, "ycoords", 7,
+     .               "zcoords", 7, x, y, DB_F77NULL, dims, ndims,
+     .               DB_FLOAT, DB_COLLINEAR, optlistid, ierr)
+
+      buildrect2d = 0
+
+      end
+
+      integer function builducd (dbid, name, lname)
+c----------------------------------------------------------------------
+c  Routine						      builducd
+c
+c  Purpose
+c
+c	Build ucd-mesh, ucd-var, facelist and zonelist, and return
+c	the mesh ID.
+c 
+c  Modifications:
+c    Kathleen Bonnell, Wed Sep 2 16:12:15 PDT 20099
+c    Changed 'character*8 name' to 'character*(*) name' to remove 
+c    'Character length argument mismatch' compiler error.
+c
+c-----------------------------------------------------------------------
+
+      implicit none
+
+      integer        dbid            ! Database identifier
+      character*(*)  name            ! Name of mesh to build
+      integer        lname           ! Length of name
+
+      include        "silo.inc"      ! Don't forget to include this file
+
+      integer        err, ierr
+      integer        cycle
+      real           time
+      real           x(2646), y(2646), z(2646)
+      integer        ndims
+      integer        nzones, nnodes
+      integer        lzonelist
+      integer        zshapesize, zshapecnt
+      integer        zonelist(16000)
+
+      real           d(2646), p(2646), u(2646), v(2646), w(2646)
+
+      integer        nmats
+      integer        matnos(3)
+      integer        matlist(2000)
+      integer        mixlen
+      integer        mix_next(900), mix_mat(900), mix_zone(900)
+      real           mix_vf(900)
+
+      integer        optlistid
+      integer        flid, one
+
+      integer        i, j, k
+      integer        iz
+      real           xcenter, ycenter
+      real           theta, dtheta
+      real           r, dr
+      real           h, dh
+      real           dist
+
+      character*1024 mnames(3)
+      integer        lmnames(3)
+      character*1024 colors(3)
+      integer        lcolors(3)
+c     Create the mesh.
+c
+      ndims = 3
+      nnodes = 21 * 21 * 6
+      nzones = 20 * 20 * 5
+
+      lzonelist = (20 * 20 * 5) * 8
+      zshapecnt = nzones
+      zshapesize = 8
+
+      dh = 20. / 20.
+      dtheta = (180. / 20.) * (3.1415926 / 180.)
+      dr = 3. / 5.
+      h = 0.
+      do 100 i = 0, 20
+         theta = 0.
+         do 110 j = 0, 20
+            r = 2.
+            do 120 k = 0, 5
+               x(i * 126 + j * 6 + k + 1) = r * cos(theta)
+               y(i * 126 + j * 6 + k + 1) = r * sin(theta)
+               z(i * 126 + j * 6 + k + 1) = h
+               r = r + dr
+120         continue
+            theta = theta + dtheta
+110      continue
+         h = h + dh
+100   continue
+
+      iz = 1
+      do 200 i = 0, 19
+         do 210 j = 0, 19
+            do 220 k = 0, 4
+               zonelist(iz) = (i) * 126 + (j) * 6 + k
+               zonelist(iz + 1) = (i) * 126 + (j + 1) * 6 + k
+               zonelist(iz + 2) = (i) * 126 + (j + 1) * 6 + k + 1
+               zonelist(iz + 3) = (i) * 126 + (j) * 6 + k + 1
+               zonelist(iz + 4) = (i + 1) * 126 + (j) * 6 + k
+               zonelist(iz + 5) = (i + 1) * 126 + (j + 1) * 6 + k
+               zonelist(iz + 6) = (i + 1) * 126 + (j + 1) * 6 + k + 1
+               zonelist(iz + 7) = (i + 1) * 126 + (j) * 6 + k + 1
+               iz = iz + 8
+220         continue
+210      continue
+200   continue
+
+c
+c     Create the density and pressure arrays.
+c
+      xcenter = 0.
+      ycenter = 0.
+      do 300 i = 0, 20
+         do 310 j = 0, 20
+            do 320 k = 0, 5
+               dist = sqrt((x(i * 126 + j * 6 + k + 1) - xcenter) *
+     .                     (x(i * 126 + j * 6 + k + 1) - xcenter) +
+     .                     (y(i * 126 + j * 6 + k + 1) - ycenter) *
+     .                     (y(i * 126 + j * 6 + k + 1) - ycenter))
+               d(i * 126 + j * 6 + k + 1) = dist
+               p(i * 126 + j * 6 + k + 1) = 1. / (dist + .0001)
+320         continue
+310      continue
+300   continue
+
+c
+c     Create the velocity component arrays.
+c
+      xcenter = 0.
+      ycenter = 0.
+      do 400 i = 0, 20
+         do 410 j = 0, 20
+            do 420 k = 0, 5
+               dist = sqrt((x(i+1) - xcenter) * (x(i+1) - xcenter) +
+     .                     (y(j+1) - ycenter) * (y(j+1) - ycenter))
+               u(i * 126 + j * 6 + k + 1) = (x(i+1) - xcenter) / dist
+               v(i * 126 + j * 6 + k + 1) = (y(j+1) - ycenter) / dist
+               w(i * 126 + j * 6 + k + 1) = 0.
+420         continue
+410      continue
+400   continue
+
+c
+c     Create the material array.
+c
+      nmats = 3
+      matnos(1) = 1
+      matnos(2) = 2
+      matnos(3) = 3
+      mixlen = 0
+
+c
+c     Put in the material in 3 shells.
+c
+      do 500 i = 0, 19
+         do 510 j = 0, 19
+            do 520 k = 0, 1
+               matlist(i * 100 + j * 5 + k + 1) = 1
+520         continue
+            do 530 k = 2, 3
+               matlist(i * 100 + j * 5 + k + 1) = 2
+530         continue
+            do 540 k = 4, 4
+               matlist(i * 100 + j * 5 + k + 1) = 3
+540         continue
+510      continue
+500   continue
+
+c
+c     Write out the variables.
+c
+      cycle = 48
+      time = 4.8
+      one = 1
+
+      ierr = dbset2dstrlen(1024)
+      ierr = dbmkoptlist(10, optlistid)                  ! Create the option list
+      ierr = dbaddiopt  (optlistid, DBOPT_CYCLE, cycle) ! Add integer opt
+      ierr = dbaddropt  (optlistid, DBOPT_TIME, time)   ! Add real opt
+
+      err = dbcalcfl (zonelist, nnodes, 0, zshapesize, zshapecnt, 1,
+     .                matlist, 1, flid) 
+      err = dbwrtfl (dbid, "facelist", 8, flid, ierr)
+
+      err = dbputzl (dbid, "zonelist", 8, nzones, ndims, zonelist,
+     .               lzonelist, 0, zshapesize, zshapecnt, 1, ierr)
+
+      err = dbputum (dbid, "mesh1", 5, ndims, x, y, z,
+     .               "xcoords", 7, "ycoords", 7, "zcoords", 7, DB_FLOAT,
+     .               nnodes, nzones, "zonelist", 8, "facelist", 8,
+     .               optlistid, ierr)
+
+      err = dbputuv1 (dbid, "d", 1, "mesh1", 5, d, nnodes, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, optlistid, ierr)
+
+      err = dbputuv1 (dbid, "p", 1, "mesh1", 5, p, nnodes, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, optlistid, ierr)
+
+      err = dbputuv1 (dbid, "u", 1, "mesh1", 5, u, nnodes, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, optlistid, ierr)
+
+      err = dbputuv1 (dbid, "v", 1, "mesh1", 5, v, nnodes, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, optlistid, ierr)
+
+      err = dbputuv1 (dbid, "w", 1, "mesh1", 5, w, nnodes, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, optlistid, ierr)
+
+      ierr = dbaddropt  (optlistid, DBOPT_ALLOWMAT0, one)
+      mnames(1) = "Ear Wax"
+      mnames(2) = "Drool"
+      mnames(3) = "Vaporware"
+      lmnames(1) = 7 
+      lmnames(2) = 5 
+      lmnames(3) = 9
+      ierr = dbaddcaopt  (optlistid, DBOPT_MATNAMES,
+     .                nmats, mnames, lmnames)
+      colors(1) = "Green"
+      colors(2) = "Red"
+      colors(3) = "Baby Blue"
+      lcolors(1) = 5
+      lcolors(2) = 3
+      lcolors(3) = 9 
+      ierr = dbaddcaopt  (optlistid, DBOPT_MATCOLORS,
+     .                nmats, colors, lcolors)
+
+      err = dbputmat (dbid, "mat1", 4, "mesh1", 5, nmats, matnos,
+     .                matlist, nzones, 1, mix_next, mix_mat,
+     .                mix_zone, mix_vf, mixlen, DB_FLOAT, optlistid,
+     .                ierr)
+
+      builducd = 0
+
+      end
+
diff --git a/tests/testdtypes b/tests/testdtypes
new file mode 100755
index 0000000..2048039
--- /dev/null
+++ b/tests/testdtypes
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+result=0
+
+# -----------------------------------------------------------------------------
+# Test datatype handling with force single on and off 
+#
+# Programmer: Mark C. Miller, Thu Jul 15 18:05:03 PDT 2010
+#
+# Modifications:
+#
+#   Mark C. Miller, Mon Aug  9 16:59:23 PDT 2010
+#   Made it work for any HDF5 driver, not just DB_HDF5.
+# -----------------------------------------------------------------------------
+
+# Diddle the the directory because Autotest is not at all designed to handle
+# tests the way this one was written
+if test -n "$1"; then
+    topDir=$1
+    if test -e $topDir/../../multi_test; then
+        topDir=$1/../..
+    fi
+else
+    topDir=.
+fi
+
+smode="pdb"
+if test "${2:0:7}" = "DB_HDF5"; then
+    smode="h5"
+fi
+
+echo -e "driver\tfsmode\tmesh\tvartyp\tdattyp\tstatus"
+for fsmode in "-s 1" ""; do
+    for mt in "quad" "ucd"; do
+        for v in "n" "z"; do
+            for d in "c" "s" "i" "l" "L" "d"; do
+                diffs=$($topDir/../tools/browser/browser -q ${fsmode} -e "diff f${v}var ${d}${v}var" specmix_$mt.$smode | grep -v 'different data sizes' | grep -v 'byte data' | grep vals | head)
+                if test -n "$diffs"; then
+                    result=1
+                    break 4
+                    echo -e "${smode}\t${fsmode}\t${mt}\t${v}\t${d}\tFAILED"
+                else
+                    echo -e "${smode}\t${fsmode}\t${mt}\t${v}\t${d}\tPASSED"
+                fi
+            done
+        done
+    done
+done
+
+exit $result 
diff --git a/tests/testhzip b/tests/testhzip
new file mode 100755
index 0000000..9f502c4
--- /dev/null
+++ b/tests/testhzip
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+set -x
+
+# -----------------------------------------------------------------------------
+# Test hzip compression capability in silo by generating compressed data
+# file, copying it, re-generating w/o compression and then diffing it with
+# browser against the original.
+#
+# Programmer: Mark C. Miller
+# Creation:   July 21, 2008
+#
+# Modifications:
+#   Mark C. Miller, Wed Feb  4 20:58:34 PST 2009
+#   Made it more lenient about the compressed file size being larger. That
+#   can happen for toy datasets.
+# -----------------------------------------------------------------------------
+
+# Diddle the the directory because Autotest is not at all designed to handle
+# tests the way this one was written
+if test -n "$1"; then
+    topDir=$1
+    if test -e $topDir/../../multi_test; then
+        topDir=$1/../..
+    fi
+else
+    topDir=.
+fi
+
+#
+# Create data with compression (only on HDF5 driver) and save files
+#
+$topDir/multi_test DB_HDF5 hzip 1>/dev/null 2>&1
+rm -rf h5_hzip_files
+mkdir h5_hzip_files
+mv *.h5 h5_hzip_files/.
+
+#
+# Create data without compression 
+#
+$topDir/multi_test DB_HDF5 1>/dev/null 2>&1
+
+#
+# Now, run browser and make sure we don't get any errors in the diff
+#
+result=0
+for df in multi_*.h5; do
+    # confirm compressed files are smaller (or at least not too much bigger)
+    hzip_file_size=`ls -l h5_hzip_files/$df | tr -s ' ' | cut -d' ' -f5`
+    orig_file_size=`ls -l $df | tr -s ' ' | cut -d' ' -f5`
+    orig_file_size_x2=`expr $orig_file_size \* 2`
+    if test ! $hzip_file_size -lt $orig_file_size_x2; then
+        result=1
+        break
+    fi
+    # do a diff on the files
+    rm -f testhzip.out
+    $topDir/../tools/browser/browser -q -e diff $df h5_hzip_files/$df 1>testhzip.out 2>&1
+    if test `wc -l testhzip.out | tr -s ' ' | cut -d' ' -f2` -gt 0; then
+        result=1
+        break
+    fi
+done
+
+#
+# Cleanup
+#
+#rm -rf h5_hzip_files
+#rm -f testhzip.out
+
+exit $result 
diff --git a/tests/testlib.c b/tests/testlib.c
new file mode 100644
index 0000000..ce6c2ed
--- /dev/null
+++ b/tests/testlib.c
@@ -0,0 +1,860 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <silo.h>
+
+/*======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================
+
+  Module Name                                               test-misc.c
+
+  Purpose
+
+        Miscellaneous functions useful for testing SILO library.
+
+  Programmer
+
+        Jeffery Long, NSSD/B
+
+  Contents
+
+        meshid = build_quad (dbfile)
+        meshid = build_ucd  (dbfile)
+
+  ======================================================================
+  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+  ======================================================================*/
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_quad
+ *
+ *  Purpose
+ *
+ *      Build quad-mesh, quad-var, and material data objects; return
+ *      the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 09:35:52 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of varid and matid, which
+ *    were unused.
+ *
+ *--------------------------------------------------------------------*/
+int
+build_quad(DBfile *dbfile, char *name)
+{
+    int            i, dims[3], zones[3], ndims, cycle, meshid;
+    float          time;
+    double         dtime;
+    int            zdims[3];
+    float          x[10], y[8], d[80], *coords[3], *vars[3];
+    float          u[80], v[80];
+    int            matnos[3], matlist[63], nmat, mixlen;
+    char          *coordnames[3], *varnames[3];
+    DBoptlist     *optlist;
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+
+    ndims = 2;
+    dims[0] = 10;
+    dims[1] = 8;
+
+    zones[0] = 9;
+    zones[1] = 7;
+
+    cycle = 44;
+    time = 4.4;
+    dtime = 4.4;
+    coords[0] = x;
+    coords[1] = y;
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+
+    for (i = 0; i < dims[0]; i++)
+        x[i] = (float)i;
+    for (i = 0; i < dims[1]; i++)
+        y[i] = (float)i + .1;
+
+    meshid = DBPutQuadmesh(dbfile, name, coordnames, coords, dims, ndims,
+                           DB_FLOAT, DB_COLLINEAR, optlist);
+
+    varnames[0] = "d";
+    vars[0] = d;
+    zdims[0] = dims[0] - 1;
+    zdims[1] = dims[1] - 1;
+
+    for (i = 0; i < zdims[0] * zdims[1]; i++)
+        d[i] = (float)i *.2;
+
+    (void)DBPutQuadvar1(dbfile, "d", name, d, zdims, ndims,
+                        NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+    for (i = 0; i < dims[0] * dims[1]; i++) {
+        u[i] = (float)i *.1;
+        v[i] = (float)i *.1;
+    }
+
+    (void)DBPutQuadvar1(dbfile, "ucomp", name, u, dims, ndims,
+                        NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+    (void)DBPutQuadvar1(dbfile, "vcomp", name, v, dims, ndims,
+                        NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = u;
+    vars[1] = v;
+    varnames[0] = "u";
+    varnames[1] = "v";
+
+    (void)DBPutQuadvar(dbfile, "velocity", name, 2, varnames, vars,
+                       dims, ndims, NULL, 0, DB_FLOAT, DB_NODECENT,
+                       optlist);
+
+    /*
+     *  Build material data.
+     */
+    nmat = 3;
+    mixlen = 0;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    for (i = 0; i < 27; i++)
+        matlist[i] = 1;
+    for (i = 27; i < 45; i++)
+        matlist[i] = 2;
+    for (i = 45; i < 63; i++)
+        matlist[i] = 3;
+
+    (void)DBPutMaterial(dbfile, "material", name, nmat, matnos,
+                        matlist, zones, ndims, NULL, NULL, NULL, NULL,
+                        mixlen, DB_FLOAT, NULL);
+
+    return (meshid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_quad3
+ *
+ *  Purpose
+ *
+ *      Build quad-mesh, quad-var, and material data objects; return
+ *      the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 09:35:52 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of varid and matid, which
+ *    were unused.
+ *
+ *--------------------------------------------------------------------*/
+int
+build_quad3(DBfile *dbfile, char *name)
+{
+    int            i, dims[3], zones[3], ndims, cycle, meshid;
+    float          time;
+    double         dtime;
+    int            zdims[3];
+    float          x[125], y[125], z[125], d[64], *coords[3], *vars[3];
+    float          u[125], v[125], w[125];
+    int            matnos[3], matlist[63], nmat, mixlen;
+    char          *coordnames[3], *varnames[3];
+    DBoptlist     *optlist;
+
+    optlist = DBMakeOptlist(10);
+    DBAddOption(optlist, DBOPT_CYCLE, &cycle);
+    DBAddOption(optlist, DBOPT_TIME, &time);
+    DBAddOption(optlist, DBOPT_DTIME, &dtime);
+
+    ndims = 3;
+    dims[0] = 5;
+    dims[1] = 5;
+    dims[2] = 5;
+
+    zones[0] = 4;
+    zones[1] = 4;
+    zones[2] = 4;
+
+    cycle = 44;
+    time = 4.4;
+    dtime = 4.4;
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    for (i = 0; i < dims[0]; i++)
+        x[i] = (float)i;
+    for (i = 0; i < dims[1]; i++)
+        y[i] = (float)i;
+    for (i = 0; i < dims[2]; i++)
+        z[i] = (float)i;
+
+    meshid = DBPutQuadmesh(dbfile, name, coordnames, coords, dims, ndims,
+                           DB_FLOAT, DB_COLLINEAR, optlist);
+
+    varnames[0] = "d";
+    vars[0] = d;
+    zdims[0] = dims[0] - 1;
+    zdims[1] = dims[1] - 1;
+    zdims[2] = dims[2] - 1;
+
+    for (i = 0; i < zdims[0] * zdims[1] * zdims[2]; i++)
+        d[i] = (float)i *.2;
+
+    for (i=0;i<200; i++)
+    (void)DBPutQuadvar1(dbfile, "d", name, d, zdims, ndims,
+                        NULL, 0, DB_FLOAT, DB_ZONECENT, optlist);
+
+    for (i = 0; i < dims[0] * dims[1] * dims[2]; i++) {
+        u[i] = (float)i *.1;
+        v[i] = (float)i *.1;
+        w[i] = (float)i *.1;
+    }
+
+    for (i=0;i<200; i++)
+    (void)DBPutQuadvar1(dbfile, "ucomp", name, u, dims, ndims,
+                        NULL, 0, DB_FLOAT, DB_NODECENT, 0);
+    (void)DBPutQuadvar1(dbfile, "vcomp", name, v, dims, ndims,
+                        NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+    (void)DBPutQuadvar1(dbfile, "wcomp", name, w, dims, ndims,
+                        NULL, 0, DB_FLOAT, DB_NODECENT, optlist);
+
+    vars[0] = u;
+    vars[1] = v;
+    vars[2] = w;
+    varnames[0] = "u";
+    varnames[1] = "v";
+    varnames[2] = "w";
+
+    (void)DBPutQuadvar(dbfile, "velocity", name, 3, varnames, vars,
+                       dims, ndims, NULL, 0, DB_FLOAT, DB_NODECENT,
+                       optlist);
+
+    /*
+     *  Bulid material data.
+     */
+    nmat = 3;
+    mixlen = 0;
+    matnos[0] = 1;
+    matnos[1] = 2;
+    matnos[2] = 3;
+
+    for (i = 0; i < 27; i++)
+        matlist[i] = 1;
+    for (i = 27; i < 45; i++)
+        matlist[i] = 2;
+    for (i = 45; i < 63; i++)
+        matlist[i] = 3;
+
+    (void)DBPutMaterial(dbfile, "material", name, nmat, matnos,
+                        matlist, zones, ndims, NULL, NULL, NULL,
+                        NULL, mixlen, DB_FLOAT, NULL);
+
+    return (meshid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_ucd
+ *
+ *  Purpose
+ *
+ *      Build ucd-mesh, ucd-var, facelist and zonelist, and return
+ *      the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 09:35:52 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of flid, zlid, varid, i, 
+ *    dfnew, dbid, and matid, which were unused.
+ *
+ *--------------------------------------------------------------------*/
+int
+build_ucd(DBfile *dbfile, char *name)
+{
+#define NMATS   2
+#define NZONES  6
+#define NFACES  10
+#define NNODES  12
+#define MAXMIX  12
+#define MAXOMIX 4
+#define NZSHAPES 1
+#define NFSHAPES 1
+#define NFTYPES  0
+#define LZNODELIST 24
+#define LFNODELIST 20
+
+   /*----------------------------------------------------------------------
+       The test mesh looks like this:
+
+        3.      |       0       4       8
+                |
+        2.      |       1       5       9
+                |
+        1.      |       2       6       10
+                |
+                |       3       7       11
+        0.      ---------------------------
+
+                        0.      .5      1.
+     *---------------------------------------------------------------------*/
+
+    int  meshid;
+
+    /* Default model for material data */
+    static int     matlist[NZONES] =
+    {1, -1, 2, 1, -3, 2};
+    static int     matnos[NMATS] =
+    {1, 2};
+    static float   mix_vf[MAXMIX] =
+    {.6, .8, .4, .2};
+    static int     mix_next[MAXMIX] =
+    {2, 0, 4, 0};
+    static int     mix_mat[MAXMIX] =
+    {1, 2, 1, 2};
+    static int     mix_zone[MAXMIX] =
+    {0, 0, 3, 3};
+
+    /* OTHER model for material data */
+#if 0
+    static int     imatlist[NZONES] =
+    {1, 0, 2, 1, 0, 2};
+    static int     nmix[NMATS] =
+    {2, 2};
+    static int     mixedels[MAXMIX] =
+    {1, 4, 1, 4};
+#endif
+
+    static float   x[NNODES] =
+    {9., 9., 9., 9., 10., 10., 10., 10.,
+     11., 11., 11., 11.};
+    static float   y[NNODES] =
+    {3., 2., 1., 0., 3., 2., 1., 0., 3., 2., 1., 0.};
+    static float   u[NNODES] =
+    {0., .5, 1., 0., .5, 1., 0., .5, 1., 0., .5, 1.};
+    static float   v[NNODES] =
+    {0., .5, 1., 0., .5, 1., 0., .5, 1., 0., .5, 1.};
+    static float   d[NZONES] =
+    {2., 4., 6., 8., 10., 12.};
+#if 0
+    static float   df[MAXOMIX] =
+    {.58, .78, .42, .22};
+    static float   vf[MAXOMIX] =
+    {.4, .45, .6, .55};
+#endif
+
+    static int     fnodelist[LFNODELIST] =
+    {0, 1, 1, 2, 2, 3, 3, 7, 7, 11, 11, 10, 10, 9, 9, 8, 8, 4, 4, 0};
+    static int     znodelist[LZNODELIST] =
+    {0, 1, 5, 4, 4, 5, 9, 8, 1, 2, 6, 5, 5, 6, 10, 9, 2, 3, 7, 6, 6, 7, 11, 10};
+
+    int            fshapesize, fshapecnt, zshapesize, zshapecnt;
+    int            idatatype, mixlen;
+    int            dims;
+#if 0
+    double         ttime = 2.345;
+    int            tcycle = 200;
+#endif
+
+    float         *coords[3], *vars[2];
+    char          *coordnames[3], *varnames[2];
+
+    fshapesize = 2;
+    fshapecnt = NFACES;
+    zshapesize = 4;
+    zshapecnt = NZONES;
+
+    idatatype = DB_FLOAT;
+    mixlen = MAXMIX;
+
+    coords[0] = x;
+    coords[1] = y;
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutFacelist(dbfile, "fl", NFACES, 2, fnodelist, LFNODELIST, 0,
+                        NULL, &fshapesize, &fshapecnt, NFSHAPES,
+                        NULL, NULL, 0);
+
+    (void)DBPutZonelist(dbfile, "zl", NZONES, 2, znodelist, LZNODELIST, 0,
+                        &zshapesize, &zshapecnt, NZSHAPES);
+
+    meshid = DBPutUcdmesh(dbfile, name, 2, coordnames, coords,
+                          NNODES, NZONES, "zl", "fl", DB_FLOAT, NULL);
+
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NZONES,
+                      NULL, 0, idatatype, DB_ZONECENT, NULL);
+    vars[0] = u;
+    varnames[0] = "u";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = v;
+    varnames[0] = "v";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = u;
+    varnames[0] = "ucomp";
+    vars[1] = v;
+    varnames[1] = "vcomp";
+
+    (void)DBPutUcdvar(dbfile, "velocity", name, 2, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    dims = NZONES;
+
+    (void)DBPutMaterial(dbfile, "material", name, NMATS, matnos,
+                        matlist, &dims, 1, mix_next, mix_mat, mix_zone,
+                        mix_vf, mixlen, DB_FLOAT, NULL);
+#if 0
+    mixlen = -99;
+
+    for (i = 0; i < MAXMIX; i++) {
+        mix_mat[i] = -99;
+        mix_next[i] = -99;
+        mix_zone[i] = -99;
+        mix_vf[i] = -99.;
+    }
+
+    DBConvertMat(NMATS, NZONES, nmix, mixedels, imatlist, matnos, vf, DB_FLOAT,
+                 &mixlen, matlist, mix_next, mix_mat, mix_zone, mix_vf);
+
+    (void)DBPutMaterial(dbfile, "material", name, matnos, NMATS,
+                        matlist, &dims, 1, mix_next, mix_mat, mix_zone,
+                        mix_vf, mixlen, DB_FLOAT, NULL);
+
+#endif
+    return (meshid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_ucd3
+ *
+ *  Purpose
+ *
+ *      Build in 3D a ucd-mesh, ucd-var, facelist and zonelist, and return
+ *      the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 09:35:52 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of flid, zlid, varid, i,
+ *    dfnew, dbid, ln, and matid, which were unused.
+ *
+ *--------------------------------------------------------------------*/
+int
+build_ucd3(DBfile *dbfile, char *name)
+{
+#undef NZONES
+#define NZONES  3
+#undef NFACES
+#define NFACES  14
+#undef NNODES
+#define NNODES  16
+#undef MAXMIX
+#define MAXMIX  12
+#undef MAXOMIX
+#define MAXOMIX 4
+#undef NZSHAPES
+#define NZSHAPES 1
+#undef NFSHAPES
+#define NFSHAPES 1
+#undef NFTYPES
+#define NFTYPES 0
+#undef LZNODELIST
+#define LZNODELIST 24
+#undef LFNODELIST
+#define LFNODELIST 56
+
+   /*----------------------------------------------------------------------
+       The test mesh looks like this:
+
+     *---------------------------------------------------------------------*/
+
+    int meshid;
+
+    static float   x[NNODES] =
+    {0., 1., 1., 0., 0., 1., 1., 0., 0., 1., 1., 0.,
+     0., 1., 1., 0.};
+    static float   y[NNODES] =
+    {0., 0., 0., 0., 1., 1., 1., 1., 2., 2., 2., 2., 3., 3., 3., 3.};
+    static float   z[NNODES] =
+    {0., 0., 1., 1., 0., 0., 1., 1., 0., 0., 1., 1., 0., 0., 1., 1.};
+    static float   u[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+    static float   v[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+    static float   w[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+    static float   d[NZONES] =
+    {2., 4., 6.};
+#if 0
+    static float   df[MAXOMIX] =
+    {.58, .78, .42, .22};
+    static float   vf[MAXOMIX] =
+    {.4, .45, .6, .55};
+#endif
+    static int     matlist[NZONES] =
+    {1, 1, 2};
+    static int     matnos[2] =
+    {1, 2};
+#if 0
+    static int     fzoneno[NFACES];
+
+    static int     fnodelist[LFNODELIST] =
+    {0, 1, 5, 4, 1, 2, 6, 5, 3, 2, 7, 6, 3, 0, 4, 7, 4, 5, 9, 8, 6, 5, 9, 10,
+     7, 6, 10, 11, 4, 7, 11, 8, 8, 9, 13, 12, 10, 9, 13, 14,
+     11, 10, 14, 15, 11, 15, 12, 8, 0, 1, 2, 3, 12, 13, 14, 15};
+#endif
+    static int     znodelist[LZNODELIST] =
+    {0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 11, 12, 13, 14, 15};
+
+#if 0
+    int            fshapesize, fshapecnt;
+#endif
+    int            zshapesize, zshapecnt;
+    int            idatatype;
+    int            dims;
+#if 0
+    double         ttime = 2.345;
+    int            tcycle = 200;
+    int            mixlen = MAXMIX;
+#endif
+
+    float         *coords[3], *vars[3];
+    char          *coordnames[3], *varnames[3];
+    DBfacelist    *fl;
+
+#if 0
+    int            inode, iface, izone, ifl, izl;
+    int            nface = 0;
+#endif
+    int            inode, izone, izl;
+
+#if 0
+    fshapesize = 4;
+    fshapecnt = NFACES;
+#endif
+    zshapesize = 8;
+    zshapecnt = NZONES;
+
+    idatatype = DB_FLOAT;
+    dims = NZONES;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    coordnames[2] = "Z";
+    vars[0] = d;
+    varnames[0] = "d";
+
+    inode = 0;
+    for (izone = 0; izone == NZONES; izone++) {
+        x[inode++] = 0.;
+        x[inode++] = 1.;
+        x[inode++] = 1.;
+        x[inode++] = 0.;
+        inode -= 4;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        inode -= 4;
+        z[inode++] = 0.;
+        z[inode++] = 0.;
+        z[inode++] = 1.;
+        z[inode++] = 1.;
+    }
+    izl = 0;
+    for (izone = 0; izone < NZONES; izone++) {
+        for (inode = 0; inode < 4; inode++) {
+            znodelist[izl++] = izone * 4 + inode;
+        }
+        for (inode = 0; inode < 4; inode++) {
+            znodelist[izl++] = (izone + 1) * 4 + inode;
+        }
+    }
+#if 0
+    ifl = 0;
+    for (izone = 0; izone < NZONES; izone++) {
+        for (iface = 0; iface < 3; iface++) {
+            fnodelist[ifl++] = izone * 4 + iface;
+            fnodelist[ifl++] = izone * 4 + iface + 1;
+            fnodelist[ifl++] = izone * 4 + iface + 5;
+            fnodelist[ifl++] = izone * 4 + iface + 4;
+        }
+        fnodelist[ifl++] = izone * 4 + 3;
+        fnodelist[ifl++] = izone * 4;
+        fnodelist[ifl++] = izone * 4 + 4;
+        fnodelist[ifl++] = izone * 4 + 7;
+
+        for (iface = 0; iface < 4; iface++)
+            fzoneno[nface++] = izone;
+    }
+    fnodelist[ifl++] = 0;
+    fnodelist[ifl++] = 1;
+    fnodelist[ifl++] = 2;
+    fnodelist[ifl++] = 3;
+    fzoneno[nface++] = 0;
+    fnodelist[ifl++] = 12;
+    fnodelist[ifl++] = 13;
+    fnodelist[ifl++] = 14;
+    fnodelist[ifl++] = 15;
+    fzoneno[nface++] = NZONES - 1;
+#endif
+
+    /* Last parameter was added by Sean Ahern -
+     * Tue Aug 30 17:55:22 PDT 1994
+     * It is the boundary method.  Arbitraryily chosen as 0 */
+    fl = (DBfacelist *) DBCalcExternalFacelist(znodelist, NNODES, 1,
+                                       &zshapesize, &zshapecnt, NZSHAPES,
+                                               matlist, 0);
+
+    (void)DBPutFacelist(dbfile, "fl", fl->nfaces, 3, fl->nodelist,
+                        fl->lnodelist, 0, fl->zoneno, fl->shapesize,
+                        fl->shapecnt, fl->nshapes, NULL, NULL, 0);
+
+/*
+ * flid = DBPutFacelist (dbfile, "fl", NFACES, 3, fnodelist, LFNODELIST, 0,
+ * fzoneno, &fshapesize, &fshapecnt, NFSHAPES,
+ * NULL, NULL, 0);
+ */
+    (void)DBPutZonelist(dbfile, "zl", NZONES, 3, znodelist, LZNODELIST, 0,
+                        &zshapesize, &zshapecnt, NZSHAPES);
+
+    meshid = DBPutUcdmesh(dbfile, name, 3, coordnames, coords,
+                          NNODES, NZONES, "zl", "fl", DB_FLOAT, NULL);
+
+    (void)DBPutMaterial(dbfile, "material", name, 2, matnos, matlist,
+                        &dims, 1, NULL, NULL, NULL, NULL, 0, DB_FLOAT,
+                        NULL);
+
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NZONES,
+                      NULL, 0, idatatype, DB_ZONECENT, NULL);
+    vars[0] = u;
+    varnames[0] = "u";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = v;
+    varnames[0] = "v";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = w;
+    varnames[0] = "w";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = u;
+    varnames[0] = "ucomp";
+    vars[1] = v;
+    varnames[1] = "vcomp";
+    vars[2] = w;
+    varnames[2] = "wcomp";
+
+    (void)DBPutUcdvar(dbfile, "velocity", name, 3, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    return (meshid);
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                build_ucd_tri
+ *
+ *  Purpose
+ *
+ *      Build triangle based ucd-mesh and ucd-var, facelist and
+ *      zonelist, and return the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 09:35:52 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of flid, zlid, varid, i,
+ *    dbid, dims, nmats, maxmix, nftypes, and matid, which were unused.
+ *
+ *--------------------------------------------------------------------*/
+int
+build_ucd_tri(DBfile *dbfile, char *name)
+{
+
+    int            nzones = 6;
+    int            nfaces = 6;
+    int            nnodes = 7;
+    int            nzshapes = 1;
+    int            nfshapes = 1;
+    int            lznodelist = 18;
+    int            lfnodelist = 12;
+
+   /*----------------------------------------------------------------------
+       The test mesh looks like this:
+
+        4.      |               1
+                |
+        3.      |       2               6
+                |
+        2.      |               0
+                |
+        1.      |       3               5
+                |
+                |               4
+        0.      ---------------------------
+
+                        0.      2.      4.
+     *---------------------------------------------------------------------*/
+
+    int meshid;
+
+    static float   x[] =
+    {13., 13., 11., 11., 13., 15., 15.};
+    static float   y[] =
+    {2., 4., 3., 1., 0., 1., 3.};
+    static float   u[] =
+    {0., .5, 1., 1.5, 2., 2.5, 3.};
+    static float   d[] =
+    {1., 2., 3., 4., 5., 6.};
+
+    static int     fnodelist[] =
+    {1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1};
+    static int     znodelist[] =
+    {0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6, 0, 6, 1};
+
+    int            fshapesize, fshapecnt, zshapesize, zshapecnt;
+    int            idatatype;
+#if 0
+    double         ttime = 2.345;
+    int            tcycle = 200;
+    int            mixlen = MAXMIX;
+#endif
+
+    float         *coords[3], *vars[1];
+    char          *coordnames[3], *varnames[1];
+
+    fshapesize = 2;
+    fshapecnt = nfaces;
+    zshapesize = 3;
+    zshapecnt = nzones;
+
+    idatatype = DB_FLOAT;
+
+    coords[0] = x;
+    coords[1] = y;
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutFacelist(dbfile, "fl", nfaces, 2, fnodelist, lfnodelist, 0,
+                        NULL, &fshapesize, &fshapecnt, nfshapes,
+                        NULL, NULL, 0);
+
+    (void)DBPutZonelist(dbfile, "zl", nzones, 2, znodelist, lznodelist, 0,
+                        &zshapesize, &zshapecnt, nzshapes);
+
+    meshid = DBPutUcdmesh(dbfile, name, 2, coordnames, coords,
+                          nnodes, nzones, "zl", "fl", DB_FLOAT, NULL);
+
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, nzones,
+                      NULL, 0, idatatype, DB_ZONECENT, NULL);
+    vars[0] = u;
+    varnames[0] = "u";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, nnodes,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    return (meshid);
+}
diff --git a/tests/testpdb.c b/tests/testpdb.c
new file mode 100644
index 0000000..fb7200f
--- /dev/null
+++ b/tests/testpdb.c
@@ -0,0 +1,313 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <score.h>
+#include <pdb.h>
+
+char *safe_strdup(const char *);
+
+typedef struct {
+    char          *name;
+    char          *type;        /* Type of group/object */
+    char         **comp_names;  /* Array of component names */
+    char         **pdb_names;   /* Array of internal (PDB) variable names */
+    int            ncomponents; /* Number of components */
+} Group;
+
+void CreateFile (char *filename, char *name, char *type, int num,
+     char **comp_names, char **pdb_names);
+void ReadFile (char *filename, char *name);
+
+char *comp_names[] = {"coord0",
+                      "coord1",
+                      "coord2",
+                      "min_extents",
+                      "max_extents",
+                      "facelist",
+                      "zonelist",
+                      "ndims",
+                      "nnodes",
+                      "nzones",
+                      "facetype",
+                      "cycle",
+                      "coord_sys",
+                      "planar",
+                      "origin",
+                      "datatype",
+                      "time"};
+char *pdb_names[]  = {"/mesh_coord0",
+                      "/mesh_coord1",
+                      "/mesh_coord2",
+                      "/mesh_min_extents",
+                      "/mesh_max_extents",
+                      "'<s>fl'",
+                      "'<s>zl'",
+                      "'<i>3'",
+                      "'<i>1093'",
+                      "'<i>1200'",
+                      "'<i>100'",
+                      "'<i>0'",
+                      "'<i>124'",
+                      "'<i>124'",
+                      "'<i>0'",
+                      "'<i>20'",
+                      "/time"};
+
+float coord0_data[20] = { 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.,
+                         10., 11., 12., 13., 14., 15., 16., 17., 18., 19.};
+
+
+main ()
+{
+
+    CreateFile("abc.pdb", "mesh", "ucdmesh", 17, comp_names, pdb_names);
+
+    ReadFile("abc.pdb", "mesh");
+}
+
+void
+ReadFile (char *filename, char *name)
+{
+    int       i;
+    PDBfile   *file=NULL;
+    Group     *group=NULL;
+    char      str[256];
+    char      *cptr;
+    char      **ccptr;
+    char      carray[256];
+    float     farray[20];
+    float     fval;
+
+    /*
+     * Open the file.
+     */
+    if ((file = lite_PD_open(filename, "r")) == NULL)
+    {
+        printf("Error opening file.\n");
+        exit(-1);
+    }
+
+    /*
+     * Read some variables and print their results.
+     */
+    printf("reading group\n");
+    lite_PD_read(file, name, &group);
+    printf("group->name = %s\n", group->name);
+    printf("group->type = %s\n", group->type);
+    printf("group->ncomponents = %d\n", group->ncomponents);
+    printf("group->comp_names[0] = %s\n", group->comp_names[0]);
+    printf("group->pdb_names[0] = %s\n", group->pdb_names[0]);
+    for (i = 0; i < 17; i++)
+    {
+        SFREE(group->comp_names[i]);
+        SFREE(group->pdb_names[i]);
+    }
+    SFREE(group->comp_names);
+    SFREE(group->pdb_names);
+    SFREE(group->name);
+    SFREE(group->type);
+    SFREE(group);
+
+    printf("reading group->name\n");
+    sprintf(str, "%s->name", name);
+    lite_PD_read(file, str, &cptr);
+    printf("%s->name = %s\n", name, cptr);
+    SFREE(cptr);
+
+    printf("reading group->comp_names\n");
+    sprintf(str, "%s->comp_names", name);
+    lite_PD_read(file, str, &ccptr);
+    printf("%s->comp_names[0] = %s\n", name, ccptr[0]);
+    for (i = 0; i < 17; i++)
+       SFREE(ccptr[i]);
+    SFREE(ccptr);
+
+    printf("reading group->comp_names[1]\n");
+    sprintf(str, "%s->comp_names[1]", name);
+    lite_PD_read(file, str, &cptr);
+    printf("%s->comp_names[1] = %s\n", name, cptr);
+    SFREE(cptr);
+
+    printf("reading group->comp_names[1][2:4]\n");
+    sprintf(str, "%s->comp_names[1][2:4]", name);
+    lite_PD_read(file, str, &carray);
+    carray[3] = '\0';
+    printf("%s->comp_names[1][2:4] = %s\n", name, carray);
+
+    printf("reading coord0\n");
+    lite_PD_read(file, "coord0", farray);
+    printf("coord0[4] = %g\n", farray[4]);
+
+    printf("reading coord0(0, 3)\n");
+    lite_PD_read(file, "coord0(0, 3)", &fval);
+    printf("coord0(0, 3) = %g\n", fval);
+
+    /*
+     * Close the file.
+     */
+    lite_PD_close(file);
+
+    return;
+}
+
+
+/*
+ *  Mark C. Miller, Thu Jan  7 10:36:24 PST 2010
+ *  Replaced safe_strdup with MAKE_N as PDB's mem allocation 
+ *  routines are required for this code.
+ */
+void
+CreateFile (char *filename, char *name, char *type, int num,
+            char **comp_names, char **pdb_names)
+{
+    int       i;
+    int       *null_ptr;
+    PDBfile   *file=NULL;
+    Group     *group=NULL;
+    float     *coord0;
+    long      ind[6];
+
+    /*
+     * Create a file.
+     */
+    if ((file = lite_PD_create(filename)) == NULL)
+    {
+        printf("Error creating file.\n");
+        exit(-1);
+    }
+
+    /*
+     * Define the group to PDB.
+     */
+    null_ptr  = FMAKE(int, "NULL");
+    *null_ptr = 0;
+
+    if (lite_PD_defstr(file, "Group",
+                       "char    *name",
+                       "char    *type",
+                       "char    **comp_names",
+                       "char    **pdb_names",
+                       "integer ncomponents",
+                       null_ptr) == NULL)
+    {
+        printf("Error defining Group structure.\n");
+        exit(-1);
+    }
+
+    SFREE(null_ptr);
+
+    /*
+     * Allocate the group structure and populate it.
+     */
+    group = MAKE_N(Group, 1);
+    group->comp_names = MAKE_N(char *, num);
+    group->pdb_names = MAKE_N(char *, num);
+    for (i = 0; i < num; i++) {
+        group->comp_names[i] = MAKE_N(char, strlen(comp_names[i])+1);
+        strcpy(group->comp_names[i], comp_names[i]);
+        group->pdb_names[i] = MAKE_N(char, strlen(pdb_names[i])+1);
+        strcpy(group->pdb_names[i], pdb_names[i]);
+    }
+    group->type = MAKE_N(char, strlen(type)+1);
+    strcpy(group->type, type);
+    group->name = MAKE_N(char, strlen(name)+1);
+    strcpy(group->name, name);
+    group->ncomponents = num;
+
+    /*
+     * Write the group.
+     */
+    if (lite_PD_write(file, name, "Group *", &group) == 0)
+    {
+        printf("Error writing group.\n");
+        exit(-1);
+    }
+
+    /*
+     * Free the group structure.
+     */
+    for (i = 0; i < group->ncomponents; i++)
+    {
+        SFREE(group->comp_names[i]);
+        SFREE(group->pdb_names[i]);
+    }
+    SFREE(group->comp_names);
+    SFREE(group->pdb_names);
+    SFREE(group->name);
+    SFREE(group->type);
+    SFREE(group);
+
+    /*
+     * Write an array.
+     */
+    coord0 = MAKE_N(float, 20);
+    for (i = 0; i < 20; i++) coord0[i] = coord0_data[i];
+    ind[0] = 0;
+    ind[1] = 1;
+    ind[2] = 1;
+    ind[3] = 0;
+    ind[4] = 9;
+    ind[5] = 1;
+    if (lite_PD_write_alt(file, "coord0", "float", coord0, 2, ind) == 0)
+    {
+        printf("Error writing array.\n");
+        exit(-1);
+    }
+
+    SFREE(coord0);
+
+    /*
+     * Close the file.
+     */
+    lite_PD_close(file);
+
+    return;
+}
diff --git a/tests/testsilock b/tests/testsilock
new file mode 100755
index 0000000..f5de84f
--- /dev/null
+++ b/tests/testsilock
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+result=0
+
+# -----------------------------------------------------------------------------
+# Test silock nan/inf checker. 
+#
+# Programmer: Mark C. Miller
+# Creation:   Thu Nov  5 11:13:33 PST 2009
+#
+# Modifications:
+#
+#   Mark C. Miller, Thu Apr 29 15:56:33 PDT 2010
+#   Fix redirection to use sh syntax rather than csh syntax.
+# -----------------------------------------------------------------------------
+
+# Diddle the the directory because Autotest is not at all designed to handle
+# tests the way this one was written
+if test -n "$1"; then
+    topDir=$1
+    if test -e $topDir/../../multi_test; then
+        topDir=$1/../..
+    fi
+else
+    topDir=.
+fi
+
+for driver in DB_PDB "$2"; do
+    for fparams in "nan 0" "inf 7"; do
+        fpissue=$(echo $fparams | cut -d' ' -f1)
+        index=$(echo $fparams | cut -d' ' -f2)
+        $topDir/onehex "$driver" $fpissue 1>/dev/null 2>&1
+        foundIt=$($topDir/../tools/silock/silock onehex.silo | grep "has .* issue at index ${index}$")
+        if test -z "$foundIt"; then
+            result=1
+            break 2
+        fi
+    done
+done
+
+#
+# Cleanup
+#
+rm -rf onehex.silo
+
+exit $result 
diff --git a/tests/testsuite b/tests/testsuite
new file mode 100755
index 0000000..860dec2
--- /dev/null
+++ b/tests/testsuite
@@ -0,0 +1,5865 @@
+#! /bin/sh
+#
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+# This test suite is free software; the Free Software Foundation gives
+# unlimited permission to copy, distribute and modify it.
+#
+# This work was performed under the auspices of
+# the U.S. Department of Energy by
+# Lawrence Livermore National Laboratory
+# in part under Contract W-7405-Eng-48 and
+# in part under Contract DE-AC52-07NA27344.
+## --------------------- ##
+## 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=:
+  # Zsh 3.x and 4.x performs 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
+
+
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+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.)
+as_nl='
+'
+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
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+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
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs 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_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  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" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); 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
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+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
+fi
+echo >conf$$.file
+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
+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=:
+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'"
+
+
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# How were we run?
+at_cli_args="$@"
+
+# Load the config file.
+for at_file in atconfig atlocal
+do
+  test -r $at_file || continue
+  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
+: ${at_top_build_prefix=$at_top_builddir}
+
+# atconfig delivers names relative to the directory the test suite is
+# in, but the groups themselves are run in testsuite-dir/group-dir.
+if test -n "$at_top_srcdir"; then
+  builddir=../..
+  for at_dir in srcdir top_srcdir top_build_prefix
+  do
+    at_val=`eval echo '${'at_$at_dir'}'`
+    eval "$at_dir=\$at_val/../.."
+  done
+fi
+
+# Not all shells have the 'times' builtin; the subshell is needed to make
+# sure we discard the 'times: not found' message from the shell.
+at_times_p=false
+(times) >/dev/null 2>&1 && at_times_p=:
+
+# CLI Arguments to pass to the debugging scripts.
+at_debug_args=
+# -e sets to true
+at_errexit_p=false
+# Shall we be verbose?
+at_verbose=:
+at_quiet=echo
+
+# Shall we keep the debug scripts?  Must be `:' when the suite is
+# run by a debug script, so that the script doesn't remove itself.
+at_debug_p=false
+# Display help message?
+at_help_p=false
+# Display the version message?
+at_version_p=false
+# List test groups?
+at_list_p=false
+# Test groups to run
+at_groups=
+
+# The directory we are in.
+at_dir=`pwd`
+# The directory the whole suite works in.
+# Should be absolutely to let the user `cd' at will.
+at_suite_dir=$at_dir/$as_me.dir
+# The file containing the suite.
+at_suite_log=$at_dir/$as_me.log
+# The file containing the location of the last AT_CHECK.
+at_check_line_file=$at_suite_dir/at-check-line
+# The file containing the exit status of the last command.
+at_status_file=$at_suite_dir/at-status
+# The files containing the output of the tested commands.
+at_stdout=$at_suite_dir/at-stdout
+at_stder1=$at_suite_dir/at-stder1
+at_stderr=$at_suite_dir/at-stderr
+# The file containing dates.
+at_times_file=$at_suite_dir/at-times
+
+# List of the tested programs.
+at_tested=''
+# List of the all the test groups.
+at_groups_all=' banner-1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 banner-2 40 41 42 banner-3 43 banner-4 44 45 46 47 48 49 50 51 52 53 banner-5 54 55 56 57 58 59 60 banner-6 61 62 63 64 65'
+# As many question marks as there are digits in the last test group number.
+# Used to normalize the test group numbers so that `ls' lists them in
+# numerical order.
+at_format='??'
+# Description of all the test groups.
+at_help_all="1;testsuite.at:63;version;;
+2;testsuite.at:86;namescheme;;
+3;testsuite.at:89;point;;
+4;testsuite.at:92;extface;;
+5;testsuite.at:95;testall -small;;
+6;testsuite.at:98;TestReadMask;;
+7;testsuite.at:104;array;;
+8;testsuite.at:107;multi_test;;
+9;testsuite.at:110;multi_test earlyclose;;
+10;testsuite.at:113;partial_io;;
+11;testsuite.at:116;simple;;
+12;testsuite.at:119;ucd;;
+13;testsuite.at:122;ucdsamp3;;
+14;testsuite.at:125;testall -small -fortran;;
+15;testsuite.at:128;obj;;
+16;testsuite.at:131;onehex;;
+17;testsuite.at:134;oneprism;;
+18;testsuite.at:137;onepyramid;;
+19;testsuite.at:140;onetet;;
+20;testsuite.at:143;subhex;;
+21;testsuite.at:146;twohex;;
+22;testsuite.at:149;multispec;;
+23;testsuite.at:152;sami;;
+24;testsuite.at:155;specmix;;
+25;testsuite.at:158;spec;;
+26;testsuite.at:161;group_test;;
+27;testsuite.at:164;listtypes;;
+28;testsuite.at:168;alltypes;;
+29;testsuite.at:171;wave;;
+30;testsuite.at:174;polyzl;;
+31;testsuite.at:177;csg;;
+32;testsuite.at:180;rocket;;
+33;testsuite.at:183;mmadjacency;;
+34;testsuite.at:186;mat3d_3across;;
+35;testsuite.at:189;ucd1d;;
+36;testsuite.at:192;dir;;
+37;testsuite.at:195;quad;;
+38;testsuite.at:198;arbpoly2d;;
+39;testsuite.at:201;readstuff;;
+40;testsuite.at:207;read;python;
+41;testsuite.at:212;write;python;
+42;testsuite.at:227;error handling;python;
+43;testsuite.at:234;testpdb;;
+44;testsuite.at:239;grab;;
+45;testsuite.at:242;compression gzip;compression;
+46;testsuite.at:247;compression szip;compression;
+47;testsuite.at:252;compression fpzip;compression;
+48;testsuite.at:257;compression lossy3;compression;
+49;testsuite.at:262;compression minratio1000;compression;
+50;testsuite.at:266;testhzip;compression;
+51;testsuite.at:270;checksums;;
+52;testsuite.at:273;xversion;;
+53;testsuite.at:276;largefile;large;
+54;testsuite.at:282;arrayf77;fortran;
+55;testsuite.at:286;curvef77;fortran;
+56;testsuite.at:290;matf77;fortran;
+57;testsuite.at:294;pointf77;fortran;
+58;testsuite.at:298;quadf77;fortran;
+59;testsuite.at:302;testallf77;fortran;
+60;testsuite.at:306;ucdf77;fortran;
+61;testsuite.at:312;silock;tools;
+62;testsuite.at:316;force single;conversions;
+63;testsuite.at:321;multi_file;large;
+64;testsuite.at:325;testall -medium;large;
+65;testsuite.at:329;testall -large;large;
+"
+
+at_prev=
+for at_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$at_prev"; then
+    at_option=$at_prev=$at_option
+    at_prev=
+  fi
+
+  case $at_option in
+  *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
+  *)   at_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $at_option in
+    --help | -h )
+	at_help_p=:
+	;;
+
+    --list | -l )
+	at_list_p=:
+	;;
+
+    --version | -V )
+	at_version_p=:
+	;;
+
+    --clean | -c )
+	test -d "$at_suite_dir" &&
+	  find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	rm -f -r "$at_suite_dir" "$at_suite_log"
+	exit 0
+	;;
+
+    --debug | -d )
+	at_debug_p=:
+	;;
+
+    --errexit | -e )
+	at_debug_p=:
+	at_errexit_p=:
+	;;
+
+    --verbose | -v )
+	at_verbose=echo; at_quiet=:
+	;;
+
+    --trace | -x )
+	at_traceon='set -x'; at_traceoff='set +x'
+	;;
+
+    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
+	at_groups="$at_groups$at_option "
+	;;
+
+    # Ranges
+    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
+	at_range_start=`echo $at_option |tr -d X-`
+	at_range=`echo " $at_groups_all " | \
+	  sed -e 's/^.* \('$at_range_start' \)/\1/'`
+	at_groups="$at_groups$at_range "
+	;;
+
+    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
+	at_range_end=`echo $at_option |tr -d X-`
+	at_range=`echo " $at_groups_all " | \
+	  sed -e 's/\( '$at_range_end'\) .*$/\1/'`
+	at_groups="$at_groups$at_range "
+	;;
+
+    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
+    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
+    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
+    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
+    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
+    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
+	at_range_start=`expr $at_option : '\(.*\)-'`
+	at_range_end=`expr $at_option : '.*-\(.*\)'`
+	if test $at_range_start -gt $at_range_end; then
+	  at_tmp=$at_range_end
+	  at_range_end=$at_range_start
+	  at_range_start=$at_tmp
+	fi
+	at_range=`echo " $at_groups_all " | \
+	  sed -e 's/^.*\( '$at_range_start' \)/\1/' \
+	      -e 's/\( '$at_range_end'\) .*$/\1/'`
+	at_groups="$at_groups$at_range "
+	;;
+
+    # Keywords.
+    --keywords | -k )
+	at_prev=--keywords
+	;;
+    --keywords=* )
+	at_groups_selected=$at_help_all
+	at_save_IFS=$IFS
+	IFS=,
+	set X $at_optarg
+	shift
+	IFS=$at_save_IFS
+	for at_keyword
+	do
+	  at_invert=
+	  case $at_keyword in
+	  '!'*)
+	    at_invert="-v"
+	    at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
+	    ;;
+	  esac
+	  # It is on purpose that we match the test group titles too.
+	  at_groups_selected=`echo "$at_groups_selected" |
+	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
+	done
+	at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
+	# Smash the newlines.
+	at_groups="$at_groups`echo $at_groups_selected` "
+	;;
+
+    *=*)
+	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
+	# Reject names that are not valid shell variable names.
+	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
+   { (exit 1); exit 1; }; }
+	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+	eval "$at_envvar='$at_value'"
+	export $at_envvar
+	# Propagate to debug scripts.
+	at_debug_args="$at_debug_args $at_envvar='$at_value'"
+	;;
+
+     *) echo "$as_me: invalid option: $at_option" >&2
+	echo "Try \`$0 --help' for more information." >&2
+	exit 1
+	;;
+  esac
+done
+
+# Selected test groups.
+if test -z "$at_groups"; then
+  at_groups=$at_groups_all
+else
+  # Sort the tests, removing duplicates:
+  at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
+  # and add banners.  (Passing at_groups_all is tricky--see the comment
+  # starting with "Passing at_groups is tricky.")
+  at_groups=`echo "$at_groups$as_nl $at_groups_all" |
+    awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
+	/^$/ { next }  # Ignore the empty line.
+	!/ / { groups++; selected[$ 0] = 1; next }
+	# The last line, containing at_groups_all.
+	{
+		n = split($ 0, a, " ")
+		# If there are several tests, select their banners:
+		if (groups > 1) {
+			for (i = 1; i <= n; i++) {
+				if (a[i] ~ /^banner-/)
+					banner = a[i]
+				else if (banner != "" && selected[a[i]] == 1)
+					selected[banner] = 1
+			}
+		}
+		for (i = 1; i <= n; i++)
+			if (selected[a[i]] == 1)
+				list = list " " a[i]
+		print list
+	}'`
+fi
+
+# Help message.
+if $at_help_p; then
+  cat <<_ATEOF
+Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
+
+Run all the tests, or the selected TESTS, given by numeric ranges, and
+save a detailed log file.  Upon failure, create debugging scripts.
+
+You should not change environment variables unless explicitly passed
+as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
+to exercise.  Each relative directory is expanded as build and source
+directories relatively to the top level of this distribution.  E.g.,
+
+  $ $0 AUTOTEST_PATH=bin
+
+possibly amounts into
+
+  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
+_ATEOF
+cat <<_ATEOF
+
+Operation modes:
+  -h, --help     print the help message, then exit
+  -V, --version  print version number, then exit
+  -c, --clean    remove all the files this test suite might create and exit
+  -l, --list     describes all the tests, or the selected TESTS
+_ATEOF
+cat <<_ATEOF
+
+Execution tuning:
+  -k, --keywords=KEYWORDS
+	         select the tests matching all the comma-separated KEYWORDS
+	         multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
+  -e, --errexit  abort as soon as a test fails; implies --debug
+  -v, --verbose  force more detailed output
+	         default for debugging scripts
+  -d, --debug    inhibit clean up and top-level logging
+	         default for debugging scripts
+  -x, --trace    enable tests shell tracing
+_ATEOF
+cat <<_ATEOF
+
+Report bugs to <visit-users at email.ornl.gov>.
+_ATEOF
+  exit 0
+fi
+
+# List of tests.
+if $at_list_p; then
+  cat <<_ATEOF
+silo 4.8 test suite: VALGRIND="$VALGRIND" STARGS="$STARGS" test groups:
+
+ NUM: FILE-NAME:LINE     TEST-GROUP-NAME
+      KEYWORDS
+
+_ATEOF
+  # Passing at_groups is tricky.  We cannot use it to form a literal string
+  # or regexp because of the limitation of AIX awk.  And Solaris' awk
+  # doesn't grok more than 99 fields in a record, so we have to use `split'.
+  echo "$at_groups$as_nl$at_help_all" |
+    awk 'BEGIN { FS = ";" }
+	 NR == 1 {
+	   for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
+	   next
+	 }
+	 {
+	   if (selected[$ 1]) {
+	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
+	     if ($ 4) printf "      %s\n", $ 4
+	   }
+	 }'
+  exit 0
+fi
+if $at_version_p; then
+  echo "$as_me (silo 4.8)"
+  cat <<\_ACEOF
+
+Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+Foundation, Inc.
+This test suite is free software; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+This work was performed under the auspices of
+the U.S. Department of Energy by
+Lawrence Livermore National Laboratory
+in part under Contract W-7405-Eng-48 and
+in part under Contract DE-AC52-07NA27344.
+_ACEOF
+  exit 0
+fi
+
+# Don't take risks: use only absolute directories in PATH.
+#
+# For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
+#
+# For embedded test suites, AUTOTEST_PATH is relative to the top level
+# of the package.  Then expand it into build/src parts, since users
+# may create executables in both places.
+AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
+at_path=
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $AUTOTEST_PATH $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
+case $as_dir in
+  [\\/]* | ?:[\\/]* )
+    at_path=$at_path$as_dir
+    ;;
+  * )
+    if test -z "$at_top_build_prefix"; then
+      # Stand-alone test suite.
+      at_path=$at_path$as_dir
+    else
+      # Embedded test suite.
+      at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
+      at_path=$at_path$at_top_srcdir/$as_dir
+    fi
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+# Now build and simplify PATH.
+#
+# There might be directories that don't exist, but don't redirect
+# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
+PATH=
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $at_path
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
+test -d "$as_dir" || continue
+case $PATH in
+	          $as_dir                 | \
+	          $as_dir$PATH_SEPARATOR* | \
+  *$PATH_SEPARATOR$as_dir                 | \
+  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
+
+  '') PATH=$as_dir ;;
+   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+esac
+done
+IFS=$as_save_IFS
+
+export PATH
+
+# Setting up the FDs.
+# 5 is the log file.  Not to be overwritten if `-d'.
+
+if $at_debug_p; then
+  at_suite_log=/dev/null
+else
+  : >"$at_suite_log"
+fi
+exec 5>>"$at_suite_log"
+
+# Banners and logs.
+sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## silo 4.8 test suite: VALGRIND="$VALGRIND" STARGS="$STARGS". ##
+_ASBOX
+{
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## silo 4.8 test suite: VALGRIND="$VALGRIND" STARGS="$STARGS". ##
+_ASBOX
+  echo
+
+  echo "$as_me: command line was:"
+  echo "  $ $0 $at_cli_args"
+  echo
+
+  # Try to find a few ChangeLogs in case it might help determining the
+  # exact version.  Use the relative dir: if the top dir is a symlink,
+  # find will not follow it (and options to follow the links are not
+  # portable), which would result in no output here.
+  if test -n "$at_top_srcdir"; then
+    cat <<\_ASBOX
+## ----------- ##
+## ChangeLogs. ##
+## ----------- ##
+_ASBOX
+    echo
+    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
+    do
+      echo "$as_me: $at_file:"
+      sed 's/^/| /;10q' $at_file
+      echo
+    done
+
+    {
+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=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+}
+    echo
+  fi
+
+  # Contents of the config files.
+  for at_file in atconfig atlocal
+  do
+    test -r $at_file || continue
+    echo "$as_me: $at_file:"
+    sed 's/^/| /' $at_file
+    echo
+  done
+
+  cat <<\_ASBOX
+## ---------------- ##
+## Tested programs. ##
+## ---------------- ##
+_ASBOX
+  echo
+} >&5
+
+# Report what programs are being tested.
+for at_program in : $at_tested
+do
+  test "$at_program" = : && continue
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -f "$as_dir/$at_program" && break
+done
+IFS=$as_save_IFS
+
+  if test -f "$as_dir/$at_program"; then
+    {
+      echo "$at_srcdir/testsuite.at:55: $as_dir/$at_program --version"
+      "$as_dir/$at_program" --version
+      echo
+    } >&5 2>&1
+  else
+    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
+echo "$as_me: error: cannot find $at_program" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+done
+
+{
+  cat <<\_ASBOX
+## ------------------ ##
+## Running the tests. ##
+## ------------------ ##
+_ASBOX
+} >&5
+
+at_start_date=`date`
+at_start_time=`date +%s 2>/dev/null`
+echo "$as_me: starting at: $at_start_date" >&5
+at_xpass_list=
+at_xfail_list=
+at_pass_list=
+at_fail_list=
+at_skip_list=
+at_group_count=0
+
+# Create the master directory if it doesn't already exist.
+test -d "$at_suite_dir" ||
+  mkdir "$at_suite_dir" ||
+  { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
+echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Can we diff with `/dev/null'?  DU 5.0 refuses.
+if diff /dev/null /dev/null >/dev/null 2>&1; then
+  at_devnull=/dev/null
+else
+  at_devnull=$at_suite_dir/devnull
+  >"$at_devnull"
+fi
+
+# Use `diff -u' when possible.
+if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
+then
+  at_diff='diff -u'
+else
+  at_diff=diff
+fi
+
+
+for at_group in $at_groups
+do
+  # Be sure to come back to the top test directory.
+  cd "$at_suite_dir"
+
+  case $at_group in
+    banner-*)
+      at_group_log=$at_suite_log
+      ;;
+
+    *)
+      at_group_normalized=$at_group
+
+  while :; do
+    case $at_group_normalized in #(
+    $at_format*) break;;
+    esac
+    at_group_normalized=0$at_group_normalized
+  done
+
+
+      # Create a fresh directory for the next test group, and enter.
+      at_group_dir=$at_suite_dir/$at_group_normalized
+      at_group_log=$at_group_dir/$as_me.log
+      if test -d "$at_group_dir"; then
+	find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	rm -fr "$at_group_dir"
+      fi
+      # Be tolerant if the above `rm' was not able to remove the directory.
+      { as_dir=$at_group_dir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`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 ||
+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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+      cd $at_group_dir
+      ;;
+  esac
+
+  echo 0 > "$at_status_file"
+
+  # Clearly separate the test groups when verbose.
+  test $at_group_count != 0 && $at_verbose
+
+  # In verbose mode, append to the log file *and* show on
+  # the standard output; in quiet mode only write to the log
+  if test $at_verbose = echo; then
+    at_tee_pipe='tee -a "$at_group_log"'
+  else
+    at_tee_pipe='cat >> "$at_group_log"'
+  fi
+
+  case $at_group in
+
+  banner-1 ) # Banner 1. testsuite.at:62
+    cat <<\_ATEOF
+
+Non-driver-specific
+
+_ATEOF
+    ;;
+
+  1 ) # 1. testsuite.at:63: version
+    at_setup_line='testsuite.at:63'
+    at_desc="version"
+    $at_quiet $ECHO_N "  1: version                                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "1. testsuite.at:63: testing ..."
+      $at_traceon
+
+cat >expout <<'_ATEOF'
+This version of Silo is greater than or equal to 4.6
+This version of Silo is NOT greater than or equal to 90.5.2
+DBVersion() returns "4.8"
+DBVersionGE(4,6,0) returns 1
+DBVersionGE(90,5,2) returns 0
+On file handle returned from DBCreate...
+    DBFileVersion() returns "4.8"
+    DBFileVersionGE(4,6,0) returns 1
+    DBFileVersionGE(90,5,2) returns 0
+On file handle returned from DBOpen...
+    DBFileVersion() returns "4.8"
+    DBFileVersionGE(4,6,0) returns 1
+    DBFileVersionGE(90,5,2) returns 0
+On old silo file handle returned from DBOpen...
+    DBFileVersion() returns "unknown; 4.5 or older"
+    DBFileVersionGE(3,0,0) returns -1
+    DBFileVersionGE(4,6,0) returns 0
+    DBFileVersionGE(90,5,2) returns 0
+_ATEOF
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:84: \$VALGRIND version \$STARGS"
+echo testsuite.at:84 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND version $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND version $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND version $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+$at_diff expout "$at_stdout" || at_failed=:
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:84: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  2 ) # 2. testsuite.at:86: namescheme
+    at_setup_line='testsuite.at:86'
+    at_desc="namescheme"
+    $at_quiet $ECHO_N "  2: namescheme                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "2. testsuite.at:86: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:87: \$VALGRIND namescheme"
+echo testsuite.at:87 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND namescheme" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND namescheme ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND namescheme ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:87: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  3 ) # 3. testsuite.at:89: point
+    at_setup_line='testsuite.at:89'
+    at_desc="point"
+    $at_quiet $ECHO_N "  3: point                                          $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "3. testsuite.at:89: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:90: \$VALGRIND point \$STARGS"
+echo testsuite.at:90 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND point $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND point $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND point $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:90: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  4 ) # 4. testsuite.at:92: extface
+    at_setup_line='testsuite.at:92'
+    at_desc="extface"
+    $at_quiet $ECHO_N "  4: extface                                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "4. testsuite.at:92: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:93: \$VALGRIND extface \$STARGS"
+echo testsuite.at:93 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND extface $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND extface $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND extface $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:93: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  5 ) # 5. testsuite.at:95: testall -small
+    at_setup_line='testsuite.at:95'
+    at_desc="testall -small"
+    $at_quiet $ECHO_N "  5: testall -small                                 $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "5. testsuite.at:95: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:96: \$VALGRIND testall -small \$STARGS"
+echo testsuite.at:96 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND testall -small $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND testall -small $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND testall -small $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:96: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  6 ) # 6. testsuite.at:98: TestReadMask
+    at_setup_line='testsuite.at:98'
+    at_desc="TestReadMask"
+    $at_quiet $ECHO_N "  6: TestReadMask                                   $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "6. testsuite.at:98: testing ..."
+      $at_traceon
+ # needs files generated by other execs
+$at_traceoff
+echo "$at_srcdir/testsuite.at:99: extface \$STARGS"
+echo testsuite.at:99 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "extface $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; extface $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; extface $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:99: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+ # don't valgrind these intermediate parts
+$at_traceoff
+echo "$at_srcdir/testsuite.at:100: point \$STARGS"
+echo testsuite.at:100 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "point $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; point $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; point $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:100: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:101: testall -small \$STARGS"
+echo testsuite.at:101 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "testall -small $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; testall -small $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; testall -small $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:101: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:102: \$VALGRIND TestReadMask \$STARGS"
+echo testsuite.at:102 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND TestReadMask $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND TestReadMask $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND TestReadMask $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:102: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  7 ) # 7. testsuite.at:104: array
+    at_setup_line='testsuite.at:104'
+    at_desc="array"
+    $at_quiet $ECHO_N "  7: array                                          $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "7. testsuite.at:104: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:105: \$VALGRIND array \$STARGS"
+echo testsuite.at:105 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND array $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND array $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND array $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:105: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  8 ) # 8. testsuite.at:107: multi_test
+    at_setup_line='testsuite.at:107'
+    at_desc="multi_test"
+    $at_quiet $ECHO_N "  8: multi_test                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "8. testsuite.at:107: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:108: \$VALGRIND multi_test \$STARGS"
+echo testsuite.at:108 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND multi_test $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND multi_test $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND multi_test $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:108: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  9 ) # 9. testsuite.at:110: multi_test earlyclose
+    at_setup_line='testsuite.at:110'
+    at_desc="multi_test earlyclose"
+    $at_quiet $ECHO_N "  9: multi_test earlyclose                          $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "9. testsuite.at:110: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:111: \$VALGRIND multi_test earlyclose \$STARGS"
+echo testsuite.at:111 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND multi_test earlyclose $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND multi_test earlyclose $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND multi_test earlyclose $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:111: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  10 ) # 10. testsuite.at:113: partial_io
+    at_setup_line='testsuite.at:113'
+    at_desc="partial_io"
+    $at_quiet $ECHO_N " 10: partial_io                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "10. testsuite.at:113: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:114: \$VALGRIND partial_io \$STARGS"
+echo testsuite.at:114 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND partial_io $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND partial_io $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND partial_io $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:114: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  11 ) # 11. testsuite.at:116: simple
+    at_setup_line='testsuite.at:116'
+    at_desc="simple"
+    $at_quiet $ECHO_N " 11: simple                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "11. testsuite.at:116: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:117: \$VALGRIND simple \$STARGS"
+echo testsuite.at:117 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND simple $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND simple $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND simple $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:117: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  12 ) # 12. testsuite.at:119: ucd
+    at_setup_line='testsuite.at:119'
+    at_desc="ucd"
+    $at_quiet $ECHO_N " 12: ucd                                            $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "12. testsuite.at:119: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:120: \$VALGRIND ucd \$STARGS"
+echo testsuite.at:120 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND ucd $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND ucd $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND ucd $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:120: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  13 ) # 13. testsuite.at:122: ucdsamp3
+    at_setup_line='testsuite.at:122'
+    at_desc="ucdsamp3"
+    $at_quiet $ECHO_N " 13: ucdsamp3                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "13. testsuite.at:122: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:123: \$VALGRIND ucdsamp3 \$STARGS"
+echo testsuite.at:123 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND ucdsamp3 $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND ucdsamp3 $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND ucdsamp3 $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:123: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  14 ) # 14. testsuite.at:125: testall -small -fortran
+    at_setup_line='testsuite.at:125'
+    at_desc="testall -small -fortran"
+    $at_quiet $ECHO_N " 14: testall -small -fortran                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "14. testsuite.at:125: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:126: \$VALGRIND testall -small -fortran \$STARGS"
+echo testsuite.at:126 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND testall -small -fortran $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND testall -small -fortran $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND testall -small -fortran $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:126: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  15 ) # 15. testsuite.at:128: obj
+    at_setup_line='testsuite.at:128'
+    at_desc="obj"
+    $at_quiet $ECHO_N " 15: obj                                            $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "15. testsuite.at:128: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:129: \$VALGRIND obj \$STARGS"
+echo testsuite.at:129 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND obj $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND obj $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND obj $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:129: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  16 ) # 16. testsuite.at:131: onehex
+    at_setup_line='testsuite.at:131'
+    at_desc="onehex"
+    $at_quiet $ECHO_N " 16: onehex                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "16. testsuite.at:131: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:132: \$VALGRIND onehex \$STARGS"
+echo testsuite.at:132 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND onehex $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND onehex $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND onehex $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:132: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  17 ) # 17. testsuite.at:134: oneprism
+    at_setup_line='testsuite.at:134'
+    at_desc="oneprism"
+    $at_quiet $ECHO_N " 17: oneprism                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "17. testsuite.at:134: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:135: \$VALGRIND oneprism \$STARGS"
+echo testsuite.at:135 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND oneprism $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND oneprism $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND oneprism $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:135: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  18 ) # 18. testsuite.at:137: onepyramid
+    at_setup_line='testsuite.at:137'
+    at_desc="onepyramid"
+    $at_quiet $ECHO_N " 18: onepyramid                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "18. testsuite.at:137: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:138: \$VALGRIND onepyramid \$STARGS"
+echo testsuite.at:138 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND onepyramid $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND onepyramid $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND onepyramid $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:138: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  19 ) # 19. testsuite.at:140: onetet
+    at_setup_line='testsuite.at:140'
+    at_desc="onetet"
+    $at_quiet $ECHO_N " 19: onetet                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "19. testsuite.at:140: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:141: \$VALGRIND onetet \$STARGS"
+echo testsuite.at:141 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND onetet $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND onetet $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND onetet $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:141: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  20 ) # 20. testsuite.at:143: subhex
+    at_setup_line='testsuite.at:143'
+    at_desc="subhex"
+    $at_quiet $ECHO_N " 20: subhex                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "20. testsuite.at:143: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:144: \$VALGRIND subhex \$STARGS"
+echo testsuite.at:144 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND subhex $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND subhex $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND subhex $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:144: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  21 ) # 21. testsuite.at:146: twohex
+    at_setup_line='testsuite.at:146'
+    at_desc="twohex"
+    $at_quiet $ECHO_N " 21: twohex                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "21. testsuite.at:146: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:147: \$VALGRIND twohex \$STARGS"
+echo testsuite.at:147 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND twohex $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND twohex $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND twohex $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:147: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  22 ) # 22. testsuite.at:149: multispec
+    at_setup_line='testsuite.at:149'
+    at_desc="multispec"
+    $at_quiet $ECHO_N " 22: multispec                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "22. testsuite.at:149: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:150: \$VALGRIND multispec \$STARGS"
+echo testsuite.at:150 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND multispec $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND multispec $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND multispec $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:150: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  23 ) # 23. testsuite.at:152: sami
+    at_setup_line='testsuite.at:152'
+    at_desc="sami"
+    $at_quiet $ECHO_N " 23: sami                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "23. testsuite.at:152: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:153: \$VALGRIND sami \$STARGS"
+echo testsuite.at:153 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND sami $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND sami $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND sami $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:153: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  24 ) # 24. testsuite.at:155: specmix
+    at_setup_line='testsuite.at:155'
+    at_desc="specmix"
+    $at_quiet $ECHO_N " 24: specmix                                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "24. testsuite.at:155: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:156: \$VALGRIND specmix \$STARGS"
+echo testsuite.at:156 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND specmix $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND specmix $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND specmix $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:156: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  25 ) # 25. testsuite.at:158: spec
+    at_setup_line='testsuite.at:158'
+    at_desc="spec"
+    $at_quiet $ECHO_N " 25: spec                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "25. testsuite.at:158: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:159: \$VALGRIND spec \$STARGS"
+echo testsuite.at:159 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND spec $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND spec $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND spec $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:159: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  26 ) # 26. testsuite.at:161: group_test
+    at_setup_line='testsuite.at:161'
+    at_desc="group_test"
+    $at_quiet $ECHO_N " 26: group_test                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "26. testsuite.at:161: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:162: \$VALGRIND group_test 0 0 0 \$STARGS"
+echo testsuite.at:162 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND group_test 0 0 0 $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND group_test 0 0 0 $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND group_test 0 0 0 $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:162: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  27 ) # 27. testsuite.at:164: listtypes
+    at_setup_line='testsuite.at:164'
+    at_desc="listtypes"
+    $at_quiet $ECHO_N " 27: listtypes                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "27. testsuite.at:164: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:165: \$VALGRIND ucd \$STARGS"
+echo testsuite.at:165 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND ucd $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND ucd $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND ucd $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:165: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:166: test -z \"\$STARGS\" && \$VALGRIND listtypes ucd.pdb || \$VALGRIND listtypes ucd.h5"
+echo testsuite.at:166 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test -z \"$STARGS\" && $VALGRIND listtypes ucd.pdb || $VALGRIND listtypes ucd.h5" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$STARGS" && $VALGRIND listtypes ucd.pdb || $VALGRIND listtypes ucd.h5 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$STARGS" && $VALGRIND listtypes ucd.pdb || $VALGRIND listtypes ucd.h5 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:166: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  28 ) # 28. testsuite.at:168: alltypes
+    at_setup_line='testsuite.at:168'
+    at_desc="alltypes"
+    $at_quiet $ECHO_N " 28: alltypes                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "28. testsuite.at:168: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:169: \$VALGRIND alltypes \$STARGS"
+echo testsuite.at:169 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND alltypes $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND alltypes $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND alltypes $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:169: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  29 ) # 29. testsuite.at:171: wave
+    at_setup_line='testsuite.at:171'
+    at_desc="wave"
+    $at_quiet $ECHO_N " 29: wave                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "29. testsuite.at:171: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:172: \$VALGRIND wave \$STARGS"
+echo testsuite.at:172 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND wave $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND wave $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND wave $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:172: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  30 ) # 30. testsuite.at:174: polyzl
+    at_setup_line='testsuite.at:174'
+    at_desc="polyzl"
+    $at_quiet $ECHO_N " 30: polyzl                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "30. testsuite.at:174: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:175: \$VALGRIND polyzl \$STARGS"
+echo testsuite.at:175 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND polyzl $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND polyzl $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND polyzl $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:175: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  31 ) # 31. testsuite.at:177: csg
+    at_setup_line='testsuite.at:177'
+    at_desc="csg"
+    $at_quiet $ECHO_N " 31: csg                                            $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "31. testsuite.at:177: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:178: \$VALGRIND csg \$STARGS"
+echo testsuite.at:178 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND csg $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND csg $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND csg $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:178: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  32 ) # 32. testsuite.at:180: rocket
+    at_setup_line='testsuite.at:180'
+    at_desc="rocket"
+    $at_quiet $ECHO_N " 32: rocket                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "32. testsuite.at:180: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:181: \$VALGRIND rocket \$STARGS"
+echo testsuite.at:181 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND rocket $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND rocket $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND rocket $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:181: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  33 ) # 33. testsuite.at:183: mmadjacency
+    at_setup_line='testsuite.at:183'
+    at_desc="mmadjacency"
+    $at_quiet $ECHO_N " 33: mmadjacency                                    $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "33. testsuite.at:183: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:184: \$VALGRIND mmadjacency \$STARGS"
+echo testsuite.at:184 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND mmadjacency $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND mmadjacency $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND mmadjacency $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:184: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  34 ) # 34. testsuite.at:186: mat3d_3across
+    at_setup_line='testsuite.at:186'
+    at_desc="mat3d_3across"
+    $at_quiet $ECHO_N " 34: mat3d_3across                                  $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "34. testsuite.at:186: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:187: \$VALGRIND mat3d_3across \$STARGS"
+echo testsuite.at:187 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND mat3d_3across $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND mat3d_3across $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND mat3d_3across $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+$at_diff "$at_devnull" "$at_stdout" || at_failed=:
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:187: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  35 ) # 35. testsuite.at:189: ucd1d
+    at_setup_line='testsuite.at:189'
+    at_desc="ucd1d"
+    $at_quiet $ECHO_N " 35: ucd1d                                          $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "35. testsuite.at:189: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:190: \$VALGRIND ucd1d \$STARGS"
+echo testsuite.at:190 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND ucd1d $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND ucd1d $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND ucd1d $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:190: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  36 ) # 36. testsuite.at:192: dir
+    at_setup_line='testsuite.at:192'
+    at_desc="dir"
+    $at_quiet $ECHO_N " 36: dir                                            $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "36. testsuite.at:192: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:193: \$VALGRIND dir \$STARGS"
+echo testsuite.at:193 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND dir $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND dir $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND dir $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:193: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  37 ) # 37. testsuite.at:195: quad
+    at_setup_line='testsuite.at:195'
+    at_desc="quad"
+    $at_quiet $ECHO_N " 37: quad                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "37. testsuite.at:195: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:196: \$VALGRIND quad \$STARGS"
+echo testsuite.at:196 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND quad $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND quad $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND quad $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:196: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  38 ) # 38. testsuite.at:198: arbpoly2d
+    at_setup_line='testsuite.at:198'
+    at_desc="arbpoly2d"
+    $at_quiet $ECHO_N " 38: arbpoly2d                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "38. testsuite.at:198: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:199: \$VALGRIND arbpoly2d \$STARGS"
+echo testsuite.at:199 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND arbpoly2d $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND arbpoly2d $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND arbpoly2d $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:199: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  39 ) # 39. testsuite.at:201: readstuff
+    at_setup_line='testsuite.at:201'
+    at_desc="readstuff"
+    $at_quiet $ECHO_N " 39: readstuff                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "39. testsuite.at:201: testing ..."
+      $at_traceon
+ # needs data file from multi_test
+$at_traceoff
+echo "$at_srcdir/testsuite.at:202: multi_test \$STARGS"
+echo testsuite.at:202 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "multi_test $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; multi_test $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; multi_test $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:202: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+ # don't valgrind these intermediate parts
+$at_traceoff
+echo "$at_srcdir/testsuite.at:203: \$VALGRIND readstuff \$STARGS"
+echo testsuite.at:203 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND readstuff $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND readstuff $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND readstuff $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   *);;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  banner-2 ) # Banner 2. testsuite.at:206
+    cat <<\_ATEOF
+
+pythonmodule
+
+_ATEOF
+    ;;
+
+  40 ) # 40. testsuite.at:207: read
+    at_setup_line='testsuite.at:207'
+    at_desc="read"
+    $at_quiet $ECHO_N " 40: read                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "40. testsuite.at:207: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:209: multi_test \$STARGS hdf-friendly"
+echo testsuite.at:209 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "multi_test $STARGS hdf-friendly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; multi_test $STARGS hdf-friendly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; multi_test $STARGS hdf-friendly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:209: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+ # generate data for python tests
+$at_traceoff
+echo "$at_srcdir/testsuite.at:210: test -z \"\$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs \$PYTHON ../../test_read.py"
+echo testsuite.at:210 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test -z \"$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_read.py" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_read.py ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_read.py ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:210: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  41 ) # 41. testsuite.at:212: write
+    at_setup_line='testsuite.at:212'
+    at_desc="write"
+    $at_quiet $ECHO_N " 41: write                                          $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "41. testsuite.at:212: testing ..."
+      $at_traceon
+
+
+cat >expout <<'_ATEOF'
+toc=nvar = 12
+var_names = (_fileinfo, _silolibinfo, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8)
+ndir = 1
+dir_names = (a)
+
+t2='hello'
+t6= (1.2, 10.199999999999999)
+a/t8='x2'
+t9=x3
+/t5= (1.2, 10.0)
+_ATEOF
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:225: test -z \"\$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs \$PYTHON ../../test_write.py"
+echo testsuite.at:225 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test -z \"$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_write.py" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_write.py ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_write.py ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+$at_diff expout "$at_stdout" || at_failed=:
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:225: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  42 ) # 42. testsuite.at:227: error handling
+    at_setup_line='testsuite.at:227'
+    at_desc="error handling"
+    $at_quiet $ECHO_N " 42: error handling                                 $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "42. testsuite.at:227: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:229: multi_test \$STARGS hdf-friendly"
+echo testsuite.at:229 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "multi_test $STARGS hdf-friendly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; multi_test $STARGS hdf-friendly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; multi_test $STARGS hdf-friendly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:229: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+ # generate data for python tests
+$at_traceoff
+echo "$at_srcdir/testsuite.at:230: test -z \"\$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs \$PYTHON ../../test_error.py"
+echo testsuite.at:230 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test -z \"$PYTHON\" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_error.py" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_error.py ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_error.py ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:230: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  banner-3 ) # Banner 3. testsuite.at:233
+    cat <<\_ATEOF
+
+PDB Specific
+
+_ATEOF
+    ;;
+
+  43 ) # 43. testsuite.at:234: testpdb
+    at_setup_line='testsuite.at:234'
+    at_desc="testpdb"
+    $at_quiet $ECHO_N " 43: testpdb                                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "43. testsuite.at:234: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:235: test \"\$STARGS\" = DB_HDF5 && exit 77 || \$VALGRIND testpdb"
+echo testsuite.at:235 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" = DB_HDF5 && exit 77 || $VALGRIND testpdb" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" = DB_HDF5 && exit 77 || $VALGRIND testpdb ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" = DB_HDF5 && exit 77 || $VALGRIND testpdb ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   *);;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  banner-4 ) # Banner 4. testsuite.at:238
+    cat <<\_ATEOF
+
+HDF5 Specific
+
+_ATEOF
+    ;;
+
+  44 ) # 44. testsuite.at:239: grab
+    at_setup_line='testsuite.at:239'
+    at_desc="grab"
+    $at_quiet $ECHO_N " 44: grab                                           $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "44. testsuite.at:239: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:240: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND grab"
+echo testsuite.at:240 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND grab" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND grab ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND grab ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:240: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  45 ) # 45. testsuite.at:242: compression gzip
+    at_setup_line='testsuite.at:242'
+    at_desc="compression gzip"
+    $at_quiet $ECHO_N " 45: compression gzip                               $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "45. testsuite.at:242: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:244: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression gzip"
+echo testsuite.at:244 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression gzip" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression gzip ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression gzip ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:244: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:245: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression readonly"
+echo testsuite.at:245 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression readonly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:245: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  46 ) # 46. testsuite.at:247: compression szip
+    at_setup_line='testsuite.at:247'
+    at_desc="compression szip"
+    $at_quiet $ECHO_N " 46: compression szip                               $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "46. testsuite.at:247: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:249: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression szip"
+echo testsuite.at:249 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression szip" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression szip ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression szip ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:249: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:250: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression readonly"
+echo testsuite.at:250 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression readonly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:250: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  47 ) # 47. testsuite.at:252: compression fpzip
+    at_setup_line='testsuite.at:252'
+    at_desc="compression fpzip"
+    $at_quiet $ECHO_N " 47: compression fpzip                              $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "47. testsuite.at:252: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:254: test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression fpzip"
+echo testsuite.at:254 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression fpzip" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression fpzip ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression fpzip ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:254: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:255: test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression readonly"
+echo testsuite.at:255 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression readonly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:255: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  48 ) # 48. testsuite.at:257: compression lossy3
+    at_setup_line='testsuite.at:257'
+    at_desc="compression lossy3"
+    $at_quiet $ECHO_N " 48: compression lossy3                             $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "48. testsuite.at:257: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:259: test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression lossy3"
+echo testsuite.at:259 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression lossy3" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression lossy3 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression lossy3 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:259: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:260: test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression readonly"
+echo testsuite.at:260 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression readonly" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   50) ;;
+   *) echo "$at_srcdir/testsuite.at:260: exit code was $at_status, expected 50"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  49 ) # 49. testsuite.at:262: compression minratio1000
+    at_setup_line='testsuite.at:262'
+    at_desc="compression minratio1000"
+    $at_quiet $ECHO_N " 49: compression minratio1000                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "49. testsuite.at:262: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:264: test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND compression minratio1000"
+echo testsuite.at:264 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \\) -o \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND compression minratio1000" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression minratio1000 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression minratio1000 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   1) ;;
+   *) echo "$at_srcdir/testsuite.at:264: exit code was $at_status, expected 1"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  50 ) # 50. testsuite.at:266: testhzip
+    at_setup_line='testsuite.at:266'
+    at_desc="testhzip"
+    $at_quiet $ECHO_N " 50: testhzip                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "50. testsuite.at:266: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:268: test ! \\( -e ../src/hzip/hzutil.o -o -e ../../../src/hzip/hzutil.o \\) -o -z \"\$BROWSER\" -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND testhzip \`pwd\`"
+echo testsuite.at:268 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -e ../src/hzip/hzutil.o -o -e ../../../src/hzip/hzutil.o \) -o -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testhzip `pwd` ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -e ../src/hzip/hzutil.o -o -e ../../../src/hzip/hzutil.o \) -o -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testhzip `pwd` ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:268: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  51 ) # 51. testsuite.at:270: checksums
+    at_setup_line='testsuite.at:270'
+    at_desc="checksums"
+    $at_quiet $ECHO_N " 51: checksums                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "51. testsuite.at:270: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:271: test -z \"\$BROWSER\" -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND checksums \`pwd\`"
+echo testsuite.at:271 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND checksums `pwd` ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND checksums `pwd` ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:271: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  52 ) # 52. testsuite.at:273: xversion
+    at_setup_line='testsuite.at:273'
+    at_desc="xversion"
+    $at_quiet $ECHO_N " 52: xversion                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "52. testsuite.at:273: testing ..."
+      $at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:274: test -z \"\$BROWSER\" -o \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND testxvers \`pwd\`"
+echo testsuite.at:274 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testxvers `pwd` ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testxvers `pwd` ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:274: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  53 ) # 53. testsuite.at:276: largefile
+    at_setup_line='testsuite.at:276'
+    at_desc="largefile"
+    $at_quiet $ECHO_N " 53: largefile                                      $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "53. testsuite.at:276: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:278: test \"\$STARGS\" != DB_HDF5 && exit 77 || \$VALGRIND largefile"
+echo testsuite.at:278 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test \"$STARGS\" != DB_HDF5 && exit 77 || $VALGRIND largefile" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND largefile ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND largefile ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:278: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  banner-5 ) # Banner 5. testsuite.at:281
+    cat <<\_ATEOF
+
+Fortran
+
+_ATEOF
+    ;;
+
+  54 ) # 54. testsuite.at:282: arrayf77
+    at_setup_line='testsuite.at:282'
+    at_desc="arrayf77"
+    $at_quiet $ECHO_N " 54: arrayf77                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "54. testsuite.at:282: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:284: test ! \\( -f arrayf77 -o -f ../../arrayf77 \\) && exit 77 || \$VALGRIND arrayf77"
+echo testsuite.at:284 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f arrayf77 -o -f ../../arrayf77 \\) && exit 77 || $VALGRIND arrayf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f arrayf77 -o -f ../../arrayf77 \) && exit 77 || $VALGRIND arrayf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f arrayf77 -o -f ../../arrayf77 \) && exit 77 || $VALGRIND arrayf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:284: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  55 ) # 55. testsuite.at:286: curvef77
+    at_setup_line='testsuite.at:286'
+    at_desc="curvef77"
+    $at_quiet $ECHO_N " 55: curvef77                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "55. testsuite.at:286: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:288: test ! \\( -f curvef77 -o -f ../../curvef77 \\) && exit 77 || \$VALGRIND curvef77"
+echo testsuite.at:288 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f curvef77 -o -f ../../curvef77 \\) && exit 77 || $VALGRIND curvef77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f curvef77 -o -f ../../curvef77 \) && exit 77 || $VALGRIND curvef77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f curvef77 -o -f ../../curvef77 \) && exit 77 || $VALGRIND curvef77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:288: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  56 ) # 56. testsuite.at:290: matf77
+    at_setup_line='testsuite.at:290'
+    at_desc="matf77"
+    $at_quiet $ECHO_N " 56: matf77                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "56. testsuite.at:290: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:292: test ! \\( -f matf77 -o -f ../../matf77 \\) && exit 77 || \$VALGRIND matf77"
+echo testsuite.at:292 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f matf77 -o -f ../../matf77 \\) && exit 77 || $VALGRIND matf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f matf77 -o -f ../../matf77 \) && exit 77 || $VALGRIND matf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f matf77 -o -f ../../matf77 \) && exit 77 || $VALGRIND matf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:292: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  57 ) # 57. testsuite.at:294: pointf77
+    at_setup_line='testsuite.at:294'
+    at_desc="pointf77"
+    $at_quiet $ECHO_N " 57: pointf77                                       $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "57. testsuite.at:294: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:296: test ! \\( -f pointf77 -o -f ../../pointf77 \\) && exit 77 || \$VALGRIND pointf77"
+echo testsuite.at:296 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f pointf77 -o -f ../../pointf77 \\) && exit 77 || $VALGRIND pointf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f pointf77 -o -f ../../pointf77 \) && exit 77 || $VALGRIND pointf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f pointf77 -o -f ../../pointf77 \) && exit 77 || $VALGRIND pointf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:296: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  58 ) # 58. testsuite.at:298: quadf77
+    at_setup_line='testsuite.at:298'
+    at_desc="quadf77"
+    $at_quiet $ECHO_N " 58: quadf77                                        $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "58. testsuite.at:298: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:300: test ! \\( -f quadf77 -o -f ../../quadf77 \\) && exit 77 || \$VALGRIND quadf77"
+echo testsuite.at:300 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f quadf77 -o -f ../../quadf77 \\) && exit 77 || $VALGRIND quadf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f quadf77 -o -f ../../quadf77 \) && exit 77 || $VALGRIND quadf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f quadf77 -o -f ../../quadf77 \) && exit 77 || $VALGRIND quadf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:300: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  59 ) # 59. testsuite.at:302: testallf77
+    at_setup_line='testsuite.at:302'
+    at_desc="testallf77"
+    $at_quiet $ECHO_N " 59: testallf77                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "59. testsuite.at:302: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:304: test ! \\( -f testallf77 -o -f ../../testallf77 \\) && exit 77 || \$VALGRIND testallf77"
+echo testsuite.at:304 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f testallf77 -o -f ../../testallf77 \\) && exit 77 || $VALGRIND testallf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f testallf77 -o -f ../../testallf77 \) && exit 77 || $VALGRIND testallf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f testallf77 -o -f ../../testallf77 \) && exit 77 || $VALGRIND testallf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:304: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  60 ) # 60. testsuite.at:306: ucdf77
+    at_setup_line='testsuite.at:306'
+    at_desc="ucdf77"
+    $at_quiet $ECHO_N " 60: ucdf77                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "60. testsuite.at:306: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:308: test ! \\( -f ucdf77 -o -f ../../ucdf77 \\) && exit 77 || \$VALGRIND ucdf77"
+echo testsuite.at:308 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "test ! \\( -f ucdf77 -o -f ../../ucdf77 \\) && exit 77 || $VALGRIND ucdf77" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; test ! \( -f ucdf77 -o -f ../../ucdf77 \) && exit 77 || $VALGRIND ucdf77 ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; test ! \( -f ucdf77 -o -f ../../ucdf77 \) && exit 77 || $VALGRIND ucdf77 ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:308: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  banner-6 ) # Banner 6. testsuite.at:311
+    cat <<\_ATEOF
+
+Special
+
+_ATEOF
+    ;;
+
+  61 ) # 61. testsuite.at:312: silock
+    at_setup_line='testsuite.at:312'
+    at_desc="silock"
+    $at_quiet $ECHO_N " 61: silock                                         $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "61. testsuite.at:312: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:314: testsilock \`pwd\` \$STARGS"
+echo testsuite.at:314 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; testsilock `pwd` $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; testsilock `pwd` $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:314: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  62 ) # 62. testsuite.at:316: force single
+    at_setup_line='testsuite.at:316'
+    at_desc="force single"
+    $at_quiet $ECHO_N " 62: force single                                   $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "62. testsuite.at:316: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:318: specmix \$STARGS"
+echo testsuite.at:318 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "specmix $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; specmix $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; specmix $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:318: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:319: testdtypes \`pwd\` \$STARGS"
+echo testsuite.at:319 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; testdtypes `pwd` $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; testdtypes `pwd` $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:319: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  63 ) # 63. testsuite.at:321: multi_file
+    at_setup_line='testsuite.at:321'
+    at_desc="multi_file"
+    $at_quiet $ECHO_N " 63: multi_file                                     $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "63. testsuite.at:321: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:323: \$VALGRIND multi_file \$STARGS"
+echo testsuite.at:323 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND multi_file $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND multi_file $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND multi_file $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:323: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  64 ) # 64. testsuite.at:325: testall -medium
+    at_setup_line='testsuite.at:325'
+    at_desc="testall -medium"
+    $at_quiet $ECHO_N " 64: testall -medium                                $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "64. testsuite.at:325: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:327: \$VALGRIND testall -medium \$STARGS"
+echo testsuite.at:327 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND testall -medium $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND testall -medium $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND testall -medium $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:327: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+  65 ) # 65. testsuite.at:329: testall -large
+    at_setup_line='testsuite.at:329'
+    at_desc="testall -large"
+    $at_quiet $ECHO_N " 65: testall -large                                 $ECHO_C"
+    at_xfail=no
+    echo "#                             -*- compilation -*-" >> "$at_group_log"
+    (
+      echo "65. testsuite.at:329: testing ..."
+      $at_traceon
+
+
+$at_traceoff
+echo "$at_srcdir/testsuite.at:331: \$VALGRIND testall -large \$STARGS"
+echo testsuite.at:331 >"$at_check_line_file"
+
+at_trace_this=
+if test -n "$at_traceon"; then
+    case "$VALGRIND testall -large $STARGS" in
+        *'
+'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
+ *) at_trace_this=yes ;;
+    esac
+fi
+
+if test -n "$at_trace_this"; then
+    ( $at_traceon; $VALGRIND testall -large $STARGS ) >"$at_stdout" 2>"$at_stder1"
+    at_status=$?
+    grep '^ *+' "$at_stder1" >&2
+    grep -v '^ *+' "$at_stder1" >"$at_stderr"
+else
+    ( :; $VALGRIND testall -large $STARGS ) >"$at_stdout" 2>"$at_stderr"
+    at_status=$?
+fi
+
+at_failed=false
+$at_diff "$at_devnull" "$at_stderr" || at_failed=:
+echo stdout:; cat "$at_stdout"
+case $at_status in
+   77) echo 77 > "$at_status_file"; exit 77;;
+   0) ;;
+   *) echo "$at_srcdir/testsuite.at:331: exit code was $at_status, expected 0"
+      at_failed=:;;
+esac
+if $at_failed; then
+
+
+  echo 1 > "$at_status_file"
+  exit 1
+fi
+
+$at_traceon
+
+      $at_traceoff
+      $at_times_p && times >"$at_times_file"
+    ) 5>&1 2>&1 | eval $at_tee_pipe
+    at_status=`cat "$at_status_file"`
+    ;;
+
+
+  * )
+    echo "$as_me: no such test group: $at_group" >&2
+    continue
+    ;;
+  esac
+
+  # Be sure to come back to the suite directory, in particular
+  # since below we might `rm' the group directory we are in currently.
+  cd "$at_suite_dir"
+
+  case $at_group in
+    banner-*) ;;
+    *)
+      if test ! -f "$at_check_line_file"; then
+	sed "s/^ */$as_me: warning: /" <<_ATEOF
+	A failure happened in a test group before any test could be
+	run. This means that test suite is improperly designed.  Please
+	report this failure to <visit-users at email.ornl.gov>.
+_ATEOF
+	echo "$at_setup_line" >"$at_check_line_file"
+      fi
+      at_group_count=`expr 1 + $at_group_count`
+      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
+      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
+      case $at_xfail:$at_status in
+	yes:0)
+	    at_msg="UNEXPECTED PASS"
+	    at_xpass_list="$at_xpass_list $at_group"
+	    at_errexit=$at_errexit_p
+	    ;;
+	no:0)
+	    at_msg="ok"
+	    at_pass_list="$at_pass_list $at_group"
+	    at_errexit=false
+	    ;;
+	*:77)
+	    at_msg='skipped ('`cat "$at_check_line_file"`')'
+	    at_skip_list="$at_skip_list $at_group"
+	    at_errexit=false
+	    ;;
+	yes:*)
+	    at_msg='expected failure ('`cat "$at_check_line_file"`')'
+	    at_xfail_list="$at_xfail_list $at_group"
+	    at_errexit=false
+	    ;;
+	no:*)
+	    at_msg='FAILED ('`cat "$at_check_line_file"`')'
+	    at_fail_list="$at_fail_list $at_group"
+	    at_errexit=$at_errexit_p
+	    ;;
+      esac
+      # Make sure there is a separator even with long titles.
+      echo " $at_msg"
+      at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
+      case $at_status in
+	0|77)
+	  # $at_times_file is only available if the group succeeded.
+	  # We're not including the group log, so the success message
+	  # is written in the global log separately.  But we also
+	  # write to the group log in case they're using -d.
+	  if test -f "$at_times_file"; then
+	    at_log_msg="$at_log_msg	("`sed 1d "$at_times_file"`')'
+	    rm -f "$at_times_file"
+          fi
+	  echo "$at_log_msg" >> "$at_group_log"
+	  echo "$at_log_msg" >&5
+
+	  # Cleanup the group directory, unless the user wants the files.
+	  if $at_debug_p ; then
+	    	  {
+	    echo "#! /bin/sh"
+	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
+	    echo "cd '$at_dir'"
+	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
+	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
+	    echo 'exit 1'
+	  } >$at_group_dir/run
+	  chmod +x $at_group_dir/run
+
+	  elif test -d "$at_group_dir"; then
+	    find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
+	    rm -fr "$at_group_dir"
+	  fi
+	  ;;
+	*)
+	  # Upon failure, include the log into the testsuite's global
+	  # log.  The failure message is written in the group log.  It
+	  # is later included in the global log.
+	  echo "$at_log_msg" >> "$at_group_log"
+
+	  # Upon failure, keep the group directory for autopsy, and
+	  # create the debugging script.
+	  	  {
+	    echo "#! /bin/sh"
+	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
+	    echo "cd '$at_dir'"
+	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
+	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
+	    echo 'exit 1'
+	  } >$at_group_dir/run
+	  chmod +x $at_group_dir/run
+
+	  $at_errexit && break
+	  ;;
+      esac
+      ;;
+  esac
+done
+
+# Back to the top directory.
+cd "$at_dir"
+
+# Compute the duration of the suite.
+at_stop_date=`date`
+at_stop_time=`date +%s 2>/dev/null`
+echo "$as_me: ending at: $at_stop_date" >&5
+case $at_start_time,$at_stop_time in
+  [0-9]*,[0-9]*)
+    at_duration_s=`expr $at_stop_time - $at_start_time`
+    at_duration_m=`expr $at_duration_s / 60`
+    at_duration_h=`expr $at_duration_m / 60`
+    at_duration_s=`expr $at_duration_s % 60`
+    at_duration_m=`expr $at_duration_m % 60`
+    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
+    echo "$as_me: test suite duration: $at_duration" >&5
+    ;;
+esac
+
+# Wrap up the test suite with summary statistics.
+at_skip_count=`set dummy $at_skip_list; shift; echo $#`
+at_fail_count=`set dummy $at_fail_list; shift; echo $#`
+at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
+at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
+
+at_run_count=`expr $at_group_count - $at_skip_count`
+at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
+at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
+
+echo
+cat <<\_ASBOX
+## ------------- ##
+## Test results. ##
+## ------------- ##
+_ASBOX
+echo
+{
+  echo
+  cat <<\_ASBOX
+## ------------- ##
+## Test results. ##
+## ------------- ##
+_ASBOX
+  echo
+} >&5
+
+if test $at_run_count = 1; then
+  at_result="1 test"
+  at_were=was
+else
+  at_result="$at_run_count tests"
+  at_were=were
+fi
+if $at_errexit_p && test $at_unexpected_count != 0; then
+  if test $at_xpass_count = 1; then
+    at_result="$at_result $at_were run, one passed"
+  else
+    at_result="$at_result $at_were run, one failed"
+  fi
+  at_result="$at_result unexpectedly and inhibited subsequent tests."
+else
+  # Don't you just love exponential explosion of the number of cases?
+  case $at_xpass_count:$at_fail_count:$at_xfail_count in
+    # So far, so good.
+    0:0:0) at_result="$at_result $at_were successful." ;;
+    0:0:*) at_result="$at_result behaved as expected." ;;
+
+    # Some unexpected failures
+    0:*:0) at_result="$at_result $at_were run,
+$at_fail_count failed unexpectedly." ;;
+
+    # Some failures, both expected and unexpected
+    0:*:1) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    0:*:*) at_result="$at_result $at_were run,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+
+    # No unexpected failures, but some xpasses
+    *:0:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly." ;;
+
+    # No expected failures, but failures and xpasses
+    *:1:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
+    *:*:0) at_result="$at_result $at_were run,
+$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
+
+    # All of them.
+    *:*:1) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
+    *:*:*) at_result="$at_result $at_were run,
+$at_xpass_count passed unexpectedly,
+$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
+  esac
+
+  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
+    at_result="All $at_result"
+  fi
+fi
+
+# Now put skips in the mix.
+case $at_skip_count in
+  0) ;;
+  1) at_result="$at_result
+1 test was skipped." ;;
+  *) at_result="$at_result
+$at_skip_count tests were skipped." ;;
+esac
+
+if test $at_unexpected_count = 0; then
+  echo "$at_result"
+  echo "$at_result" >&5
+else
+  echo "ERROR: $at_result" >&2
+  echo "ERROR: $at_result" >&5
+  {
+    echo
+    cat <<\_ASBOX
+## ------------------------ ##
+## Summary of the failures. ##
+## ------------------------ ##
+_ASBOX
+
+    # Summary of failed and skipped tests.
+    if test $at_fail_count != 0; then
+      echo "Failed tests:"
+      $SHELL "$0" $at_fail_list --list
+      echo
+    fi
+    if test $at_skip_count != 0; then
+      echo "Skipped tests:"
+      $SHELL "$0" $at_skip_list --list
+      echo
+    fi
+    if test $at_xpass_count != 0; then
+      echo "Unexpected passes:"
+      $SHELL "$0" $at_xpass_list --list
+      echo
+    fi
+    if test $at_fail_count != 0; then
+      cat <<\_ASBOX
+## ---------------------- ##
+## Detailed failed tests. ##
+## ---------------------- ##
+_ASBOX
+      echo
+      for at_group in $at_fail_list
+      do
+        at_group_normalized=$at_group
+
+  while :; do
+    case $at_group_normalized in #(
+    $at_format*) break;;
+    esac
+    at_group_normalized=0$at_group_normalized
+  done
+
+        cat "$at_suite_dir/$at_group_normalized/$as_me.log"
+        echo
+      done
+      echo
+    fi
+    if test -n "$at_top_srcdir"; then
+      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## ${at_top_build_prefix}config.log ##
+_ASBOX
+      sed 's/^/| /' ${at_top_build_prefix}config.log
+      echo
+    fi
+  } >&5
+
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## $as_me.log was created. ##
+_ASBOX
+
+  echo
+  echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
+  echo
+  echo "   To: <visit-users at email.ornl.gov>"
+  echo "   Subject: [silo 4.8] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
+  echo
+  if test $at_debug_p = false; then
+    echo
+    echo 'You may investigate any problem if you feel able to do so, in which'
+    echo 'case the test suite provides a good starting point.  Its output may'
+    echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
+    echo
+  fi
+    exit 1
+fi
+
+exit 0
+
+
+
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644
index 0000000..c53a306
--- /dev/null
+++ b/tests/testsuite.at
@@ -0,0 +1,341 @@
+#!/bin/sh
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+# Testsuite for Silo
+AT_INIT(VALGRIND="$VALGRIND" STARGS="$STARGS")
+AT_COPYRIGHT([This work was performed under the auspices of 
+the U.S. Department of Energy by 
+Lawrence Livermore National Laboratory 
+in part under Contract W-7405-Eng-48 and 
+in part under Contract DE-AC52-07NA27344.])
+
+AT_BANNER(Non-driver-specific)
+AT_SETUP(version)
+AT_DATA(expout,
+This version of Silo is greater than or equal to 4.6
+This version of Silo is NOT greater than or equal to 90.5.2
+DBVersion() returns "AT_PACKAGE_VERSION"
+DBVersionGE(4,6,0) returns 1
+DBVersionGE(90,5,2) returns 0
+On file handle returned from DBCreate...
+    DBFileVersion() returns "AT_PACKAGE_VERSION"
+    DBFileVersionGE(4,6,0) returns 1
+    DBFileVersionGE(90,5,2) returns 0
+On file handle returned from DBOpen...
+    DBFileVersion() returns "AT_PACKAGE_VERSION"
+    DBFileVersionGE(4,6,0) returns 1
+    DBFileVersionGE(90,5,2) returns 0
+On old silo file handle returned from DBOpen...
+    DBFileVersion() returns "unknown; 4.5 or older"
+    DBFileVersionGE(3,0,0) returns -1
+    DBFileVersionGE(4,6,0) returns 0
+    DBFileVersionGE(90,5,2) returns 0
+)
+AT_CHECK($VALGRIND version $STARGS,,expout,ignore)
+AT_CLEANUP
+AT_SETUP(namescheme)
+AT_CHECK($VALGRIND namescheme,,ignore)
+AT_CLEANUP
+AT_SETUP(point)
+AT_CHECK($VALGRIND point $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(extface)
+AT_CHECK($VALGRIND extface $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(testall -small)
+AT_CHECK($VALGRIND testall -small $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(TestReadMask) # needs files generated by other execs 
+AT_CHECK(extface $STARGS,,ignore) # don't valgrind these intermediate parts
+AT_CHECK(point $STARGS,,ignore)
+AT_CHECK(testall -small $STARGS,,ignore)
+AT_CHECK($VALGRIND TestReadMask $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(array)
+AT_CHECK($VALGRIND array $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(multi_test)
+AT_CHECK($VALGRIND multi_test $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(multi_test earlyclose)
+AT_CHECK($VALGRIND multi_test earlyclose $STARGS,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(partial_io)
+AT_CHECK($VALGRIND partial_io $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(simple)
+AT_CHECK($VALGRIND simple $STARGS,0,ignore)
+AT_CLEANUP
+AT_SETUP(ucd)
+AT_CHECK($VALGRIND ucd $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(ucdsamp3)
+AT_CHECK($VALGRIND ucdsamp3 $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(testall -small -fortran)
+AT_CHECK($VALGRIND testall -small -fortran $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(obj)
+AT_CHECK($VALGRIND obj $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(onehex)
+AT_CHECK($VALGRIND onehex $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(oneprism)
+AT_CHECK($VALGRIND oneprism $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(onepyramid)
+AT_CHECK($VALGRIND onepyramid $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(onetet)
+AT_CHECK($VALGRIND onetet $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(subhex)
+AT_CHECK($VALGRIND subhex $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(twohex)
+AT_CHECK($VALGRIND twohex $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(multispec)
+AT_CHECK($VALGRIND multispec $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(sami)
+AT_CHECK($VALGRIND sami $STARGS,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(specmix)
+AT_CHECK($VALGRIND specmix $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(spec)
+AT_CHECK($VALGRIND spec $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(group_test)
+AT_CHECK($VALGRIND group_test 0 0 0 $STARGS,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(listtypes)
+AT_CHECK($VALGRIND ucd $STARGS,,ignore)
+AT_CHECK(test -z "$STARGS" && $VALGRIND listtypes ucd.pdb || $VALGRIND listtypes ucd.h5,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(alltypes)
+AT_CHECK($VALGRIND alltypes $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(wave)
+AT_CHECK($VALGRIND wave $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(polyzl)
+AT_CHECK($VALGRIND polyzl $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(csg)
+AT_CHECK($VALGRIND csg $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(rocket)
+AT_CHECK($VALGRIND rocket $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(mmadjacency)
+AT_CHECK($VALGRIND mmadjacency $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(mat3d_3across)
+AT_CHECK($VALGRIND mat3d_3across $STARGS)
+AT_CLEANUP
+AT_SETUP(ucd1d)
+AT_CHECK($VALGRIND ucd1d $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(dir)
+AT_CHECK($VALGRIND dir $STARGS,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(quad)
+AT_CHECK($VALGRIND quad $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(arbpoly2d)
+AT_CHECK($VALGRIND arbpoly2d $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(readstuff) # needs data file from multi_test
+AT_CHECK(multi_test $STARGS,,ignore) # don't valgrind these intermediate parts
+AT_CHECK($VALGRIND readstuff $STARGS,ignore,ignore)
+AT_CLEANUP
+
+AT_BANNER(pythonmodule)
+AT_SETUP(read)
+AT_KEYWORDS(python)
+AT_CHECK(multi_test $STARGS hdf-friendly,,ignore) # generate data for python tests
+AT_CHECK(test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_read.py,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(write)
+AT_KEYWORDS(python)
+AT_DATA(expout,[toc=nvar = 12
+var_names = (_fileinfo, _silolibinfo, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8)
+ndir = 1
+dir_names = (a)
+
+t2='hello'
+t6= (1.2, 10.199999999999999)
+a/t8='x2'
+t9=x3
+/t5= (1.2, 10.0)
+])
+AT_CHECK(test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_write.py,,expout,ignore)
+AT_CLEANUP
+AT_SETUP(error handling)
+AT_KEYWORDS(python)
+AT_CHECK(multi_test $STARGS hdf-friendly,,ignore) # generate data for python tests
+AT_CHECK(test -z "$PYTHON" && exit 77 || env PYTHONPATH=../../../tools/python/.libs $PYTHON ../../test_error.py,,ignore,ignore)
+AT_CLEANUP
+
+AT_BANNER(PDB Specific)
+AT_SETUP(testpdb)
+AT_CHECK(test "$STARGS" = DB_HDF5 && exit 77 || $VALGRIND testpdb,ignore,ignore)
+AT_CLEANUP
+
+AT_BANNER(HDF5 Specific)
+AT_SETUP(grab)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND grab,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(compression gzip)
+AT_KEYWORDS(compression)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression gzip,,ignore,ignore)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(compression szip)
+AT_KEYWORDS(compression)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression szip,,ignore,ignore)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(compression fpzip)
+AT_KEYWORDS(compression)
+AT_CHECK(test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression fpzip,,ignore,ignore)
+AT_CHECK(test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(compression lossy3)
+AT_KEYWORDS(compression)
+AT_CHECK(test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression lossy3,,ignore,ignore)
+AT_CHECK(test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression readonly,50,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(compression minratio1000)
+AT_KEYWORDS(compression)
+AT_CHECK(test ! \( -e ../src/fpzip/read.o -o -e ../../../src/fpzip/read.o \) -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND compression minratio1000,1,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(testhzip)
+AT_KEYWORDS(compression)
+AT_CHECK(test ! \( -e ../src/hzip/hzutil.o -o -e ../../../src/hzip/hzutil.o \) -o -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testhzip `pwd`,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(checksums)
+AT_CHECK(test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND checksums `pwd`,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(xversion)
+AT_CHECK(test -z "$BROWSER" -o "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND testxvers `pwd`,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(largefile)
+AT_KEYWORDS(large)
+AT_CHECK(test "$STARGS" != DB_HDF5 && exit 77 || $VALGRIND largefile,,ignore,ignore)
+AT_CLEANUP
+
+AT_BANNER(Fortran)
+AT_SETUP(arrayf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f arrayf77 -o -f ../../arrayf77 \) && exit 77 || $VALGRIND arrayf77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(curvef77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f curvef77 -o -f ../../curvef77 \) && exit 77 || $VALGRIND curvef77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(matf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f matf77 -o -f ../../matf77 \) && exit 77 || $VALGRIND matf77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(pointf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f pointf77 -o -f ../../pointf77 \) && exit 77 || $VALGRIND pointf77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(quadf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f quadf77 -o -f ../../quadf77 \) && exit 77 || $VALGRIND quadf77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(testallf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f testallf77 -o -f ../../testallf77 \) && exit 77 || $VALGRIND testallf77,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(ucdf77)
+AT_KEYWORDS(fortran)
+AT_CHECK(test ! \( -f ucdf77 -o -f ../../ucdf77 \) && exit 77 || $VALGRIND ucdf77,,ignore,ignore)
+AT_CLEANUP
+
+AT_BANNER(Special)
+AT_SETUP(silock)
+AT_KEYWORDS(tools)
+AT_CHECK(testsilock `pwd` $STARGS,,ignore,ignore)
+AT_CLEANUP
+AT_SETUP(force single)
+AT_KEYWORDS(conversions)
+AT_CHECK(specmix $STARGS,,ignore)
+AT_CHECK(testdtypes `pwd` $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(multi_file)
+AT_KEYWORDS(large)
+AT_CHECK($VALGRIND multi_file $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(testall -medium)
+AT_KEYWORDS(large)
+AT_CHECK($VALGRIND testall -medium $STARGS,,ignore)
+AT_CLEANUP
+AT_SETUP(testall -large)
+AT_KEYWORDS(large)
+AT_CHECK($VALGRIND testall -large $STARGS,,ignore)
+AT_CLEANUP
+#AT_SETUP(cpz1plt)
+#AT_CHECK($VALGRIND cpz1plt $STARGS)   # Fails with: Missing input file "z1plt", cannot continue.
+#AT_CLEANUP
+#AT_SETUP(resample)
+#AT_CHECK($VALGRIND resample $STARGS) # mpi test, mpirun
+#AT_CLEANUP
+#AT_SETUP(merge_block)
+#AT_CHECK($VALGRIND merge_block $STARGS) # requires arguments
+#AT_CLEANUP
diff --git a/tests/testxvers b/tests/testxvers
new file mode 100755
index 0000000..c01d0e7
--- /dev/null
+++ b/tests/testxvers
@@ -0,0 +1,127 @@
+#!/bin/sh -x
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+# -----------------------------------------------------------------------------
+# Test interversion file format compatibility of HDF5
+#
+# Programmer: Mark C. Miller
+# Creation:   July 21, 2008
+#
+# -----------------------------------------------------------------------------
+
+difffiles () {
+    for df in multi_*.h5; do
+        bf=`basename $df .h5`
+        # do a diff on the files
+        rm -f testxvers.out
+        $topDir/../tools/browser/browser -q -e diff $df $topDir/xvers_data/${bf}_$1 1>testxvers.out 2>&1
+        if test `wc -l testxvers.out | tr -s ' ' | cut -d' ' -f2` -gt 20; then
+            return 1
+            break
+        fi
+    done
+}
+
+# Diddle the the directory because Autotest is not at all designed to handle
+# tests the way this one was written
+if test -n "$1"; then
+    topDir=$1
+    if test -e $topDir/../../multi_test; then
+        topDir=$1/../..
+    fi
+else
+    topDir=.
+fi
+
+#
+# Create data with no special features 
+#
+$topDir/multi_test DB_HDF5 1>/dev/null 2>&1
+
+#
+# Figure out minor version num of HDF5 used to create the current data
+#
+vmin=`$topDir/../tools/browser/browser -e _hdf5libinfo multi_ucd3d.h5 2>/dev/null | grep hdf5 | cut -d'-' -f2 | cut -d'.' -f2`
+if test $vmin -eq 6; then
+    vtest=8
+elif test $vmin -eq 8; then
+    vtest=6
+else
+    echo "Did not find expected hdf5 minor version number"
+    exit 1
+fi
+
+#
+# Uncompress and untar data files from specific versions of HDF5
+#
+which bunzip2 1>/dev/null 2>&1
+test $? -eq 0 || exit 1
+bunzip2 < $topDir/xvers_data.tar.bz2 | tar xf -
+
+#
+# Now, run browser and make sure we don't get any errors in the diff
+#
+result=0
+test $result -gt 0 || difffiles v1${vtest}.h5
+result=$?
+test $result -gt 0 || difffiles v1${vtest}ck.h5
+result=$?
+test $result -gt 0 || difffiles v1${vtest}fpz.h5
+result=$?
+
+#
+# Cleanup
+#
+rm -f testxvers.out
+rm -rf $topDir/xvers_data
+
+exit $result 
diff --git a/tests/twohex.c b/tests/twohex.c
new file mode 100644
index 0000000..aab1948
--- /dev/null
+++ b/tests/twohex.c
@@ -0,0 +1,287 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+#include <silo.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <std.c>
+
+#define IND(i,j) i-1][j-1
+
+#define matrix_assign(matrix,a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44)         \
+   {                                                                          \
+   matrix [IND(1,1)] = a11 ;                                              \
+   matrix [IND(1,2)] = a12 ;                                              \
+   matrix [IND(1,3)] = a13 ;                                              \
+   matrix [IND(1,4)] = a14 ;                                              \
+   matrix [IND(2,1)] = a21 ;                                              \
+   matrix [IND(2,2)] = a22 ;                                              \
+   matrix [IND(2,3)] = a23 ;                                              \
+   matrix [IND(2,4)] = a24 ;                                              \
+   matrix [IND(3,1)] = a31 ;                                              \
+   matrix [IND(3,2)] = a32 ;                                              \
+   matrix [IND(3,3)] = a33 ;                                              \
+   matrix [IND(3,4)] = a34 ;                                              \
+   matrix [IND(4,1)] = a41 ;                                              \
+   matrix [IND(4,2)] = a42 ;                                              \
+   matrix [IND(4,3)] = a43 ;                                              \
+   matrix [IND(4,4)] = a44 ;                                              \
+   }
+
+#define matrix_mult(matrixa, matrixb, matrixc)                                \
+   {                                                                          \
+   for (i = 1; i < 5; i++) {                                                  \
+      for (j = 1; j < 5; j++) {                                               \
+         matrixc [IND(i,j)] = matrixa [IND(i,1)] * matrixb [IND(1,j)] + \
+                                  matrixa [IND(i,2)] * matrixb [IND(2,j)] + \
+                                  matrixa [IND(i,3)] * matrixb [IND(3,j)] + \
+                                  matrixa [IND(i,4)] * matrixb [IND(4,j)] ; \
+         }                                                                    \
+      }                                                                       \
+   }
+#ifndef M_PI        /* yea, Solaris 5 */
+#define M_PI        3.14159265358979323846264338327950288   /* pi */
+#endif
+#define RAD(deg)    M_PI*(deg/180.0)
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    DBfile         *dbfile = NULL;
+    char           *coordnames[3];
+    float          *coords[3];
+    int             nodelist[16];
+    float           x[12], y[12], z[12];
+    int             shapesize[1];
+    int             shapecnt[1];
+    DBfacelist     *facelist = NULL;
+    int             i, j, len;
+    char            mesh_command[256];
+    float           rot1[4][4], rot2[4][4], final[4][4];
+    float           angle;
+    float           var[12];
+    int		    driver=DB_PDB;
+    char	   *filename="twohex.silo";
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "twohex.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "twohex.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, DB_CLOBBER, DB_LOCAL, "3D ucd hex", driver);
+
+    coordnames[0] = "xcoords";
+    coordnames[1] = "ycoords";
+    coordnames[2] = "zcoords";
+
+    /*
+     * The coordinates of the 12 nodes...
+     */
+
+    x[0]  = 0; y[0]  = 0; z[0]  = 0;
+    x[1]  = 1; y[1]  = 0; z[1]  = 0;
+    x[2]  = 1; y[2]  = 0; z[2]  = 1;
+    x[3]  = 0; y[3]  = 0; z[3]  = 1;
+    x[4]  = 0; y[4]  = 1; z[4]  = 0;
+    x[5]  = 1; y[5]  = 1; z[5]  = 0;
+    x[6]  = 1; y[6]  = 1; z[6]  = 1;
+    x[7]  = 0; y[7]  = 1; z[7]  = 1;
+
+    x[8]  = 2; y[8]  = 0; z[8]  = 0;
+    x[9]  = 2; y[9]  = 0; z[9]  = 1;
+    x[10] = 2; y[10] = 1; z[10] = 0;
+    x[11] = 2; y[11] = 1; z[11] = 1;
+
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+
+    angle = 45;
+    angle = M_PI*(angle/180.0);
+    matrix_assign(rot1,
+                  1, 0, 0, 0,
+                  0, cos(angle), sin(angle), 0,
+                  0, -sin(angle), cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_assign(rot2,
+                  cos(angle), 0, -sin(angle), 0,
+                  0, 1, 0, 0,
+                  sin(angle), 0, cos(angle), 0,
+                  0, 0, 0, 1);
+    matrix_mult(rot1, rot2, final);
+
+    for (i = 0; i < 12; i++)
+    {
+        float           tx, ty,tz;
+
+        tx = x[i]*final[IND(1,1)] + y[i]*final[IND(1,2)] + z[i]*final[IND(1,3)] + final[IND(1,4)];
+        ty = x[i]*final[IND(2,1)] + y[i]*final[IND(2,2)] + z[i]*final[IND(2,3)] + final[IND(2,4)];
+        tz = x[i]*final[IND(3,1)] + y[i]*final[IND(3,2)] + z[i]*final[IND(3,3)] + final[IND(3,4)];
+
+        x[i] = tx;
+        y[i] = ty;
+        z[i] = tz;
+
+        var[i] = x[i]+y[i]*z[i];
+    }
+
+    nodelist[ 0] =  0;	/* The first hex */
+    nodelist[ 1] =  1;
+    nodelist[ 2] =  2;
+    nodelist[ 3] =  3;
+    nodelist[ 4] =  4;
+    nodelist[ 5] =  5;
+    nodelist[ 6] =  6;
+    nodelist[ 7] =  7;
+
+    nodelist[ 8] =  1;	/* The second hex */
+    nodelist[ 9] =  8;
+    nodelist[10] =  9;
+    nodelist[11] =  2;
+    nodelist[12] =  5;
+    nodelist[13] = 10;
+    nodelist[14] = 11;
+    nodelist[15] =  6;
+
+    shapecnt[0]  = 2;	/* There are 2... */
+    shapesize[0] = 8;	/* ...hexes */
+
+
+    DBSetDeprecateWarnings(0);
+    DBPutZonelist(dbfile, "zonelist", 2, 3, nodelist, 12, 0, shapesize,
+                  shapecnt, 1);
+    DBSetDeprecateWarnings(3);
+
+    facelist = DBCalcExternalFacelist(nodelist, 12, 0, shapesize, shapecnt, 1,
+                                      NULL, 0);
+
+    DBPutFacelist(dbfile, "facelist", facelist->nfaces, facelist->ndims,
+               facelist->nodelist, facelist->lnodelist, facelist->origin,
+               facelist->zoneno, facelist->shapesize, facelist->shapecnt,
+                  facelist->nshapes, facelist->types, facelist->typelist,
+                  facelist->ntypes);
+
+    DBPutUcdmesh(dbfile, "hex", 3, coordnames, coords, 12, 2, "zonelist",
+                 "facelist", DB_FLOAT, NULL);
+
+    DBPutUcdvar1(dbfile, "v", "hex", var, 12, NULL, 0, DB_FLOAT, DB_NODECENT,
+                 NULL);
+
+    sprintf(mesh_command, "mesh hex; contour v");
+    len = strlen(mesh_command) + 1;
+    DBWrite(dbfile, "_meshtvinfo", mesh_command, &len, 1, DB_CHAR);
+
+    DBClose(dbfile);
+
+    dbfile = DBOpen(filename, driver, DB_READ);
+    {
+       char tmpname[256];
+       int i;
+       DBucdmesh *mesh;
+
+       if (DBInqVarExists(dbfile, "v"))
+          printf("Found field \"v\"\n");
+
+       if (DBInqMeshname(dbfile, "v", tmpname))
+          printf("Found that field \"v\" lives on mesh %s\n", tmpname);
+
+       mesh = DBGetUcdmesh(dbfile, "hex");
+       if (mesh == NULL)
+          printf("couldn't read the mesh\n");
+
+       printf("zones nodelist\n");
+       for (i = 0; i < mesh->zones->lnodelist; i++)
+          printf("%d ", mesh->zones->nodelist[i]);
+       printf("\n");
+
+       printf("faces nodelist\n");
+       for (i = 0; i < mesh->faces->lnodelist; i++)
+          printf("%d ", mesh->faces->nodelist[i]);
+       printf("\n");
+
+       DBFreeUcdmesh(mesh);
+    }
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return (0);
+}
diff --git a/tests/ucd.c b/tests/ucd.c
new file mode 100644
index 0000000..13e6e24
--- /dev/null
+++ b/tests/ucd.c
@@ -0,0 +1,306 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>     /* For exit()   */
+#include <string.h>     /* For strcmp() */
+#include "silo.h"
+#include <std.c>
+
+static void build_ucd(DBfile *dbfile, char *name);
+
+

+/*-------------------------------------------------------------------------
+ * Function:	main
+ *
+ * Purpose:	
+ *
+ * Return:	0
+ *
+ * Programmer:	
+ *
+ * Modifications:
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ *
+ *  Lisa J. Roberts, Fri Apr  7 10:40:49 PDT 2000
+ *  Removed db and name, which were unused.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    int		i, driver = DB_PDB;
+    char	*filename = "ucd.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "ucd.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "ucd.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+    
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "ucd test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+    build_ucd(dbfile, "ucdmesh");
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    return 0;
+}
+
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_ucd
+ *
+ *  Purpose
+ *
+ *      Build ucd-mesh, ucd-var, facelist and zonelist, and return
+ *      the mesh ID.
+ *
+ * Modifications
+ *
+ *     Lisa J. Roberts, Fri Apr  7 10:41:47 PDT 2000
+ *     Removed dbid, dfnew, flid, zlid, meshid, varid, and matid, which
+ *     were unused.
+ *
+ *--------------------------------------------------------------------*/
+static void
+build_ucd(DBfile *dbfile, char *name)
+{
+#define NMATS   2
+#define NZONES  6
+#define NFACES  10
+#define NNODES  12
+#define MAXMIX  12
+#define MAXOMIX 4
+#define NZSHAPES 1
+#define NFSHAPES 1
+#define NFTYPES  0
+#define LZNODELIST 24
+#define LFNODELIST 20
+
+   /*----------------------------------------------------------------------
+       The test mesh looks like this:
+
+        3.      |       0       4       8
+                |
+        2.      |       1       5       9
+                |
+        1.      |       2       6       10
+                |
+                |       3       7       11
+        0.      ---------------------------
+
+                        0.      .5      1.
+     *---------------------------------------------------------------------*/
+
+    int            i;
+
+    /* Default model for material data */
+    static int     matlist[NZONES] = {1, -1, 2, 1, -3, 2};
+    static int     matnos[NMATS] = {1, 2};
+    static float   mix_vf[MAXMIX] = {.6, .4, .8, .2};
+    static int     mix_next[MAXMIX] = {2, 0, 4, 0};
+    static int     mix_mat[MAXMIX] = {1, 2, 1, 2};
+    static int     mix_zone[MAXMIX] = {0, 0, 3, 3};
+
+    /* OTHER model for material data */
+#if 0
+    static int     imatlist[NZONES] = {1, 0, 2, 1, 0, 2};
+    static int     nmix[NMATS] = {2, 2};
+    static int     mixedels[MAXMIX] = {1, 4, 1, 4};
+#endif
+
+    static float   x[NNODES] = {9., 9., 9., 9., 10., 10., 10., 10., 11., 11.,
+                                11., 11.};
+    static float   y[NNODES] = {3., 2., 1., 0., 3., 2., 1., 0., 3., 2., 1.,
+                                0.};
+    static float   u[NNODES] = {0., .5, 1., 0., .5, 1., 0., .5, 1., 0., .5,
+                                1.};
+    static float   v[NNODES] = {0., .5, 1., 0., .5, 1., 0., .5, 1., 0., .5,
+                                1.};
+    static float   d[NZONES] = {2., 4., 6., 8., 10., 12.};
+#if 0
+    static float   df[MAXOMIX] = {.58, .78, .42, .22};
+    static float   vf[MAXOMIX] = {.4, .45, .6, .55};
+#endif
+
+    static int     fnodelist[LFNODELIST] = {0, 1, 1, 2, 2, 3, 3, 7, 7, 11, 11,
+                                            10, 10, 9, 9, 8, 8, 4, 4, 0};
+    static int     znodelist[LZNODELIST] = {0, 1, 5, 4, 4, 5, 9, 8, 1, 2, 6, 5,
+                                            5, 6, 10, 9, 2, 3, 7, 6, 6, 7, 11,
+                                            10};
+
+    int            fshapesize, fshapecnt, zshapesize, zshapecnt;
+    int            idatatype, mixlen;
+    int            dims;
+#if 0
+    int            tcycle = 200;
+    double         ttime = 2.345;
+#endif
+
+    float         *coords[3], *vars[8];
+    char          *coordnames[3], *varnames[8];
+
+    fshapesize = 2;
+    fshapecnt = NFACES;
+    zshapesize = 4;
+    zshapecnt = NZONES;
+
+    idatatype = DB_FLOAT;
+    mixlen = MAXMIX;
+
+    coords[0] = x;
+    coords[1] = y;
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    vars[0] = d;
+    varnames[0] = "d";
+
+    (void)DBPutFacelist(dbfile, "fl", NFACES, 2, fnodelist, LFNODELIST, 0,
+                        NULL, &fshapesize, &fshapecnt, NFSHAPES,
+                        NULL, NULL, 0);
+
+    DBSetDeprecateWarnings(0);
+    (void)DBPutZonelist(dbfile, "zl", NZONES, 2, znodelist, LZNODELIST, 0,
+                        &zshapesize, &zshapecnt, NZSHAPES);
+    DBSetDeprecateWarnings(3);
+
+    (void)DBPutUcdmesh(dbfile, name, 2, coordnames, coords,
+                       NNODES, NZONES, "zl", NULL, DB_FLOAT, NULL);
+
+    vars[0] = d;
+    varnames[0] = "d";
+
+    for (i = 0; i < 30; i++) {
+        char           vname[16];
+
+        sprintf(vname, "d%d", i);
+
+        (void)DBPutUcdvar1(dbfile, vname, name, vars[0], NZONES,
+                           NULL, 0, idatatype, DB_ZONECENT, NULL);
+    }
+
+    vars[0] = u;
+    varnames[0] = "u";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = v;
+    varnames[0] = "v";
+
+    (void)DBPutUcdvar(dbfile, varnames[0], name, 1, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    vars[0] = u;
+    varnames[0] = "ucomp";
+    vars[1] = v;
+    varnames[1] = "vcomp";
+
+    (void)DBPutUcdvar(dbfile, "velocity", name, 2, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    /* test writing more than 2 or 3 component variable */
+    vars[0] = d;
+    varnames[0] = "dcompm";
+    vars[1] = u;
+    varnames[1] = "ucompm";
+    vars[2] = v;
+    varnames[2] = "vcompm";
+    vars[3] = d;
+    varnames[3] = "dcompm_copy";
+    vars[4] = u;
+    varnames[4] = "ucompm_copy";
+    vars[5] = v;
+    varnames[5] = "vcompm_copy";
+
+    (void)DBPutUcdvar(dbfile, "many_comps", name, 6, varnames, vars, NNODES,
+                      NULL, 0, idatatype, DB_NODECENT, NULL);
+
+
+    dims = NZONES;
+
+    (void)DBPutMaterial(dbfile, "material", name, NMATS, matnos,
+                        matlist, &dims, 1, mix_next, mix_mat, mix_zone,
+                        mix_vf, mixlen, DB_FLOAT, NULL);
+#if 0
+    mixlen = -99;
+
+    for (i = 0; i < MAXMIX; i++) {
+        mix_mat[i] = -99;
+        mix_next[i] = -99;
+        mix_zone[i] = -99;
+        mix_vf[i] = -99.;
+    }
+
+    DBConvertMat(NMATS, NZONES, nmix, mixedels, imatlist, matnos, vf, DB_FLOAT,
+                 &mixlen, matlist, mix_next, mix_mat, mix_zone, mix_vf);
+
+    (void)DBPutMaterial(dbfile, "material", name, matnos, NMATS,
+                        matlist, &dims, 1, mix_next, mix_mat, mix_zone,
+                        mix_vf, mixlen, DB_FLOAT, NULL);
+#endif
+}
diff --git a/tests/ucd1d.c b/tests/ucd1d.c
new file mode 100644
index 0000000..7b381df
--- /dev/null
+++ b/tests/ucd1d.c
@@ -0,0 +1,209 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+States Government  nor Lawrence  Livermore National Security,  LLC nor
+any of  their employees,  makes any warranty,  express or  implied, or
+assumes   any   liability   or   responsibility  for   the   accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process  disclosed, or  represents  that its  use  would not  infringe
+privately-owned   rights.  Any  reference   herein  to   any  specific
+commercial products,  process, or  services by trade  name, trademark,
+manufacturer or otherwise does not necessarily constitute or imply its
+endorsement,  recommendation,   or  favoring  by   the  United  States
+Government or Lawrence Livermore National Security, LLC. The views and
+opinions  of authors  expressed  herein do  not  necessarily state  or
+reflect those  of the United  States Government or  Lawrence Livermore
+National  Security, LLC,  and shall  not  be used  for advertising  or
+product endorsement purposes.
+*/
+/*------------------------------------------------------------------------
+ * ucd1d.c -- 1-dimensional UCD meshes in 3D space
+ *
+ * Programmer:  Jeremy Meredith, June 16, 2000
+ *
+ *  This test case creates a series of 1D zones ("BEAM"s) over coordinates
+ *  of a 3D UCD mesh.
+ *
+ * Modifications:
+ *   Mark C. Miller, Mon Aug 31 21:09:38 PDT 2009
+ *   Added 'reorder' option to test browser's differencing. Added a
+ *   option to turn on friendly hdf5 names.
+ *-----------------------------------------------------------------------*/
+#include <math.h>
+#include <silo.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <std.c>
+
+int main(int argc, char **argv)
+{
+    float x[1000],y[1000],z[1000];
+    float *coords[3];
+
+    int nodelist[2000];
+    int zoneno[1000];
+
+    int shapetype[1] = {DB_ZONETYPE_BEAM};
+    int shapesize[1] = {2};
+    int shapecnt[1]; /* fill this in later after we count the zones */
+    int nzones = 0;
+    int nnodes = 0;
+    int l;
+
+    float zval[1000];
+    float nval[1000];
+
+    DBfile *db;
+    int i,j, driver = DB_PDB, reorder = 0, friendly = 0;
+    char          *filename = "ucd1d.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "ucd1d.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "ucd1d.h5";
+        } else if (!strcmp(argv[i], "reorder")) {
+            reorder = 1;
+        } else if (!strcmp(argv[i], "friendly")) {
+            friendly = 1;
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    /* Create the coordinate arrays and the nodal variable */
+    for (i=0; i<30; i++)
+    {
+        for (j=0; j<=30; j++)
+        {
+            x[i*31+j] = (float)i-14.5;
+            y[i*31+j] = sin(2*M_PI*(float)j/30)*5;
+            z[i*31+j] = cos(2*M_PI*(float)j/30)*5;
+
+            nval[nnodes] = sqrt(x[i*31+j]*x[i*31+j]*.2 + 
+                                y[i*31+j]*y[i*31+j]*.5 +
+                                z[i*31+j]*z[i*31+j]*1.);
+
+            nnodes++;
+        }
+    }
+    if (reorder)
+    {
+        float tmp = nval[0];
+        nval[0] = nval[1];
+        nval[1] = tmp;
+    }
+    coords[0]=x;
+    coords[1]=y;
+    coords[2]=z;
+
+    /* Create the connectivity arrays and teh zonal variable */
+    l=0;
+    for (i=0; i<30; i++)
+    {
+        for (j=0; j<30; j++)
+        {
+            if (! (abs(i-j)<5 || abs(i-j+30)<5 || abs(i-j-30)<5))
+            {
+                nodelist[l++] = (i*31 + j);
+                nodelist[l++] = (i*31 + j+1);
+                zoneno[nzones]=nzones;
+
+                zval[nzones] = i+j;
+
+                nzones++;
+            }
+        }
+    }
+    if (reorder)
+    {
+        float tmp = zval[nzones-1];
+        zval[nzones-1] = zval[nzones-2];
+        zval[nzones-2] = tmp;
+    }
+    shapecnt[0] = nzones;
+
+
+    if (friendly && (driver&0xF) == DB_HDF5)
+        DBSetFriendlyHDF5Names(1);
+
+    /* Write out the mesh */
+    printf("Creating test file: \"%s\".\n", filename);
+    db = DBCreate(filename, DB_CLOBBER, DB_LOCAL,
+                  "UCD mesh test", driver);
+
+
+    DBPutUcdmesh(db,"mesh",3,
+                 NULL, coords,
+                 nnodes, nzones,
+                 NULL, "fl",
+                 DB_FLOAT, NULL);
+
+    DBPutFacelist(db,"fl",nzones,3,
+                  nodelist,l,
+                  0, zoneno,
+                  shapesize,shapecnt, 1, 
+                  NULL,NULL,0);
+
+    if (reorder)
+    {
+        DBPutUcdvar1(db, "nval", "mesh", nval, nnodes, NULL,0,
+            DB_FLOAT, DB_NODECENT, NULL);
+
+        DBPutUcdvar1(db, "zval", "mesh", zval, nzones, NULL,0,
+            DB_FLOAT, DB_ZONECENT, NULL);
+    }
+    else
+    {
+        DBPutUcdvar1(db, "zval", "mesh", zval, nzones, NULL,0,
+            DB_FLOAT, DB_ZONECENT, NULL);
+
+        DBPutUcdvar1(db, "nval", "mesh", nval, nnodes, NULL,0,
+            DB_FLOAT, DB_NODECENT, NULL);
+    }
+
+    DBClose(db);
+    CleanupDriverStuff();
+    return(0);   
+}
diff --git a/tests/ucdf77.f b/tests/ucdf77.f
new file mode 100644
index 0000000..a6c7d81
--- /dev/null
+++ b/tests/ucdf77.f
@@ -0,0 +1,257 @@
+************************************************************************
+* Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+* LLNL-CODE-425250.
+* All rights reserved.
+* 
+* This file is part of Silo. For details, see silo.llnl.gov.
+* 
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 
+*    * Redistributions of source code must retain the above copyright
+*      notice, this list of conditions and the disclaimer below.
+*    * Redistributions in binary form must reproduce the above copyright
+*      notice, this list of conditions and the disclaimer (as noted
+*      below) in the documentation and/or other materials provided with
+*      the distribution.
+*    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+* LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+* 
+* This work was produced at Lawrence Livermore National Laboratory under
+* Contract No.  DE-AC52-07NA27344 with the DOE.
+* 
+* Neither the  United States Government nor  Lawrence Livermore National
+* Security, LLC nor any of  their employees, makes any warranty, express
+* or  implied,  or  assumes  any  liability or  responsibility  for  the
+* accuracy, completeness,  or usefulness of  any information, apparatus,
+* product, or  process disclosed, or  represents that its use  would not
+* infringe privately-owned rights.
+* 
+* Any reference herein to  any specific commercial products, process, or
+* services by trade name,  trademark, manufacturer or otherwise does not
+* necessarily  constitute or imply  its endorsement,  recommendation, or
+* favoring  by  the  United  States  Government  or  Lawrence  Livermore
+* National Security,  LLC. The views  and opinions of  authors expressed
+* herein do not necessarily state  or reflect those of the United States
+* Government or Lawrence Livermore National Security, LLC, and shall not
+* be used for advertising or product endorsement purposes.
+************************************************************************
+
+c---------------------------------------------------------------------
+c  Purpose
+c
+c     Demonstrate use of SILO for creating unstructured cell data
+c     (UCD) objects for viewing with MeshTV.
+c
+c---------------------------------------------------------------------
+      program main
+
+      implicit none
+      include "silo.inc"
+      integer builducd
+      integer  dbid, meshid, err
+
+
+c...Create file named "ucdf77.pdb". Database ID is returned in 'dbid'.
+
+      err = dbcreate("ucdf77.pdb", 10, 0, DB_LOCAL,
+     .               "file info", 9, DB_PDB, dbid)
+
+
+c...Write out necessary objects for MeshTV.
+
+      meshid = builducd(dbid, "ucd", 3)
+
+
+c...Close data file.
+
+      err = dbclose(dbid)
+
+
+      print *,'Created file: ucdf77.pdb'
+
+      stop
+      end
+
+
+      integer function builducd (dbid, name, lname)
+c----------------------------------------------------------------------
+c  Routine						      builducd
+c
+c  Purpose
+c
+c	Build ucd-mesh, ucd-var, facelist and zonelist, and return
+c	the mesh ID.
+c
+c  Modifications:
+c    Kathleen Bonnell, Wed Sep 2 16:12:15 PDT 20099
+c    Changed 'character*8 name' to 'character*(*) name' to remove 
+c    'Character length argument mismatch' compiler error.
+c
+c-----------------------------------------------------------------------
+
+      integer  dbid             ! Database identifier
+      character*(*) name        ! Name of mesh to build
+      integer     lname         ! Length of name
+
+      include "silo.inc"       ! Don't forget to include this file
+
+      parameter  (NMATS  = 2)   ! Number of materials
+      parameter  (NZONES = 7)   ! Number of zones
+      parameter  (NFACES = 12)  ! Number of external faces
+      parameter  (NNODES = 13)  ! Number of nodes
+      parameter  (MAXMIX = 12)  ! Max length of mixed data
+      parameter  (MAXOMIX= 4)
+      parameter  (NZSHAPES= 2)  ! Number of zone shapes
+      parameter  (NFSHAPES= 1)  ! Number of face shapes
+      parameter  (NFTYPES = 0)  ! Number of face types
+      parameter  (LZNODELIST= 27) ! Length of zone nodelist
+      parameter  (LFNODELIST= 24) ! Length of face nodelist
+
+c----------------------------------------------------------------------
+c       The NODES in this 2D mesh looks like this:
+c
+c  	  	0	4	8
+c
+c  	  	1	5	9
+c                                       12
+c  	  	2	6	10
+c
+c  	  	3	7	11
+c
+c
+c       The ZONES in the mesh look like this:
+c       (there are six rectangle zones and one triangle zone)
+c
+c
+c               -----------------\
+c               |   0   |   1   | \
+c               -----------------  \
+c               |   2   |   3   | 6 >
+c               -----------------  /
+c               |   4   |   5   | /
+c               -----------------/
+c
+c
+c-----------------------------------------------------------------------
+
+      integer      i, flid, zlid, meshid, varid, matid, optlistid
+      integer      matlist(NZONES), matnos(NMATS)
+      integer      mix_next(MAXOMIX), mix_mat(MAXOMIX),
+     .             mix_zone(MAXOMIX)
+      real         mix_vf(MAXOMIX)
+
+      real         x(NNODES), y(NNODES), d(NZONES), df(MAXOMIX)
+      real         u(NNODES)
+      integer      fnodelist(LFNODELIST), znodelist(LZNODELIST)
+      integer      zshapesize(NZSHAPES), zshapecnt(NZSHAPES)
+
+      integer  fshapesize, fshapecnt
+      integer  tcycle, mixlen
+      integer  dims
+c     real*8   ttime
+      real*4   ttime
+      real*4   rtime
+      real     dfnew(MAXMIX)
+
+
+c...Initialize material data */
+      data  matlist/1,-1, 2, 1,-3, 2, 2/
+      data  matnos/1, 2/
+      data  mix_vf/.6, .8, .4, .2/
+      data  mix_next/2, 0, 4, 0/
+      data  mix_mat/1, 2, 1, 2/
+      data  mix_zone/0, 0, 3, 3/
+
+c...Initialize coordinate and zonal data.
+      data  x/9.,9.,9.,9.,10.,10.,10.,10.,11.,11.,11.,11.,12./
+      data  y/3.,2.,1.,0., 3., 2., 1., 0., 3., 2., 1., 0.,1.5/
+      data  d/1.,2.,3.,4.,5.,6.,7./
+      data  u/0.,0.,0.,0.,1.,1.,1.,1.,2.,2.,2.,2.,3./
+      data  df/.58,.78,.42,.22/
+
+c...Initialize facelist and zonelist.
+      data fnodelist/0,1,1,2,2,3,3,7,7,11,11,10,10,9,9,8,8,4,4,0,8,12,
+     .               12,11/
+      data znodelist/0,1,5,4,4,5,9,8,1,2,6,5,5,6,10,9,2,3,7,6,6,7,11,10,
+     .               8,12,11 /
+      data zshapesize /4,3/     ! shape 1 has four nodes, shape 2 has three
+      data zshapecnt  /6,1/     ! six zones are shape 1, one zone is shape 2
+
+      data fshapesize /2/       ! shape 1 has two nodes
+      data fshapecnt  /NFACES/  ! NFACES faces are shape 1
+
+      ttime  = 2.345
+c     rtime  = sngl(ttime)
+      rtime  = ttime
+      tcycle = 200
+      mixlen = MAXMIX
+
+
+c...Create a rudimentary option list.
+
+      ierr = dbmkoptlist(3, optlistid)                   ! Create the option list
+      ierr = dbaddiopt  (optlistid, DBOPT_CYCLE, tcycle) ! Add integer opt
+      ierr = dbaddropt  (optlistid, DBOPT_TIME, rtime)   ! Add real opt
+
+
+c...Start by writing the external face list. This contains all of the
+c...faces which are on the external surface of the mesh. For 2D
+c...meshes, this is not really necessary, but for 3D it is essential.
+
+      err = dbputfl(dbid, 'Facelist', 8, NFACES, 2, fnodelist,
+     .              LFNODELIST, 0,
+     .              DB_F77NULL, fshapesize, fshapecnt, NFSHAPES,
+     .              DB_F77NULL, DB_F77NULL, 0, flid)
+
+
+
+c...Write zone list. This contains the information which describes each
+c...of the zones in the mesh. The nodelist must be organized such that
+c...zones of each shape are described consecutively.
+
+      err = dbputzl(dbid, 'Zonelist', 8, NZONES, 2, znodelist,
+     .              LZNODELIST, 0,
+     .              zshapesize, zshapecnt, NZSHAPES, zlid)
+
+
+
+c...Write the UCD mesh. For any arguments which are not applicable,
+c...use the DB_F77NULL argument. The mesh id is returned in 'meshid'.
+
+      err = dbputum(dbid, name, lname, 2, x, y, DB_F77NULL,
+     .              "X", 1, "Y", 1, DB_F77NULLSTRING, 0, DB_FLOAT,
+     .              NNODES, NZONES, 'Zonelist', 8, 'Facelist', 8,
+     .              optlistid, meshid)
+
+
+
+c...Write out a UCD variable. Use dbputuv1 for scalar (non-vector)
+c...arrays. The variable ID is returned in 'varid'.
+
+      err = dbputuv1 (dbid, "d", 1, name, lname, d, NZONES, DB_F77NULL,
+     .                0, DB_FLOAT, DB_ZONECENT, DB_F77NULL, varid)
+
+      err = dbputuv1 (dbid, "u", 1, name, lname, u, NNODES, DB_F77NULL,
+     .                0, DB_FLOAT, DB_NODECENT, DB_F77NULL, varid)
+
+
+      builducd = meshid
+      end
+
+
diff --git a/tests/ucdsamp3.c b/tests/ucdsamp3.c
new file mode 100644
index 0000000..6f5da21
--- /dev/null
+++ b/tests/ucdsamp3.c
@@ -0,0 +1,319 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include "silo.h"
+#include <std.c>
+
+static int build_ucd3(DBfile *dbfile, char *name);
+
+/***********************************************************************
+ *  Program
+ *
+ *      ucdsamp3
+ *
+ *  Purpose
+ *
+ *      Sample program illustrating use of SILO for writing 3D
+ *      unstructured cell data.
+ *
+ *  Modifications
+ *
+ * 	Robb Matzke, 1999-04-09
+ *	Added argument parsing to control the driver which is used.
+ ***********************************************************************/
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    int		  i, driver=DB_PDB;
+    char	  *filename="ucdsamp3.pdb";
+    int            show_all_errors = FALSE;
+
+    /* Parse command-line */
+    for (i=1; i<argc; i++) {
+	if (!strncmp(argv[i], "DB_PDB", 6)) {
+	    driver = StringToDriver(argv[i]);
+	    filename = "ucdsamp3.pdb";
+	} else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+	    filename = "ucdsamp3.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+	    fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+	}
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "ucd test file", driver);
+    printf("Creating file: '%s'...\n", filename);
+    build_ucd3(dbfile, "mesh1");
+    DBClose(dbfile);
+
+    CleanupDriverStuff();
+    exit(0);
+}
+/*----------------------------------------------------------------------
+ *  Routine                                                   build_ucd3
+ *
+ *  Purpose
+ *
+ *      Build a 3D ucd-mesh, ucd-var, facelist and zonelist, and return
+ *      the mesh ID.
+ *
+ * Arguments
+ *    name      Name to assign mesh.
+ *
+ * Modifications
+ *
+ *    Lisa J. Roberts, Fri Apr  7 10:48:31 PDT 2000
+ *    Changed the prototype to ANSI standard and explicitly indicated
+ *    the function returns an int.  Got rid of flid, zlid, varid, i, 
+ *    ln, dbid, and matid, which were unused.
+ *
+ *--------------------------------------------------------------------*/
+static int
+build_ucd3(DBfile *dbfile, char *name)
+{
+
+#define NZONES  3               /* Number of zones (elements) */
+#define NFACES  14              /* Number of external faces */
+#define NNODES  16              /* Number of mesh nodes */
+#define NZSHAPES 1              /* Number of zone shapes */
+#define NFSHAPES 1              /* Number of face shapes */
+#define NFTYPES  0              /* Number of face types */
+#define LZNODELIST 24           /* Length of zonelist nodelist */
+#define LFNODELIST 56           /* Length of facelist nodelist */
+
+    /* Misc variables */
+    int            meshid;
+    int            fshapesize, fshapecnt, zshapesize, zshapecnt;
+    int            idatatype;
+    int            dims;
+    int            inode, iface, izone, ifl, izl, nface = 0;
+#if 0
+    int            mixlen = 0;
+    int            tcycle = 200;
+    double         ttime = 2.345;
+    float         *vars[3];
+    char          *varnames[3];
+    DBfacelist    *fl;
+#endif
+    float         *coords[3];
+    char          *coordnames[3];
+
+    /* Coordinates */
+    float          x[NNODES];
+    float          y[NNODES];
+    float          z[NNODES];
+
+    /* Nodal quantities */
+    static float   u[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+#if 0
+    static float   v[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+    static float   w[NNODES] =
+    {0., 0., 0., 0., .1, .1, .1, .1, .2, .2, .2, .2, .3, .3, .3, .3};
+#endif
+
+    /* Zonal quantities */
+    static float   d[NZONES] =
+    {2., 4., 6.};
+
+    /* Material data */
+    static int     matlist[NZONES] =
+    {1, 1, 2};
+    static int     matnos[2] =
+    {1, 2};
+
+    /* Facelist data */
+    int            fzoneno[NFACES];
+    int            fnodelist[LFNODELIST];
+
+    /* Zonelist data */
+    int            znodelist[LZNODELIST];
+
+    fshapesize = 4;
+    fshapecnt = NFACES;
+    zshapesize = 8;
+    zshapecnt = NZONES;
+
+    idatatype = DB_FLOAT;
+    dims = NZONES;
+
+     /*--------------------------------------------------
+      *  Compute coordinate values, zonelist values, and
+      *  facelist values for a sample 3D mesh.
+      *-------------------------------------------------*/
+    inode = 0;
+    for (izone = 0; izone <= NZONES; izone++) {
+        x[inode++] = 0.;
+        x[inode++] = 1.;
+        x[inode++] = 1.;
+        x[inode++] = 0.;
+        inode -= 4;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        y[inode++] = (float)izone;
+        inode -= 4;
+        z[inode++] = 0.;
+        z[inode++] = 0.;
+        z[inode++] = 1.;
+        z[inode++] = 1.;
+    }
+    izl = 0;
+    for (izone = 0; izone < NZONES; izone++) {
+        for (inode = 0; inode < 4; inode++) {
+            znodelist[izl++] = izone * 4 + inode;
+        }
+        for (inode = 0; inode < 4; inode++) {
+            znodelist[izl++] = (izone + 1) * 4 + inode;
+        }
+    }
+    ifl = 0;
+    for (izone = 0; izone < NZONES; izone++) {
+        for (iface = 0; iface < 3; iface++) {
+            fnodelist[ifl++] = izone * 4 + iface;
+            fnodelist[ifl++] = izone * 4 + iface + 1;
+            fnodelist[ifl++] = izone * 4 + iface + 5;
+            fnodelist[ifl++] = izone * 4 + iface + 4;
+        }
+        fnodelist[ifl++] = izone * 4 + 3;
+        fnodelist[ifl++] = izone * 4;
+        fnodelist[ifl++] = izone * 4 + 4;
+        fnodelist[ifl++] = izone * 4 + 7;
+
+        for (iface = 0; iface < 4; iface++)
+            fzoneno[nface++] = izone;
+    }
+    fnodelist[ifl++] = 0;
+    fnodelist[ifl++] = 1;
+    fnodelist[ifl++] = 2;
+    fnodelist[ifl++] = 3;
+    fzoneno[nface++] = 0;
+    fnodelist[ifl++] = 12;
+    fnodelist[ifl++] = 13;
+    fnodelist[ifl++] = 14;
+    fnodelist[ifl++] = 15;
+    fzoneno[nface++] = NZONES - 1;
+
+#if 1
+     /*--------------------------------------------------
+      *  Write out the external facelist we defined
+      *  above.
+      *-------------------------------------------------*/
+    (void)DBPutFacelist(dbfile, "fl", NFACES, 3, fnodelist, LFNODELIST, 0,
+                        fzoneno, &fshapesize, &fshapecnt, NFSHAPES,
+                        NULL, NULL, 0);
+#else
+     /*--------------------------------------------------
+      *  Calculate an external facelist from the zonelist
+      *  information. Write it out.
+      *-------------------------------------------------*/
+    fl = (DBfacelist *) DBCalcExternalFacelist(znodelist, NNODES, 0,
+                                       &zshapesize, &zshapecnt, NZSHAPES,
+                                               matlist, 2);
+    (void)DBPutFacelist(dbfile, "fl", fl->nfaces, 3,
+                        fl->nodelist, fl->lnodelist, 0,
+                        fl->zoneno, fl->shapesize, fl->shapecnt,
+                        fl->nshapes, NULL, NULL, 0);
+#endif
+
+     /*--------------------------------------------------
+      *  Write out the zonelist.
+      *-------------------------------------------------*/
+    DBSetDeprecateWarnings(0);
+    (void)DBPutZonelist(dbfile, "zl", NZONES, 3, znodelist, LZNODELIST, 0,
+                        &zshapesize, &zshapecnt, NZSHAPES);
+    DBSetDeprecateWarnings(3);
+
+     /*--------------------------------------------------
+      *  Write out the mesh.
+      *-------------------------------------------------*/
+    coords[0] = x;
+    coords[1] = y;
+    coords[2] = z;
+    coordnames[0] = "X";
+    coordnames[1] = "Y";
+    coordnames[2] = "Z";
+
+    meshid = DBPutUcdmesh(dbfile, name, 3, coordnames, coords,
+                          NNODES, NZONES, "zl", "fl", DB_FLOAT, NULL);
+
+     /*--------------------------------------------------
+      *  Write out the material data.
+      *-------------------------------------------------*/
+    (void)DBPutMaterial(dbfile, "material", name, 2, matnos, matlist,
+                        &dims, 1, NULL, NULL, NULL, NULL, 0, DB_FLOAT,
+                        NULL);
+
+     /*--------------------------------------------------
+      *  Write out a zonal variable.
+      *-------------------------------------------------*/
+    (void)DBPutUcdvar1(dbfile, "d", name, d, NZONES,
+                       NULL, 0, idatatype, DB_ZONECENT, NULL);
+
+     /*--------------------------------------------------
+      *  Write out a nodal variable.
+      *-------------------------------------------------*/
+    (void)DBPutUcdvar1(dbfile, "u", name, u, NNODES,
+                       NULL, 0, idatatype, DB_NODECENT, NULL);
+
+    return (meshid);
+}
diff --git a/tests/version.c b/tests/version.c
new file mode 100644
index 0000000..d3dad97
--- /dev/null
+++ b/tests/version.c
@@ -0,0 +1,137 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <stdlib.h>     /* For exit()   */
+#include <string.h>     /* For strcmp() */
+#include "silo.h"
+#include <std.c>
+
+int
+main(int argc, char *argv[])
+{
+    DBfile        *dbfile;
+    int           i, driver=DB_PDB;
+    static char   *filename="version.pdb";
+    int            show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+            filename = "version.pdb";
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+            filename = "version.h5";
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    DBShowErrors(show_all_errors?DB_ALL_AND_DRVR:DB_ALL, NULL);
+
+    /* test version macro with 2 digit version number */
+#if SILO_VERSION_GE(4,6,)
+    printf("This version of Silo is greater than or equal to 4.6\n");
+#else
+    printf("This version of Silo is NOT greater than or equal to 4.6\n");
+#endif
+
+    /* test version macro with 3 digit version number */
+#if SILO_VERSION_GE(90,5,2)
+    printf("This version of Silo is greater than or equal to 90.5.2\n");
+#else
+    printf("This version of Silo is NOT greater than or equal to 90.5.2\n");
+#endif
+
+    /* test run-time version methods for lib */
+    printf("DBVersion() returns \"%s\"\n", DBVersion());
+    printf("DBVersionGE(4,6,0) returns %d\n", DBVersionGE(4,6,0));
+    printf("DBVersionGE(90,5,2) returns %d\n", DBVersionGE(90,5,2));
+    
+    dbfile = DBCreate(filename, 0, DB_LOCAL,
+                      "version test file", driver);
+    
+    /* test run-time version methods for files */
+    printf("On file handle returned from DBCreate...\n");
+    printf("    DBFileVersion() returns \"%s\"\n", DBFileVersion(dbfile));
+    printf("    DBFileVersionGE(4,6,0) returns %d\n", DBFileVersionGE(dbfile,4,6,0));
+    printf("    DBFileVersionGE(90,5,2) returns %d\n", DBFileVersionGE(dbfile,90,5,2));
+    DBClose(dbfile);
+
+    dbfile = DBOpen(filename, driver, DB_READ);
+    printf("On file handle returned from DBOpen...\n");
+    printf("    DBFileVersion() returns \"%s\"\n", DBFileVersion(dbfile));
+    printf("    DBFileVersionGE(4,6,0) returns %d\n", DBFileVersionGE(dbfile,4,6,0));
+    printf("    DBFileVersionGE(90,5,2) returns %d\n", DBFileVersionGE(dbfile,90,5,2));
+    DBClose(dbfile);
+
+    /* The second open attempt is to allow this test to run correctly
+       under autotest. Autotest runs its tests two levels down. */
+    dbfile = DBOpen("pion0244.silo", DB_UNKNOWN, DB_READ);
+    if (dbfile == 0)
+        dbfile = DBOpen("../../pion0244.silo", DB_UNKNOWN, DB_READ);
+    if (dbfile)
+    {
+        printf("On old silo file handle returned from DBOpen...\n");
+        printf("    DBFileVersion() returns \"%s\"\n", DBFileVersion(dbfile));
+        printf("    DBFileVersionGE(3,0,0) returns %d\n", DBFileVersionGE(dbfile,3,0,0));
+        printf("    DBFileVersionGE(4,6,0) returns %d\n", DBFileVersionGE(dbfile,4,6,0));
+        printf("    DBFileVersionGE(90,5,2) returns %d\n", DBFileVersionGE(dbfile,90,5,2));
+        DBClose(dbfile);
+    }
+
+    CleanupDriverStuff();
+    return 0;
+}
diff --git a/tests/wave.c b/tests/wave.c
new file mode 100644
index 0000000..6f99d3f
--- /dev/null
+++ b/tests/wave.c
@@ -0,0 +1,196 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+
+#include <math.h>
+#include <string.h>
+
+#include "silo.h"
+#include <std.c>
+
+#undef NX
+#define NX 100
+#undef NY
+#define NY 10
+#undef NZ
+#define NZ 5
+#undef NT
+#define NT 70
+
+#undef DX
+#define DX 10.
+#undef DY
+#define DY 0.5
+#undef DZ
+#define DZ 5.
+#undef T0
+#define T0 -2.
+#undef DT
+#define DT 14.
+
+#define A  1.
+
+void SWriteFile(double t, int cycle, int driver);
+
+int
+main(int argc, char *argv[])
+{
+    int       i, driver = DB_PDB;
+    double    time;
+    int       cycle;
+    int       show_all_errors = FALSE;
+
+    for (i=1; i<argc; i++) {
+        if (!strncmp(argv[i], "DB_PDB", 6)) {
+            driver = StringToDriver(argv[i]);
+        } else if (!strncmp(argv[i], "DB_HDF5", 7)) {
+            driver = StringToDriver(argv[i]);
+        } else if (!strcmp(argv[i], "hzip")) {
+            DBSetCompression("METHOD=HZIP");
+        } else if (!strcmp(argv[i], "fpzip")) {
+            DBSetCompression("METHOD=FPZIP");
+        } else if (!strcmp(argv[i], "show-all-errors")) {
+            show_all_errors = 1;
+	} else if (argv[i][0] != '\0') {
+            fprintf(stderr, "%s: ignored argument `%s'\n", argv[0], argv[i]);
+        }
+    }
+
+    if (show_all_errors) DBShowErrors(DB_ALL_AND_DRVR, 0);
+
+    for (i = 0; i < NT + 1; i++)
+    {
+        time = T0 + ((double)i / (double)NT) * DT;
+        cycle = i * 10;
+        SWriteFile (time, cycle, driver);
+    }
+
+    CleanupDriverStuff();
+    return 0;
+}
+
+void
+SWriteFile(double time, int cycle, int driver)
+{
+    int       i, j, k;
+    char      *coordnames[3]={"x", "y", "z"};
+    float     *coords[3];
+    float     xcoord[(NX+1)*(NY+1)*(NZ+1)];
+    float     ycoord[(NX+1)*(NY+1)*(NZ+1)];
+    float     zcoord[(NX+1)*(NY+1)*(NZ+1)];
+    float     var[(NX+1)*(NY+1)*(NZ+1)];
+    char      filename[80];
+    int       dims[3];
+    int       ndims;
+    float     widths[3];
+    DBfile    *dbfile;
+    DBoptlist *optList;
+
+    ndims = 3;
+    dims[0] = NX + 1;
+    dims[1] = NY + 1;
+    dims[2] = NZ + 1;
+    widths[0] = DX;
+    widths[1] = DY;
+    widths[2] = DZ;
+     
+    /*
+     * Build the mesh and a variable.
+     */
+    for (i = 0; i < NX + 1; i++)
+    {
+        for (j = 0; j < NY + 1; j++)
+        {
+            for (k = 0; k < NZ + 1; k++)
+            {
+                double    x1, y1, z1;
+                double    dy;
+  
+                x1 = ((float)i / (float)NX) * widths[0];
+                y1 = ((float)j / (float)NY) * widths[1];
+                dy = (A * A * A) / (A + (x1 - time) * (x1 - time));
+                z1 = ((float)k / (float)NZ) * widths[2];
+
+                xcoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = x1;
+                ycoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = y1 + dy;
+                zcoord[i+j*(NX+1)+k*(NX+1)*(NY+1)] = z1;
+                var[i+j*(NX+1)+k*(NX+1)*(NY+1)] = dy;
+            }
+        }
+    }
+
+    coords[0] = xcoord;
+    coords[1] = ycoord;
+    coords[2] = zcoord;
+
+    /*
+     * Create a file that contains the mesh and variable.
+     */
+    sprintf(filename, "wave%.4d.silo", cycle);
+    printf("Creating test file \"%s\".\n", filename);
+    dbfile = DBCreate(filename, 0, DB_LOCAL, "The Wave", driver);
+
+    optList = DBMakeOptlist(10);
+    DBAddOption(optList, DBOPT_DTIME, &time);
+    DBAddOption(optList, DBOPT_CYCLE, &cycle);
+    
+    DBPutQuadmesh(dbfile, "quadmesh", coordnames, coords, dims, ndims,
+                  DB_FLOAT, DB_NONCOLLINEAR, optList);
+
+    DBPutQuadvar1(dbfile, "pressure", "quadmesh", var, dims, ndims, NULL,
+                  0, DB_FLOAT, DB_NODECENT, optList);
+
+    DBFreeOptlist(optList);
+
+    DBClose(dbfile);
+}
diff --git a/tests/xvers_data.tar.bz2 b/tests/xvers_data.tar.bz2
new file mode 100644
index 0000000..98f348e
Binary files /dev/null and b/tests/xvers_data.tar.bz2 differ
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..04ce234
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,74 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+TOOLS_DIR =
+if BROWSER_NEEDED
+TOOLS_DIR += browser silock
+endif
+if PYTHON_NEEDED
+TOOLS_DIR += python
+endif
+if SILEX_NEEDED
+TOOLS_DIR += silex
+endif
+SUBDIRS = \
+ . \
+ $(TOOLS_DIR)
+DIST_SUBDIRS = \
+ . \
+ browser \
+ python \
+ silex \
+ silock
diff --git a/tools/Makefile.in b/tools/Makefile.in
new file mode 100644
index 0000000..f794bf1
--- /dev/null
+++ b/tools/Makefile.in
@@ -0,0 +1,601 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+ at BROWSER_NEEDED_TRUE@am__append_1 = browser silock
+ at PYTHON_NEEDED_TRUE@am__append_2 = python
+ at SILEX_NEEDED_TRUE@am__append_3 = silex
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+TOOLS_DIR = $(am__append_1) $(am__append_2) $(am__append_3)
+SUBDIRS = \
+ . \
+ $(TOOLS_DIR)
+
+DIST_SUBDIRS = \
+ . \
+ browser \
+ python \
+ silex \
+ silock
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	    distdir=`$(am__cd) $(distdir) && pwd`; \
+	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$top_distdir" \
+	        distdir="$$distdir/$$subdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+	install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
+# 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/tools/browser/Makefile.am b/tools/browser/Makefile.am
new file mode 100644
index 0000000..4067326
--- /dev/null
+++ b/tools/browser/Makefile.am
@@ -0,0 +1,119 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+##
+##   Mark C. Miller, Wed Sep  2 15:25:10 PDT 2009
+##   Added READLINE_LIBS
+##
+##   Mark C. Miller, Wed Jul 14 21:05:19 PDT 2010
+##   Removed silofile.magic
+##
+##   Mark C. Miller, Tue Jul 27 09:57:51 PDT 2010
+##   Added variable to control makeinfo output.
+
+bin_PROGRAMS = browser
+dist_bin_SCRIPTS = \
+ silodiff \
+ silofile
+
+browser_SOURCES = $(FILES)
+if HDF5_DRV_NEEDED
+if HZIP_NEEDED
+  # Dummy C++ source to cause C++ linking.
+  nodist_EXTRA_browser_SOURCES = dummy.cxx
+endif
+if FPZIP_NEEDED
+  # Dummy C++ source to cause C++ linking.
+  nodist_EXTRA_browser_SOURCES = dummy.cxx
+endif
+  browser_LDADD = ../../src/libsiloh5.la
+else
+  browser_LDADD = ../../src/libsilo.la
+endif
+browser_LDADD += $(READLINE_LIBS)
+info_TEXINFOS = browser.texi
+AM_MAKEINFOHTMLFLAGS = --no-split
+
+AM_CPPFLAGS = \
+ -I$(top_builddir)/src/silo \
+ -I$(includedir) \
+ -DPUBLIC_INIT_FILE=\"$(includedir)/browser_rc\"
+
+EXTRA_DIST = \
+ browser.html \
+ browser.init \
+ sample.init \
+ silodiff.init
+
+noinst_HEADERS = browser.h
+FILES = \
+ array.c \
+ bif.c \
+ browser.c \
+ cons.c \
+ file.c \
+ func.c \
+ lex.c \
+ num.c \
+ obj.c \
+ output.c \
+ parse.c \
+ prim.c \
+ ptr.c \
+ range.c \
+ sdo.c \
+ stc.c \
+ str.c \
+ switch.c \
+ sym.c
diff --git a/tools/browser/Makefile.in b/tools/browser/Makefile.in
new file mode 100644
index 0000000..88e87b1
--- /dev/null
+++ b/tools/browser/Makefile.in
@@ -0,0 +1,936 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = browser$(EXEEXT)
+subdir = tools/browser
+DIST_COMMON = $(dist_bin_SCRIPTS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = array.$(OBJEXT) bif.$(OBJEXT) browser.$(OBJEXT) \
+	cons.$(OBJEXT) file.$(OBJEXT) func.$(OBJEXT) lex.$(OBJEXT) \
+	num.$(OBJEXT) obj.$(OBJEXT) output.$(OBJEXT) parse.$(OBJEXT) \
+	prim.$(OBJEXT) ptr.$(OBJEXT) range.$(OBJEXT) sdo.$(OBJEXT) \
+	stc.$(OBJEXT) str.$(OBJEXT) switch.$(OBJEXT) sym.$(OBJEXT)
+am_browser_OBJECTS = $(am__objects_1)
+browser_OBJECTS = $(am_browser_OBJECTS)
+am__DEPENDENCIES_1 =
+ at HDF5_DRV_NEEDED_FALSE@browser_DEPENDENCIES = ../../src/libsilo.la \
+ at HDF5_DRV_NEEDED_FALSE@	$(am__DEPENDENCIES_1)
+ at HDF5_DRV_NEEDED_TRUE@browser_DEPENDENCIES = ../../src/libsiloh5.la \
+ at HDF5_DRV_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(dist_bin_SCRIPTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(browser_SOURCES) $(nodist_EXTRA_browser_SOURCES)
+DIST_SOURCES = $(browser_SOURCES)
+INFO_DEPS = $(srcdir)/browser.info
+TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/config
+DVIS = browser.dvi
+PDFS = browser.pdf
+PSS = browser.ps
+HTMLS = browser.html
+TEXINFOS = browser.texi
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+DVIPS = dvips
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+dist_bin_SCRIPTS = \
+ silodiff \
+ silofile
+
+browser_SOURCES = $(FILES)
+ at FPZIP_NEEDED_TRUE@@HDF5_DRV_NEEDED_TRUE at nodist_EXTRA_browser_SOURCES = dummy.cxx
+ at HDF5_DRV_NEEDED_TRUE@@HZIP_NEEDED_TRUE at nodist_EXTRA_browser_SOURCES = dummy.cxx
+ at HDF5_DRV_NEEDED_FALSE@browser_LDADD = ../../src/libsilo.la \
+ at HDF5_DRV_NEEDED_FALSE@	$(READLINE_LIBS)
+ at HDF5_DRV_NEEDED_TRUE@browser_LDADD = ../../src/libsiloh5.la \
+ at HDF5_DRV_NEEDED_TRUE@	$(READLINE_LIBS)
+info_TEXINFOS = browser.texi
+AM_MAKEINFOHTMLFLAGS = --no-split
+AM_CPPFLAGS = \
+ -I$(top_builddir)/src/silo \
+ -I$(includedir) \
+ -DPUBLIC_INIT_FILE=\"$(includedir)/browser_rc\"
+
+EXTRA_DIST = \
+ browser.html \
+ browser.init \
+ sample.init \
+ silodiff.init
+
+noinst_HEADERS = browser.h
+FILES = \
+ array.c \
+ bif.c \
+ browser.c \
+ cons.c \
+ file.c \
+ func.c \
+ lex.c \
+ num.c \
+ obj.c \
+ output.c \
+ parse.c \
+ prim.c \
+ ptr.c \
+ range.c \
+ sdo.c \
+ stc.c \
+ str.c \
+ switch.c \
+ sym.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cxx .dvi .html .info .lo .o .obj .pdf .ps .texi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/browser/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/browser/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+browser$(EXEEXT): $(browser_OBJECTS) $(browser_DEPENDENCIES) 
+	@rm -f browser$(EXEEXT)
+	$(CXXLINK) $(browser_OBJECTS) $(browser_LDADD) $(LIBS)
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	    $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-dist_binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bif.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/browser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cons.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dummy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/func.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/lex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/num.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/obj.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/output.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parse.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/prim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ptr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/range.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/stc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/str.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/switch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sym.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+.texi.info:
+	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+	am__cwd=`pwd` && cd $(srcdir) && \
+	rm -rf $$backupdir && mkdir $$backupdir && \
+	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+	  done; \
+	else :; fi && \
+	cd "$$am__cwd"; \
+	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+	 -o $@ $<; \
+	then \
+	  rc=0; \
+	  cd $(srcdir); \
+	else \
+	  rc=$$?; \
+	  cd $(srcdir) && \
+	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+	fi; \
+	rm -rf $$backupdir; exit $$rc
+
+.texi.dvi:
+	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+	$(TEXI2DVI) $<
+
+.texi.pdf:
+	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+	MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+	$(TEXI2PDF) $<
+
+.texi.html:
+	rm -rf $(@:.html=.htp)
+	if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+	 -o $(@:.html=.htp) $<; \
+	then \
+	  rm -rf $@; \
+	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+	    mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+	else \
+	  if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+	    rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+	  exit 1; \
+	fi
+$(srcdir)/browser.info: browser.texi 
+browser.dvi: browser.texi 
+browser.pdf: browser.texi 
+browser.html: browser.texi 
+.dvi.ps:
+	TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+	$(DVIPS) -o $@ $<
+
+uninstall-dvi-am:
+	@$(NORMAL_UNINSTALL)
+	@list='$(DVIS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+	done
+
+uninstall-html-am:
+	@$(NORMAL_UNINSTALL)
+	@list='$(HTMLS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+	  rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+	done
+
+uninstall-info-am:
+	@$(PRE_UNINSTALL)
+	@if test -d '$(DESTDIR)$(infodir)' && \
+	    (install-info --version && \
+	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	  list='$(INFO_DEPS)'; \
+	  for file in $$list; do \
+	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
+	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+	    install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+	  done; \
+	else :; fi
+	@$(NORMAL_UNINSTALL)
+	@list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  relfile=`echo "$$file" | sed 's|^.*/||'`; \
+	  relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+	  (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
+	     echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+	     rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+	   else :; fi); \
+	done
+
+uninstall-pdf-am:
+	@$(NORMAL_UNINSTALL)
+	@list='$(PDFS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+
+uninstall-ps-am:
+	@$(NORMAL_UNINSTALL)
+	@list='$(PSS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(psdir)/$$f"; \
+	done
+
+dist-info: $(INFO_DEPS)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	list='$(INFO_DEPS)'; \
+	for base in $$list; do \
+	  case $$base in \
+	    $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+	  esac; \
+	  if test -f $$base; then d=.; else d=$(srcdir); fi; \
+	  base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+	  for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+	    if test -f $$file; then \
+	      relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+	      test -f $(distdir)/$$relfile || \
+		cp -p $$file $(distdir)/$$relfile; \
+	    else :; fi; \
+	  done; \
+	done
+
+mostlyclean-aminfo:
+	-rm -rf browser.aux browser.cp browser.cps browser.fn browser.fns browser.ky \
+	  browser.kys browser.log browser.pg browser.pgs browser.tmp \
+	  browser.toc browser.tp browser.tps browser.vr browser.vrs \
+	  browser.dvi browser.pdf browser.ps browser.html
+
+maintainer-clean-aminfo:
+	@list='$(INFO_DEPS)'; for i in $$list; do \
+	  i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+	  echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+	  rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am: $(DVIS)
+
+html: html-am
+
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am: $(DVIS)
+	@$(NORMAL_INSTALL)
+	test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
+	@list='$(DVIS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
+	done
+install-exec-am: install-binPROGRAMS install-dist_binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+	@$(NORMAL_INSTALL)
+	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+	@list='$(HTMLS)'; for p in $$list; do \
+	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  if test -d "$$d$$p"; then \
+	    echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+	  else \
+	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+	  fi; \
+	done
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+	@$(NORMAL_INSTALL)
+	test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	  esac; \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+	  for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+                       $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+	    if test -f $$ifile; then \
+	      relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+	      echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
+	      $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+	    else : ; fi; \
+	  done; \
+	done
+	@$(POST_INSTALL)
+	@if (install-info --version && \
+	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	  list='$(INFO_DEPS)'; \
+	  for file in $$list; do \
+	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
+	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+	  done; \
+	else : ; fi
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+	@$(NORMAL_INSTALL)
+	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
+	@list='$(PDFS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+	done
+install-ps: install-ps-am
+
+install-ps-am: $(PSS)
+	@$(NORMAL_INSTALL)
+	test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
+	@list='$(PSS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
+	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
+	done
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+	maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
+	uninstall-dvi-am uninstall-html-am uninstall-info-am \
+	uninstall-pdf-am uninstall-ps-am
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags dist-info distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binPROGRAMS install-data \
+	install-data-am install-dist_binSCRIPTS install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-aminfo \
+	maintainer-clean-generic mostlyclean mostlyclean-aminfo \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
+	uninstall-dvi-am uninstall-html-am uninstall-info-am \
+	uninstall-pdf-am uninstall-ps-am
+
+ at HDF5_DRV_NEEDED_TRUE@@HZIP_NEEDED_TRUE@  # Dummy C++ source to cause C++ linking.
+ at FPZIP_NEEDED_TRUE@@HDF5_DRV_NEEDED_TRUE@  # Dummy C++ source to cause C++ linking.
+# 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/tools/browser/array.c b/tools/browser/array.c
new file mode 100644
index 0000000..cb4b55c
--- /dev/null
+++ b/tools/browser/array.c
@@ -0,0 +1,1617 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             array.c
+ *                      Dec  6 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             The array type class.  An array is a 1, 2, or 3
+ *                      dimensional object where all elements are the
+ *                      same type.  The dimension sizes are a list of
+ *                      comma separated numbers and/or identifiers which
+ *                      refer to silo scalar objects or 1-d arrays.  The
+ *                      number of dimensions is implied by the length
+ *                      of the dimension size vector.
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 6 Mar 1997
+ *      Arrays can have up to NDIMS dimensions, currently set to 10.
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#include <ctype.h>
+#define MYCLASS(X)      ((obj_ary_t*)(X))
+
+typedef struct obj_ary_t {
+   obj_pub_t    pub;
+   char         *ascii_dims ;           /*ASCII unparsed dimension list */
+   int          ndims ;                 /*resolved number of dimensions */
+   int          byte_offset;            /*byte offset to first value    */
+   int          offset[NDIMS] ;         /*index offset for printing     */
+   int          dim[NDIMS] ;            /*resolved dimensions           */
+   obj_t        sub ;                   /*subtype                       */
+   int          special_handling ;      /*flags for special things      */
+} obj_ary_t;
+
+#define ARY_SH_1        1       /* The array is conditionally one dimensional.
+                                 * The NDIMS field contains a number of
+                                 * dimensions, but only the dimension
+                                 * corresponding to a linear index of the
+                                 * outermost enclosing array is used.
+                                 */
+#define ARY_SH_2        2       /* The array is one dimensional.  The size
+                                 * of the dimension is the product of the
+                                 * dimensions specified.
+                                 */
+#define ARY_SH_3        3       /* The first dimension of the array must
+                                 * not be of size larger than N where N
+                                 * comes from `(array "SH3 N, dims" ...)'
+                                 */
+#define ARY_SH_4        4       /* The array is one dimensional.  The size
+                                 * of the dimension is the sum of the
+                                 * dimensions specified.
+                                 */
+#define ARY_SH_5        5       /* The array is one dimensional.  The size
+                                 * of the dimenion is determined by
+                                 * traversing the array until encountering
+                                 * sentinal, N, where N comes from
+                                 * `(array "SH5 N, ...)' 
+                                 */
+#define ARY_NSH         6       /*THIS MUST BE LAST!                    */
+
+static int      SHFlagsEncountered[ARY_NSH];
+
+class_t         C_ARY;
+static obj_t    ary_new (va_list);
+static obj_t    ary_copy (obj_t, int);
+static obj_t    ary_dest (obj_t);
+static obj_t    ary_apply (obj_t, obj_t);
+static void     ary_walk1 (obj_t, void*, int, walk_t*);
+static int      ary_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+static int      ary_walk3 (void*, obj_t, obj_t);
+static void     ary_print (obj_t, out_t*);
+static obj_t    ary_deref (obj_t, int, obj_t*);
+static obj_t    ary_bind (obj_t, void*);
+static int      AryNoCopy=0;            /*used by ary_deref()           */
+
+int             AryNProcessed;          /*num args used by ary_deref()  */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_class
+ *
+ * Purpose:     Initializes the ARRAY class.
+ *
+ * Return:      Success:        Ptr to the class
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+ary_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("ARRAY");
+   cls->new = ary_new;
+   cls->copy = ary_copy;
+   cls->dest = ary_dest;
+   cls->apply = ary_apply;
+   cls->print = ary_print;
+   cls->walk1 = ary_walk1;
+   cls->walk2 = ary_walk2;
+   cls->walk3 = ary_walk3;
+   cls->deref = ary_deref;
+   cls->bind = ary_bind;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_new
+ *
+ * Purpose:     Creates a new array object with the specified dimensions
+ *              and sub type.  The dimensions should be specified as
+ *              a string which will be parsed by ary_bind() to obtain
+ *              a list of dimension sizes.
+ *
+ * Return:      Success:        Ptr to a new ARRAY object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_new (va_list ap) {
+
+   obj_ary_t    *self = calloc (1, sizeof(obj_ary_t));
+   char         *s;
+
+   assert (self);
+   s = va_arg (ap, char*);
+   self->ascii_dims = safe_strdup (s);
+   self->sub = va_arg (ap, obj_t);
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_copy
+ *
+ * Purpose:     Copys an array type.
+ *
+ * Return:      Success:        A copy of SELF
+ *
+ *              Failure:        abort()
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 22 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_copy (obj_t _self, int flag) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+   obj_ary_t    *retval=NULL;
+   obj_t        x;
+   int          i;
+
+   if (SHALLOW==flag) {
+      x = obj_copy (self->sub, SHALLOW);
+      assert (x==self->sub);
+      retval = self;
+
+   } else {
+      retval = calloc (1, sizeof(obj_ary_t));
+      retval->ascii_dims = safe_strdup (self->ascii_dims);
+      retval->byte_offset = self->byte_offset;
+      retval->ndims = self->ndims;
+      retval->special_handling = self->special_handling;
+      for (i=0; i<retval->ndims; i++) {
+         retval->offset[i] = self->offset[i];
+         retval->dim[i] = self->dim[i];
+      }
+      retval->sub = obj_copy (self->sub, DEEP);
+   }
+
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_dest
+ *
+ * Purpose:     Destroys an array type object.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_dest (obj_t _self) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+
+   obj_dest (self->sub);
+
+   if (0==self->pub.ref) {
+      free (self->ascii_dims);
+      memset (self, 0, sizeof(obj_ary_t));
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_apply
+ *
+ * Purpose:     Applying an array type to an argument list consisting of
+ *              a single SILO database object (SDO) causes the object to
+ *              be cast to that type.
+ *
+ * Return:      Success:        Ptr to a new SDO object with the appropriate
+ *                              type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_apply (obj_t _self, obj_t args) {
+
+   obj_t        sdo=NIL, retval=NIL;
+
+   if (1!=F_length(args)) {
+      out_errorn ("typecast: wrong number of arguments");
+      return NIL;
+   }
+
+   sdo = obj_eval (cons_head (args));
+   retval = sdo_cast (sdo, _self);
+   obj_dest (sdo);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_print
+ *
+ * Purpose:     Prints an array type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      If the offset is non-zero, then a dimension range is printed
+ *      instead of the size.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      If dimension special flags are set then we note that in the
+ *      SHFlagsEncountered arrays so we can print an appropriate
+ *      footnote.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+ary_print (obj_t _self, out_t *f) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+   int          i;
+
+   out_puts (f, "[");
+   if (self->byte_offset>0) {
+      out_printf (f, "+%d ", self->byte_offset);
+   }
+   if (self->special_handling) {
+      out_printf (f, "SH%d: ", self->special_handling);
+      SHFlagsEncountered[self->special_handling] += 1;
+   }
+   if (self->ndims) {
+      for (i=0; i<self->ndims; i++) {
+         if (0==self->offset[i]) {
+            out_printf (f, "%d%s", self->dim[i], i+1<self->ndims?", ":"");
+         } else {
+            out_printf (f, "%d:%d%s", self->offset[i],
+                        self->offset[i]+self->dim[i]-1,
+                        i+1<self->ndims?", ":"");
+         }
+      }
+   } else {
+      out_printf (f, "%s", self->ascii_dims);
+      if (!strncmp (self->ascii_dims, "SH", 2)) {
+         i = strtol (self->ascii_dims+2, NULL, 10);
+         assert (i>=0 && i<ARY_NSH);
+         SHFlagsEncountered[i] += 1;
+      }
+   }
+   out_puts (f, "] ");
+   obj_print (self->sub, f);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_get_print_limits
+ *
+ * Purpose:     Reads the `$truncate' and `$trailing' browser variables to
+ *              determine which array elements should be printed.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 23 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-16
+ *              Added dollar signs to the beginning of truncate and trailing.
+ *-------------------------------------------------------------------------
+ */
+static void
+ary_get_print_limits (int nelmts,               /*input*/
+                      int *pnleft, int *pnright /*output*/) {
+   
+   obj_t        name=NIL, value=NIL;
+   int          nleft=nelmts, nright=0;
+   
+   name = obj_new (C_SYM, "$truncate");
+   value = sym_vboundp (name);
+   name = obj_dest (name);
+
+   if (num_isint(value) && (nleft=num_int(value))>=0) {
+      nleft = MIN (nleft, nelmts);
+      value = obj_dest (value);
+      name = obj_new (C_SYM, "$trailing");
+      value = sym_vboundp (name);
+      name = obj_dest (name);
+      
+      if (num_isint(value) && (nright=num_int(value))>=0) {
+         nright = MIN (nelmts, MIN (nright, nleft));
+         if (nelmts==nright) {
+            nleft = nright;
+            nright = 0;
+         }
+         nleft -= nright;
+      }
+   }
+   value = obj_dest (value);
+
+   if (nleft + nright >= nelmts) {
+      nleft = nelmts;
+      nright = 0;
+   }
+
+   if (pnleft) *pnleft = nleft;
+   if (pnright) *pnright = nright;
+}
+      
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_walk1
+ *
+ * Purpose:     Print memory cast as an array type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The array has an initial byte offset specification now.  The
+ *      caller gives MEM and the array starts at MEM+BYTE_OFFSET.
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added SH4 mode specially handled array.
+ *
+ *      Mark C. Miller, Wed Jul 14 21:01:16 PDT 2010
+ *      Added hackish SH5 mode, where 1D array's size is determined by
+ *      traversal for a terminal sentinel.
+ *-------------------------------------------------------------------------
+ */
+static void
+ary_walk1 (obj_t _self, void *mem, int operation, walk_t *wdata) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+   int          i, n, nbytes, *idx_ptr=NULL, ndims, dim[NDIMS];
+   int          nleft, nright;
+   int          oldlit;
+   out_t        *f=NULL;
+   char         buf[256];
+
+   /*
+    * Take into account the array offset.
+    */
+   mem = (char*)mem + self->byte_offset;
+
+   /*
+    * The size of each element of the array...
+    */
+   if ((nbytes=obj_sizeof(self->sub))<=0) {
+      /* Total hack to make SH5 case work */
+      if (ARY_SH_5==self->special_handling) {
+          nbytes=sizeof(int);
+      } else {
+          out_error ("unable to determine size of: ", self->sub);
+          return;
+      }
+   }
+
+   if (WALK_PRINT==operation) {
+      f = wdata->f;
+   } else {
+      f = OUT_STDOUT;
+   }
+   assert (f);
+
+   /*
+    * The number of dimensions and the size of each dimension.
+    * Some special things are handled here.
+    */
+   if (ARY_SH_1==self->special_handling) {
+      assert (self->ndims>0);
+      ndims = 1;
+      i = out_getindex (f, -1);
+      if (i<0) {
+         out_errorn ("unable to determine array size of: %s",
+                     self->ascii_dims);
+         n = dim[0] = self->dim[0];
+      } else if (i>=self->ndims) {
+         n = dim[0] = self->dim[self->ndims-1];
+      } else {
+         n = dim[0] = self->dim[i];
+      }
+   } else if (ARY_SH_2==self->special_handling) {
+      ndims = 1;
+      for (i=0,n=1; i<self->ndims; i++) n *= self->dim[i];
+      dim[0] = n;
+   } else if (ARY_SH_4==self->special_handling) {
+      ndims = 1;
+      for (i=0,n=0; i<self->ndims; i++) n += self->dim[i];
+      dim[0] = n;
+   } else {
+      assert (self->ndims<=NELMTS(dim));
+      ndims = self->ndims;
+      for (i=0,n=1; i<ndims; i++) {
+         dim[i] = self->dim[i];
+         n *= self->dim[i];
+      }
+   }
+
+   switch (operation) {
+   case WALK_PRINT:
+      /*
+       * Set up output prefix info.
+       */
+      ary_get_print_limits (n, &nleft, &nright);
+      idx_ptr = out_push_array (f, NULL, ndims, self->offset, dim);
+      out_puts (f, "{");
+
+      
+      for (i=0; i<n && !out_brokenpipe(f); i++) {
+         *idx_ptr = i;
+         if (i) {
+            /*
+             * The comma should be on the same line as the value.
+             */
+            oldlit = out_literal (f, true);
+            out_puts (f, ",");
+            out_literal (f, oldlit);
+
+            /*
+             * This space gets eaten at the beginning of a line.
+             */
+            out_puts (f, " ");
+         }
+
+         if (i==nleft) {
+            sprintf (buf, "%s(%d value%s omitted)%s",
+                     nleft?"...":"", n-(nleft+nright),
+                     1==n-(nleft+nright)?"":"s", nright?"...":"");
+            out_putw (f, buf);
+            i = (n-nright)-1;
+         } else {
+            obj_walk1 (self->sub, (char*)mem+i*nbytes, operation, wdata);
+         }
+      }
+
+      /*
+       * The last value ends with a curly brace on the same line.
+       */
+      if (!out_brokenpipe(f)) {
+         oldlit = out_literal (f, true);
+         out_puts (f, "}");
+         out_literal (f, oldlit);
+      }
+      out_pop (f);
+      break;
+
+   case WALK_RETRIEVE:
+      if (wdata->nvals<0) return ;      /*error already detected*/
+      if (wdata->vals == 0)
+      {
+          /* Total hack to make SH5 case work */
+          wdata->vals = (int *) malloc(10*sizeof(int));
+          wdata->nvals = 0;
+          wdata->maxvals = 10;
+          i = 0;
+          while (1)
+          {
+              if (wdata->nvals == wdata->maxvals)
+              {
+                  wdata->maxvals *= 1.5;
+                  wdata->vals = (int *) realloc(wdata->vals, wdata->maxvals*sizeof(int));
+              }
+              wdata->vals[i] = *((int*)((char*)mem+i*nbytes));
+              wdata->nvals++;
+              if (wdata->vals[i] == -1)
+                  break;
+              i++;
+          }
+      }
+      else
+      {
+          for (i=0; i<n && wdata->nvals<wdata->maxvals; i++) {
+             obj_walk1 (self->sub, (char*)mem+i*nbytes, operation, wdata);
+          }
+      }
+      break;
+
+   default:
+      abort();
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_walk2
+ *
+ * Purpose:     Determines if A_MEM and B_MEM are the same or different.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical.
+ *                 1: A and B are partially different.  We have printed
+ *                    the difference summary.
+ *                 2: A and B are completely different.  The caller should
+ *                    print the summary.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The array has an initial byte offset specification now.  The
+ *      caller gives MEM and the array starts at MEM+BYTE_OFFSET.
+ *
+ *      Robb Matzke, 2000-05-25
+ *      Obeys the DiffOpt settings.
+ *
+ *      Robb Matzke, 2000-06-27
+ *      The two-column output style is now supported.
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added SH4 mode specially handled array.
+ *
+ *      Mark C. Miller, Mon Dec  7 07:29:42 PST 2009
+ *      Made it descend into arrays of differing type.
+ *-------------------------------------------------------------------------
+ */
+static int
+ary_walk2 (obj_t _a, void *a_mem, obj_t _b, void *b_mem, walk_t *wdata) {
+
+    obj_ary_t   *a = MYCLASS(_a);
+    obj_ary_t   *b = MYCLASS(_b);
+    int         a_nbytes, b_nbytes;     /*bytes per element             */
+    int         a_total, b_total;       /*total elements per array      */
+    int         first=(-1), last;       /*differing range               */
+    int         *elmtno=NULL;           /*linear element number         */
+    int         nleft, nright;          /*print limits                  */
+    int         i, j, n, status, differ=0, oldlit;
+    int         a_ndims=0, a_dim[NDIMS];
+    int         b_ndims=0, b_dim[NDIMS];
+    out_t       *f = wdata->f;
+    char        buf[256];
+
+    assert(a->ndims);
+    assert(b->ndims);
+
+    /* The number of dimensions and the size of each dimension.  Some
+     * special things are handled here. */
+    if (ARY_SH_1==a->special_handling) {
+        assert(a->ndims>0);
+        a_ndims = 1;
+        i = out_getindex(f, -1);
+        if (i<0) {
+            out_errorn("unable to determine array size of: %s", a->ascii_dims);
+            a_dim[0] = a->dim[0];
+        } else if (i>=a->ndims) {
+            a_dim[0] = a->dim[a->ndims-1];
+        } else {
+            a_dim[0] = a->dim[i];
+        }
+    } else if (ARY_SH_2==a->special_handling) {
+        a_ndims = 1;
+        for (i=0,n=1; i<a->ndims; i++) n *= a->dim[i];
+        a_dim[0] = n;
+    } else if (ARY_SH_4==a->special_handling) {
+        a_ndims = 1;
+        for (i=0,n=0; i<a->ndims; i++) n += a->dim[i];
+        a_dim[0] = n;
+    } else {
+        assert (a->ndims<=NELMTS(a_dim));
+        a_ndims = a->ndims;
+        for (i=0; i<a_ndims; i++) a_dim[i] = a->dim[i];
+    }
+   
+    if (ARY_SH_1==b->special_handling) {
+        assert(b->ndims>0);
+        b_ndims = 1;
+        i = out_getindex(f, -1);
+        if (i<0) {
+            out_errorn("unable to determine array size of: %s", b->ascii_dims);
+            b_dim[0] = b->dim[0];
+        } else if (i>=b->ndims) {
+            b_dim[0] = b->dim[b->ndims-1];
+        } else {
+            b_dim[0] = b->dim[i];
+        }
+    } else if (ARY_SH_2==b->special_handling) {
+        b_ndims = 1;
+        for (i=0,n=1; i<b->ndims; i++) n *= b->dim[i];
+        b_dim[0] = n;
+    } else if (ARY_SH_4==b->special_handling) {
+        b_ndims = 1;
+        for (i=0,n=0; i<b->ndims; i++) n += b->dim[i];
+        b_dim[0] = n;
+    } else {
+        assert(b->ndims<=NELMTS(b_dim));
+        b_ndims = b->ndims;
+        for (i=0; i<b_ndims; i++) b_dim[i] = b->dim[i];
+    }
+
+
+    /* Take the byte offset into account. */    
+    a_mem = (char*)a_mem + a->byte_offset;
+    b_mem = (char*)b_mem + b->byte_offset;
+
+    /* If the number of dimensions differ or the size of a dimension (other
+     * than the first (slowest varying) dimension) differs then the entire
+     * arrays differ.  If the array subtypes differ in size then the entire
+     * arrays differ. */
+    if (a_ndims != b_ndims) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_printf(f, "%d-dimensional array", a_ndims);
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                out_printf(f, "%d-dimensional array", b_ndims);
+                out_nl(f);
+                return 1;
+            }
+            return 2;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "different dimensionality "
+                       "[%d in file A; %d in file B]", a_ndims, b_ndims);
+            out_nl(f);
+            return 1;
+        case DIFF_REP_SUMMARY:
+            return 1;
+        }
+    }
+    for (i=1,a_total=a_dim[0],b_total=b_dim[0]; i<a_ndims; i++) {
+        if (a_dim[i]!=b_dim[i]) return 2;
+        a_total *= a_dim[i];
+        b_total *= b_dim[i];
+    }
+    if ((a_nbytes=obj_sizeof(a->sub))<0) return -1;
+    if ((b_nbytes=obj_sizeof(b->sub))<0) return -1;
+    if (b_nbytes!=a_nbytes) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_printf(f, "%d-byte data", a_nbytes);
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                out_printf(f, "%d-byte data", b_nbytes);
+                out_nl(f);
+            }
+            out_printf(f, "different data sizes [%d in file A; %d in file B]",
+                       a_nbytes, b_nbytes);
+            out_nl(f);
+            break;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "different data sizes [%d in file A; %d in file B]",
+                       a_nbytes, b_nbytes);
+            out_nl(f);
+            return 1;
+        case DIFF_REP_SUMMARY:
+            return 1;
+        }
+    }
+    
+    if ((a_total>b_total && !DiffOpt.ignore_dels) ||
+        (a_total<b_total && !DiffOpt.ignore_adds)) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            /* We'll report the extra values below */
+            break;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "different sizes [%d in file A; %d in file B]",
+                       a_total, b_total);
+            out_nl(f);
+            return 1;
+        case DIFF_REP_SUMMARY:
+            return 1;
+        }
+    }
+
+    /* Only print array indices if we're doing a full difference. */
+    if (DIFF_REP_ALL==DiffOpt.report) {
+        elmtno = out_push_array(f, NULL, a_ndims, a->offset, a_dim);
+    }
+   
+    /* Compare and print partial differences. */
+    for (i=0; i<=MAX(a_total,b_total); i++) {
+        if (out_brokenpipe(f)) {
+            out_pop (f);
+            return -1;
+        }
+        if (elmtno) *elmtno = i;
+
+        if (i<MIN(a_total,b_total)) {
+            status = obj_walk2(a->sub, (char*)a_mem+i*a_nbytes,
+                               b->sub, (char*)b_mem+i*b_nbytes, wdata);
+        } else if (i<MAX(a_total,b_total)) {
+            if ((a_total>b_total && !DiffOpt.ignore_dels) ||
+                (a_total<b_total && !DiffOpt.ignore_adds)) {
+                status = 2;
+            } else {
+                status = 0;
+            }
+        } else if (first<=0) {
+            break;
+        } else {
+            status = 0;
+        }
+
+        if (status) {
+            differ++;
+            switch (DiffOpt.report) {
+            case DIFF_REP_ALL:
+                if (DiffOpt.two_column && 2==status) {
+                    /* A */
+                    if (i<a_total) {
+                        obj_walk1(a->sub, (char*)a_mem+i*a_nbytes,
+                                  WALK_PRINT, wdata);
+                    } else {
+                        out_puts(f, DIFF_NOTAPP);
+                    }
+                    /* B */
+                    out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                    if (i<b_total) {
+                        obj_walk1(b->sub, (char*)b_mem+i*b_nbytes,
+                                  WALK_PRINT, wdata);
+                    } else {
+                        out_puts(f, DIFF_NOTAPP);
+                    }
+                    out_nl(f);
+                } else {
+                    /* We'll report the differences below */
+                }
+                break;
+            case DIFF_REP_BRIEF:
+                out_puts(f, "different value(s)");
+                out_nl(f);
+                return 1;
+            case DIFF_REP_SUMMARY:
+                return 1;
+            }
+        }
+      
+        if (status<0 || 2==status) {
+            if (!DiffOpt.two_column) {
+                /* This is part of a differing range which has not been
+                 * printed yet. */
+                if (first<0) first = i;
+                last = i;
+            }
+            
+        } else if (first>=0) {
+            /* We've reached the end of a differing range.  Print the
+             * two arrays. */
+            out_pop(f);
+
+            /* A... */
+            out_line(f, "***************");
+            if (first<a_total) {
+                n = MIN(last+1, a_total) - first;
+                ary_get_print_limits(n, &nleft, &nright);
+                elmtno = out_push_array(f, NULL, a_ndims, a->offset,
+                                        a_dim);
+                if (elmtno) *elmtno = first;
+                out_puts(f, "{");
+                for (j=first; j<MIN(last+1, a_total); j++) {
+                    if (out_brokenpipe(f)) {
+                        out_pop(f);
+                        return -1;
+                    }
+                    if (elmtno) *elmtno = j;
+                    if (j>first) {
+                        oldlit = out_literal(f, true);
+                        out_puts(f, ",");
+                        out_literal(f, oldlit);
+                        out_puts(f, " ");
+                    }
+                    if (j==nleft+first) {
+                        sprintf(buf,"%s(%d value%s omitted)%s",
+                                nleft?"...":"", n-(nleft+nright),
+                                1==n-(nleft+nright)?"":"s",
+                                nright?"...":"");
+                        out_puts(f, buf);
+                        j = first+(n-nright)-1;
+                    } else {
+                        obj_walk1(a->sub, (char*)a_mem+j*a_nbytes,
+                                  WALK_PRINT, wdata);
+                    }
+                }
+                if (!out_brokenpipe(f)) {
+                    oldlit = out_literal(f, true);
+                    out_puts(f, "}");
+                    out_literal(f, oldlit);
+                }
+                out_pop(f);
+            }
+
+            /* B... */
+            out_line(f, "---------------");
+            if (first<b_total) {
+                n = MIN(last+1, b_total) - first;
+                ary_get_print_limits(n, &nleft, &nright);
+                elmtno = out_push_array(f, NULL, b_ndims, b->offset,
+                                        b_dim);
+                if (elmtno) *elmtno = first;
+                out_puts(f, "{");
+                for (j=first; j<MIN(last+1, b_total); j++) {
+                    if (out_brokenpipe(f)) {
+                        out_pop(f);
+                        return -1;
+                    }
+                    if (elmtno) *elmtno = j;
+                    if (j>first) {
+                        oldlit = out_literal(f, true);
+                        out_puts(f, ",");
+                        out_literal(f, oldlit);
+                        out_puts(f, " ");
+                    }
+                    if (j==nleft+first) {
+                        sprintf(buf, "%s(%d value%s omitted)%s",
+                                nleft?"...":"", n-(nleft+nright),
+                                1==n-(nleft+nright)?"":"s",
+                                nright?"...":"");
+                        out_puts(f, buf);
+                        j = first+(n-nright)-1;
+                    } else {
+                        obj_walk1(b->sub, (char*)b_mem+j*b_nbytes,
+                                  WALK_PRINT, wdata);
+                    }
+                }
+                if (!out_brokenpipe(f)) {
+                    oldlit = out_literal(f, true);
+                    out_puts(f, "}");
+                    out_literal(f, oldlit);
+                }
+                out_pop(f);
+            }
+
+            /* Reset */
+            if (out_brokenpipe(f)) return -1;
+            out_line(f, "***************");
+            elmtno = out_push_array(f, NULL, a_ndims, a->offset, a_dim);
+            first = -1;
+        }
+    }
+    if (DIFF_REP_ALL==DiffOpt.report) out_pop(f);
+    return differ ? (0==first && !DiffOpt.two_column ? 2 : 1) : 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_walk3
+ *
+ * Purpose:     Assigns from VAL to MEM according to TYPE.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+ary_walk3 (void *mem, obj_t _type, obj_t val) {
+
+   obj_ary_t    *type = MYCLASS(_type);
+   int          nelmts, size;
+   int          i, n, status;
+   obj_t        ptr=NIL;
+
+   assert (0==type->special_handling);
+   for (i=0,nelmts=1; i<type->ndims; i++) nelmts *= type->dim[i];
+   size = obj_sizeof (type->sub);
+
+   if (val && C_NUM==val->pub.cls) {
+      /*
+       * Assignment of a scalar value to an array.
+       */
+      for (i=0; i<nelmts; i++) {
+         void *tmp = (char*)mem + type->byte_offset + i*size;
+         status = obj_walk3 (tmp, type->sub, val);
+         if (status<0) return -1;
+      }
+
+   } else if (val && C_CONS==val->pub.cls) {
+      /*
+       * Assignment of a list of things to an array.  This is what we get
+       * when we say something like `data[1:3] = {11, 22, 33}' to the
+       * parser.
+       */
+      val = F_flatten (val);
+      n = F_length (val);
+      for (i=0,ptr=val,status=0; status>=0 && i<nelmts && ptr; i++) {
+         void *tmp = (char*)mem + type->byte_offset + i*size;
+         status = obj_walk3 (tmp, type->sub, cons_head(ptr));
+         ptr = cons_tail (ptr);
+      }
+      val = obj_dest (val); /*the flattened version*/
+
+      if (status>=0 && i<nelmts) {
+         /*
+          * The RHS was smaller than the LHS.
+          */
+         out_errorn ("ary_walk3: in `LHS = RHS' the size of the RHS had only "
+                     "%d element%s instead of %d (incomplete assignment)",
+                     n, 1==n?"":"s", nelmts);
+         
+      } else if (status>=0 && ptr) {
+         /*
+          * The RHS was larger than the LHS.
+          */
+         out_errorn ("ary_walk3: in `LHS = RHS' the size of the LHS had only "
+                     "%d element%s instead of %d (extra values were ignored)",
+                     nelmts, 1==nelmts?"":"s", n);
+      }
+      
+   } else {
+      out_error ("ary_walk3: inappropriate RHS in `LHS = RHS' where RHS = ",
+                 val);
+      return -1;
+   }
+   return 0;
+}
+      
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_deref_nocopy
+ *
+ * Purpose:     Same as ary_deref() except it doesn't return a new type.
+ *              Instead, it changes the array type in place.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  4 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+ary_deref_nocopy (obj_t _self, int argc, obj_t argv[]) {
+
+   obj_t        retval=NIL;
+
+   AryNoCopy++;
+   retval = ary_deref (_self, argc, argv);
+   --AryNoCopy;
+
+   assert (!retval || retval==_self);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_deref
+ *
+ * Purpose:     Given a selection expression, return a new array type.
+ *
+ * Return:      Success:        Ptr to a new array type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  6 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      The result has the same number of dimensions as the input, but
+ *      each dimension is probably smaller.
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      Dereferencing an array results in an array.  Therefore, if an object
+ *      is of type `[10]*[20]float' one can dereference the first array
+ *      but never the second.  Therefore, this function now takes more than
+ *      one selection criterion and applies as many as possible to the
+ *      current array and stores the number processed in the global
+ *      variable AryNProcessed.
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The byte offset is returned as part of the type.  It is no longer
+ *      necessary to call ary_offset().
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      If global variable `AryNoCopy' has a non-zero value then this
+ *      function modifies SELF in place instead of creating a new type.
+ *
+ *      Robb Matzke, 20 Mar 1997
+ *      Added the `static' qualifier.
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added SH4 mode specially handled array.
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_deref (obj_t _self, int argc, obj_t argv[]) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+   int          ndims=(-1), dim[NDIMS];
+   obj_t        _retval = NIL;
+   obj_ary_t    *retval = NULL;
+   int          lo, hi;                 /*selection indices, inclusive  */
+   int          nelmts;                 /*number elements selected      */
+   int          argno, i, acc;
+   int          n_ranges=0;
+   int          sh1_min=(-1);
+   char         buf[256];
+
+   /*
+    * What are the dimensions of SELF?  Be careful for special
+    * handling instructions.
+    */
+   if (ARY_SH_1==self->special_handling) {
+      ndims = 1;
+      dim[0] = sh1_min = self->dim[0];
+      for (i=1; i<self->ndims; i++) {
+         dim[0] = MAX(dim[0], self->dim[i]);
+         sh1_min = MIN (sh1_min, self->dim[i]);
+      }
+   } else if (ARY_SH_2==self->special_handling) {
+      ndims = 1;
+      for (i=0,dim[0]=1; i<self->ndims; i++) dim[0] *= self->dim[i];
+   } else if (ARY_SH_4==self->special_handling) {
+      ndims = 1;
+      for (i=0,dim[0]=0; i<self->ndims; i++) dim[0] += self->dim[i];
+   } else {
+      ndims = self->ndims;
+      for (i=0; i<self->ndims; i++) dim[i] = self->dim[i];
+   }
+
+   /*
+    * Make a new deep copy of the array type because we are about to
+    * modify it unless AryNoCopy is set.
+    */
+   if (AryNoCopy) {
+      _retval = _self;
+      retval = self;
+      retval->special_handling = 0;
+      retval->ndims = ndims;
+      for (i=0; i<ndims; i++) retval->dim[i] = dim[i];
+   } else {
+      _retval = obj_new (C_ARY, "COMPUTED", obj_copy (self->sub, DEEP));
+      retval = MYCLASS(_retval);
+      retval->ndims = ndims;
+      for (i=0; i<ndims; i++) {
+         retval->offset[i] = self->offset[i];
+         retval->dim[i] = dim[i];
+      }
+   }
+   AryNProcessed = 0;
+
+   for (argno=0; argno<argc && argno<ndims; argno++) {
+      /*
+       * What are the low and high selection values.
+       */
+      if (num_isint (argv[argno])) {
+         lo = hi = num_int (argv[argno]);
+      } else if (C_RANGE==argv[argno]->pub.cls) {
+         range_range (argv[argno], &lo, &hi);
+      } else {
+         sprintf (buf, "ary_deref: arg-%d is an inappropriate array "
+                  "subscript: ", argno+1);
+         out_error (buf, argv[argno]);
+         return NIL;
+      }
+
+      /*
+       * Are the selection criteria appropriate for this dimension?
+       */
+      if (lo<0) {
+         out_errorn ("ary_deref: inappropriate array subscript: %d", lo);
+         return NIL;
+      }
+      if (hi>=dim[argno]) {
+         out_errorn ("ary_deref: inappropriate array subscript: %d", hi);
+         return NIL;
+      }
+      if ((nelmts=hi+1-lo)<=0) {
+         out_errorn ("ary_deref: no array members selected by [%d,%d]",
+                     lo, hi);
+         return NIL;
+      }
+      if (sh1_min>=0 && hi>=sh1_min) {
+         out_info ("WARNING: ary_deref: SH1 flag is not implemented yet "
+                   "(assuming %d elements)", dim[0]);
+         out_info ("WARNING: ary_deref: possible array bounds overflow "
+                   "for elements %d:%d", MAX(sh1_min,lo), hi);
+      }
+
+
+      /*
+       * There can be only one dimension where more than one element is
+       * selected from that dimension but less than all of the elements
+       * are selected.  That dimension must be the first dimension where
+       * more than one element was selected.  Otherwise we get holes in
+       * memory that don't correspond to any selected value.
+       */
+      if (nelmts>1) {
+         n_ranges++;
+         if (n_ranges>1 && (lo!=0 || hi+1!=dim[argno])) {
+            out_errorn ("ary_deref: illegal partial range results in "
+                        "a memory hole");
+            return NIL;
+         }
+      } else if (n_ranges && (lo!=0 || hi+1!=dim[argno])) {
+         out_errorn ("ary_deref: illegal partial range results in a memory "
+                     "hole");
+         return NIL;
+      }
+
+
+      /*
+       * Update the offset from the beginning of this object's memory.
+       */
+      for (i=argno+1,acc=1; i<ndims; i++) acc *= dim[i];
+      retval->byte_offset += lo * acc * obj_sizeof(self->sub);
+
+      /*
+       * Update the array type.
+       */
+      retval->offset[argno] += lo;
+      retval->dim[argno] = nelmts;
+   }
+
+   AryNProcessed = argno;
+   return _retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_bind
+ *
+ * Purpose:     Array dimensions are stored as an unparsed character
+ *              string of dimension sizes and/or type symbols.  This function
+ *              dereferences the type symbols and splices the result
+ *              into the list of integers, storing the array dimensions
+ *              and dimension sizes in the `ndims' and `dims' fields.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 13 Jan 1997
+ *      Arrays are allowed to have a dimension of zero so that dynamic
+ *      size array types can point to a null.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      The array special handling flag `SH1' now takes an optional
+ *      argument which should be a scalar integer SILO data object.  If
+ *      the optional argument evaluates to something other than DB_COLLINEAR
+ *      then the special handling flag is discarded and the array is
+ *      multi-dimensional.
+ *
+ *      Mark C. Miller, Wed Jul 14 21:01:16 PDT 2010
+ *      Added hackish SH5 mode, where 1D array's size is determined by
+ *      traversal for a terminal sentinel.
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ary_bind (obj_t _self, void *mem) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+   char         *s, *t, *rest, buf[1024];
+   int          i, n, dim[NDIMS], max_dim0=0, sentinel;
+   lex_t        *lex_input=NULL;
+   obj_t        in=NIL, sdo=NIL;
+   walk_t       wdata;
+
+   self->ndims = 0;
+   strcpy (buf, self->ascii_dims);
+   s = buf;
+   
+   for (/*void*/; (t=strtok(s,",")); s=NULL) {
+      while (*t && isspace(*t)) t++;
+
+      if (!strncmp(t, "SH", 2) && isdigit(t[2])) {
+         self->special_handling = strtol (t+2, &rest, 0);
+         
+         if (ARY_SH_1==self->special_handling && rest && *rest) {
+	    if (strstr(rest, "DB_COLLINEAR"))
+	    {
+                wdata.vals = dim;
+                wdata.nvals = 1;
+		wdata.vals[0] = DB_COLLINEAR;
+	    }
+	    else
+	    {
+                lex_input = lex_string (rest);
+                in = parse_stmt (lex_input, false);
+                lex_close (lex_input);
+                sdo = obj_eval (in);
+                in = obj_dest (in);
+                if (!sdo || C_SDO!=sdo->pub.cls) {
+                   out_error ("array SH1 argument is invalid: ", sdo);
+                   self->ndims = 0;
+                   goto error;
+                }
+                wdata.vals = dim;
+                wdata.nvals = 0;
+                wdata.maxvals = 2;
+                obj_walk1 (sdo, NULL, WALK_RETRIEVE, &wdata);
+                sdo = obj_dest (sdo);
+	    }
+            if (wdata.nvals<1) {
+               out_errorn ("array SH1 argument has no value: %s", rest);
+               self->ndims = 0;
+               goto error;
+            }
+            if (wdata.nvals>1) {
+               out_errorn ("array SH1 argument `%s' should be scalar", rest);
+               self->ndims = 0;
+               goto error;
+            }
+            if (wdata.vals[0]!=DB_COLLINEAR) {
+               self->special_handling = 0; /*ignore special handling */
+            }
+            rest = NULL;
+
+         } else if (ARY_SH_3==self->special_handling) {
+            self->special_handling = 0; /*completely handled here*/
+            max_dim0 = strtol (rest, &rest, 0);
+         } else if (ARY_SH_5==self->special_handling) {
+            sentinel = strtol (rest, &rest, 0);
+            self->ndims = 1;
+         }
+         assert (!rest || !*rest);
+
+      } else if (*t && isdigit(*t)) {
+         /*
+          * Integer constant dimension.
+          */
+         if (self->ndims>=NDIMS) {
+            out_errorn ("too many dimensions in array type");
+            goto error;
+         }
+         self->dim[self->ndims] = n = strtol (t, &rest, 0);
+         self->ndims += 1;
+
+         if (n<0) {
+            out_errorn ("dimension %d is invalid: %d",
+                        self->ndims, n);
+            goto error;
+         }
+         if (rest && *rest) {
+            out_errorn ("invalid dimension %d: %s", self->ndims+1, t);
+            goto error;
+         }
+
+      } else if (*t && (isalpha(*t) || strchr("_$", *t))) {
+         /*
+          * Integer variable dimension.
+          */
+         lex_input = lex_string (t);
+         in = parse_stmt (lex_input, false);
+         lex_close (lex_input);
+         sdo = obj_eval (in);
+         in = obj_dest (in);
+         if (!sdo || C_SDO!=sdo->pub.cls) {
+            out_error ("array dimension is not appropriate: ", sdo);
+            self->ndims = 0;
+            goto error;
+         }
+         if (ARY_SH_5==self->special_handling)
+         {
+             wdata.vals = 0;
+             wdata.nvals = 0;
+             wdata.maxvals = 0;
+             obj_walk1 (sdo, NULL, WALK_RETRIEVE, &wdata);
+             if (wdata.nvals<1) {
+                out_errorn ("array dimension has no value: %s", t);
+                self->ndims = 0;
+                goto error;
+             }
+             sdo = obj_dest (sdo);
+             self->ndims = 1;
+             self->dim[0] = wdata.nvals;
+         }
+         else
+         {
+             wdata.vals = dim;
+             wdata.nvals = 0;
+             wdata.maxvals = NELMTS(dim);
+             obj_walk1 (sdo, NULL, WALK_RETRIEVE, &wdata);
+             if (wdata.nvals<1) {
+                out_errorn ("array dimension has no value: %s", t);
+                self->ndims = 0;
+                goto error;
+             }
+             sdo = obj_dest (sdo);
+             for (i=0; i<wdata.nvals; i++) {
+                if (self->ndims>=NDIMS) {
+                   out_errorn ("too many dimensions in array type");
+                   goto error;
+                }
+                self->dim[self->ndims] = n = wdata.vals[i];
+                self->ndims += 1;
+                if (n<0) {
+                   out_errorn ("dimension %d is invalid: %d",
+                               self->ndims, n);
+                   goto error;
+                }
+             }
+         }
+      } else {
+         /*
+          * What?
+          */
+         out_errorn ("invalid array dimension %d: %s", self->ndims+1, t);
+      }
+   }
+
+   if (max_dim0 && self->ndims>0 && self->dim[0]>max_dim0) {
+      out_errorn ("dimension zero has been truncated from %d to %d",
+                  self->dim[0], max_dim0);
+      self->dim[0] = max_dim0;
+   }
+   
+   return obj_bind (self->sub, mem);
+
+error:
+   if (sdo) sdo = obj_dest (sdo);
+   self->ndims = 0;
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_typeof
+ *
+ * Purpose:     Returns the type of an array element without copying the
+ *              type.
+ *
+ * Return:      Success:        The (uncopied) type of an array element.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  4 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+ary_typeof (obj_t _self) {
+
+   obj_ary_t    *self = MYCLASS(_self);
+
+   assert (self && C_ARY==self->pub.cls);
+   return self->sub;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_footnotes_reset
+ *
+ * Purpose:     Resets the SHFlagsEncountered counters.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Jul 29 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+ary_footnotes_reset (void)
+{
+   memset (SHFlagsEncountered, 0, sizeof(SHFlagsEncountered));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ary_footnotes_print
+ *
+ * Purpose:     Prints footnotes describing each special handling flag.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Jul 29 1997
+ *
+ * Modifications:
+ *
+ *      Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *      Added SH4 mode specially handled array.
+ *
+ *      Mark C. Miller, Wed Jul 14 21:01:16 PDT 2010
+ *      Added hackish SH5 mode, where 1D array's size is determined by
+ *      traversal for a terminal sentinel.
+ *-------------------------------------------------------------------------
+ */
+void
+ary_footnotes_print (void)
+{
+   char         title[64];
+   int          num = 1;
+
+   if (SHFlagsEncountered[ARY_SH_1] && SHFlagsEncountered[ARY_SH_1]<999) {
+      sprintf (title, "*** Footnote %d", num++);
+      out_push (OUT_STDOUT, title);
+      out_nl (OUT_STDOUT); /*blank line*/
+      out_putw (OUT_STDOUT, "The SH1 flag can be used to create ragged "
+                "edge arrays.  The size of the current dimension is one "
+                "of the specified values and is selected based on the "
+                "current index of the previous array.");
+      out_nl (OUT_STDOUT);
+      out_pop (OUT_STDOUT);
+      SHFlagsEncountered[ARY_SH_1] = 999; /*don't show it again*/
+   }
+
+   if (SHFlagsEncountered[ARY_SH_2] && SHFlagsEncountered[ARY_SH_2]<999) {
+      sprintf (title, "*** Footnote %d", num++);
+      out_push (OUT_STDOUT, title);
+      out_nl (OUT_STDOUT); /*blank line*/
+      out_putw (OUT_STDOUT, "The SH2 flag appearing in an array definition "
+                "indicates that the array is one-dimensional.  The size of "
+                "the dimension is the product of the listed sizes.");
+      out_nl (OUT_STDOUT);
+      out_pop (OUT_STDOUT);
+      SHFlagsEncountered[ARY_SH_2] = 999; /*don't show it again*/
+   }
+
+   if (SHFlagsEncountered[ARY_SH_3] && SHFlagsEncountered[ARY_SH_3]<999) {
+      sprintf (title, "*** Footnote %d", num++);
+      out_push (OUT_STDOUT, title);
+      out_nl (OUT_STDOUT); /*blank line*/
+      out_putw (OUT_STDOUT, "The SH3 flag appearing in an array definition "
+                "indicates that the size of the first dimension must not "
+                "exceed the size specified as the argument to this flag.");
+      out_nl (OUT_STDOUT);
+      out_pop (OUT_STDOUT);
+      SHFlagsEncountered[ARY_SH_3] = 999; /*don't show it again*/
+   }
+
+   if (SHFlagsEncountered[ARY_SH_4] && SHFlagsEncountered[ARY_SH_4]<999) {
+      sprintf (title, "*** Footnote %d", num++);
+      out_push (OUT_STDOUT, title);
+      out_nl (OUT_STDOUT); /*blank line*/
+      out_putw (OUT_STDOUT, "The SH4 flag appearing in an array definition "
+                "indicates that the array is one-dimensional.  The size of "
+                "the dimension is the sum of the listed sizes.");
+      out_nl (OUT_STDOUT);
+      out_pop (OUT_STDOUT);
+      SHFlagsEncountered[ARY_SH_4] = 999; /*don't show it again*/
+   }
+
+   if (SHFlagsEncountered[ARY_SH_5] && SHFlagsEncountered[ARY_SH_5]<999) {
+      sprintf (title, "*** Footnote %d", num++);
+      out_push (OUT_STDOUT, title);
+      out_nl (OUT_STDOUT); /*blank line*/
+      out_putw (OUT_STDOUT, "The SH5 flag appearing in an array definition "
+                "indicates that the array is one-dimensional.  The size of "
+                "the dimension is determined by traversing the array for a "
+                "sentinel, terminal value. The sentinel value is determined "
+                "by the argument to this flag.");
+      out_nl (OUT_STDOUT);
+      out_pop (OUT_STDOUT);
+      SHFlagsEncountered[ARY_SH_5] = 999; /*don't show it again*/
+   }
+
+
+}
diff --git a/tools/browser/bif.c b/tools/browser/bif.c
new file mode 100644
index 0000000..61980a4
--- /dev/null
+++ b/tools/browser/bif.c
@@ -0,0 +1,229 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             bif.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Built in function class
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+
+#define MYCLASS(X)      ((obj_bif_t*)(X))
+
+typedef struct obj_bif_t {
+   obj_pub_t    pub;
+   obj_t        (*cfunc)(int,obj_t[]);
+   int          holdfirst;      /*don't evaluate the first argument     */
+   int          holdrest;       /*don't eval args 2 through N           */
+   int          lex_special;    /*special lexical analysis              */
+} obj_bif_t;
+
+class_t         C_BIF;
+static obj_t    bif_new (va_list);
+static obj_t    bif_apply (obj_t,obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    bif_class
+ *
+ * Purpose:     Initializes the bif class.
+ *
+ * Return:      Success:        Ptr to the bif class
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+bif_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("BIF");
+   cls->new = bif_new;
+   cls->apply = bif_apply;
+   cls->dest = NULL;
+   cls->copy = NULL;
+   cls->print = NULL;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    bif_new
+ *
+ * Purpose:     Creates a new BIF object pointing to the specified C
+ *              function.
+ *
+ * Return:      Success:        Ptr to new BIF object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+bif_new (va_list ap) {
+
+   obj_bif_t    *self = calloc (1, sizeof(obj_bif_t));
+   int          flags ; 
+
+   assert (self);
+   self->cfunc = (obj_t(*)(int,obj_t[]))va_arg (ap, void*);
+   flags = va_arg (ap, int);
+
+   if (flags & HOLDFIRST) self->holdfirst = true;
+   if (flags & HOLDREST)  self->holdrest  = true;
+   if (flags & IMP_STRING)  self->lex_special = true;
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    bif_apply
+ *
+ * Purpose:     Apply a builtin function to some arguments.
+ *
+ * Return:      Success:        Ptr to the result.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+bif_apply (obj_t _self, obj_t args) {
+
+   obj_bif_t    *self = MYCLASS(_self);
+   obj_t        argv[128], cur, retval=NIL;
+   int          i, argc;
+
+
+   /*
+    * Evaluate the arguments.
+    */
+   for (i=0,cur=args; cur; cur=cons_tail(cur),i++) {
+      assert (C_CONS==cur->pub.cls);
+      assert (i<NELMTS(argv));
+      if ((i==0 && self->holdfirst) ||
+          (i>0 && self->holdrest)) {
+         argv[i] = obj_copy (cons_head(cur), SHALLOW);
+      } else {
+         argv[i] = obj_eval (cons_head(cur));
+      }
+   }
+   argc= i;
+
+   retval = (self->cfunc)(argc, argv);
+
+   for (i=0; i<argc; i++) {
+      argv[i] = obj_dest (argv[i]);
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    bif_lex_special
+ *
+ * Purpose:     Detects whether the function should be parsed so that the
+ *              first argument can be a special token that looks like a
+ *              file name (or something that isn't a normal token).
+ *
+ * Return:      Success:        true or false
+ *
+ *              Failure:        false
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+bif_lex_special (obj_t _self) {
+
+   obj_bif_t    *self = MYCLASS(_self);
+
+   if (!self || C_BIF!=self->pub.cls) return false;
+   return self->lex_special;
+}
diff --git a/tools/browser/browser.c b/tools/browser/browser.c
new file mode 100644
index 0000000..fbc0d15
--- /dev/null
+++ b/tools/browser/browser.c
@@ -0,0 +1,1789 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             browser.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             A better browser
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Fri Feb 28 14:13:29 PST 1997
+ *      Added checks for the readline library.
+ *
+ *      Sean Ahern, Tue Mar  3 16:00:09 PST 1998
+ *      Added a USAGE message, telling the user about flags to browser.
+ *    
+ *      Jeremy Meredith, Sept 21 1998
+ *      Added support for multi-species object.
+ *
+ *      Robb Matzke, 2000-05-31
+ *      Modularized the command-line parsing.
+ *
+ *      Thomas Treadway, Thu Jun  8 16:56:35 PDT 2006
+ *      Modified readline definitions to support new configure macro.
+ *-------------------------------------------------------------------------
+ */
+#include "config.h"     /*MeshTV configuration record*/
+
+#include <silo.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "browser.h"
+#include <ctype.h>
+#include <pwd.h>
+#include <math.h>
+#ifdef HAVE_LIBREADLINE
+#  if defined(HAVE_READLINE_READLINE_H)
+#    include <readline/readline.h>
+#  elif defined(HAVE_READLINE_H)
+#    include <readline.h>
+#  else /* !defined(HAVE_READLINE_H) */
+extern char *readline ();
+#  endif /* !defined(HAVE_READLINE_H) */
+char *cmdline = NULL;
+#else /* !defined(HAVE_READLINE_READLINE_H) */
+  /* no readline */
+#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE_HISTORY
+#  if defined(HAVE_READLINE_HISTORY_H)
+#    include <readline/history.h>
+#  elif defined(HAVE_HISTORY_H)
+#    include <history.h>
+#  else /* !defined(HAVE_HISTORY_H) */
+extern void add_history ();
+extern int write_history ();
+extern int read_history ();
+#  endif /* defined(HAVE_READLINE_HISTORY_H) */
+  /* no history */
+#endif /* HAVE_READLINE_HISTORY */
+#include <signal.h>
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif /* HAVE_SYS_STAT_H */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+const char *arg0;               /*argv[0]                               */
+int     Verbosity=1;            /*0=none, 1=normal, 2=more              */
+char    HistoryFile[1024];      /*command history file name             */
+size_t  Trapped_FPE;            /*how many SIGFPE's were raised?        */
+size_t  Trapped_WINCH;          /*how many SIGWINCH's were raised?      */
+switches_t *Switches=NULL;      /*command-line switches                 */
+
+char    *ObjTypeName[BROWSER_NOBJTYPES] = {
+   "curve", "multimesh", "multivar", "multimat", "multispecies", "qmesh", 
+   "qvar", "ucdmesh", "ucdvar", "ptmesh", "ptvar", "mat", "matspecies", "var",
+   "obj", "dir", "array", "defvars", "csgmesh", "csgvar", "multimeshadj",
+   "mrgtree", "groupelmap", "mrgvar"
+};
+
+/*
+ * Externals for the ale3d and debug filter registration.
+ */
+extern int       f_ale3d_Open ();
+extern int       f_debug_Open ();
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Print a usage message to the standard error stream.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+usage(void)
+{
+    switch_usage(Switches, arg0, NULL);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    pl
+ *
+ * Purpose:     Debugger function to print an object to the standard
+ *              output stream followed by a return.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        SELF
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+pl (obj_t self) {
+
+   extern int   DebugPrinting;
+
+   DebugPrinting++;
+   out_reset (OUT_STDERR);
+   out_printf (OUT_STDERR, "Object: ");
+   obj_print (self, OUT_STDERR);
+   out_nl (OUT_STDERR);
+   --DebugPrinting;
+   return self;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    sort_toc_by_name
+ *
+ * Purpose:     Compares two table of contents entries.  This sort function
+ *              sorts first by name then by object type.
+ *
+ * Return:      Success:        n<0, n==0, n>0 like strcmp.
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  6 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+sort_toc_by_name (toc_t *a, toc_t *b) {
+
+   int          cmp;
+
+   cmp = strcmp (a->name, b->name);
+   if (cmp) return cmp;
+
+   if (a->type == b->type) return 0;
+   return a->type < b->type ? -1 : 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    sort_toc_by_type
+ *
+ * Purpose:     Compares two table of contents entries.  This sort function
+ *              sorts first by type then by name.
+ *
+ * Return:      Success:        n<0, n==0, n>0 like strcmp().
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  6 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+sort_toc_by_type (toc_t *a, toc_t *b) {
+
+   if (a->type!=b->type) return a->type < b->type ? -1 : 1;
+   return strcmp (a->name, b->name);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetToc
+ *
+ * Purpose:     Reads a table of contents from the current directory
+ *              and builds an easier-to-use data structure.
+ *
+ * Return:      Success:        A browser table of contents.
+ *
+ *              Failure:        NULL, including when the table of contents
+ *                              is empty.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  6 1997
+ *
+ * Modifications:
+ *    Jeremy Meredith, Sept 21 1998
+ *    Added multimatspecies to TOC.
+ *
+ *    Jeremy Meredith, Mon Aug 16 13:30:36 PDT 1999
+ *    I replaced strdup with safe_strdup.
+ *
+ *    Robb Matzke, Fri May 19 13:32:08 EDT 2000
+ *    Avoid calls to malloc(0) since the result isn't defined by Posix.
+ *-------------------------------------------------------------------------
+ */
+toc_t *
+browser_DBGetToc (DBfile *file, int *nentries, int (*sorter)(toc_t*,toc_t*)) {
+
+   int          total;                  /*total number of objects       */
+   toc_t        *retval=NULL;           /*table of contents             */
+   int          i, at=0;
+   DBtoc        *toc;
+
+   toc = DBGetToc (file);
+   total = toc->ncurve + toc->nmultimesh + toc->nmultivar +
+           toc->nmultimat + toc->nmultimatspecies + toc->nqmesh + 
+           toc->nqvar + toc->nucdmesh + toc->nucdvar + toc->nptmesh +
+           toc->nptvar + toc->nmat + toc->nmatspecies + toc->nvar + 
+           toc->nobj + toc->ndir + toc->narrays + toc->ndefvars +
+           toc->ncsgmesh + toc->ncsgvar + toc->nmultimeshadj +
+           toc->nmrgtrees + toc->ngroupelmaps + toc->nmrgvars;
+   if (total) retval = malloc (total * sizeof(toc_t));
+
+   /*
+    * Load the various types of objects into the new structure.
+    */
+   for (i=0; i<toc->ndefvars; i++,at++) {
+      retval[at].name = safe_strdup (toc->defvars_names[i]);
+      retval[at].type = BROWSER_DB_DEFVARS;
+   }
+
+   for (i=0; i<toc->ncsgmesh; i++,at++) {
+      retval[at].name = safe_strdup (toc->csgmesh_names[i]);
+      retval[at].type = BROWSER_DB_CSGMESH;
+   }
+
+   for (i=0; i<toc->ncsgvar; i++,at++) {
+      retval[at].name = safe_strdup (toc->csgvar_names[i]);
+      retval[at].type = BROWSER_DB_CSGVAR;
+   }
+
+   for (i=0; i<toc->ncurve; i++,at++) {
+      retval[at].name = safe_strdup (toc->curve_names[i]);
+      retval[at].type = BROWSER_DB_CURVE;
+   }
+
+   for (i=0; i<toc->nmultimesh; i++,at++) {
+      retval[at].name = safe_strdup (toc->multimesh_names[i]);
+      retval[at].type = BROWSER_DB_MULTIMESH;
+   }
+
+   for (i=0; i<toc->nmultimeshadj; i++,at++) {
+      retval[at].name = safe_strdup (toc->multimeshadj_names[i]);
+      retval[at].type = BROWSER_DB_MULTIMESHADJ;
+   }
+
+   for (i=0; i<toc->nmultivar; i++,at++) {
+      retval[at].name = safe_strdup (toc->multivar_names[i]);
+      retval[at].type = BROWSER_DB_MULTIVAR;
+   }
+
+   for (i=0; i<toc->nmultimat; i++,at++) {
+      retval[at].name = safe_strdup (toc->multimat_names[i]);
+      retval[at].type = BROWSER_DB_MULTIMAT;
+   }
+
+   for (i=0; i<toc->nmultimatspecies; i++,at++) {
+      retval[at].name = safe_strdup (toc->multimatspecies_names[i]);
+      retval[at].type = BROWSER_DB_MULTIMATSPECIES;
+   }
+
+   for (i=0; i<toc->nqmesh; i++,at++) {
+      retval[at].name = safe_strdup (toc->qmesh_names[i]);
+      retval[at].type = BROWSER_DB_QMESH;
+   }
+
+   for (i=0; i<toc->nqvar; i++,at++) {
+      retval[at].name = safe_strdup (toc->qvar_names[i]);
+      retval[at].type = BROWSER_DB_QVAR;
+   }
+
+   for (i=0; i<toc->nucdmesh; i++,at++) {
+      retval[at].name = safe_strdup (toc->ucdmesh_names[i]);
+      retval[at].type = BROWSER_DB_UCDMESH;
+   }
+
+   for (i=0; i<toc->nucdvar; i++,at++) {
+      retval[at].name = safe_strdup (toc->ucdvar_names[i]);
+      retval[at].type = BROWSER_DB_UCDVAR;
+   }
+
+   for (i=0; i<toc->nptmesh; i++,at++) {
+      retval[at].name = safe_strdup (toc->ptmesh_names[i]);
+      retval[at].type = BROWSER_DB_PTMESH;
+   }
+
+   for (i=0; i<toc->nptvar; i++,at++) {
+      retval[at].name = safe_strdup (toc->ptvar_names[i]);
+      retval[at].type = BROWSER_DB_PTVAR;
+   }
+
+   for (i=0; i<toc->nmat; i++,at++) {
+      retval[at].name = safe_strdup (toc->mat_names[i]);
+      retval[at].type = BROWSER_DB_MAT;
+   }
+
+   for (i=0; i<toc->nmatspecies; i++,at++) {
+      retval[at].name = safe_strdup (toc->matspecies_names[i]);
+      retval[at].type = BROWSER_DB_MATSPECIES;
+   }
+
+   for (i=0; i<toc->nvar; i++,at++) {
+      retval[at].name = safe_strdup (toc->var_names[i]);
+      retval[at].type = BROWSER_DB_VAR;
+   }
+
+   for (i=0; i<toc->nobj; i++,at++) {
+      retval[at].name = safe_strdup (toc->obj_names[i]);
+      retval[at].type = BROWSER_DB_OBJ;
+   }
+
+   for (i=0; i<toc->ndir; i++,at++) {
+      retval[at].name = safe_strdup (toc->dir_names[i]);
+      retval[at].type = BROWSER_DB_DIR;
+   }
+
+   for (i=0; i<toc->narrays; i++,at++) {
+      retval[at].name = safe_strdup (toc->array_names[i]);
+      retval[at].type = BROWSER_DB_ARRAY;
+   }
+
+   for (i=0; i<toc->nmrgtrees; i++,at++) {
+      retval[at].name = safe_strdup (toc->mrgtree_names[i]);
+      retval[at].type = BROWSER_DB_MRGTREE;
+   }
+
+   for (i=0; i<toc->ngroupelmaps; i++,at++) {
+      retval[at].name = safe_strdup (toc->groupelmap_names[i]);
+      retval[at].type = BROWSER_DB_GROUPELMAP;
+   }
+
+   for (i=0; i<toc->nmrgvars; i++,at++) {
+      retval[at].name = safe_strdup (toc->mrgvar_names[i]);
+      retval[at].type = BROWSER_DB_MRGVAR;
+   }
+
+   assert (at==total);
+
+   /*
+    * Sort by name.
+    */
+   qsort (retval, total, sizeof(toc_t),
+          (int(*)(const void*,const void*))sorter);
+   if (nentries) *nentries = at;
+   return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_rl_obj_generator
+ *
+ * Purpose:     Returns completions for TEXT.  STATE is zero the first time
+ *              this function is called for a particular completion.  TEXT
+ *              is the (partial) name of the object being completed.
+ *
+ * Return:      Success:        Ptr to one of the possible completions.
+ *                              When STATE==0 the completion list is
+ *                              regenerated.
+ *
+ *              Failure:        NULL when all completions have been
+ *                              returned.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Feb  9 1997
+ *
+ * Modifications:
+ *
+ *      Sean Ahern, Fri Feb 28 14:13:50 PST 1997
+ *      Added a check for the readline library.
+ *
+ *      Jeremy Meredith, Mon Aug 16 13:30:36 PDT 1999
+ *      I replaced strdup with safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
+static char *
+browser_rl_obj_generator (char *text, int state) {
+
+   obj_t        f1, val;
+   int          i, n;
+   char         *s, *slash, cwd[1024];
+   DBfile       *file;
+
+   static toc_t *toc=NULL;
+   static int   nentries, current, length;
+   static char  *dir=NULL;
+
+   if (0==state) {
+      /*
+       * Free any previous table of contents.
+       */
+      if (toc) {
+         for (i=0; i<nentries; i++) {
+            if (toc[i].name) free (toc[i].name);
+         }
+         free (toc);
+         if (dir) free (dir);
+         toc = NULL;
+      }
+
+      /*
+       * Split the name into a directory and base name.
+       */
+      if ((slash=strchr(text, '/'))) {
+         if (slash==text) {
+            dir = safe_strdup ("/");
+         } else {
+            n = slash - text;
+            dir = malloc (n+1);
+            strncpy (dir, text, n);
+            dir[n] = '\0';
+         }
+         while ('/'==*slash) slash++;
+      } else {
+         dir = NULL;
+      }
+
+      /*
+       * Get the file
+       */
+      f1 = obj_new (C_SYM, "$1");
+      val = sym_vboundp (f1);
+      f1 = obj_dest (f1);
+      if (!val) return NULL;                    /*no completions*/
+      if (NULL==(file=file_file(val))) {
+         val = obj_dest (val);
+         return NULL;                           /*$1 is not a file      */
+      }
+      val = obj_dest (val);
+
+      /*
+       * Change to the directory and read the table of contents.
+       */
+      DBShowErrors (DB_SUSPEND, NULL);
+      if (dir) {
+         DBGetDir (file, cwd);
+         if (DBSetDir (file, dir)<0) {
+            free (dir);
+            dir = NULL;
+            return NULL;
+         }
+      }
+      toc = browser_DBGetToc (file, &nentries, sort_toc_by_name);
+      if (dir) DBSetDir (file, cwd);
+      DBShowErrors (DB_RESUME, NULL);
+
+      /*
+       * Replace each name in the table of contents with the full
+       * name.
+       */
+      if (dir) {
+         n = strlen (dir) + (strcmp(dir,"/") ? 1 : 0);
+         for (i=0; i<nentries; i++) {
+            s = malloc (n + strlen(toc[i].name) + 1);
+            sprintf (s, "%s%s%s", dir, strcmp(dir,"/")?"/":"", toc[i].name);
+            free (toc[i].name);
+            toc[i].name = s;
+         }
+      }
+
+      current = 0;
+      length = strlen (text);
+   }
+
+   /*
+    * Return the next entry that matches the partial base name.
+    */
+   for (/*void*/; current<nentries; current++) {
+      if (!strncmp(toc[current].name, text, length)) {
+         s = toc[current].name;
+         toc[current].name = NULL;
+         current++;
+         return s;
+      }
+   }
+
+   return NULL;
+}
+#endif /*HAVE_READLINE_READLINE_H && HAVE_LIBREADLINE */
+
+/*-------------------------------------------------------------------------
+ * Function:    different
+ *
+ * Purpose:     Determines if A and B are same or different based on an
+ *              absolute tolerance and relative tolerance.  A and B differ
+ *              if and only if
+ *
+ *                      | A-B | > ABSTOL
+ *
+ *              or
+ *
+ *                      2 | A-B |
+ *                      ---------  > RELTOL
+ *                       | A+B |
+ *
+ *              If ABSTOL or RELTOL is negative then the corresponding
+ *              test is not performed.  If both are negative then this
+ *              function degenerates to a `!=' operator.
+ *
+ * Return:      Success:        0 if same, 1 if different.
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Feb  6 1997
+ *
+ * Modifications:
+ *
+ *  Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *  Added suppot for alternate relative diff option.
+ *-------------------------------------------------------------------------
+ */
+int
+different (double a, double b, double abstol, double reltol,
+    double reltol_eps) {
+
+   double       num, den;
+
+   /*
+    * Now the |A-B| but make sure it doesn't overflow which can only
+    * happen if one is negative and the other is positive.
+    */
+   if (abstol>0) {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         if (fabs (a/2 - b/2) > abstol/2) return 1;
+      } else {
+         if (fabs(a-b) > abstol) return 1;
+      }
+   }
+
+   /*
+    * First, see if we should use the alternate diff.
+    * check |A-B|/(|A|+|B|+EPS) in a way that won't overflow.
+    */
+   if (reltol_eps >= 0)
+   {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         num = fabs (a/2 - b/2);
+         den = fabs (a/2) + fabs(b/2) + reltol_eps/2;
+         reltol /= 2;
+      } else {
+         num = fabs (a - b);
+         den = fabs (a) + fabs(b) + reltol_eps;
+      }
+      if (0.0==den && num) return 1;
+      if (num/den > reltol) return 1;
+   }
+
+   /*
+    * Now check 2|A-B|/|A+B| in a way that won't overflow.
+    */
+   if (reltol>0) {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         num = fabs (a/2 - b/2);
+         den = fabs (a/2 + b/2);
+         reltol /= 2;
+      } else {
+         num = fabs (a - b);
+         den = fabs (a/2 + b/2);
+      }
+      if (0.0==den && num) return 1;
+      if (num/den > reltol) return 1;
+   }
+
+   /*
+    * If all tests tried succeeded then the numbers are equal.
+    */
+   if (abstol>0 || reltol>0 || reltol_eps>=0) return 0;
+
+   /*
+    * Otherwise do a normal exact comparison.
+    */
+   return a!=b;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    differentll
+ *
+ * Purpose:     Implement above difference function for long long type. 
+ *
+ * Programmer:  Mark C. Miller, Mon Dec  7 07:05:39 PST 2009
+ *
+ * Modifications:
+ *   Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *   Change conditional compilation logic to compile this routine
+ *   whenever a double is NOT sufficient to hold full precision of long
+ *   or long long.
+ *
+ *   Mark C. Miller, Mon Jan 11 16:20:16 PST 2010
+ *   Made it compiled UNconditionally.
+ *-------------------------------------------------------------------------
+ */
+#define FABS(A) ((A)<0?-(A):(A))
+int
+differentll (long long a, long long b, double abstol, double reltol,
+    double reltol_eps) {
+
+   long long num, den;
+
+   /*
+    * Now the |A-B| but make sure it doesn't overflow which can only
+    * happen if one is negative and the other is positive.
+    */
+   if (abstol>0) {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         if (FABS(a/2 - b/2) > abstol/2) return 1;
+      } else {
+         if (FABS(a-b) > abstol) return 1;
+      }
+   }
+
+   /*
+    * First, see if we should use the alternate diff.
+    * check |A-B|/(|A|+|B|+EPS) in a way that won't overflow.
+    */
+   if (reltol_eps >= 0)
+   {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         num = FABS (a/2 - b/2);
+         den = FABS (a/2) + FABS(b/2) + reltol_eps/2;
+         reltol /= 2;
+      } else {
+         num = FABS (a - b);
+         den = FABS (a) + FABS(b) + reltol_eps;
+      }
+      if (0.0==den && num) return 1;
+      if (num/den > reltol) return 1;
+   }
+
+   /*
+    * Now check 2|A-B|/|A+B| in a way that won't overflow.
+    */
+   if (reltol>0) {
+      if ((a<0 && b>0) || (b<0 && a>0)) {
+         num = FABS (a/2 - b/2);
+         den = FABS (a/2 + b/2);
+         reltol /= 2;
+      } else {
+         num = FABS (a - b);
+         den = FABS (a/2 + b/2);
+      }
+      if (0.0==den && num) return 1;
+      if (num/den > reltol) return 1;
+   }
+
+   /*
+    * If all tests tried succeeded then the numbers are equal.
+    */
+   if (abstol>0 || reltol>0 || reltol_eps>=0) return 0;
+
+   /*
+    * Otherwise do a normal exact comparison.
+    */
+   return a!=b;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    set_diff
+ *
+ * Purpose:     Sets all differencing symbols to the same value.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 25 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Added initialization of the `int8' differencing parameters.
+ *
+ *      Mark C. Miller, Mon Jan 11 16:20:39 PST 2010
+ *      Added initialization for long long diff params.
+ *-------------------------------------------------------------------------
+ */
+static void
+set_diff (const char *suffix, const char *d) {
+
+   char         tmp[64];
+   obj_t        name=NIL;
+
+   sprintf (tmp, "$diff_int8_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_short_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_int_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_long_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_float_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_double_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+   sprintf (tmp, "$diff_llong_%s", suffix);
+   name = obj_new (C_SYM, tmp);
+   sym_vbind (name, obj_new (C_NUM, d));
+   name = obj_dest (name);
+
+}
+
+static double 
+browser_version()
+{
+    return strtod(DBVersion(), 0);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    check_version
+ *
+ * Purpose:     Checks the version number specified in the initialization
+ *              file to make sure it's up to date with respect to the
+ *              browser.  If the browser is at version N (an integer) then
+ *              the initialization file version must be a real number between
+ *              N (inclusive) and N+1 (exclusive).
+ *
+ * Return:      Success:        0 if version is OK
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  3 1997
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+static int
+check_version (const char *filename) {
+
+   obj_t        sym, val;
+   double       vers;
+   struct stat  sb;
+
+   /*
+    * If the startup file is empty then don't print any warnings.
+    */
+   if (stat (filename, &sb)>=0 && 0==sb.st_size) return 0;
+
+   sym = obj_new (C_SYM, "$browser_version");
+   val = sym_vboundp (sym);
+   sym = obj_dest (sym);
+
+   if (!val) {
+      out_errorn ("check_version: The initialization file `%s' seems to "
+                  "be lacking version information and may be out of date. "
+                  "Please update your initialization file or add the "
+                  "statement `$browser_version=%3.1f' after checking that "
+                  "the file contains valid initialization statements. Type "
+                  "`help' for the latest documentation.  Or use the `-f FILE' "
+                  "command-line option to specify some other startup file or "
+                  "say `-f /dev/null' for no file.",
+                  filename, browser_version());
+      return -1;
+   }
+
+   if (!num_isfp(val)) {
+      out_errorn ("check_version: The initialization file `%s' contains an "
+                  "invalid version number (it should be an integer or "
+                  "floating-point constant).  Type `$browser_version' to "
+                  "see the version specified in the file.", filename);
+      val = obj_dest (val);
+      return -1;
+   }
+
+   vers = num_fp (val);
+   val = obj_dest (val);
+
+   if (vers<browser_version()) {
+      out_errorn ("check_version: The initialization file `%s' was written "
+                  "for version %3.1f of the browser (the current browser version "
+                  "is %3.1f).  Please obtain the latest version of that file "
+                  "or verify that the commands in that file still apply "
+                  "to this version of the browser.  Or use the `-f FILE' "
+                  "command-line option to specify some other startup file or "
+                  "say `-f /dev/null' for no file.",
+                  filename, vers, browser_version());
+      return -1;
+   }
+
+   if (vers>=browser_version()+1) {
+      out_errorn ("check_version: Based on the contents of the initialization "
+                  "file `%s', you appear to be running an old version of the "
+                  "browser.  The file was written for version %3.1f, but this "
+                  "is browser version %3.1f.  Or use the `-f FILE' command-line "
+                  "option to specify some other startup file or say `-f "
+                  "/dev/null' for no file.",
+                  filename, vers, browser_version());
+      return -1;
+   }
+
+   return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Signal handler for SIGFPE.
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, June  2, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+sigfpe_handler(int signo)
+{
+    Trapped_FPE++;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Signal handler for SIGWINCH
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June  6, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+sigwinch_handler(int signo)
+{
+    Trapped_WINCH++;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    trapped_fpe
+ *
+ * Purpose:     If the SIGFPE counter is positive then tell the user that
+ *              NaN values might appear as zeros.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Jul 29 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+trapped_fpe(void)
+{
+    static int  ncalls=0;
+    
+    if (Trapped_FPE) {
+        if (Verbosity>=2) {
+            /* Tell the user every time a prompt is issued */
+            out_info("%lu floating point exception%s generated in last output",
+                     (unsigned long)Trapped_FPE, 1==Trapped_FPE?"":"s");
+            Trapped_FPE = 0;
+        } else if (Verbosity>=1 && 0==ncalls++) {
+            /* Tell the user just once */
+            out_info("This system generates SIGFPE when attempting to display "
+                     "invalid floating point data. Such data may appear as "
+                     "zeros instead of \"NaN\"");
+        }
+    }
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Perform operations that must be done each iteration
+ *              through the read-eval-print loop.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June  6, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static void
+rep_update(void)
+{
+    int         i;
+
+    /* Check for floating-point exceptions */
+    trapped_fpe();
+
+    /* Adjust output margins */
+    if (Trapped_WINCH) {
+        char tmp[32];
+        Trapped_WINCH=0;
+        out_init_size();
+        sprintf(tmp, "%d", OUT_NROWS);
+        sym_bi_set("height", tmp, NULL, NULL);
+        sprintf(tmp, "%d", OUT_NCOLS);
+        sym_bi_set("width", tmp, NULL, NULL);
+    } else {
+        if ((i=sym_bi_true("height")) && i>0) {
+            OUT_NROWS = i;
+        } else {
+            sym_bi_set("height", "0", NULL, NULL);
+            OUT_NROWS = 0; /*no paging*/
+        }
+        if ((i=sym_bi_true("width")) && i>0) {
+            OUT_NCOLS = i;
+        } else {
+            sym_bi_set("width", "80", NULL, NULL);
+            OUT_NCOLS = 80; /*default*/
+        }
+    }
+
+    /* Verbosity */
+    Verbosity = sym_bi_true("verbosity");
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Callback for the `--version' command-line switch. It
+ *              prints the version number one time.
+ *
+ * Return:      Zero
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Mar 10 15:42:31 PDT 2009
+ *   Changed to report version of the Silo library browser is linked with.
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+process_sw_version(switch_t *sw, const char *argv, const char *value)
+{
+    static int  ncalls=0;
+
+    if (0==ncalls++) {
+        out_info("This browser is linked with version %s of the Silo library",
+                 DBVersion());
+    }
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Callback for the `--help' command-line switch. It prints a
+ *              help message one time.
+ *
+ * Return:      Zero
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+process_sw_help(switch_t *sw, const char *argv, const char *value)
+{
+    static int  ncalls=0;
+
+    if (0==ncalls++) usage();
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Handles the `--verbose' and `--quiet' command-line switches.
+ *
+ * Return:      0
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+process_sw_verbose(switch_t *sw, const char *argv, const char *value)
+{
+    char        buf[16];
+
+    /* Set browser Verbosity */
+    if (!strcmp(sw->long_name, "--verbose")) {
+        Verbosity=2;
+    } else {
+        Verbosity=0;
+    }
+
+    /* Set internal variable */
+    sprintf(buf, "%d", Verbosity);
+    sym_bi_set("verbosity", buf, NULL, NULL);
+    
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Callback for `--eval' command-line switch.
+ *
+ * Return:      Zero on success, negative on failure
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+process_sw_eval(switch_t *sw, const char *argv, const char *value)
+{
+    strlist_t   *eval_list = (strlist_t*)(sw->info);
+
+    if (eval_list->nused>=NELMTS(eval_list->value)) {
+        out_errorn("too many `%s' and/or `%s' switches",
+                   sw->long_name, sw->short_name);
+        return -1;
+    }
+
+    eval_list->value[eval_list->nused++] = safe_strdup(value);
+    return 0;
+}
+    
+/*---------------------------------------------------------------------------
+ * Purpose:     Callback for `--exclude' command-line switch.
+ *
+ * Return:      Zero on success, negative on failure
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+process_sw_exclude(switch_t *sw, const char *argv, const char *value)
+{
+    strlist_t   *exclude_list = (strlist_t*)(sw->info);
+    char        *str = safe_strdup(value);
+    char        *t, *name;
+
+    for (t=str; (name=strtok(t, ", ")); t=NULL) {
+        /* Check for overflow */
+        if (exclude_list->nused>=NELMTS(exclude_list->value)) {
+            out_errorn("too many `%s' and/or `%s' switches",
+                       sw->long_name, sw->short_name);
+            return -1;
+        }
+
+        /* Add name to list */
+        exclude_list->value[exclude_list->nused++] = safe_strdup(name);
+    }
+    if (str) free(str);
+    return 0;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Process command-line switches.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-10-19
+ *              Set $obase from `--obase' argument.
+ *
+ *   Mark C. Miller, Wed Sep  2 16:46:46 PDT 2009
+ *   Added the 'pass' argument so we can skip resetting of $lowlevel on 
+ *   passes other than the first.
+ *
+ *  Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *  Added suppot for alternate relative diff option using epsilon switch.
+ *---------------------------------------------------------------------------
+ */
+static void
+process_switches(switches_t *switches, int pass)
+{
+    switch_t    *sw;
+    char        tmp[32], *s, *t, *word;
+    int         argc, i;
+    obj_t       argv[25], sym, val;
+
+    if ((sw=switch_find(switches, "--absolute")) && sw->seen) {
+        set_diff("abs", sw->lexeme);
+    }
+
+    if ((sw=switch_find(switches, "--relative")) && sw->seen) {
+        set_diff("rel", sw->lexeme);
+    }
+
+    if ((sw=switch_find(switches, "--epsilon")) && sw->seen) {
+        set_diff("eps", sw->lexeme);
+    }
+
+    if ((sw=switch_find(switches, "--diff")) && sw->seen) {
+        /* Convert command- and/or space-separated words into a list of
+         * symbols. */
+        s = t = safe_strdup(sw->lexeme);
+        if (s) {
+            for (argc=0; argc<NELMTS(argv) && (word=strtok(t, ", ")); argc++) {
+                argv[argc] = obj_new(C_SYM, word);
+                t = NULL;
+            }
+            val = V_make_list(argc, argv);
+            for (i=0; i<argc; i++) obj_dest(argv[i]);
+            free(s);
+        } else {
+            val = NIL;
+        }
+        sym = obj_new(C_SYM, "$diff");
+        sym_vbind(sym, val);
+        val=NIL;
+        sym = obj_dest(sym);
+    }
+
+    if ((sw=switch_find(switches, "--obase")) && sw->seen) {
+        sym_bi_set("obase", sw->lexeme, NULL, NULL);
+    }
+    
+    if ((sw=switch_find(switches, "--debug")) && sw->seen) {
+        DBDebugAPI = 2;
+    }
+
+    if ((sw=switch_find(switches, "--lowlevel")) && sw->seen && pass==0) {
+        sym_bi_set("lowlevel", sw->lexeme, NULL, NULL);
+    }
+    
+    if ((sw=switch_find(switches, "--rdonly")) && sw->seen) {
+        sprintf(tmp, "%d", sw->value.d); /*boolean*/
+        sym_bi_set("rdonly", tmp, NULL, NULL);
+    }
+
+    if ((sw=switch_find(switches, "--single")) && sw->seen) {
+        DBForceSingle(1);
+    }
+    
+    if ((sw=switch_find(switches, "--height")) && sw->seen) {
+        sym_bi_set("height", sw->lexeme, NULL, NULL);
+        OUT_NROWS = sw->value.d;
+    }
+    
+    if ((sw=switch_find(switches, "--width")) && sw->seen) {
+        sym_bi_set("width", sw->lexeme, NULL, NULL);
+        OUT_NCOLS = MAX(1, sw->value.d);
+    }
+
+    if ((sw=switch_find(switches, "--verbose")) && sw->seen) {
+        sym_bi_set("verbosity", "2", NULL, NULL);
+        Verbosity = 2;
+    } else if ((sw=switch_find(switches, "--quiet")) && sw->seen) {
+        sym_bi_set("verbosity", "0", NULL, NULL);
+        Verbosity = 0;
+    }
+
+    if ((sw=switch_find(switches, "--checksums")) && sw->seen) {
+        sym_bi_set("checksums", "1", NULL, NULL);
+    }
+    
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Print an error message about an unrecognized command-line
+ *              switch.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June  1, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static void
+bad_switch(const char *fmt, ...)
+{
+    va_list     ap;
+    
+    /* Base name of executable */
+    const char  *base = strrchr(arg0, '/');
+    base = base ? base+1 : arg0;
+
+    /* Print the error message */
+    va_start(ap, fmt);
+    fprintf(stderr, "%s: ", base);
+    vfprintf(stderr, fmt, ap);
+    fprintf(stderr, "\n");
+    fprintf(stderr, "Say `%s --help' for usage.\n", base);
+    va_end(ap);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    main
+ *
+ * Purpose:     A better SILO browser.
+ *
+ * Return:      Success:        exit(0)
+ *
+ *              Failure:        exit(non-zero)
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 10 Feb 1997
+ *      If the GNU readline and/or history libraries are available then
+ *      initialize them.
+ *
+ *      Robb Matzke, 25 Feb 1997
+ *      Added the `-A N' and `-R N' command-line options for setting the
+ *      absolute and relative differencing tolerances.
+ *
+ *      Sean Ahern, Fri Feb 28 14:14:24 PST 1997
+ *      Added checks for the readline library.
+ *
+ *      Robb Matzke, 5 Mar 1997
+ *      Changed INIT_DIRECTORY to PUBLIC_INIT_FILE.  The base name of
+ *      that file does not have to be the same as the base name of the
+ *      user's personal init file in his/her home directory.
+ *
+ *      Eric Brugger, Fri Mar 14 15:42:55 PST 1997
+ *      I modified the routine to register the ale3d and debug filters.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      We check for and print footnotes after each interactive command.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      If the `trap_fpe' variable is defined and non-zero then we ignore
+ *      floating point exceptions.  Some machines raise SIGFPE when
+ *      operating on NaN quantities and ignoring SIGFPE will convert them
+ *      to zeros, which isn't necessarily desired either.  The `trap_fpe'
+ *      variable is set with the `-nofpe' command-line switch and cleared
+ *      with `-fpe'
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Added the `--debug' option that prints the names of each silo
+ *      API function to stdout as it's called.  This is not for normal users
+ *      and is therefore not documented in the user manual.
+ *
+ *      Robb Matzke, 2 Apr 1999
+ *      Added the `-s' option which causes the browser to call
+ *      DBForceSingle() before doing much of anything.
+ *
+ *      Robb Matzke, 2000-05-23
+ *      The `-l' switch can take an integer argument, which is the value
+ *      which is assigned to the `$lowlevel' internal variable. The
+ *      default is one.
+ *
+ *      Robb Matzke, 2000-05-31
+ *      Added long command-line switches.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Calls DBShowErrors(DB_NONE) to turn off silo's error messages.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Changed SIGFPE behavior to make it automatic and quieter.
+ *
+ *      Robb Matzke, 2000-06-29
+ *      Added the `-E' and `--exclude' command-line switches.
+ *
+ *      Robb Matzke, 2000-07-10
+ *      Added support for the `include' command by passing an input stack to
+ *      the lexical analysis functions instead of just a single input
+ *      source.
+ *
+ *      Robb Matzke, 2000-10-19
+ *      Added `--obase' command-line switch.
+ *
+ *      Mark C. Miller, Tue Jul 22 17:49:15 PDT 2008
+ *      Added call to setlinebuf on stdout. This is to prevent situations
+ *      where a client shell using i/o-redirection of stderr into stdout
+ *      (e.g. '2>&1') results in browser output lines getting 'interrupted'
+ *      with lines from stderr.
+ *
+ *      Mark C. Miller, Wed Sep  2 16:47:43 PDT 2009
+ *      Added an argument to process_switches to indicate which pass
+ *      is being made.
+ *
+ *      Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *      Added suppot for alternate relative diff option epsilon switch.
+ *      Improved help message for various diff options.
+ *
+ *      Mark C. Miller, Tue Nov 17 22:32:01 PST 2009
+ *      Fixed help messages so difference equations would not get split
+ *      across new lines.
+ *
+ *      Mark C. Miller, Fri Feb 12 08:41:04 PST 2010
+ *      Added the --split-vfd switch.
+ *
+ *      Mark C. Miller, Fri Mar 12 00:35:43 PST 2010
+ *      Replaced --split-vfd switch with --hdf5-vfd-opts switch.
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+    obj_t        in=NIL, out=NIL;
+    lex_t        *input_stack=NULL, *tmp_file=NULL;
+    int          i, argno;
+    char         init_file_buf[1024];
+    const char   *init_file=NULL;
+    struct passwd *passwd=NULL;
+    strlist_t    eval_list, exclude_list, hdf5_vfd_opts;
+    switches_t   *sws=switch_new();
+    switch_t     *sw=NULL;
+    struct sigaction action;
+    
+    arg0 = argv[0]; /*global executable name*/
+
+    /* We want stdout line buffered to prevent possible redirection
+       from client shells (e.g. 2>&1) from having stderr cause
+       breaks in lines in stdout */
+    setlinebuf(stdout);
+
+#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
+    /* We have our own readline completion function that tries to complete
+     * object names instead of the standard completion function that tries
+     * to complete file names. */
+    rl_completion_entry_function = (char *(*)(const char *, int)) browser_rl_obj_generator;
+#endif /*HAVE_READLINE_READLINE_H && HAVE_LIBREADLINE*/
+
+#if defined(HAVE_READLINE_HISTORY_H) && defined(HAVE_READLINE_HISTORY)
+    /* History functions will be used.  A command history will be saved
+     * in the HISTORY_FILE. */
+    using_history();
+    stifle_history(HISTORY_STIFLE);
+#ifdef HISTORY_FILE
+    if ((passwd=getpwuid(getuid())) && passwd->pw_dir) {
+        assert (strlen(passwd->pw_dir)+strlen(HISTORY_FILE)+2 <
+                sizeof(HistoryFile));
+        sprintf (HistoryFile, "%s/%s", passwd->pw_dir, HISTORY_FILE);
+        read_history (HistoryFile);
+    } else {
+        HistoryFile[0] = '\0';
+    }
+#endif /*HISTORY_FILE*/
+#endif /*HAVE_READLINE_HISTORY_H && HAVE_READLINE_HISTORY*/
+
+    /* Turn off Silo error reporting */
+    DBShowErrors(DB_TOP, NULL);
+
+    /* Initialize data structures. */
+    out_init();
+    obj_init();
+    parse_init();
+    sym_init();
+    stc_silo_types();
+
+    /* Determine where the default startup file is located. Read either
+     * the user's init file or the system-wide init file, but not both.
+     * The `--file' command-line option overrides this. */
+    if ((passwd=getpwuid(getuid())) && passwd->pw_dir) {
+        sprintf(init_file_buf, "%s/%s", passwd->pw_dir, INIT_FILE);
+        if (access(init_file_buf, F_OK)>=0) init_file = init_file_buf;
+    }
+#ifdef PUBLIC_INIT_FILE
+    if (!init_file) {
+        strcpy(init_file_buf, PUBLIC_INIT_FILE);
+        if (access(init_file_buf, F_OK)>=0) init_file = init_file_buf;
+    }
+#endif /*PUBLIC_INIT_FILE*/
+
+    /* Define command-line switches */
+    switch_add(sws, "-A", "--absolute", "g:ATOL",        NULL);
+    switch_doc(NULL,
+               "All absolute differencing tolerances are set to ATOL. "
+               "Two numbers, A and B, are different if\n|A-B|>ATOL. "
+               "This sets the internal variables `$diff_*_abs' where `*' "
+               "is one of the following words: int8, short, int, long, "
+               "float, or double. Default is zero.");
+   
+    switch_add(sws, "-R", "--relative", "g:RTOL",        NULL);
+    switch_doc(NULL,
+               "All relative differencing tolerances are set to RTOL. "
+               "Two numbers, A and B, are different if\n2|A-B|/|A+B|>RTOL. "
+               "This sets the internal variables `$diff_*_rel' where `*' "
+               "is one of the following words: int8, short, int, long "
+               "float, or double. Default is zero.");
+   
+    switch_add(sws, "-x",   "--epsilon", "g:EPS",        NULL);
+    switch_doc(NULL,
+               "When non-negative, all relative differencing epsilon "
+               "parameters are set to EPS "
+               "and an alternate relative difference scheme is used where "
+               "two numbers, A and B, are different if\n|A-B|/(|A|+|B|+EPS)>RTOL. "
+               "This sets the internal variables `$diff_*_eps' where `*' "
+               "is one of the following words: int8, short, int, long "
+               "float, or double. For EPS=0, the algorithm is similar (but not "
+               "identical) to `normal' relative differencing. But for EPS=1, "
+               "it behaves in such a way as to shift between this alternate "
+               "relative differencing for large numbers and absolute differencing "
+               "for numbers near zero. Default is -1 (e.g. turned off).");
+   
+    switch_add(sws, "-V", "--version",  NULL,           process_sw_version);
+    switch_doc(NULL, "Shows the version number.");
+   
+    switch_add(sws, "-d", "--diff",     "s:WORDS",      NULL);
+    switch_doc(NULL,
+               "Controls the details of the `diff' function. WORDS is a "
+               "comma-separated list of key words: detail, brief, summary, "
+               "ignore_additions, ignore_deletions. See documentation for "
+               "the `$diff' variable for details.");
+
+    switch_add(sws, "-e", "--eval",     "s:EXPR",       process_sw_eval);
+    memset(&eval_list, 0, sizeof eval_list);
+    switch_info(NULL, &eval_list);
+    switch_doc(NULL,
+               "The browser expression EXPR is evaluated and printed on the "
+               "standard output stream. More than one expression can be given "
+               "to the browser by specifying this switch multiple times. The "
+               "expressions are evaluated in the order given.  When this "
+               "switch is specified the browser does not enter interactive "
+               "mode.");
+
+    switch_add(sws, "-E", "--exclude",  "s:NAMES",      process_sw_exclude);
+    memset(&exclude_list, 0, sizeof exclude_list);
+    switch_info(NULL, &exclude_list);
+    switch_doc(NULL,
+               "The browser $exclude variable is set to the comma- and/or "
+               "space-separated list of names supplied as the switch's "
+               "argument. This switch may appear more than once. The names "
+               "in the $exclude list will be excluded from recursive `diff' "
+               "operations.");
+    
+    switch_add(sws, "-f", "--file",     "s:FILE",       NULL);
+    switch_doc(NULL,
+               "When the browser begins execution it attempts to read the "
+               "file `.browser_rc' in the user's home directory. If that "
+               "file isn't readable then it tries to read a system-wide "
+               "browser initialization file. This command line switch causes "
+               "the specified file to be read instead. The file is read after "
+               "command-line options are parsed and command-line specified "
+               "database files are opened. After processing the file the "
+               "command-line options will be re-evaluated to override "
+               "settings in the startup file. To prevent the browser from "
+               "reading any initialization file, give the name "
+               "`/dev/null'. Starting the browser with `--verbose' will "
+               "cause it to display the name of the startup file it's using.");
+   
+    switch_add(sws, "-h", "--help",     NULL,           process_sw_help);
+    switch_doc(NULL,
+               "Show a usage summary. The browser `help' command can "
+               "provide more detailed documentation.");
+   
+    switch_add(sws, "-l", "--lowlevel", "u:N=1",        NULL);
+    switch_doc(NULL,
+               "This option sets the internal variable `$lowlevel' to N "
+               "(default 1), which causes the browser to load database "
+               "objects as type DBobject even if the object is some other "
+               "composite SILO datatype like DBquadvar.\n");
+
+    switch_add(sws, "-n", "--height",    "u:LINES",     NULL);
+    switch_doc(NULL,
+               "The browser pages interactive output to prevent it from "
+               "scrolling off the top of the screen. It normally decides "
+               "how tall the window is by making ioctl() calls, but this "
+               "switch can be used to override that choice. It sets the "
+               "$height variable to LINES.");
+   
+    switch_add(sws, "-q", "--quiet",    NULL,           process_sw_verbose);
+    switch_doc(NULL, "Cause the browser to be less verbose than normal by "
+               "setting the $verbosity variable to zero (default is one).");
+
+
+    switch_add(sws, "-o", "--obase",   "u:FORMAT",     NULL);
+    switch_doc(NULL,
+               "This switch sets the internal variable `$obase' to the "
+               "FORMAT base, which should be one of 16, 8, or 2 for "
+               "hexadecimal, octal, or binary output format. It controls how "
+               "integer, floating-point, character, and string data are "
+               "displayed. The default is that these types of data are "
+               "displayed with a type-dependent printf(3C) format string "
+               "which is user defined (e.g., `$fmt_int').");
+
+    switch_add(sws, "-r", "--rdonly",   "b=1",          NULL);
+    switch_doc(NULL,
+               "If this switch is specified then all files will be open in "
+               "read-only mode regardless of their permissions. This switch "
+               "sets the $rdonly variable.");
+
+    switch_add(sws, "-s", "--single",   "b=1",          NULL);
+    switch_doc(NULL,
+               "Causes DBForceSingle() to be called with an argument of one, "
+               "resulting in data being returned as type `float' instead of "
+               "`double'.");
+
+    switch_add(sws, "-v", "--verbose",  NULL,           process_sw_verbose);
+    switch_doc(NULL, "Cause the browser to be more verbose than normal by "
+               "setting the $verbosity variable to two (default is one).");
+
+    switch_add(sws, "-w", "--width",    "u:COLUMNS",    NULL);
+    switch_doc(NULL,
+               "The browser normally breaks lines to prevent them from "
+               "wrapping around from the right margin to the next line. It "
+               "decides how many columns are appropriate by making ioctl() "
+               "calls, but this switch overrides that choice. This switch "
+               "sets $width to COLUMNS.");
+
+    switch_add(sws, NULL, "--debug",    "b=1",          NULL);
+    switch_doc(NULL, "Tells SILO to display the names of the SILO API "
+               "functions as they are called. This switch is probably only "
+               "useful to those who debug the browser.");
+
+    switch_add(sws, "-c", "--checksums", NULL,        NULL);
+    switch_doc(NULL,
+               "This option sets the internal variable `$checksums' to 1 "
+               "(default 0), which causes the browser to perform checksums, "
+               "when available in the database, during read.\n");
+
+    /* We can get away with using process_sw_exclude here to process hdf5 vfd
+     * options because that routine winds up stuffing the results into the
+     * list identifed in switch_info */
+    switch_add(sws, NULL, "--hdf5-vfd-opts", "s:H5VFDOPTS", process_sw_exclude);
+    memset(&hdf5_vfd_opts, 0, sizeof hdf5_vfd_opts);
+    switch_info(NULL, &hdf5_vfd_opts);
+    switch_doc(NULL,
+               "Tells browser sets of HDF5 virtual file driver (vfd) options "
+               "when opening files.\n");
+
+    /* Parse, then process command-line options */
+    Switches = sws;
+    if ((argno=switch_parse(sws, argc, argv, bad_switch))<0) exit(1);
+    process_switches(sws, 0);
+
+    /* Assign the --exclude list to the $exclude variable */
+    if ((sw=switch_find(sws, "--exclude")) && sw->seen) {
+        obj_t list[NELMTS(exclude_list.value)], symbol, value;
+        for (i=0; i<exclude_list.nused; i++) {
+            list[i] = obj_new(C_STR, exclude_list.value[i]);
+        }
+        value = V_make_list(exclude_list.nused, list);
+        for (i=0; i<exclude_list.nused; i++) {
+            obj_dest(list[i]);
+        }
+        symbol = obj_new(C_SYM, "$exclude");
+        sym_vbind(symbol, value);
+        obj_dest(symbol);
+    }
+    
+    /* Assign the --hdf5-vfd-opts values list to the $h5vfdopts variable */
+    if ((sw=switch_find(sws, "--hdf5-vfd-opts")) && sw->seen) {
+        obj_t list[NELMTS(hdf5_vfd_opts.value)], symbol, value;
+        for (i=0; i<hdf5_vfd_opts.nused; i++) {
+            list[i] = obj_new(C_STR, hdf5_vfd_opts.value[i]);
+        }
+        value = V_make_list(hdf5_vfd_opts.nused, list);
+        for (i=0; i<hdf5_vfd_opts.nused; i++) {
+            obj_dest(list[i]);
+        }
+        symbol = obj_new(C_SYM, "$h5vfdopts");
+        sym_vbind(symbol, value);
+        obj_dest(symbol);
+    }
+    
+    /* If invoked with --help then exit now.  If invoked with just
+    * `--version' and no other arguments then exit now. */
+    if (((sw=switch_find(sws, "--help")) && sw->seen) ||
+        ((sw=switch_find(sws, "--version")) && sw->seen && 2==argc)) {
+        exit(0);
+    }
+   
+    /* Register the ale3d and debug filters. */    
+    DBFilterRegistration("ale3d", NULL, f_ale3d_Open);
+    DBFilterRegistration("debug", NULL, f_debug_Open);
+
+    /* Remaining words on the command-line are file names.  Open them as
+     * `$1', `$2', etc. */
+    for (i=1; argno<argc; argno++,i++) {
+        char sym[16];
+        obj_t av[2];
+
+        sprintf(sym, "$%d", i);
+        av[0] = obj_new(C_SYM, argv[argno]);
+        av[1] = obj_new(C_SYM, sym);
+        out = V_open(2, av);
+        obj_dest(av[0]);
+        obj_dest(av[1]);
+        out = obj_dest(out);
+    }
+
+    /* Don't dump core on floating-point exceptions. Keep track of window
+     * size changes. */
+    action.sa_handler = sigwinch_handler;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = SA_RESTART;
+    sigaction(SIGWINCH, &action, NULL);
+
+    action.sa_handler = sigfpe_handler;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = SA_RESTART;
+    sigaction(SIGFPE, &action, NULL);
+
+    /* Open the initialization file and read it. */    
+    if ((sw=switch_find(sws, "--file")) && sw->seen) init_file = sw->lexeme;
+    if (init_file) {
+        input_stack = lex_stack();
+        if (NULL==(tmp_file=lex_open(init_file))) {
+            out_errorn("cannot open initialization file `%s'", init_file);
+            exit(1);
+        } else {
+            if (Verbosity>=2) {
+                out_info("reading commands from `%s'", init_file);
+            }
+            lex_push(input_stack, tmp_file);
+            for (;;) {
+                in = parse_stmt(input_stack, true);
+                if (in && C_SYM==in->pub.cls &&
+                    !strcmp(obj_name(in), "__END__")) {
+                    break;
+                }
+                out = obj_eval(in);
+                in = obj_dest(in);
+                out = obj_dest(out);
+                rep_update();
+            }
+        }
+        input_stack = lex_close(input_stack);
+        check_version(init_file);
+    } else if (Verbosity>=2) {
+        out_info("no initialization file -- using built-in defaults");
+    }
+    
+
+    /* Flags set on the command-line override values set in the initilization
+    * file, so reprocess the command-line switches. */
+    process_switches(sws, 1);
+
+    /* Process expressions given on the command line.  A control-C should
+     * terminate the command and the browser. If there were expressions
+    * then don't enter interactive mode. */
+    for (i=0; i<eval_list.nused; i++) {
+        input_stack = lex_stack();
+        lex_push(input_stack, lex_string(eval_list.value[i]));
+        for (;;) {
+            in = parse_stmt(input_stack, true);
+            if (in && C_SYM==in->pub.cls && !strcmp(obj_name(in), "__END__")) {
+                break;
+            }
+            out_reset(OUT_STDOUT);
+            out = obj_eval(in);
+            if (PAGER_INTERRUPT==out_brokenpipe(OUT_STDOUT)) {
+                fflush(OUT_STDOUT->f);
+                fputs("\nCaught SIGINT.\n", stdout);
+                exit(1);
+            }
+            if (out || Verbosity>=2) {
+                obj_print(out, OUT_STDOUT);
+                out_nl(OUT_STDOUT);
+            }
+            in = obj_dest(in);
+            out = obj_dest(out);
+            rep_update();
+        }
+        input_stack = lex_close(input_stack);
+    }
+    if (eval_list.nused) exit(0);
+
+#if !defined(HAVE_READLINE_READLINE_H) || !defined(HAVE_LIBREADLINE)
+    out_info("Command-line editing is disabled (no readline library).");
+#endif
+
+    /* Now process interactive input. */
+    input_stack = lex_stack();
+    lex_push(input_stack, lex_stream(stdin));
+
+    ary_footnotes_reset();
+    for (;;) {
+        in = parse_stmt(input_stack, true);
+        if (in && C_SYM==in->pub.cls && !strcmp(obj_name(in), "__END__")) {
+            break;
+        }
+
+        out_reset(OUT_STDOUT);
+        rep_update(); /*handle sigs that arrived during input */
+        out = obj_eval(in);
+        if (PAGER_INTERRUPT==out_brokenpipe(OUT_STDOUT)) {
+            fflush(OUT_STDOUT->f);
+            fputs("\nCommand aborted.\n", stdout);
+            in = obj_dest(in);
+            out = obj_dest(out);
+            continue;
+        }
+
+        if (out || Verbosity>=2) {
+            obj_print(out, OUT_STDOUT);
+            out_nl(OUT_STDOUT);
+        }
+
+        ary_footnotes_print();
+        in = obj_dest(in);
+        out = obj_dest(out);
+        rep_update(); /*handle changes to state from eval */
+        if (Verbosity>=2) out_info("Objects allocated: %d", obj_usage());
+    }
+
+    lex_close(input_stack);
+    return 0;
+}
diff --git a/tools/browser/browser.h b/tools/browser/browser.h
new file mode 100644
index 0000000..6784fe2
--- /dev/null
+++ b/tools/browser/browser.h
@@ -0,0 +1,683 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             browser.h
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Browser header file
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 10 Feb 1997
+ *      The Makefile can override INIT_FILE, HISTORY_FILE,
+ *      and HISTORY_STIFLE by defining any of those constants on the
+ *      compiler command-line.
+ *
+ *      Robb Matzke, 5 Mar 1997
+ *      Changed the name of the browser startup file to `.browser_rc'.
+ *
+ *      Robb Matzke, 11 Jun 1997
+ *      Changed the documentation URL to something that probably won't
+ *      be found (but won't be found quickly) until we find a permanent
+ *      home for the documentation.  The documentation URL in this file
+ *      is the initial value for the `doc_url' variable which can be
+ *      (re)set from initialization files without recompiling.
+ *
+ *      Jeremy Meredith, Fri Nov 19 09:47:37 PST 1999
+ *      Added code to replace strdup calls with safe_strdup calls.
+ *
+ *      Sean Ahern, Wed May 10 14:22:50 PDT 2000
+ *      Removed tabs.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Incremented browser major version number because names of internal
+ *      variables changed, making older init files no longer work.
+ *
+ *      Eric Brugger, Mon Aug  7 13:49:15 PDT 2000
+ *      I changed the patch number for release 4.1.
+ *
+ *      Eric Brugger, Fri Sep  1 17:35:18 PDT 2000
+ *      I changed the patch number for release 4.1.1.
+ *
+ *      Eric Brugger, Thu Oct 19 14:38:00 PDT 2000
+ *      I changed the patch number for release 4.1.2.
+ *
+ *      Eric Brugger, Fri Apr  6 11:43:43 PDT 2001
+ *      I changed the patch number for release 4.2.
+ *
+ *      Eric Brugger, Fri Nov  1 10:47:02 PDT 2001
+ *      I changed the patch number for release 4.2.1.
+ *
+ *      Eric Brugger, Mon Mar 11 15:03:10 PST 2002
+ *      I changed the patch number for release 4.3.
+ *
+ *      Eric Brugger, Mon May  6 11:14:32 PDT 2002
+ *      I changed the patch number for release 4.3.1.
+ *
+ *      Eric Brugger, Tue Aug 27 08:58:40 PDT 2002
+ *      I changed the patch number for release 4.3.2.
+ *
+ *      Eric Brugger, Fri Sep 12 10:52:23 PDT 2003
+ *      I changed the patch number for release 4.4.
+ *
+ *      Eric Brugger, Tue Sep 28 11:50:10 PDT 2004
+ *      I changed the patch number for release 4.4.1.
+ *
+ *      Mark C. Miller, Tue Feb 15 11:11:22 PST 2005
+ *      I changed the patch number for release 4.4.2
+ *
+ *      Mark C. Miller, Tue Mar 10 15:41:50 PDT 2009
+ *      Removed VERSION symbols. No need for browser to maintain
+ *      version information apart from the Silo library it is linked with.
+ *-------------------------------------------------------------------------
+ */
+#ifndef _BROWSER_H
+#define _BROWSER_H
+
+#include <silo.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define false           0
+#define true            1
+#define CAUGHT_SIGINT   999999
+#define SHALLOW         0
+#define DEEP            1
+#define NIL             ((obj_t)0)
+#define NDIMS           10
+#define NELMTS(X)       (sizeof(X)/sizeof(*(X)))
+
+char *safe_strdup(const char *);
+#undef strdup
+#define strdup(s) safe_strdup(s)
+
+/*
+ * The Makefile can override these constants.
+ */
+#ifndef INIT_FILE
+#  define INIT_FILE     ".browser_rc"           /*relative to $HOME*/
+#endif
+#ifndef HISTORY_FILE
+#  define HISTORY_FILE  ".browser_history"      /*relative to $HOME*/
+#endif
+#ifndef HISTORY_STIFLE
+#  define HISTORY_STIFLE 500
+#endif
+
+/* Command-line switches */
+typedef struct switch_t switch_t;
+typedef struct switches_t switches_t;
+typedef int (*switch_handler_t)(switch_t*, const char*, const char*);
+
+struct switches_t {
+    size_t      nused;          /*number of switches defined    */
+    size_t      nalloc;         /*number of slots allocated     */
+    switch_t    *sw;            /*array of switches             */
+};
+
+struct switch_t {
+    char        *short_name;    /*single letter switch          */
+    char        *long_name;     /*full name of switch           */
+    char        *arg_spec;      /*argument specification        */
+    char        *doc_string;    /*documentation string          */
+    void        *info;          /*extra info to pass through    */
+    switches_t  *all;           /*containing switch list        */
+    switch_handler_t handler;   /*callback function             */
+    int         seen;           /*number of times seen          */
+    const char  *lexeme;        /*lexeme of latest occurrence   */
+    union {
+        int     d;
+        double  g;
+        const char *s;
+    } value;                    /*value of latest occurrence    */
+};
+
+/*
+ * These are often already defined.
+ */
+#ifndef MAX
+#  define MAX(X,Y)      ((X)>(Y)?(X):(Y))
+#endif
+#ifndef MIN
+#  define MIN(X,Y)      ((X)<(Y)?(X):(Y))
+#endif
+                
+typedef struct obj_t *obj_t;
+typedef struct class_t *class_t;
+
+/*
+ * The walk functions take an extra argument to hold state information.
+ */
+typedef struct walk_t {
+
+#define WALK_PRINT      0                       /*print typed memory    */
+   struct out_t         *f;                     /*output file           */
+
+#define WALK_RETRIEVE   1                       /*retrieve integer vals */
+   int                  nvals;                  /*number retrieved vals */
+   int                  maxvals;                /*max vals to retreive  */
+   int                  *vals;                  /*retrieved values      */
+
+#define WALK_DIFF       2
+   obj_t                a_sdo;                  /*SDO for a_mem         */
+   obj_t                b_sdo;                  /*SDO for b_mem         */
+
+} walk_t;
+
+/*
+ * I/O association tables map integer values to string constants and
+ * vice versa.
+ */
+#define NASSOCS         32
+
+typedef struct prim_assoc_t {
+   int          n ;                     /*integer part                  */
+   char         *s ;                    /*string part                   */
+} prim_assoc_t;
+
+/*
+ * Class methods and variables.
+ */
+struct class_t {
+   char                 *name ;                 /*class name            */
+   obj_t                (*new)(va_list);        /*constructor           */
+   obj_t                (*dest)(obj_t);         /*destructor            */
+   obj_t                (*copy)(obj_t,int);     /*copy constructor      */
+   void                 (*print)(obj_t,struct out_t*);  /*print object  */
+   obj_t                (*eval)(obj_t);         /*evaluate an object    */
+   obj_t                (*feval)(obj_t);        /*evaluate to a function*/
+   obj_t                (*apply)(obj_t,obj_t);  /*apply func to args    */
+   char                 *(*objname)(obj_t);     /*get object name       */
+   void                 (*walk1)(obj_t,void*,int,walk_t*); /*traversal  */
+   int                  (*walk2)(obj_t,void*,obj_t,void*,walk_t*);/*diff*/
+   int                  (*walk3)(void*,obj_t,obj_t);/*assignements      */
+   int                  (*size_of)(obj_t);      /*number of bytes in obj*/
+   obj_t                (*deref)(obj_t,int,obj_t*); /*dereference an obj*/
+   obj_t                (*bind)(obj_t,void*);   /*binds array dimensions*/
+   int                  (*diff)(obj_t,obj_t);   /*object differencer    */
+};
+
+
+/*
+ * Public object methods and variables...
+ */
+typedef struct obj_pub_t {
+   class_t              cls ;                   /*my class              */
+   int                  ref ;                   /*reference count       */
+} obj_pub_t;
+
+struct obj_t {
+   obj_pub_t            pub;
+   /*private stuff here*/
+};
+
+/*
+ * Types of tokens returned by the lexical analysis functions.
+ */
+#define TOK_EOF         EOF             /*end of file                   */
+#define TOK_EOL         256             /*end of line                   */
+#define TOK_INVALID     257             /*invalid character on input    */
+#define TOK_SYM         258             /*symbol                        */
+#define TOK_NUM         259             /*integer or floating pt const  */
+#define TOK_RT          '>'             /*file redirection              */
+#define TOK_RTRT        260             /*file appending                */
+#define TOK_PIPE        '|'             /*redirection to a command      */
+#define TOK_STR         261             /*string constant               */
+#define TOK_DOT         '.'             /*dot                           */
+#define TOK_LTPAREN     '('
+#define TOK_RTPAREN     ')'
+#define TOK_COLON       ':'
+#define TOK_COMMA       ','
+#define TOK_EQ          '='
+#define TOK_LTCURLY     '{'
+#define TOK_RTCURLY     '}'
+
+typedef struct lex_t {                  /*lexer input stream            */
+    FILE                *f;             /*input file                    */
+    char                *s;             /*input string                  */
+    int                 at;             /*offset into input string      */
+    int                 tok;            /*current token                 */
+    char                lexeme[8192];   /*current lexeme                */
+    char                *prompt;        /*prompt string                 */
+    struct lex_t        *stack[32];     /*input stack                   */
+    int                 nstack;         /*items on input stack          */
+} lex_t;
+
+#define OUT_NFIELDS     20              /*max output fields             */
+
+/* Pager flags */
+typedef enum {
+    PAGER_OKAY=0,                       /*normal (default) pager mode   */
+    PAGER_INTERRUPT,                    /*got a SIGINT                  */
+    PAGER_PIPE,                         /*got a SIGPIPE                 */
+    PAGER_NEXT_SECTION,                 /*turn off until next section   */
+    PAGER_NEXT_CMD                      /*turn off pager until next cmd */
+} pflags_t;
+
+#define PAGER_ACTIVE(F) ((F)->paged && PAGER_OKAY==(F)->pflags)
+
+typedef struct out_t {                  /*output stream                 */
+    FILE                *f;             /*output file                   */
+    int                 row, col;       /*current position              */
+    int                 paged;          /*should output be paged?       */
+    pflags_t            pflags;         /*how should output be paged?   */
+    int                 rtmargin;       /*columns for right margin      */
+    int                 indent;         /*indentation level             */
+    int                 literal;        /*output literally              */
+    int                 nfields;        /*number of prefix fields       */
+    char                *header;        /*table header line             */
+    struct {
+        char            *name ;         /*field name                    */
+        int             silent;         /*this field is not printed     */
+        int             elmtno ;        /*current array element number  */
+        int             ndims ;         /*array dimensionality or zero  */
+        int             offset[NDIMS] ; /*origin for printing           */
+        int             dim[NDIMS] ;    /*dimension sizes               */
+    } field[OUT_NFIELDS];
+} out_t;
+
+/*
+ * function attributes
+ */
+#define HOLDFIRST       0x0001          /*don't eval first arg          */
+#define HOLDREST        0x0002          /*don't eval remaining args     */
+#define HOLD    (HOLDFIRST|HOLDREST)    /*don't eval any arguments      */
+#define IMP_STRING      0x0004          /*next tok is an implied string */
+
+/* List of strings */
+typedef struct strlist_t {
+    int         nused;
+    char        *value[500];
+} strlist_t;
+
+/* Differencing options. */
+typedef enum diff_rep_t {
+    DIFF_REP_ALL        = 0,            /*report all differences        */
+    DIFF_REP_BRIEF      = 1,            /*report all; don't print data  */
+    DIFF_REP_SUMMARY    = 2             /*only report summary           */
+} diff_rep_t;
+
+typedef struct diffopt_t {
+    diff_rep_t          report;         /*what to report                */
+    int                 ignore_adds;    /*ignore things in B only       */
+    int                 ignore_dels;    /*ignore things in A only       */
+    int                 two_column;     /*use pdbdiff output style?     */
+    double              c_abs, c_rel, c_eps; /*int8 tolerances          */
+    double              s_abs, s_rel, s_eps; /*short tolerances         */
+    double              i_abs, i_rel, i_eps; /*integer tolerances       */
+    double              l_abs, l_rel, l_eps; /*long tolerances          */
+    double              f_abs, f_rel, f_eps; /*float tolerances         */
+    double              d_abs, d_rel, d_eps; /*double tolerances        */
+    double              ll_abs, ll_rel, ll_eps; /*long long tolerances  */
+    strlist_t           exclude;        /*objects to exclude            */
+} diffopt_t;
+
+#define DIFF_NOTAPP     "N/A"           /*not applicable                */
+#define DIFF_SEPARATOR  " "             /*for two-column output         */
+
+/*
+ * SILO has a hard-to-use table of contents datatype, so we make our
+ * own here.  Also, the DBObjectType constants cannot be used to index
+ * into an array, so we define our own here.
+ */
+#define BROWSER_DB_CURVE           0
+#define BROWSER_DB_MULTIMESH       1
+#define BROWSER_DB_MULTIVAR        2
+#define BROWSER_DB_MULTIMAT        3
+#define BROWSER_DB_MULTIMATSPECIES 4
+#define BROWSER_DB_QMESH           5
+#define BROWSER_DB_QVAR            6
+#define BROWSER_DB_UCDMESH         7
+#define BROWSER_DB_UCDVAR          8
+#define BROWSER_DB_PTMESH          9
+#define BROWSER_DB_PTVAR           10
+#define BROWSER_DB_MAT             11
+#define BROWSER_DB_MATSPECIES      12
+#define BROWSER_DB_VAR             13
+#define BROWSER_DB_OBJ             14
+#define BROWSER_DB_DIR             15
+#define BROWSER_DB_ARRAY           16
+#define BROWSER_DB_DEFVARS         17
+#define BROWSER_DB_CSGMESH         18
+#define BROWSER_DB_CSGVAR          19
+#define BROWSER_DB_MULTIMESHADJ    20
+#define BROWSER_DB_MRGTREE         21
+#define BROWSER_DB_GROUPELMAP      22
+#define BROWSER_DB_MRGVAR          23
+#define BROWSER_NOBJTYPES          24   /*must be last                  */
+
+typedef struct toc_t {
+   char                 *name;          /*object name                   */
+   int                  type;           /*a BROWSER_DB_* constant       */
+} toc_t;
+
+typedef struct DBdirectory {
+   int                  nsyms;          /*number of symbols             */
+   toc_t                *toc;           /*each entry                    */
+   toc_t                **entry_ptr;    /*see `stc.c'                   */
+} DBdirectory;
+
+/*
+ * The strtok(3) function isn't reentrant.  We have our own that is.
+ * The third argument is this struct which holds all the state info.
+ */
+typedef struct strtok_t {
+   char                 *stop;          /*end of previous token         */
+   char                 save;           /*old character at `stop'       */
+} strtok_t;
+
+/* Table of contents for help */
+typedef struct helptoc_t {
+    char                *name;
+    char                *desc;
+} helptoc_t;
+
+extern helptoc_t        HelpFuncToc[25];
+extern int              NHelpFuncToc;
+extern helptoc_t        HelpVarToc[50];
+extern int              NHelpVarToc;
+extern helptoc_t        HelpOpToc[25];
+extern int              NHelpOpToc;
+
+/*
+ * Classes...
+ */
+extern class_t  C_ARY  ;                /*array data type               */
+extern class_t  C_BIF  ;                /*built in function             */
+extern class_t  C_CONS ;                /*LISP-like cons cells          */
+extern class_t  C_FILE ;                /*SILO File                     */
+extern class_t  C_NUM  ;                /*numbers                       */
+extern class_t  C_PRIM ;                /*a primitive type              */
+extern class_t  C_PTR  ;                /*a pointer type                */
+extern class_t  C_RANGE ;               /*integer range object          */
+extern class_t  C_SDO  ;                /*a silo data object            */
+extern class_t  C_STC  ;                /*structure data type           */
+extern class_t  C_STR  ;                /*strings                       */
+extern class_t  C_SYM  ;                /*symbols                       */
+
+/*** class initializers ***/
+class_t ary_class   (void);
+class_t bif_class   (void);
+class_t cons_class  (void);
+class_t file_class  (void);
+class_t num_class   (void);
+class_t prim_class  (void);
+class_t ptr_class   (void);
+class_t range_class (void);
+class_t sdo_class   (void);
+class_t stc_class   (void);
+class_t str_class   (void);
+class_t sym_class   (void);
+
+/*** array.c ***/
+extern int AryNProcessed;
+obj_t ary_deref_nocopy (obj_t, int, obj_t*);
+obj_t ary_typeof (obj_t);
+void ary_footnotes_reset (void);
+void ary_footnotes_print (void);
+
+/*** bif.c ***/
+int bif_lex_special (obj_t);
+
+/*** browser.c ***/
+extern int Verbosity;
+extern char HistoryFile[];
+extern char *ObjTypeName[BROWSER_NOBJTYPES];
+void usage(void);
+int different (double, double, double, double, double);
+toc_t *browser_DBGetToc (DBfile*, int*, int(*)(toc_t*,toc_t*));
+int sort_toc_by_name (toc_t*, toc_t*);
+int sort_toc_by_type (toc_t*, toc_t*);
+
+/*** cons.c ***/
+obj_t cons_head (obj_t);
+obj_t cons_tail (obj_t);
+
+/*** file.c ***/
+DBfile *file_file (obj_t);
+int file_rdonly (obj_t);
+
+/*** func.c ***/
+extern diffopt_t DiffOpt;
+obj_t V_array (int, obj_t[]);
+obj_t V_assign (int, obj_t[]);
+obj_t V_close (int, obj_t[]);
+obj_t F_cons (obj_t, obj_t);
+obj_t V_diff (int, obj_t[]);
+obj_t V_dot (int, obj_t[]);
+obj_t V_exit (int, obj_t[]);
+void F_fbind (obj_t, obj_t);
+obj_t V_file (int, obj_t[]);
+obj_t F_flatten (obj_t);
+obj_t F_head (obj_t);
+obj_t V_help (int, obj_t[]);
+obj_t V_include(int, obj_t[]);
+int F_length (obj_t);
+obj_t V_list (int, obj_t[]);
+obj_t V_make_list (int, obj_t[]);
+obj_t V_noprint (int, obj_t[]);
+obj_t V_open (int, obj_t[]);
+obj_t V_pipe (int, obj_t[]);
+obj_t V_pointer (int, obj_t[]);
+obj_t V_primitive (int, obj_t[]);
+obj_t V_print (int, obj_t[]);
+obj_t V_pwd (int, obj_t[]);
+obj_t V_quote (int, obj_t[]);
+obj_t V_redirect (int, obj_t[]);
+obj_t F_reverse (obj_t);
+obj_t V_setcwd (int, obj_t[]);
+obj_t V_setf (int, obj_t[]);
+obj_t V_struct (int, obj_t[]);
+obj_t F_tail (obj_t);
+obj_t V_typeof (int, obj_t[]);
+
+/*** lex.c ***/
+extern lex_t *LEX_STDIN;
+lex_t *lex_open (const char*);
+lex_t *lex_stream (FILE*);
+lex_t *lex_string (const char*);
+lex_t *lex_stack(void);
+void lex_push(lex_t *f, lex_t *item);
+lex_t *lex_close (lex_t*);
+int lex_getc (lex_t*);
+int lex_ungetc (lex_t*, int);
+char *lex_gets (lex_t*, char*, int);
+int lex_token (lex_t*, char**, int);
+void lex_special (lex_t*, int);
+int lex_consume (lex_t*);
+void lex_set (lex_t*, int, char*);
+char *lex_strtok (char*, const char*, strtok_t*);
+
+/*** num.c ***/
+int num_isint (obj_t);
+int num_int (obj_t);
+int num_isfp (obj_t);
+double num_fp (obj_t);
+
+/*** obj.c ***/
+void obj_init (void);
+obj_t obj_new (class_t, ...);
+obj_t obj_dest (obj_t);
+int obj_diff (obj_t, obj_t);
+obj_t obj_copy (obj_t, int);
+void obj_print (obj_t, out_t*);
+obj_t obj_eval (obj_t);
+obj_t obj_feval (obj_t);
+obj_t obj_apply (obj_t, obj_t);
+char *obj_name (obj_t);
+int obj_usage (void);
+void obj_walk1 (obj_t, void*, int, walk_t*);
+int obj_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+int obj_walk3 (void*, obj_t, obj_t);
+int obj_sizeof (obj_t);
+obj_t obj_deref (obj_t, int, obj_t*);
+obj_t obj_bind (obj_t, void*);
+int obj_truth (obj_t);
+
+/*** output.c ***/
+extern out_t *OUT_STDOUT;
+extern out_t *OUT_STDERR;
+extern int OUT_NCOLS;
+extern int OUT_NROWS;
+extern int OUT_LTMAR;
+extern int OUT_COL2;
+pflags_t out_brokenpipe (out_t*);
+void out_section(out_t*);
+void out_error (const char*, obj_t);
+void out_errorn (const char*, ...);
+int out_error_disable (void);
+int out_error_restore (void);
+void out_indent (out_t*);
+void out_column(out_t *f, int column, const char *separator);
+void out_info (const char*, ...);
+void out_init_size(void);
+void out_init (void);
+void out_line (out_t*, const char*);
+int out_literal (out_t*, int);
+void out_nl (out_t*);
+void out_pop (out_t*);
+void out_header(out_t *f, const char *header);
+void out_prefix (out_t*);
+void out_printf (out_t*, const char*, ...);
+void out_progress (const char*);
+void out_push (out_t*, const char*);
+int *out_push_array (out_t*, const char*, int, const int*, const int*);
+void out_puts (out_t*, const char*);
+void out_putw (out_t*, const char*);
+void out_reset (out_t*);
+out_t *out_stream (FILE*);
+void out_undent (out_t*);
+int out_getindex (out_t*, int);
+
+/*** parse.c ***/
+void parse_init (void);
+obj_t parse_stmt (lex_t*, int);
+
+/*** prim.c ***/
+extern prim_assoc_t PA_BR_OBJTYPE[];
+extern prim_assoc_t PA_OBJTYPE[];
+extern prim_assoc_t PA_DATATYPE[];
+extern prim_assoc_t PA_ORDER[];
+extern prim_assoc_t PA_ONOFF[];
+extern prim_assoc_t PA_BOOLEAN[];
+extern prim_assoc_t PA_COORDSYS[];
+extern prim_assoc_t PA_COORDTYPE[];
+extern prim_assoc_t PA_FACETYPE[];
+extern prim_assoc_t PA_PLANAR[];
+extern prim_assoc_t PA_CENTERING[];
+extern prim_assoc_t PA_DEFVARTYPE[];
+extern prim_assoc_t PA_BOUNDARYTYPE[];
+extern prim_assoc_t PA_REGIONOP[];
+extern prim_assoc_t PA_TOPODIM[];
+
+obj_t prim_set_io_assoc (obj_t, prim_assoc_t*);
+DBdatatype prim_silotype (obj_t);
+void prim_octal(char *buf/*out*/, const void *_mem, size_t nbytes);
+
+/*** range.c ***/
+int range_range (obj_t, int*, int*);
+
+/*** sdo.c ***/
+obj_t sdo_assign (obj_t, obj_t);
+obj_t sdo_cast (obj_t, obj_t);
+obj_t sdo_typeof (obj_t);
+obj_t sdo_file (obj_t);
+void *sdo_mem (obj_t);
+
+/*** stc.c ***/
+obj_t stc_add (obj_t, obj_t, int, const char*);
+void stc_sort (obj_t, int);
+int stc_offset (obj_t, obj_t);
+void stc_silo_types (void);
+
+/*** str.c ***/
+void str_doprnt (out_t*, char*, char*);
+
+/*** switch.c ***/
+switches_t *switch_new(void);
+switch_t *switch_add(switches_t *sws,
+                     const char *short_name, const char *long_name,
+                     const char *arg_spec, switch_handler_t handler);
+void switch_info(switch_t *sw, void *info);
+void switch_doc(switch_t *sw, const char *doc_string);
+switch_t *switch_find(switches_t *sws, const char *name);
+void switch_usage(switches_t *sws, const char *arg0, const char *sname);
+int switch_parse(switches_t *sws, int argc, char *argv[],
+                 void(*error)(const char*, ...));
+void switch_arg(switch_t *sw, int *type, size_t name_size, char *name,
+                int *required, const char **dflt);
+
+/*** sym.c ***/
+void sym_init (void);
+void sym_fbind (obj_t, obj_t);
+obj_t sym_fboundp (obj_t);
+void sym_vbind (obj_t, obj_t);
+obj_t sym_vboundp (obj_t);
+void sym_dbind(obj_t _self, obj_t value);
+obj_t sym_dboundp(obj_t _self);
+obj_t sym_self_set (obj_t);
+int sym_truth (char*);
+void sym_bi_set(const char *name, const char *value, const char *desc,
+                const char *doc);
+char *sym_bi_gets(const char *name);
+int sym_bi_true(const char *name);
+int sym_map(int(*func)(obj_t, void*), void *cdata);
+void sym_doc(const char *symname, const char *docstr);
+
+#endif /* !_BROWSER_H */
+
diff --git a/tools/browser/browser.html b/tools/browser/browser.html
new file mode 100644
index 0000000..3e918aa
--- /dev/null
+++ b/tools/browser/browser.html
@@ -0,0 +1,1386 @@
+<html lang="en">
+<head>
+<title>Silo Browser User Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="Silo Browser User Manual">
+<meta name="generator" content="makeinfo 4.8">
+<link title="Top" rel="top" href="#Top">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+  pre.display { font-family:inherit }
+  pre.format  { font-family:inherit }
+  pre.smalldisplay { font-family:inherit; font-size:smaller }
+  pre.smallformat  { font-family:inherit; font-size:smaller }
+  pre.smallexample { font-size:smaller }
+  pre.smalllisp    { font-size:smaller }
+  span.sc    { font-variant:small-caps }
+  span.roman { font-family:serif; font-weight:normal; } 
+  span.sansserif { font-family:sans-serif; font-weight:normal; } 
+--></style>
+</head>
+<body>
+<h1 class="settitle">Silo Browser User Manual</h1>
+<div class="node">
+<p><hr>
+<a name="Top"></a>
+Next: <a rel="next" accesskey="n" href="#Copying">Copying</a>,
+Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
+
+</div>
+
+<h2 class="unnumbered">The Silo Browser User Manual</h2>
+
+<p>This document describes the Silo file browser, an application program
+built on the Silo library for interactive viewing of Silo database
+files.
+
+<ul class="menu">
+<li><a accesskey="1" href="#Copying">Copying</a>:                      Copyright information. 
+<li><a accesskey="2" href="#Invocation">Invocation</a>:                   Invoking the browser. 
+<li><a accesskey="3" href="#Syntax">Syntax</a>:                       Command Syntax. 
+<li><a accesskey="4" href="#Functions">Functions</a>:                    Builtin Functions. 
+<li><a accesskey="5" href="#Operators">Operators</a>:                    Browser operators. 
+<li><a accesskey="6" href="#Internal-Variables">Internal Variables</a>:           Controlling the browser personality. 
+<li><a accesskey="7" href="#Startup-File">Startup File</a>:                 Browser initialization. 
+<li><a accesskey="8" href="#Editing">Editing</a>:                      Changing the values of objects. 
+<li><a accesskey="9" href="#Paging">Paging</a>:                       Long output is paginated. 
+<li><a href="#Redirection">Redirection</a>:                  Sending output to a file or command. 
+<li><a href="#Interrupts">Interrupts</a>:                   Interrupting a long-running command. 
+<li><a href="#Examples">Examples</a>:                     Some simple examples. 
+</ul>
+
+<!-- =========================================================================== -->
+<!-- =========================================================================== -->
+<!-- =========================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Copying"></a>
+Next: <a rel="next" accesskey="n" href="#Invocation">Invocation</a>,
+Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="unnumbered">Copyright</h2>
+
+<p>Copyright © (c) 1994 - 2010, Lawrence Livermore National Security, LLC. 
+LLNL-CODE-425250. 
+All rights reserved.
+
+   <p>Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   <p>* Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below. 
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution. 
+   * Neither the name of the LLNS/LLNL nor the names of its
+     contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+
+   <p>THIS SOFTWARE  IS PROVIDED BY  THE COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+   <p>This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+   <p>Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+   <p>Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Invocation"></a>
+Next: <a rel="next" accesskey="n" href="#Syntax">Syntax</a>,
+Previous: <a rel="previous" accesskey="p" href="#Copying">Copying</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">1 The Browser Command Line</h2>
+
+<p>The schnauzer is a small terrier with a wiry coat; the browser is a
+utility built on Silo for reading scientific database files.  The
+browser command line is
+
+   <p><code>browser</code> <b>[</b><var>switches</var><b>]</b> <b>[</b><code>--</code><b>]</b>
+<b>[</b><var>files</var><b>]...</b>
+
+   <p>The browser recognizes the following command line switches.  Single
+letter switches that don't require an argument can be grouped together
+(so `<samp><span class="samp">-l -q</span></samp>' is the same as `<samp><span class="samp">-lq</span></samp>'). When a single-letter switch
+takes an argument the argument can appear either immediately after the
+letter or as the next argument such as `<samp><span class="samp">-l3</span></samp>' or `<samp><span class="samp">-l 3</span></samp>'. Long
+format switches are introduced by double hyphens and if they take an
+argument it must follow an equal sign such as `<samp><span class="samp">--eval=exit</span></samp>'. 
+Command-line options take effect before the initialization file is read,
+but also override any settings made in that file.
+
+   <p>Invoking the browser with the switch `<samp><span class="samp">--help</span></samp>' will show a complete
+list of command-line switches and their descriptions.
+
+     <dl>
+<dt><code>-A </code><var>tolerance</var><dt><code>--absolute=</code><var>tolerance</var><dd>All absolute differencing tolerances are set to <var>tolerance</var>, a
+floating point number. All variables of the form `<samp><span class="samp">$diff_*_abs</span></samp>' are
+set to the specified tolerance.
+
+     <br><dt><code>-R </code><var>tolerance</var><dt><code>--absolute=</code><var>tolerance</var><dd>All relative differencing tolerances are set to <var>tolerance</var>, a
+floating point number.  All variables of the form `<samp><span class="samp">$diff_*_rel</span></samp>' are
+set to the specified tolerance.
+
+     <br><dt><code>-V</code><dt><code>--version</code><dd>Prints the browser version number. If no other switches or files are
+specified then the browser will exit after printing the version number.
+
+     <br><dt><code>-d </code><var>words</var><dt><code>--diff=</code><var>words</var><dd>This switch controls the behavior of the <code>diff</code> function of the
+browser. The <var>words</var> should be a comma-separated list of key words
+which will be assigned to the <code>$diff</code> browser variable. See its
+documentation for details.
+
+     <br><dt><code>-e </code><var>expression</var><dt><code>--eval=</code><var>expression</var><dd>The browser expression is evaluated and the result is printed on the
+standard output stream.  More than one expression can be given to the
+browser by using multiple switches.  The expressions will be evaluated
+in the order given after the initialization file is read.  When a
+`<samp><span class="samp">-e</span></samp>' switch is present the browser exits after all expressions are
+processed instead of going into interactive mode. If standard output is
+a terminal then the browser pages the output in the normal way (see
+below).  If the interrupt character is pressed when an expression is
+being evaluated, the browser aborts<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>.
+
+     <br><dt><code>-E </code><var>list</var><dt><code>--exclude=</code><var>list</var><dd>The browser <code>$exclude</code> variable is set to the comma-separated list
+of names and/or datatypes supplied as an argument to this switch. The
+switch may appear more than once. The names in the <code>$exclude</code> list
+will be excluded from recursive <code>diff</code> operations. See
+documentation for <code>$exclude</code> for details.
+
+     <br><dt><code>-f </code><var>initfile</var><dt><code>--file=</code><var>initfile</var><dd>When the browser begins execution it attempts to read the file
+<samp><span class="file">.browser_rc</span></samp> in the user's home directory.  If that file isn't
+readable then it tries to read a system-wide browser initialization
+file.  The `<samp><span class="samp">-f</span></samp>' command line switch causes the browser to try to
+read the specified file instead.  To prevent the browser from reading
+any initialization file, say `<samp><span class="samp">-f /dev/null</span></samp>' (internal browser
+variables are still initialized to default values).  The initialization
+file is opened after the database(s) and therefore can contain commands
+that reference the database(s).
+
+     <br><dt><code>-h</code><dt><code>--help</code><dd>Prints a browser usage message. If this is the only switch and no file
+names are specified then the browser will exit after showing the usage
+message.  The usage message will be paged if printed to a terminal.
+
+     <br><dt><code>-l </code><b>[</b><var>value</var><b>]</b><dt><code>--lowlevel</code><b>[</b><code>=</code><var>value</var><b>]</b><dd>This switch assigns an integer value to the <code>$lowlevel</code> browser
+variable, which causes the browser to load database objects as type
+<code>DBobject</code> even if the object is some other composite Silo datatype
+like <code>DBquadvar</code>. If <var>value</var> is specified then it will be
+assigned to the <code>$lowlevel</code> variable; otherwise the value `<samp><span class="samp">1</span></samp>'
+is assigned.
+
+     <br><dt><code>-c </code><b>[</b><var>value</var><b>]</b><dt><code>--checksums</code><b>[</b><code>=</code><var>value</var><b>]</b><dd>This switch assigns an integer value to the <code>$checksums</code> browser
+variable, which controls browser's use of checksums during read.
+
+     <br><dt><code>-n </code><var>lines</var><dt><code>--height=</code><var>lines</var><dd>The browser pages interactive output to prevent it from scrolling off
+the top of the screen. It normally decides how tall the window is by
+making <code>ioctl</code> calls, but this switch can be used to override that
+choice. The setting is valid only until the browser receives a
+<code>SIGWINCH</code> signal and queries the terminal size.
+
+     <br><dt><code>-q</code><dt><code>--quiet</code><dd>This option causes the browser to be less verbose than normal. This sets
+the <code>$verbosity</code> variable to zero.
+
+     <br><dt><code>-o</code><dt><code>--obase=</code><var>format</var><dd>This switch sets the internal variable <code>$obase</code> to <var>format</var>,
+which should be `<samp><span class="samp">16</span></samp>' for hexadecimal, `<samp><span class="samp">8</span></samp>' for octal, `<samp><span class="samp">2</span></samp>'
+for binary, or anything else for the default decimal format. It controls
+how integer, floating-point, character, and string data are
+displayed. The default is that these types of data are displayed with a
+type-dependent <code>printf</code> format string which is user defined (e.g.,
+<code>$fmt_int</code>).
+
+     <br><dt><code>-r </code><b>[</b><var>boolean</var><b>]</b><dt><code>--rdonly</code><b>[</b><code>=</code><var>boolean</var><b>]</b><dd>This option assigns a boolean value to the <code>$rdonly</code> browser
+variable, which causes the browser to open all subsequent files in
+read-only mode. Files that only have Unix read permission are always
+opened in read-only mode, but the browser issues a warning if the user
+had asked for read-write permission.  If no argument is given for this
+switch then true is assumed. The default if this switch does not appear
+is false.
+
+     <br><dt><code>-s </code><b>[</b><var>boolean</var><b>]</b><dt><code>--single</code><b>[</b><code>=</code><var>boolean</var><b>]</b><dd>This option causes the browser to call <code>DBForceSingle</code> with a value
+of one or zero depending on whether the argument is true or false. If no
+argument is given then it is assumed to be true.  Calling
+<code>DBForceSingle</code> with a non-zero value causes most drivers to return
+floating point data with the C <code>float</code> type rather than the default
+<code>double</code> type.
+
+     <br><dt><code>-v</code><dt><code>--verbose</code><dd>This option causes the browser to be more verbose than normal. This sets
+the <code>$verbosity</code> variable to two.
+
+     <br><dt><code>-w </code><var>columns</var><dt><code>--width=</code><var>columns</var><dd>The browser normally breaks lines to prevent them from wrapping around
+from the right margin to the next line. It decides how many columns are
+appropriate by making <code>ioctl</code> calls, but this switch overrides that
+choice.
+
+     <br><dt><code>--debug</code><b>[</b><code>=</code><var>boolean</var><b>]</b><dd>Tells Silo to display the names of the Silo API functions as they are
+called. This switch is probably only useful to those who debug the browser.
+
+   </dl>
+
+   <p>If Silo database file names are specified then the files are opened in
+the order specified and associated with file symbols <code>$1</code>,
+<code>$2</code>, etc. These are opened before the initialization file is read,
+which happens before any <code>--eval</code> statements are executed. However,
+the command-line options are reevaluated after the initialization file
+is read.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Syntax"></a>
+Next: <a rel="next" accesskey="n" href="#Functions">Functions</a>,
+Previous: <a rel="previous" accesskey="p" href="#Invocation">Invocation</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">2 Command Syntax</h2>
+
+<p>The browser command syntax is quite simple, consisting of function
+calls, operators, atoms, and lists. Comments begin with a hash mark and
+continue to the end of the line (except in strings). White space is
+generally ignored except as a token separator. Statements can be
+continued across multiple lines, but a backslash must escape the
+linefeed if the partial statement looks syntactically complete.
+
+   <p>A function call is a parenthetical expression where the first element is
+the name of the function and the subsequent elements are the arguments
+to that function.  Most functions evaluate all their arguments but
+others evaluate only some (or none). For example, the <code>Assign</code>
+function doesn't evaluate its first argument, but rather assignes the
+evaluated second argument to the l-value specified by the first
+argument. The parentheses can be omitted from around the top-level
+function call. Say `<samp><span class="samp">help func</span></samp>' (or `<samp><span class="samp">(help func)</span></samp>') for a list
+of all functions.
+
+   <p>Most browser operators are infix, binary operators. They take two
+operands, one on each side of the operator, and call some function which
+is bound to the operator. For example the expression `<samp><span class="samp">foo=1</span></samp>' is
+equivalent to `<samp><span class="samp">(Assign foo 1)</span></samp>'. The `<samp><span class="samp">{}</span></samp>' operator takes any
+number of arguments which appear between the open and close curly
+braces. Say `<samp><span class="samp">help operators</span></samp>' for a list of all operators.
+
+   <p>The browser has three types of atoms: strings, numbers, and symbols. A
+string is a sequence of characters enclosed in single or double
+quotes. The normal C escaping mechanism can be used for special
+characters within the string. A single quote has no special significance
+in a double-quoted string and vice versa.  Numbers are positive or
+negative sequences of decimal digits with an optional embedded decimal
+point and trailing exponent. An exponent consists of the letter `e' or
+`E' followed by an optional sign and one or more decimal digits.  A
+symbol is any sequence of alphanumeric characters and may also include
+dollar signs, hyphens, underscores, and various other characters
+(although their use is discouraged).
+
+   <p>A list consists of zero or more atoms or lists enclosed in
+parentheses. Evaluation of the list results in the browser looking up
+the functional value of the first member of the list and calling that
+function with the subsequent list members as arguments. Evaluation of
+the list can be suppressed by using curly braces instead of parentheses
+(e.g., `<samp><span class="samp">{1 3 5}</span></samp>' is equivalent to `<samp><span class="samp">(Quote 1 3 5)')</span></samp>'.
+
+   <p>The browser reads commands interactively from its standard input. If
+available, the GNU readline library is used allowing the user to edit
+commands as they are entered using Emacs or vi editing commands. To
+quote from the readline library (documentation is available at
+<samp><span class="file">http://www.cs.utah.edu/csinfo/texinfo/texinfo.html</span></samp>):
+
+   <blockquote>
+Often during an interactive session you type in a long line of text,
+only to notice that the first word on the line is misspelled.  The
+Readline library gives you a set of commands for manipulating the text
+as you type it in, allowing you to just fix your typo, and not forcing
+you to retype the majority of the line.  Using these editing commands,
+you move the cursor to the place that needs correction, and delete or
+insert the text of the corrections.  Then, when you are satisfied with
+the line, you simply press <RETURN>.  You do not have to be at the
+end of the line to press <RETURN>; the entire line is accepted
+regardless of the location of the cursor within the line. 
+</blockquote>
+
+   <p>The readline library default mode is Emacs.  If you prefer <code>vi</code> key
+bindings, then create a file called <samp><span class="file">.inputrc</span></samp> in your home
+directory with the single line `<samp><span class="samp">set editing-mode vi</span></samp>'.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Functions"></a>
+Next: <a rel="next" accesskey="n" href="#Operators">Operators</a>,
+Previous: <a rel="previous" accesskey="p" href="#Syntax">Syntax</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">3 Builtin Functions</h2>
+
+<p>Some of the browser functions have more than one form and are overloaded
+to do various things depending on the number of actual arguments
+supplied. Arguments shown between `<samp><span class="samp">[</span></samp>' and `<samp><span class="samp">]</span></samp>' are optional.
+
+     <dl>
+<dt><code>array </code><var>dimensions</var> <b>...</b> <var>basetype</var><dd>Creates a new array datatype. The arguments are the size of the array in
+each dimension and the datatype of the array elements. The array size
+arguments can be either integers or strings that look like comma- and/or
+space-separated integers. Browser arrays use C element ordering.
+
+     <br><dt><code>cd </code><var>dirname</var> <b>[</b><var>filesym</var><b>]</b><dd>Each file has a current working directory (CWD) which is initially set
+to the root directory (<samp><span class="file">/</span></samp>). This command will set the CWD to some
+other directory. The first argument is the name of the new CWD. If the
+name contains special characters it should be enclosed in quotes to
+protect it from the parser. If the name is relative (doesn't start with
+a `<samp><span class="samp">/</span></samp>') then the name is looked up with respect to the current
+CWD. The second optional argument is the file or list of files whose CWD
+is being set (default is the file represented by the browser variable
+`<samp><span class="samp">$1</span></samp>').  The <var>dirname</var> is a string; it is not interpreted by the
+browser and thus a command like `<samp><span class="samp">cd $1.domain_0.angle_walls</span></samp>' will
+fail while `<samp><span class="samp">cd domain_0/angle_walls $1</span></samp>' would work.
+
+     <br><dt><code>close </code><var>filesym</var> <b>...</b><dd>Closes the database files associated with the specified file symbols. 
+If objects exist in the browser memory which are associated with the
+database then the database will be held open until those objects no
+longer exist, but the file symbol will be freed so another file can
+immediately be associated with that symbol. This command is equivalent
+to `<samp><var>filesym</var><span class="samp">=nil</span></samp>' (except with extra sanity checks).
+
+     <br><dt><code>diff </code><var>objects...</var><dd>Calculates the differences between its arguments similar to the Unix
+<code>diff</code> command. If called with an even number of arguments the
+argument list is split in half and each argument from the first half is
+compared with the corresponding argument of the second half. If called
+with no arguments then the argument list will be the SILO files from the
+command-line (`<samp><span class="samp">$1</span></samp>', `<samp><span class="samp">$2</span></samp>', <i>etc.</i>).  If called with just one
+argument which is an object from the silo file `<samp><span class="samp">$1</span></samp>' then that
+object will be compared to an object with the same name from file
+`<samp><span class="samp">$2</span></samp>'.  The behavior is influenced by the `<samp><span class="samp">$diff</span></samp>' browser
+variable. In general, if no differences are found then no output is
+produced.
+
+     <br><dt><code>end</code><dd>See <code>exit</code>.
+
+     <br><dt><code>exit </code><b>[</b><var>status</var><b>]</b><dd>Exits the browser with the specified <var>status</var>, an integer constant. 
+If no exit status is supplied then zero (success) is assumed. Typing the
+end of file character (usually control-d) at the beginning of a line
+also invokes this command, causing a zero (success) exit.
+
+     <br><dt><code>file </code><var>filename</var><dd>The Silo database <var>filename</var> is opened and returned but not
+associated with any symbol.  Therefore, as soon as nothing refers to the
+file, it is closed.  One common use of this function is with the
+<code>ls</code> or <code>diff</code> commands which can take file objects as
+arguments.  For instance, the command `<samp><span class="samp">ls (file curv2d.pdb)</span></samp>' opens
+the <samp><span class="file">curv2d.pdb</span></samp> file and lists the root directory and `<samp><span class="samp">ls
+(cd dirname (file curv2d.pdb))</span></samp>' lists the contents of the <var>dirname</var>
+directory of <samp><span class="file">curv2d.pdb</span></samp>.  The file is open for read-write mode
+unless the <code>$rdonly</code> browser variable has a non-nil value or the
+file has only read permission.
+
+     <br><dt><code>help </code><b>[</b><var>topic</var><b>]</b> <b>[</b><var>docstring</var><b>]</b><dd>Shows documentation for various parts of the browser. When invoked
+without arguments it will display a table of contents of <code>help</code>
+subcommands. With one argument it will display documentation for a help
+category (e.g., <code>help run</code>), a browser internal variable (e.g.,
+<code>help $diff</code>), a function (e.g., <code>help diff</code>), a command-line
+switch (e.g., <code>help --diff</code>), an operator (e.g., <code>help
+"op="</code>), or the documentation string associated with the specified
+symbol. When invoked with a string argument it will print all help
+categories which contain the specified string (e.g., <code>help
+"diff"</code>). When called with two arguments it assigns the second argument
+as the documentation property of the first argument, which must be a
+symbol or string.
+
+     <br><dt><code>include </code><var>filename</var><dd>Causes the specified file to be parsed and evaluated. This is often
+useful in user-private initialization files, <samp><span class="file">~/.browser_rc</span></samp>, where
+the user wants to augment the actions that would normally happen in the
+system-wide browser initialization file. The user-private file should
+contain the line `<samp><span class="samp">include $pubinit</span></samp>'.
+
+     <br><dt><code>ls </code><b>[</b><var>filesym</var><b>]</b> <b>[</b><var>objnames</var><b>...]</b><dd>This command lists the contents of the current working directory.  If no
+file is specified then the file associated with `<samp><span class="samp">$1</span></samp>' is used. If a
+list of files is specified (e.g., `<samp><span class="samp">$*</span></samp>') then a listing is produced
+for each of those files. If object names are supplied, then only those
+objects are listed.  The object names can include the normal Unix
+filename wild cards `<samp><span class="samp">*</span></samp>', `<samp><span class="samp">?</span></samp>', and `<samp><span class="samp">[]</span></samp>' (object names with
+`<samp><span class="samp">[]</span></samp>' wild cards require quotes so the `<samp><span class="samp">[</span></samp>' and `<samp><span class="samp">]</span></samp>' are not
+intrepretted as array selectors). Wild card matching is not available if
+the <code>fnmatch</code> function was not available when the browser was
+compiled.  If a single object name is supplied and that object is a
+directory, then the contents of that directory appear.  An alternative
+(and shorter) way to list the contents of a subdirectory is to type the
+name of the subdirectory on a line by itself (for instance,
+`<samp><span class="samp">dir1</span></samp>').
+
+     <br><dt><dd>Another way to list a directory is to just type the name of the
+directory at the prompt (you can use `<samp><span class="samp">.</span></samp>' as the current working
+directory).  So saying `<samp><span class="samp">$2.dir</span></samp>' is the same as saying `<samp><span class="samp">ls $2
+dir</span></samp>' and `<samp><span class="samp">$2..</span></samp>' is the same as `<samp><span class="samp">ls $2</span></samp>' or `<samp><span class="samp">ls $2 .</span></samp>'.
+
+     <br><dt><code>noprint</code><dd>See <code>print</code>.
+
+     <br><dt><code>open </code><var>filename</var> <b>[</b><var>filesym</var><b>]</b><dd>The Silo database <var>filename</var> is opened and associated with the
+specified file symbol.  Any database previously associated with
+<var>filesym</var> will be closed as soon as all objects associated with that
+file are freed.  If <var>filesym</var> is omitted then `<samp><span class="samp">$1</span></samp>' is used. 
+This command is equivalent to `<samp><var>filesym</var><span class="samp"> =
+</span><var>filename</var></samp>'. Files are open in read-write mode unless the
+<code>$rdonly</code> browser variable has a non-nil value or the file has only
+read permission.
+
+     <br><dt><b>[</b><code>no</code><b>]</b><code>print </code><var>expression</var> <b>...</b><dd>Evaluates the expressions and prints (or suppresses) the result of each
+one.  The <code>print</code> command is normally not used because the browser
+prints all non-null expressions by default.  However, a <code>noprint</code>
+can be used to prevent the default output.
+
+     <br><dt><code>pwd </code><b>[</b><var>filesym</var><b>]</b><dd>Prints the current working directory for the database associated with
+the specified file symbol, list of files, or `<samp><span class="samp">$1</span></samp>'. This command
+also prints the name of the database.  This command is usually not used
+because a file symbol appearing by itself causes the database name and
+current working directory to be displayed.
+
+     <br><dt><code>quit</code><dd>See <code>exit</code>.
+
+     <br><dt><code>typeof </code><var>expression</var><dd>The type of a Silo expression is printed.  For Silo database objects the
+type which is printed is fully qualified and bound to actual values. In
+contrast, printing the actual named type shows the unbound values.  For
+example, if `<samp><span class="samp">d</span></samp>' is a Silo quadvar object, then `<samp><span class="samp">typeof d.dims</span></samp>'
+might show `<samp><span class="samp">[3] int</span></samp>' while `<samp><span class="samp">print DBquadvar.dims</span></samp>' displays
+`<samp><span class="samp">[self.ndims] int</span></samp>'.
+
+   </dl>
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Operators"></a>
+Next: <a rel="next" accesskey="n" href="#Internal-Variables">Internal Variables</a>,
+Previous: <a rel="previous" accesskey="p" href="#Functions">Functions</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">4 Operators</h2>
+
+<p>A browser expression is composed of terms and operators. The following
+operators are supported and overloaded depending on the number and type
+of arguments.
+
+     <dl>
+<dt><var>symbol </var><code>=</code><var> value</var><dd>Assigns a value to a browser internal variable or a database object.  If
+<var>symbol</var> is an internal variable and <var>value</var> is the word
+`<samp><span class="samp">nil</span></samp>' then the symbol loses its variable value.
+
+     <br><dt><var>filesym </var><code>.</code><var> varname</var><dd>The variable or directory with the name <var>varname</var> is loaded from the
+database associated with the specified file symbol and the Silo data
+object is returned.  The variable name must be enclosed in quotes unless
+it looks like a symbol and does not conflict with a browser internal
+variable. If <var>filesym</var> is `<samp><span class="samp">$1</span></samp>' and the variable name is not
+enclosed in quotes and is not the name of an internal browser variable,
+then the file symbol and dot can be omitted.  Thus `<samp><span class="samp">$1.quadmesh</span></samp>'
+can be written as just `<samp><span class="samp">quadmesh</span></samp>'.
+
+     <br><dt><var>sdo </var><code>.</code><var> fieldname</var><dd>If <var>sdo</var> is some Silo data object which has a structured type, then
+this expression returns a new Silo data object which is the specified
+field of the <var>sdo</var> structure.  For instance, a quadmesh `<samp><span class="samp">qm</span></samp>'
+has a field named `<samp><span class="samp">dims</span></samp>' which holds the dimensions of the mesh. 
+The expression `<samp><span class="samp">qm.dims</span></samp>' returns just the dimensions.
+
+     <br><dt><var>list </var><code>.</code><var> anything</var><dd>If the first argument is a list then the dot operator is applied to each
+member of the list and the result is a list of the results.
+
+     <br><dt><var>sdo </var><code>[</code><var> elmtnum </var><code>]</code><dd>If <var>sdo</var> is some Silo data object which has an array type, then this
+expression returns the single specified element of that array.  The
+first element of an array is number zero.  For instance,
+`<samp><span class="samp">qm.dims[0]</span></samp>' returns the size of the first mesh dimension.
+
+     <br><dt><var>sdo </var><code>[</code><var> min </var><code>:</code><var> max </var><code>]</code><dd>If <var>sdo</var> is some Silo data object which has an array type, then this
+expression returns a sub-array with elements <var>min</var> through
+<var>max</var>, inclusive.  Thus, `<samp><span class="samp">qm.dims[0:2]</span></samp>' are the first three
+mesh dimensions.
+
+     <br><dt><var>sdo </var><code>[</code><var> expr1</var><code>,</code><var> expr2</var><code>,</code><var> ... </var><code>]</code><dd>If <var>sdo</var> is some Silo data object which has an array type, and
+<var>expr</var> are element numbers or ranges, then one <var>expr</var> is applied
+to each array dimension in turn, automatically skipping over pointers. 
+For instance, if a quadvar `<samp><span class="samp">qv</span></samp>' has a `<samp><span class="samp">vals</span></samp>' of type
+`<samp><span class="samp">*[2] *[36000] float</span></samp>' then the expression `<samp><span class="samp">qv.vals[0,100:199]</span></samp>'
+will be an object consisting of the second 100 values of the first
+variable.  (The expression `<samp><span class="samp">qv.vals[0][100:199]</span></samp>' would result in an
+error message because `<samp><span class="samp">qv.vals[0]</span></samp>' returns an object with the type
+`<samp><span class="samp">[1] *[36000] float</span></samp>' to which is then applied the `<samp><span class="samp">[100:199]</span></samp>'
+that is invalid because the array only has one element.)
+
+     <br><dt><var>expr </var><code>|</code><var> command</var><dd>The expression <var>expr</var> has its output redirected to the shell
+command <var>command</var>.
+
+     <br><dt><var>expr </var><code>></code><var> file</var><dd>The expression <var>expr</var> has its output redirected to the file
+<var>file</var>, which is created or truncated.
+
+     <br><dt><var>expr </var><code>>></code><var> file</var><dd>The expression <var>expr</var> has its output appended to the file
+<var>file</var>, which is created if it doesn't exist.
+
+     <br><dt><code>{</code><var> expressions </var><code>}</code><dd>This operator takes zero or more operands occurring between the curly
+braces (optionally separated by commas) and returns a list of those
+unevaluated operands. If only one operand is given then that operand is
+returned unevluated and not in a list.
+
+     <br><dt><var>minimum </var><code>:</code><var> maximum</var><dd>The range operator is used to construct a range object which represents
+all integers between <var>minimum</var> and <var>maximum</var>, inclusive.
+
+   </dl>
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Internal-Variables"></a>
+Next: <a rel="next" accesskey="n" href="#Startup-File">Startup File</a>,
+Previous: <a rel="previous" accesskey="p" href="#Operators">Operators</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">5 Internal Variables</h2>
+
+<p>Certain aspects of the browser can be configured by setting browser
+variables with the `<samp><span class="samp">=</span></samp>' operator described above.  The current value
+of an internal variable can be displayed by typing the variable's name. 
+The variables are initialized with default values when the browser
+starts and may then be overridden by command-line options, the
+initialization file, or interactively. All predefined browser variables
+begin with a dollar sign.
+
+<ul class="menu">
+<li><a accesskey="1" href="#Differencing-Variables">Differencing Variables</a>
+<li><a accesskey="2" href="#Output-Variables">Output Variables</a>
+<li><a accesskey="3" href="#File-Variables">File Variables</a>
+</ul>
+
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Differencing-Variables"></a>
+Next: <a rel="next" accesskey="n" href="#Output-Variables">Output Variables</a>,
+Previous: <a rel="previous" accesskey="p" href="#Internal-Variables">Internal Variables</a>,
+Up: <a rel="up" accesskey="u" href="#Internal-Variables">Internal Variables</a>
+
+</div>
+
+<h3 class="section">5.1 Differencing Variables</h3>
+
+<p>These variables affect the operation of the <code>diff</code> function.
+
+     <dl>
+<dt><code>$diff</code><dd>This variable's value is a list of symbols which control the details of
+the <code>diff</code> function. The default is <code>$diff = {detail,
+two_column}</code>. This variable is set by the `<samp><span class="samp">--diff</span></samp>' command-line
+switch.
+
+          <dl>
+<dt><code>detail</code><dd>This is the default, which causes the <code>diff</code> function to report all
+details about detected differences.
+
+          <br><dt><code>brief</code><dd>If this word is present then <code>diff</code> doesn't actually display any
+data. The output will consist of a single line for each file object
+which differs between file A and file B.  This option allows some
+short circuiting of the work required for the <code>detail</code> mode.
+
+          <br><dt><code>summary</code><dd>This key word causes <code>diff</code> to report by a single line of output
+when the two operands of the <code>diff</code> function are different. No
+output is produced if they are the same. This option allows some short
+circuiting of the work required for the <code>brief</code> mode.
+
+          <br><dt><code>ignore_additions</code><dd>If this is specified then <code>diff</code> will not report differences due to
+data appearing in file B but not in file A.
+
+          <br><dt><code>ignore_deletions</code><dd>If this is specified then <code>diff</code> will not report differences due to
+data appearing in file A but not in file B.
+
+          <br><dt><code>two_column</code><dd>If this is specified then the output will list differences side-by-side
+instead of one after the other (that is, output will resemble
+<code>pdbdiff</code> instead of <code>diff</code>). This setting is only applicable
+for detailed output. 
+</dl>
+
+     <br><dt><code>$exclude</code><dd>The <code>diff</code> function normally recurses into directories and compares
+the contents of those directories. However, the <code>$exclude</code> variable
+can be a list of character strings which specify object names and/or
+types which should be excluded from recursive comparison.  The object
+names may include shell wildcards such as `<samp><span class="samp">*</span></samp>', `<samp><span class="samp">?</span></samp>', and
+`<samp><span class="samp">[]</span></samp>'. If a name pattern is relative (doesn't start with a slash) it
+will be compared to the base name of the objects about to be
+differenced; but if the name pattern is absolute (begins with a slash)
+it will be compared to the full path names of the objects being
+differenced. If the <code>$exclude</code> string begins with the string
+`<samp><span class="samp">type:</span></samp>' then the following part should be one of the object types
+printed by the <code>ls</code> function.  A difference operation between two
+objects is suppressed if either object matches any of the strings stored
+in the <code>$exclude</code> list.
+
+     <p>For example, to prevent <code>diff</code> from comparing any objects with the
+base name `<samp><span class="samp">cycle</span></samp>', or any objects whose full name is
+`<samp><span class="samp">/VM/typelist</span></samp>', or any objects whose name ends with `<samp><span class="samp">_list</span></samp>',
+or any object of type `<samp><span class="samp">obj</span></samp>' one would issue the following browser
+command:
+
+     <pre class="example">          > $exclude = {"cycle", "/VM/typelist", "*_list", "type:obj"}
+     </pre>
+     <p class="noindent">or invoke the browser with the switch
+     <pre class="example">          --exclude='cycle,/VM/typelist,*_list,type:obj'
+     </pre>
+     <br><dt><code>$diff_int8_abs</code><dt><code>$diff_int8_rel</code><dt><code>$diff_short_abs</code><dt><code>$diff_short_rel</code><dt><code>$diff_int_abs</code><dt><code>$diff_int_rel</code><dt><code>$diff_long_abs</code><dt><code>$diff_long_rel</code><dt><code>$diff_float_abs</code><dt><code>$diff_float_rel</code><dt><code>$diff_double_abs</code><dt><code>$diff_double_rel</code><dd>These variables control how the <code>diff</code> function determines whether
+two numeric values are the same or different. The ones that end with
+`<samp><span class="samp">_abs</span></samp>' specify the maximum absolute difference allowed between two
+values <var>a</var> and <var>b</var>.  The <code>diff</code> command considers <var>a</var>
+and <var>b</var> to be different if `<samp><span class="samp">|</span><var>a</var><span class="samp">-</span><var>b</var><span class="samp">|></span><var>abs</var></samp>'. 
+The variables that end with `<samp><span class="samp">_rel</span></samp>' specify the maximum absolute
+difference relative to the mean of two values.  The <code>diff</code> command
+considers <var>a</var> and <var>b</var> to be different if
+`<samp><span class="samp">|</span><var>a</var><span class="samp">-</span><var>b</var><span class="samp">|/|</span><var>a</var><span class="samp">+</span><var>b</var><span class="samp">| > </span><var>rel</var><span class="samp">/2</span></samp>'.
+
+     <p>If both tests are performed then <var>a</var> and <var>b</var> are considered
+different if either test indicates they are different. If an <var>abs</var> or
+<var>rel</var> parameter is not defined (or has a non-positive value) then
+the corresponding test is not performed. If neither test is performed
+then an exact comparison is used.
+
+     <p>All <code>diff</code> variables have a default value of zero and are set by
+the `<samp><span class="samp">--absolute</span></samp>' and `<samp><span class="samp">--relative</span></samp>' command-line switches. 
+</dl>
+
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Output-Variables"></a>
+Next: <a rel="next" accesskey="n" href="#File-Variables">File Variables</a>,
+Previous: <a rel="previous" accesskey="p" href="#Differencing-Variables">Differencing Variables</a>,
+Up: <a rel="up" accesskey="u" href="#Internal-Variables">Internal Variables</a>
+
+</div>
+
+<h3 class="section">5.2 Output Variables</h3>
+
+     <dl>
+<dt><code>$height</code><dd>The height of the output terminal in lines. If set to a positive value
+then the browser will pause after each screenful of interactive output
+(redirected output is unaffected by this setting). This variable is set
+by the `<samp><span class="samp">--height</span></samp>' command-line switch and is reset whenever the
+browser receives a window size change signal (<code>SIGWINCH</code>).
+
+     <br><dt><code>$width</code><dd>The width of the output terminal in characters. The browser will try not
+to print data which would wrap from one line to the next. This variable
+is set by the `<samp><span class="samp">--width</span></samp>' command-line switch and is reset whenever
+the browser receives a window size change signal (<code>SIGWINCH</code>).
+
+     <br><dt><code>$verbosity</code><dd>This variable is set by the `<samp><span class="samp">--quiet</span></samp>' and `<samp><span class="samp">--verbose</span></samp>'
+switches. The `<samp><span class="samp">--quiet</span></samp>' sets it to zero while `<samp><span class="samp">--verbose</span></samp>' sets
+it to two (the default is one). Changing its value at runtime changes
+the amount of chatter produced by the browser.
+
+     <br><dt><code>$truncate</code><dd>If this variable holds a non-negative integer value <var>N</var>, then the
+browser shows only <var>N</var> values of each array; otherwise all values of
+an array are displayed. Values which are omitted are indicated by a
+string such as `<samp><span class="samp">...(2000 values omitted)...</span></samp>' appearing at the point
+where the values were omitted. Truncation is disabled (all values are
+printed) by setting this variable to nil (its default).
+
+     <br><dt><code>$trailing</code><dd>If this variable holds a positive integer value and `<samp><span class="samp">$truncate</span></samp>'
+has a non-negative integer value, then up to <var>n</var> of the printed
+array values will come from the end of the array rather than the
+beginning. The default value is 50.
+
+     <br><dt><code>$fmt_double</code><dd>This variable holds a <code>printf</code> format string which is used to
+format C <code>double</code> values.  The default value is `<samp><span class="samp">%1.10g</span></samp>'.
+
+     <br><dt><code>$fmt_float</code><dd>This variable holds a <code>printf</code> format string which is used to
+format C <code>float</code> values.  The default value is `<samp><span class="samp">%1.5g</span></samp>'.
+
+     <br><dt><code>$fmt_int</code><dd>This variable holds a <code>printf</code> format string which is used to
+format integer values.  The default value is `<samp><span class="samp">%d</span></samp>'.
+
+     <br><dt><code>$fmt_long</code><dd>This variable holds a <code>printf</code> format string which is used to
+format long integer values.  The default value is `<samp><span class="samp">(long)%ld</span></samp>'.
+
+     <br><dt><code>$fmt_null</code><dd>This variable holds a <code>printf</code> format string which is printed for
+null character strings.  The default value is `<samp><span class="samp">(null)</span></samp>'.
+
+     <br><dt><code>$fmt_int8</code><dd>This variable holds a <code>printf</code> format string which is used to
+format 8-bit integer values.  The default is `<samp><span class="samp">(int8)%d</span></samp>' but people
+often like to change it to `<samp><span class="samp">`%c'</span></samp>' to see the ASCII equivalent. Be
+warned that output of non-printable ASCII characters in this manner may
+not work if the terminal emulator interprets them as commands.
+
+     <br><dt><code>$fmt_short</code><dd>This vairable holds a <code>printf</code> format string which is used to
+format short integer values.  The default value is `<samp><span class="samp">(short)%d</span></samp>'.
+
+     <br><dt><code>$fmt_string</code><dd>This variable holds a <code>printf</code> format string which is used to
+format character string values.  The default value is
+`<samp><span class="samp">\"%s\"</span></samp>'.
+
+     <br><dt><code>$obase Output of primitive data (integer, character, string, and</code><dd>floating-point), by default, uses the <code>$fmt_</code> variables described
+above. However, by setting this variable to 16, 8, or 2 it is possible
+to display primitive data in hexadecimal, octal, or binary format.
+
+</dl>
+
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="File-Variables"></a>
+Previous: <a rel="previous" accesskey="p" href="#Output-Variables">Output Variables</a>,
+Up: <a rel="up" accesskey="u" href="#Internal-Variables">Internal Variables</a>
+
+</div>
+
+<h3 class="section">5.3 File Variables</h3>
+
+     <dl>
+<dt><code>$pubinit</code><dd>This variable holds the name of the public initialization file and is
+intended to be used as the first argument to the `include' function in a
+user-private initialization file.
+
+     <br><dt><code>$lowlevel</code><dd>If this variable has any true value (nil, zero, and the empty string are
+considered false), then the browser reads objects as type
+<code>DBobject</code> even if that object has some other datatype such as
+<code>DBquadvar</code>.  This variable is set by the `<samp><span class="samp">-l</span></samp>' command-line
+option and is useful for debugging the low layers of Silo. The default
+value is zero.
+
+     <p>If the value is two or higher then the Silo definition of <code>DBobject</code>
+is used and the values of the <code>comp_names</code> and <code>pdb_names</code>
+arrays become part of the object.
+
+     <p>If the value is one or two then the browser translates the Silo
+<code>DBobject</code> structure into a structure which is more user friendly
+by adding additional members to the object structure. Each member has a
+name from the <code>comp_names</code> array and a value based on the
+corresponding member of the <code>pdb_names</code> array<a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a>.
+
+     <br><dt><code>$checksums</code><dd>If this variable has any true value (nil, zero, and the empty string are
+considered false), and the database being read includes checksums, then
+the browser performs checksum checks during read. Note that currently,
+the only Silo driver that supports checksums is the HDF5 driver.
+
+     <p>If checksum checks are disabled, then if browser encounters corrupt data,
+it will not know it. In particular, if checksums are disabled, the diff
+operator can wind up reporting corrupted data as diffs. If checksums are
+enabled, however, and the database being read includes checksums, then
+browser will report errors when it encounters corrupt data and fail to
+read the associated Silo object. See the associated Silo call
+<code>DBSetEnableChecksums()</code> for more information.
+
+     <br><dt><code>$rdonly</code><dd>If this variable has any true value (nil, zero, and the empty string are
+considered false), then the browser opens files in read-only mode
+instead of read-write mode.  Editing will not work on a file open for
+reading only. 
+</dl>
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Startup-File"></a>
+Next: <a rel="next" accesskey="n" href="#Editing">Editing</a>,
+Previous: <a rel="previous" accesskey="p" href="#Internal-Variables">Internal Variables</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">6 Initializing the Browser</h2>
+
+<p>When the browser starts, it looks for a file called <samp><span class="file">.browser_rc</span></samp>
+in the user's home directory or a file called
+<samp><span class="file">/usr/local/include/browser_rc</span></samp><a rel="footnote" href="#fn-3" name="fnd-3"><sup>3</sup></a>.  However, an
+alternate startup file can be specified with the `<samp><span class="samp">--file</span></samp>' browser
+command-line switch.  The browser reads and executes each command found
+in the startup file.
+
+   <p>The startup file should contain an assignment to the
+<code>$browser_version</code> variable which will be used to check that the
+version of the startup file is appropriate for the browser being
+run. Mismatched version numbers result in a rather verbose warning
+message (provided that the browser was even able to process the startup
+file).
+
+   <p>The <code>$browser_version</code> number should be assigned some real constant
+like `<samp><span class="samp">3.004</span></samp>' where `<samp><span class="samp">3</span></samp>' is the browser major version number and
+`<samp><span class="samp">004</span></samp>' is the browser minor version number.  To determine what
+version number to specify, invoke the browser as `<samp><span class="samp">browser
+--version</span></samp>'.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Editing"></a>
+Next: <a rel="next" accesskey="n" href="#Paging">Paging</a>,
+Previous: <a rel="previous" accesskey="p" href="#Startup-File">Startup File</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">7 Editing Database Objects</h2>
+
+<p>The `<samp><span class="samp">=</span></samp>' operator can be used to set the value of an internal
+browser variable or to change the value of a database object.  If the
+left hand side of the `<samp><span class="samp">=</span></samp>' is an internal variable, then the value
+of the internal variable is changed. Otherwise if the left hand side is
+a database object, its value is changed.  Otherwise, a new internal
+variable is created and assigned an initial value.
+
+   <p>The browser can change values for objects of type <code>DBobject</code> (most
+objects are of this type if the browser is running in low-level mode) or
+objects under the `<samp><span class="samp">var(s)</span></samp>' category in a directory listing.
+
+   <p>When changing the value of a string database object like
+`<samp><span class="samp">_fileinfo</span></samp>', the new value will be truncated to the same length as
+the old value because of limitations in the underlying Silo database
+drivers.  This does not apply to string fields of a <code>DBobject</code>.
+
+   <p>Assigning a scalar value to an array or slice of an array results in all
+selected elements of the array to be set to the same value.  For
+instance, if the type of `<samp><span class="samp">u_data</span></samp>' is `<samp><span class="samp">[31, 41, 31] float</span></samp>' then
+the statement `u_data[5]=0' sets all elements of “row” five to zero.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Paging"></a>
+Next: <a rel="next" accesskey="n" href="#Redirection">Redirection</a>,
+Previous: <a rel="previous" accesskey="p" href="#Editing">Editing</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">8 Paging</h2>
+
+<p>The browser keeps track of how many lines of output have been displayed
+for the currently executing command and temporarily pauses that command
+whenever output is about to scroll off the top of the screen.  The
+height and width of the screen is determined by the browser making
+certain <code>ioctl</code> calls at startup and each time it gets a
+<code>SIGWINCH</code> signal.  The initial values can be set with
+`<samp><span class="samp">--height</span></samp>' and `<samp><span class="samp">--width</span></samp>' command-line switches.  If the
+appropriate <code>ioctl</code> is not available then the values of environment
+variables <code>LINES</code> and <code>COLUMNS</code> will be used. If all else
+fails then the browser uses zero for the number of lines (that is, no
+paging of output) and 80 for the number of columns.
+
+   <p>When the browser pauses the output, the message `<samp><span class="samp">more? ('q' to
+quit)</span></samp>' is displayed. The following user responses are recognized:
+
+     <dl>
+<dt><b>Quit</b><dd>Cancels the command and returns to the browser prompt. This is
+equivalent to the browser receiving a <code>SIGPIPE</code> signal.
+
+     <br><dt><b>Continue</b><dd>Pressing the EOF key (usually control-`<samp><span class="samp">d</span></samp>') causes the command to
+continue without being paged. Output will simply scroll off the screen).
+
+     <br><dt><b>Next Diff</b><dd>Pressing `<samp><span class="samp">n</span></samp>' causes output to be suspended until the next file
+difference report or the next non-diff command.
+
+     <br><dt><b>Interrupt</b><dd>Pressing the interrupt key (usually control-`<samp><span class="samp">c</span></samp>') causes the command
+to be interrupted as usual. 
+</dl>
+
+   <p>Output redirected to a file or command is not paged.  If the user is not
+satisfied with the limited paging ability of the browser, the output
+from a command can be redirected to the pager of the user's choice using
+output redirection.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Redirection"></a>
+Next: <a rel="next" accesskey="n" href="#Interrupts">Interrupts</a>,
+Previous: <a rel="previous" accesskey="p" href="#Paging">Paging</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">9 Redirection</h2>
+
+<p>Output from any browser command can be redirected to a file or shell
+command by appending a redirection character and file name or shell
+command to the end of the command.
+
+   <p>To save the output of a command in a file, destroying the previous
+contents of the file if any, append a `<samp><span class="samp">></span></samp>' and the name of the
+file.  Unless the file name looks like a browser symbol it must be
+enclosed in quotes.  For instance, `<samp><span class="samp">quadvar3d > saved</span></samp>' saves the
+value of Silo database variable `<samp><span class="samp">quadvar</span></samp>' in a text file named
+<samp><span class="file">saved</span></samp>.
+
+   <p>To append the output of a command to a file, append a `<samp><span class="samp">>></span></samp>' and the
+file name to the end of the command.  Unless the file name looks like a
+browser symbol it must be enclosed in quotes.  For example, `<samp><span class="samp">typeof
+quadvar3d >> saved</span></samp>' appends type information to the <samp><span class="file">saved</span></samp> file.
+
+   <p>To send the output of a browser command to the standard input of a shell
+command, follow the browser command with a `<samp><span class="samp">|</span></samp>' followed by the
+shell command in quotes.  The quotes are not necessary if the shell
+command is a single symbol.  Since paging is disabled when output is to
+a shell command, one way to display a result without paging is to pipe
+the output through the `<samp><span class="samp">cat</span></samp>' command like `<samp><span class="samp">d | cat</span></samp>'.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Interrupts"></a>
+Next: <a rel="next" accesskey="n" href="#Examples">Examples</a>,
+Previous: <a rel="previous" accesskey="p" href="#Redirection">Redirection</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">10 Interrupts</h2>
+
+<p>Since some commands may require a long time to execute or produce a huge
+amount of output, the user may want to abort the command before it
+finishes.  If the output is paged interactively to the screen then
+pressing `<samp><span class="samp">q</span></samp>' at the `<samp><span class="samp">more?</span></samp>'  prompt accomplishes
+this.  Otherwise the user can press the interrupt character (usually
+control-c) and the browser command will be immediately terminated and
+the browser will prompt for the next command.  If the interrupt
+character is typed during command input the browser itself terminates.
+
+   <p>If output from a browser command is being piped into a shell command and
+the shell command exits (or closes its standard input) before the
+browser command is finished, the browser command gets the <code>SIGPIPE</code>
+signal and terminates.
+
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<!-- ====================================================================== -->
+<div class="node">
+<p><hr>
+<a name="Examples"></a>
+Previous: <a rel="previous" accesskey="p" href="#Interrupts">Interrupts</a>,
+Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+
+</div>
+
+<h2 class="chapter">11 Examples</h2>
+
+<p>This chapter contains some sample output from the browser.
+
+   <p>Normally, you will specify the name of a database file on the browser
+command-line<a rel="footnote" href="#fn-4" name="fnd-4"><sup>4</sup></a> like in the following
+example, and sometimes it's convenient to open multiple files at the
+same time.  Each file name listed on the command-line is given an
+identifier like `<samp><span class="samp">$1</span></samp>', `<samp><span class="samp">$2</span></samp>', etc., and most of the browser
+commands operate on file `<samp><span class="samp">$1</span></samp>' by default.
+
+<pre class="example">     % <b>browser rect3d.pdb</b>
+     INFO: opening `rect3d.pdb' as $1
+</pre>
+   <p>The <code>ls</code> command is similar to the Unix <code>ls</code> command in that
+it lists the contents of the current working directory.  The heading
+fields on the left of the equal signs apply until the next heading.  The
+headings are the same as those used by MeshTV.  To list the contents of
+some subdirectory, say `<samp><span class="samp">ls</span></samp>', `<samp><span class="samp">ls dir1</span></samp>',
+`<samp><span class="samp">print dir1</span></samp>', or just `<samp><span class="samp">dir1</span></samp>'.
+
+<pre class="example">     > <b>ls</b>
+     qmesh(s)          = quadmesh3d
+     
+     qvar(s)           = d                      p
+                       = t                      u
+                       = v                      w
+     
+     mat(s)            = mat1
+     
+     var(s)            = _fileinfo              _meshtv_defvars
+                       = _meshtvinfo            cycle
+                       = d_data                 d_dims
+                       = d_maxindex             dtime
+                       = mat1_dims              mat1_matlist
+                       = mat1_matnos            mat1_mix_mat
+                       = mat1_mix_next          mat1_mix_vf
+                       = mat1_mix_zone          p_data
+                       = p_dims                 p_maxindex
+                       = quadmesh3d_align_nodal quadmesh3d_align_zonal
+                       = quadmesh3d_coord0      quadmesh3d_coord1
+                       = quadmesh3d_coord2      quadmesh3d_dims
+                       = quadmesh3d_max_extents quadmesh3d_max_index_n
+                       = quadmesh3d_max_index_z quadmesh3d_min_extents
+                       = quadmesh3d_min_index   quadmesh3d_zonedims
+                       = t_data                 t_dims
+                       = t_maxindex             time
+                       = u_data                 u_dims
+                       = u_maxindex             v_data
+                       = v_dims                 v_maxindex
+                       = w_data                 w_dims
+                       = w_maxindex
+</pre>
+   <p>To keep the size of these examples small, we've specified that at most
+50 values should be printed from each array and that 25 of those values
+should be from the end of the array (and the other 25, from the
+beginning).  To truncate everything say `<samp><span class="samp">$truncate=0</span></samp>' and to turn
+truncating off say `<samp><span class="samp">$truncate=nil</span></samp>'.
+
+<pre class="example">     > <b>$truncate = 50</b>
+                       = 50
+     > <b>$trailing = 25</b>
+                       = 25
+</pre>
+   <p>The user can ask for the type of any object, including types built into
+the browser.  If the object is a structured type (like in this example)
+then the type of each component of that structure is printed.
+
+<pre class="example">     > <b>typeof d</b>
+                       = struct DBquadvar {
+     id                =    +0 int
+     name              =    +4 string
+     units             =    +8 string
+     label             =    +12 string
+     cycle             =    +16 int
+     time              =    +20 float
+     dtime             =    +24 double
+     meshid            =    +32 int
+     datatype          =    +40 int (DBdatatype)
+     nels              =    +44 int
+     nvals             =    +48 int
+     ndims             =    +52 int
+     dims              =    +56 [3] int
+     major_order       =    +68 int (array order)
+     stride            =    +72 [3] int
+     min_index         =    +84 [3] int
+     max_index         =    +96 [3] int
+     origin            =    +108 int
+     align             =    +112 [3] float
+     mixlen            =    +128 int
+     use_specmf        =    +132 int (on/off)
+     mixvals           =    +124 *[1] *[0] float
+     vals              =    +36 *[1] *[36000] float
+                       = }
+</pre>
+   <p>An integer following a plus sign indicates that the type corresponds to
+a byte offset from the beginning of the innermost enclosing structure
+or array.
+
+   <p>A `<samp><span class="samp">*</span></samp>' means the object is a pointer to whatever type
+follows<a rel="footnote" href="#fn-5" name="fnd-5"><sup>5</sup></a>.
+
+   <p>A list of array dimensions between `<samp><span class="samp">[</span></samp>' and `<samp><span class="samp">]</span></samp>' mean that the
+object is an array and each element of the array is the type that
+follows the `<samp><span class="samp">]</span></samp>'.
+
+   <p>The final name is always one of the browser integral types `<samp><span class="samp">string</span></samp>'
+(same as the C `<samp><span class="samp">char*</span></samp>'), `<samp><span class="samp">short</span></samp>', `<samp><span class="samp">int</span></samp>', `<samp><span class="samp">long</span></samp>',
+`<samp><span class="samp">float</span></samp>', or `<samp><span class="samp">double</span></samp>'.  If the integral type name is followed
+by parentheses then the parentheses contain the name of an underlying C
+`<samp><span class="samp">enum</span></samp>' type or a set of related C preprocessor constants.
+
+   <p>Some data objects override one or more standard class methods.  Such
+objects will have flags like `<samp><span class="samp">__</span><var>flag</var><span class="samp">__</span></samp>' which appear inside
+the object type.
+
+   <p>One can also ask for the Silo definition of a named data type like
+`<samp><span class="samp">DBquadvar</span></samp>'.  This prints the definition of the Silo
+`<samp><span class="samp">DBquadvar</span></samp>' structure which is the same as printed above for the
+type of `<samp><span class="samp">d</span></samp>' except that array sizes and some primitive types are
+not bound to actual values yet<a rel="footnote" href="#fn-6" name="fnd-6"><sup>6</sup></a>.
+
+<pre class="example">     > <b>DBquadvar</b>
+                       = struct DBquadvar {
+     id                =    +0 int
+     name              =    +4 string
+     units             =    +8 string
+     label             =    +12 string
+     cycle             =    +16 int
+     time              =    +20 float
+     dtime             =    +24 double
+     meshid            =    +32 int
+     datatype          =    +40 int (DBdatatype)
+     nels              =    +44 int
+     nvals             =    +48 int
+     ndims             =    +52 int
+     dims              =    +56 [self.ndims] int
+     major_order       =    +68 int (array order)
+     stride            =    +72 [self.ndims] int
+     min_index         =    +84 [self.ndims] int
+     max_index         =    +96 [self.ndims] int
+     origin            =    +108 int
+     align             =    +112 [self.ndims] float
+     mixlen            =    +128 int
+     use_specmf        =    +132 int (on/off)
+     mixvals           =    +124 *[self.nvals] *[self.mixlen]
+     mixvals           =    self.datatype
+     vals              =    +36 *[self.nvals] *[self.nels] self.datatype
+                       = }
+</pre>
+   <p>Giving just the name of the Silo object is short for `<samp><span class="samp">print $1.d</span></samp>'. 
+Notice that the `<samp><span class="samp">vals</span></samp>' array has been truncated as requested and
+that <var>mixvals</var> has no value. The subscripts in the labels to the
+left of the equal sign correspond to the first value on that line (an
+entire array in the case of `<samp><span class="samp">vals[0]</span></samp>'.
+
+   <p>One can also ask for tye type of a single structure component by typing the
+command `<samp><span class="samp">DBquadvar.vals</span></samp>'.
+
+<pre class="example">     > <b>d</b>
+                       = DBquadvar: struct
+     id                =    0
+     name              =    "d"
+     units             =    (null)
+     label             =    (null)
+     cycle             =    48
+     time              =    4.80000
+     dtime             =    4.8000000000
+     meshid            =    0
+     datatype          =    float
+     nels              =    36000
+     nvals             =    1
+     ndims             =    3
+     dims[0]           =    {30, 40, 30}
+     major_order       =    row major
+     stride[0]         =    {1, 30, 1200}
+     min_index[0]      =    {0, 0, 0}
+     max_index[0]      =    {29, 39, 29}
+     origin            =    0
+     align[0]          =    {0.50000, 0.50000, 0.50000}
+     mixlen            =    0
+     use_specmf        =    off
+     mixvals           =    NULL
+     vals[0]           =    {{0.83957, 0.82083, 0.80304, 0.78626, 0.77056,
+     vals[0, 5]        =    0.75601, 0.74266, 0.73059, 0.71987, 0.71055,
+     vals[0, 10]       =    0.70269, 0.69633, 0.69153, 0.68831, 0.68669,
+     vals[0, 15]       =    0.68669, 0.68831, 0.69153, 0.69633, 0.70269,
+     vals[0, 20]       =    0.71055, 0.71987, 0.73059, 0.74266, 0.75601,
+     vals[0, 25]       =    ...(35950 values omitted)..., 0.75601,
+     vals[0, 35976]    =    0.74266, 0.73059, 0.71987, 0.71055, 0.70269,
+     vals[0, 35981]    =    0.69633, 0.69153, 0.68831, 0.68669, 0.68669,
+     vals[0, 35986]    =    0.68831, 0.69153, 0.69633, 0.70269, 0.71055,
+     vals[0, 35991]    =    0.71987, 0.73059, 0.74266, 0.75601, 0.77056,
+     vals[0, 35996]    =    0.78626, 0.80304, 0.82083, 0.83957}}
+</pre>
+   <p>The browser does not attempt to be efficient about loading objects from
+the database into memory since the underlying Silo library makes it
+difficult to do so.  However, if one says `<samp><span class="samp">$lowlevel=1</span></samp>' then the
+browser uses lower-level Silo functions to read the file.  As a result,
+less data is moved from disk to memory.
+
+<pre class="example">     > <b>$lowlevel=1</b>
+                       = 1
+     > <b>d</b>
+                       = struct
+     name              =    "d"
+     type              =    "quadvar"
+     meshid            =    "quadmesh"
+     align             =    "/quadmesh_align_zonal"
+     dims              =    "/d_dims"
+     max_index         =    "/d_maxindex"
+     value0            =    "/d_data"
+     ndims             =    3
+     nvals             =    1
+     nels              =    36000
+     origin            =    0
+     datatype          =    19
+     mixlen            =    0
+     major_order       =    0
+     cycle             =    48
+     time              =    "/time"
+     dtime             =    "/dtime"
+     min_index         =    "/quadmesh_min_index"
+     use_specmf        =    -1000
+</pre>
+   <p>Now we'll decrease the number of values printed and increase the
+precision that's displayed for `<samp><span class="samp">float</span></samp>' values.
+
+<pre class="example">     > <b>$truncate = 12</b>
+                       = 12
+     > <b>$trailing = 6</b>
+                       = 6
+     > <b>$fmt_float = "%1.15f"</b>
+                       = "%1.15f"
+     > <b>d.vals[0]</b>
+     [0]               = {0.839570403099060, 0.820833325386047,
+     [2]               = 0.803043246269226, 0.786264479160309,
+     [4]               = 0.770563006401062, 0.756006062030792,
+     [6]               = ...(35988 values omitted)...,
+     [35994]           = 0.756006062030792, 0.770563066005707,
+     [35996]           = 0.786264479160309, 0.803043246269226,
+     [35998]           = 0.820833325386047, 0.839570462703705}
+</pre>
+   <p>The `<samp><span class="samp">diff</span></samp>' command compares two objects and reports differences
+between them.  The output is in groups of differences where the group is
+delimited at the beginning and end by a line of stars.  The first half
+of the group displays (part of) the first argument to `<samp><span class="samp">diff</span></samp>' while
+the part of the group after the line of dashes displays (part of) the
+second argument.  Subobjects that differ only partially (`<samp><span class="samp">stride</span></samp>' in
+this case) appear separately before those which completely differ.  The
+array truncating parameters apply to each array segment individually.
+
+<pre class="example">     > <b>diff d p</b>
+     ***************
+     stride[1]         = {30, 1200}
+     ---------------
+     stride[1]         = {31, 1271}
+     ***************
+     ***************
+     name              = "d"
+     nels              = 36000
+     dims[0]           = {30, 40, 30}
+     max_index[0]      = {29, 39, 29}
+     vals[0]           = {{0.839570403099060, 0.820833325386047,
+     vals[0, 2]        = 0.803043246269226, 0.786264479160309,
+     vals[0, 4]        = 0.770563006401062, 0.756006062030792,
+     vals[0, 6]        = ...(35988 values omitted)...,
+     vals[0, 35994]    = 0.756006062030792, 0.770563066005707,
+     vals[0, 35996]    = 0.786264479160309, 0.803043246269226,
+     vals[0, 35998]    = 0.820833325386047, 0.839570462703705}}
+     ---------------
+     name              = "p"
+     nels              = 39401
+     dims[0]           = {31, 41, 31}
+     max_index[0]      = {30, 40, 30}
+     vals[0]           = {{1.190943479537964, 1.218125700950623,
+     vals[0, 2]        = 1.245107889175415, 1.271674990653992,
+     vals[0, 4]        = 1.297584056854248, 1.322565793991089,
+     vals[0, 6]        = ...(39389 values omitted)...,
+     vals[0, 39395]    = 0.000000000000000, 0.000000000000000,
+     vals[0, 39397]    = 0.000000000000000, 0.000000000000000,
+     vals[0, 39399]    = 0.000000000000000, 0.000000000000000}}
+     ***************
+</pre>
+   <p>A compound array is composed of zero or more subarrays.  A subarray can
+be printed by saying something like `<samp><span class="samp">carray.b</span></samp>', but a subarray is
+also printed by saying just `<samp><span class="samp">b</span></samp>' as long as `<samp><span class="samp">b</span></samp>' is not some
+other type of object and `<samp><span class="samp">b</span></samp>' exists in exactly one compound array.
+
+<pre class="example">     > <b>carray</b>
+                       = struct
+     name              =    "carray"
+     id                =    0
+     nelems            =    3
+     nvalues           =    18
+     datatype          =    float
+     a[0]              =    {0.00000, 0.34185, 0.64252, 0.86576}
+     b[0]              =    {0.98468, 0.98496, 0.86656, 0.64374, 0.34335,
+     b[5]              =    0.00159}
+     c[0]              =    {-0.34036, -0.64130, -0.86496, -0.98441,
+     c[4]              =    -0.98523, -0.86735, -0.64495, -0.34485}
+     
+     > <b>b</b>
+     [0]               = {0.98468, 0.98496, 0.86656, 0.64374, 0.34335,
+     [5]               = 0.00159}
+     
+     > <b>b[2]</b>
+     [2]               = {0.86656}
+</pre>
+   <p>If the file is opened for reading and writing (the default) then
+variables can be given new values.  The new values are written back to
+the file immediately.
+
+<pre class="example">     > <b>_fileinfo</b>
+                       = "3D rectilinear test file"
+     > <b>_fileinfo = "testing"</b>
+                       = "testing"
+     > <b>_fileinfo</b>
+                       = "testing"
+</pre>
+   <p>A scalar variable assigned to an array (or slice of an array) sets all
+the elements of that array (or slice) to the specified value.  A list of
+values enclosed in curly braces can be assigned to an array (or slice of
+an array) causing each element of the array (or slice) to be set to one
+of the listed values.
+
+<pre class="example">     > <b>typeof v_data</b>
+                       = [31, 41, 31] float
+     > <b>v_data = 0</b>
+                       = 0
+     > <b>v_data[0, 0, 2:4]</b>
+                       = {0, 0, 0}
+     > <b>v_data[0, 0, 2:4] = {0.111, 0.222, 0.333}</b>
+                       = {0.111, 0.222, 0.333}
+     > <b>v_data</b>
+     [0, 0, 0]         = {0, 0, 0.111, 0.222, 0.333, 0,
+     [0, 0, 6]         = ...(39389 values omitted)..., 0, 0, 0,
+     [30, 40, 28]      = 0, 0, 0}
+</pre>
+   <p>Pressing control-c during a browser command aborts the command, but
+pressing control-c when the browser is asking for input aborts the
+browser.  It is more polite to press control-d or type `<samp><span class="samp">exit</span></samp>'
+instead since this gives the browser a chance to properly close database
+files.
+
+<pre class="example">     > <b>$truncate = nil</b>
+     > <b>d >data_file</b>
+     <b>control-c</b>
+     
+     Command aborted.
+     > <b>control-c</b>
+     %
+</pre>
+   <div class="footnote">
+<hr>
+<a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> In contrast, pressing the
+interrupt character during an interactive browser command aborts the
+command but not the browser.</p>
+
+   <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> Changes
+should not be made to the <code>comp_names</code> or <code>pdb_names</code> arrays
+since the Silo <code>DBobject</code> is regenerated from the user-friendly
+fields before being saved back to the file.</p>
+
+   <p class="footnote"><small>[<a name="fn-3" href="#fnd-3">3</a>]</small> The path name may be
+different depending on how the browser was compiled.</p>
+
+   <p class="footnote"><small>[<a name="fn-4" href="#fnd-4">4</a>]</small> Opening a file on the command line is the same as
+saying `<samp><span class="samp">open "rect3d.pdb" $1</span></samp>' interactively.</p>
+
+   <p class="footnote"><small>[<a name="fn-5" href="#fnd-5">5</a>]</small>  Whether or not something is a pointer is generally not
+important to using the browser: a 1d array of pointers to 1d arrays of
+integers can be treated like a ragged-edge 2d array of integers.</p>
+
+   <p class="footnote"><small>[<a name="fn-6" href="#fnd-6">6</a>]</small> The word `<samp><span class="samp">self</span></samp>' refers to the
+object corresponding to the innermost structure which incloses the
+`<samp><span class="samp">self</span></samp>'.</p>
+
+   <p><hr></div>
+
+</body></html>
+
diff --git a/tools/browser/browser.info b/tools/browser/browser.info
new file mode 100644
index 0000000..fd87f32
--- /dev/null
+++ b/tools/browser/browser.info
@@ -0,0 +1,1375 @@
+This is browser.info, produced by makeinfo version 4.5 from
+browser.texi.
+
+   This file documents the Silo browser.
+
+   Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.  All rights reserved.
+
+
+File: browser.info,  Node: Top,  Next: Copying,  Up: (dir)
+
+The Silo Browser User Manual
+****************************
+
+   This document describes the Silo file browser, an application program
+built on the Silo library for interactive viewing of Silo database
+files.
+
+* Menu:
+
+* Copying::                     Copyright information.
+* Invocation::                  Invoking the browser.
+* Syntax::                      Command Syntax.
+* Functions::                   Builtin Functions.
+* Operators::                   Browser operators.
+* Internal Variables::          Controlling the browser personality.
+* Startup File::                Browser initialization.
+* Editing::                     Changing the values of objects.
+* Paging::                      Long output is paginated.
+* Redirection::                 Sending output to a file or command.
+* Interrupts::                  Interrupting a long-running command.
+* Examples::                    Some simple examples.
+
+
+File: browser.info,  Node: Copying,  Next: Invocation,  Prev: Top,  Up: Top
+
+Copyright
+*********
+
+   Copyright (C) (c) 1994 - 2010, Lawrence Livermore National Security,
+LLC.  LLNL-CODE-425250.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the disclaimer below.     *
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the disclaimer (as noted
+below) in the documentation and/or other materials provided with
+the distribution.     * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE LIVERMORE  NATIONAL SECURITY, LLC,  THE
+U.S.  DEPARTMENT OF  ENERGY 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.
+
+   This work was produced at Lawrence Livermore National Laboratory
+under Contract No.  DE-AC52-07NA27344 with the DOE.
+
+   Neither the  United States Government nor  Lawrence Livermore
+National Security, LLC nor any of  their employees, makes any warranty,
+express or  implied,  or  assumes  any  liability or  responsibility
+for  the accuracy, completeness,  or usefulness of  any information,
+apparatus, product, or  process disclosed, or  represents that its use
+would not infringe privately-owned rights.
+
+   Any reference herein to  any specific commercial products, process,
+or services by trade name,  trademark, manufacturer or otherwise does
+not necessarily  constitute or imply  its endorsement,  recommendation,
+or favoring  by  the  United  States  Government  or  Lawrence
+Livermore National Security,  LLC. The views  and opinions of  authors
+expressed herein do not necessarily state  or reflect those of the
+United States Government or Lawrence Livermore National Security, LLC,
+and shall not
+
+
+File: browser.info,  Node: Invocation,  Next: Syntax,  Prev: Copying,  Up: Top
+
+The Browser Command Line
+************************
+
+   The schnauzer is a small terrier with a wiry coat; the browser is a
+utility built on Silo for reading scientific database files.  The
+browser command line is
+
+   `browser' [SWITCHES] [`--'] [FILES]...
+
+   The browser recognizes the following command line switches.  Single
+letter switches that don't require an argument can be grouped together
+(so `-l -q' is the same as `-lq'). When a single-letter switch takes an
+argument the argument can appear either immediately after the letter or
+as the next argument such as `-l3' or `-l 3'. Long format switches are
+introduced by double hyphens and if they take an argument it must
+follow an equal sign such as `--eval=exit'.  Command-line options take
+effect before the initialization file is read, but also override any
+settings made in that file.
+
+   Invoking the browser with the switch `--help' will show a complete
+list of command-line switches and their descriptions.
+
+`-A TOLERANCE'
+`--absolute=TOLERANCE'
+     All absolute differencing tolerances are set to TOLERANCE, a
+     floating point number. All variables of the form `$diff_*_abs' are
+     set to the specified tolerance.
+
+`-R TOLERANCE'
+`--absolute=TOLERANCE'
+     All relative differencing tolerances are set to TOLERANCE, a
+     floating point number.  All variables of the form `$diff_*_rel' are
+     set to the specified tolerance.
+
+`-V'
+`--version'
+     Prints the browser version number. If no other switches or files
+     are specified then the browser will exit after printing the
+     version number.
+
+`-d WORDS'
+`--diff=WORDS'
+     This switch controls the behavior of the `diff' function of the
+     browser. The WORDS should be a comma-separated list of key words
+     which will be assigned to the `$diff' browser variable. See its
+     documentation for details.
+
+`-e EXPRESSION'
+`--eval=EXPRESSION'
+     The browser expression is evaluated and the result is printed on
+     the standard output stream.  More than one expression can be given
+     to the browser by using multiple switches.  The expressions will
+     be evaluated in the order given after the initialization file is
+     read.  When a `-e' switch is present the browser exits after all
+     expressions are processed instead of going into interactive mode.
+     If standard output is a terminal then the browser pages the output
+     in the normal way (see below).  If the interrupt character is
+     pressed when an expression is being evaluated, the browser
+     aborts(1).
+
+`-E LIST'
+`--exclude=LIST'
+     The browser `$exclude' variable is set to the comma-separated list
+     of names and/or datatypes supplied as an argument to this switch.
+     The switch may appear more than once. The names in the `$exclude'
+     list will be excluded from recursive `diff' operations. See
+     documentation for `$exclude' for details.
+
+`-f INITFILE'
+`--file=INITFILE'
+     When the browser begins execution it attempts to read the file
+     `.browser_rc' in the user's home directory.  If that file isn't
+     readable then it tries to read a system-wide browser initialization
+     file.  The `-f' command line switch causes the browser to try to
+     read the specified file instead.  To prevent the browser from
+     reading any initialization file, say `-f /dev/null' (internal
+     browser variables are still initialized to default values).  The
+     initialization file is opened after the database(s) and therefore
+     can contain commands that reference the database(s).
+
+`-h'
+`--help'
+     Prints a browser usage message. If this is the only switch and no
+     file names are specified then the browser will exit after showing
+     the usage message.  The usage message will be paged if printed to
+     a terminal.
+
+`-l [VALUE]'
+`--lowlevel[=VALUE]'
+     This switch assigns an integer value to the `$lowlevel' browser
+     variable, which causes the browser to load database objects as type
+     `DBobject' even if the object is some other composite Silo datatype
+     like `DBquadvar'. If VALUE is specified then it will be assigned
+     to the `$lowlevel' variable; otherwise the value `1' is assigned.
+
+`-c [VALUE]'
+`--checksums[=VALUE]'
+     This switch assigns an integer value to the `$checksums' browser
+     variable, which controls browser's use of checksums during read.
+
+`-n LINES'
+`--height=LINES'
+     The browser pages interactive output to prevent it from scrolling
+     off the top of the screen. It normally decides how tall the window
+     is by making `ioctl' calls, but this switch can be used to
+     override that choice. The setting is valid only until the browser
+     receives a `SIGWINCH' signal and queries the terminal size.
+
+`-q'
+`--quiet'
+     This option causes the browser to be less verbose than normal.
+     This sets the `$verbosity' variable to zero.
+
+`-o'
+`--obase=FORMAT'
+     This switch sets the internal variable `$obase' to FORMAT, which
+     should be `16' for hexadecimal, `8' for octal, `2' for binary, or
+     anything else for the default decimal format. It controls how
+     integer, floating-point, character, and string data are displayed.
+     The default is that these types of data are displayed with a
+     type-dependent `printf' format string which is user defined (e.g.,
+     `$fmt_int').
+
+`-r [BOOLEAN]'
+`--rdonly[=BOOLEAN]'
+     This option assigns a boolean value to the `$rdonly' browser
+     variable, which causes the browser to open all subsequent files in
+     read-only mode. Files that only have Unix read permission are
+     always opened in read-only mode, but the browser issues a warning
+     if the user had asked for read-write permission.  If no argument
+     is given for this switch then true is assumed. The default if this
+     switch does not appear is false.
+
+`-s [BOOLEAN]'
+`--single[=BOOLEAN]'
+     This option causes the browser to call `DBForceSingle' with a value
+     of one or zero depending on whether the argument is true or false.
+     If no argument is given then it is assumed to be true.  Calling
+     `DBForceSingle' with a non-zero value causes most drivers to return
+     floating point data with the C `float' type rather than the default
+     `double' type.
+
+`-v'
+`--verbose'
+     This option causes the browser to be more verbose than normal.
+     This sets the `$verbosity' variable to two.
+
+`-w COLUMNS'
+`--width=COLUMNS'
+     The browser normally breaks lines to prevent them from wrapping
+     around from the right margin to the next line. It decides how many
+     columns are appropriate by making `ioctl' calls, but this switch
+     overrides that choice.
+
+`--debug[=BOOLEAN]'
+     Tells Silo to display the names of the Silo API functions as they
+     are called. This switch is probably only useful to those who debug
+     the browser.
+
+
+   If Silo database file names are specified then the files are opened
+in the order specified and associated with file symbols `$1', `$2',
+etc. These are opened before the initialization file is read, which
+happens before any `--eval' statements are executed. However, the
+command-line options are reevaluated after the initialization file is
+read.
+
+   ---------- Footnotes ----------
+
+   (1) In contrast, pressing the interrupt character during an
+interactive browser command aborts the command but not the browser.
+
+
+File: browser.info,  Node: Syntax,  Next: Functions,  Prev: Invocation,  Up: Top
+
+Command Syntax
+**************
+
+   The browser command syntax is quite simple, consisting of function
+calls, operators, atoms, and lists. Comments begin with a hash mark and
+continue to the end of the line (except in strings). White space is
+generally ignored except as a token separator. Statements can be
+continued across multiple lines, but a backslash must escape the
+linefeed if the partial statement looks syntactically complete.
+
+   A function call is a parenthetical expression where the first
+element is the name of the function and the subsequent elements are the
+arguments to that function.  Most functions evaluate all their
+arguments but others evaluate only some (or none). For example, the
+`Assign' function doesn't evaluate its first argument, but rather
+assignes the evaluated second argument to the l-value specified by the
+first argument. The parentheses can be omitted from around the top-level
+function call. Say `help func' (or `(help func)') for a list of all
+functions.
+
+   Most browser operators are infix, binary operators. They take two
+operands, one on each side of the operator, and call some function which
+is bound to the operator. For example the expression `foo=1' is
+equivalent to `(Assign foo 1)'. The `{}' operator takes any number of
+arguments which appear between the open and close curly braces. Say
+`help operators' for a list of all operators.
+
+   The browser has three types of atoms: strings, numbers, and symbols.
+A string is a sequence of characters enclosed in single or double
+quotes. The normal C escaping mechanism can be used for special
+characters within the string. A single quote has no special significance
+in a double-quoted string and vice versa.  Numbers are positive or
+negative sequences of decimal digits with an optional embedded decimal
+point and trailing exponent. An exponent consists of the letter `e' or
+`E' followed by an optional sign and one or more decimal digits.  A
+symbol is any sequence of alphanumeric characters and may also include
+dollar signs, hyphens, underscores, and various other characters
+(although their use is discouraged).
+
+   A list consists of zero or more atoms or lists enclosed in
+parentheses. Evaluation of the list results in the browser looking up
+the functional value of the first member of the list and calling that
+function with the subsequent list members as arguments. Evaluation of
+the list can be suppressed by using curly braces instead of parentheses
+(e.g., `{1 3 5}' is equivalent to `(Quote 1 3 5)')'.
+
+   The browser reads commands interactively from its standard input. If
+available, the GNU readline library is used allowing the user to edit
+commands as they are entered using Emacs or vi editing commands. To
+quote from the readline library (documentation is available at
+`http://www.cs.utah.edu/csinfo/texinfo/texinfo.html'):
+
+     Often during an interactive session you type in a long line of
+     text, only to notice that the first word on the line is
+     misspelled.  The Readline library gives you a set of commands for
+     manipulating the text as you type it in, allowing you to just fix
+     your typo, and not forcing you to retype the majority of the line.
+     Using these editing commands, you move the cursor to the place
+     that needs correction, and delete or insert the text of the
+     corrections.  Then, when you are satisfied with the line, you
+     simply press <RETURN>.  You do not have to be at the end of the
+     line to press <RETURN>; the entire line is accepted regardless of
+     the location of the cursor within the line.
+
+   The readline library default mode is Emacs.  If you prefer `vi' key
+bindings, then create a file called `.inputrc' in your home directory
+with the single line `set editing-mode vi'.
+
+
+File: browser.info,  Node: Functions,  Next: Operators,  Prev: Syntax,  Up: Top
+
+Builtin Functions
+*****************
+
+   Some of the browser functions have more than one form and are
+overloaded to do various things depending on the number of actual
+arguments supplied. Arguments shown between `[' and `]' are optional.
+
+`array DIMENSIONS ... BASETYPE'
+     Creates a new array datatype. The arguments are the size of the
+     array in each dimension and the datatype of the array elements.
+     The array size arguments can be either integers or strings that
+     look like comma- and/or space-separated integers. Browser arrays
+     use C element ordering.
+
+`cd DIRNAME [FILESYM]'
+     Each file has a current working directory (CWD) which is initially
+     set to the root directory (`/'). This command will set the CWD to
+     some other directory. The first argument is the name of the new
+     CWD. If the name contains special characters it should be enclosed
+     in quotes to protect it from the parser. If the name is relative
+     (doesn't start with a `/') then the name is looked up with respect
+     to the current CWD. The second optional argument is the file or
+     list of files whose CWD is being set (default is the file
+     represented by the browser variable `$1').  The DIRNAME is a
+     string; it is not interpreted by the browser and thus a command
+     like `cd $1.domain_0.angle_walls' will fail while `cd
+     domain_0/angle_walls $1' would work.
+
+`close FILESYM ...'
+     Closes the database files associated with the specified file
+     symbols.  If objects exist in the browser memory which are
+     associated with the database then the database will be held open
+     until those objects no longer exist, but the file symbol will be
+     freed so another file can immediately be associated with that
+     symbol. This command is equivalent to `FILESYM=nil' (except with
+     extra sanity checks).
+
+`diff OBJECTS...'
+     Calculates the differences between its arguments similar to the
+     Unix `diff' command. If called with an even number of arguments the
+     argument list is split in half and each argument from the first
+     half is compared with the corresponding argument of the second
+     half. If called with no arguments then the argument list will be
+     the SILO files from the command-line (`$1', `$2', etc.).  If
+     called with just one argument which is an object from the silo
+     file `$1' then that object will be compared to an object with the
+     same name from file `$2'.  The behavior is influenced by the
+     `$diff' browser variable. In general, if no differences are found
+     then no output is produced.
+
+`end'
+     See `exit'.
+
+`exit [STATUS]'
+     Exits the browser with the specified STATUS, an integer constant.
+     If no exit status is supplied then zero (success) is assumed.
+     Typing the end of file character (usually control-d) at the
+     beginning of a line also invokes this command, causing a zero
+     (success) exit.
+
+`file FILENAME'
+     The Silo database FILENAME is opened and returned but not
+     associated with any symbol.  Therefore, as soon as nothing refers
+     to the file, it is closed.  One common use of this function is
+     with the `ls' or `diff' commands which can take file objects as
+     arguments.  For instance, the command `ls (file curv2d.pdb)' opens
+     the `curv2d.pdb' file and lists the root directory and `ls (cd
+     dirname (file curv2d.pdb))' lists the contents of the DIRNAME
+     directory of `curv2d.pdb'.  The file is open for read-write mode
+     unless the `$rdonly' browser variable has a non-nil value or the
+     file has only read permission.
+
+`help [TOPIC] [DOCSTRING]'
+     Shows documentation for various parts of the browser. When invoked
+     without arguments it will display a table of contents of `help'
+     subcommands. With one argument it will display documentation for a
+     help category (e.g., `help run'), a browser internal variable
+     (e.g., `help $diff'), a function (e.g., `help diff'), a
+     command-line switch (e.g., `help --diff'), an operator (e.g., `help
+     "op="'), or the documentation string associated with the specified
+     symbol. When invoked with a string argument it will print all help
+     categories which contain the specified string (e.g., `help
+     "diff"'). When called with two arguments it assigns the second
+     argument as the documentation property of the first argument,
+     which must be a symbol or string.
+
+`include FILENAME'
+     Causes the specified file to be parsed and evaluated. This is often
+     useful in user-private initialization files, `~/.browser_rc', where
+     the user wants to augment the actions that would normally happen
+     in the system-wide browser initialization file. The user-private
+     file should contain the line `include $pubinit'.
+
+`ls [FILESYM] [OBJNAMES...]'
+     This command lists the contents of the current working directory.
+     If no file is specified then the file associated with `$1' is
+     used. If a list of files is specified (e.g., `$*') then a listing
+     is produced for each of those files. If object names are supplied,
+     then only those objects are listed.  The object names can include
+     the normal Unix filename wild cards `*', `?', and `[]' (object
+     names with `[]' wild cards require quotes so the `[' and `]' are
+     not intrepretted as array selectors). Wild card matching is not
+     available if the `fnmatch' function was not available when the
+     browser was compiled.  If a single object name is supplied and
+     that object is a directory, then the contents of that directory
+     appear.  An alternative (and shorter) way to list the contents of
+     a subdirectory is to type the name of the subdirectory on a line
+     by itself (for instance, `dir1').
+
+`'
+     Another way to list a directory is to just type the name of the
+     directory at the prompt (you can use `.' as the current working
+     directory).  So saying `$2.dir' is the same as saying `ls $2 dir'
+     and `$2..' is the same as `ls $2' or `ls $2 .'.
+
+`noprint'
+     See `print'.
+
+`open FILENAME [FILESYM]'
+     The Silo database FILENAME is opened and associated with the
+     specified file symbol.  Any database previously associated with
+     FILESYM will be closed as soon as all objects associated with that
+     file are freed.  If FILESYM is omitted then `$1' is used.  This
+     command is equivalent to `FILESYM = FILENAME'. Files are open in
+     read-write mode unless the `$rdonly' browser variable has a
+     non-nil value or the file has only read permission.
+
+`[no]print EXPRESSION ...'
+     Evaluates the expressions and prints (or suppresses) the result of
+     each one.  The `print' command is normally not used because the
+     browser prints all non-null expressions by default.  However, a
+     `noprint' can be used to prevent the default output.
+
+`pwd [FILESYM]'
+     Prints the current working directory for the database associated
+     with the specified file symbol, list of files, or `$1'. This
+     command also prints the name of the database.  This command is
+     usually not used because a file symbol appearing by itself causes
+     the database name and current working directory to be displayed.
+
+`quit'
+     See `exit'.
+
+`typeof EXPRESSION'
+     The type of a Silo expression is printed.  For Silo database
+     objects the type which is printed is fully qualified and bound to
+     actual values. In contrast, printing the actual named type shows
+     the unbound values.  For example, if `d' is a Silo quadvar object,
+     then `typeof d.dims' might show `[3] int' while `print
+     DBquadvar.dims' displays `[self.ndims] int'.
+
+
+
+File: browser.info,  Node: Operators,  Next: Internal Variables,  Prev: Functions,  Up: Top
+
+Operators
+*********
+
+   A browser expression is composed of terms and operators. The
+following operators are supported and overloaded depending on the
+number and type of arguments.
+
+SYMBOL `=' VALUE
+     Assigns a value to a browser internal variable or a database
+     object.  If SYMBOL is an internal variable and VALUE is the word
+     `nil' then the symbol loses its variable value.
+
+FILESYM `.' VARNAME
+     The variable or directory with the name VARNAME is loaded from the
+     database associated with the specified file symbol and the Silo
+     data object is returned.  The variable name must be enclosed in
+     quotes unless it looks like a symbol and does not conflict with a
+     browser internal variable. If FILESYM is `$1' and the variable
+     name is not enclosed in quotes and is not the name of an internal
+     browser variable, then the file symbol and dot can be omitted.
+     Thus `$1.quadmesh' can be written as just `quadmesh'.
+
+SDO `.' FIELDNAME
+     If SDO is some Silo data object which has a structured type, then
+     this expression returns a new Silo data object which is the
+     specified field of the SDO structure.  For instance, a quadmesh
+     `qm' has a field named `dims' which holds the dimensions of the
+     mesh.  The expression `qm.dims' returns just the dimensions.
+
+LIST `.' ANYTHING
+     If the first argument is a list then the dot operator is applied
+     to each member of the list and the result is a list of the results.
+
+SDO `[' ELMTNUM `]'
+     If SDO is some Silo data object which has an array type, then this
+     expression returns the single specified element of that array.  The
+     first element of an array is number zero.  For instance,
+     `qm.dims[0]' returns the size of the first mesh dimension.
+
+SDO `[' MIN `:' MAX `]'
+     If SDO is some Silo data object which has an array type, then this
+     expression returns a sub-array with elements MIN through MAX,
+     inclusive.  Thus, `qm.dims[0:2]' are the first three mesh
+     dimensions.
+
+SDO `[' EXPR1`,' EXPR2`,' ... `]'
+     If SDO is some Silo data object which has an array type, and EXPR
+     are element numbers or ranges, then one EXPR is applied to each
+     array dimension in turn, automatically skipping over pointers.
+     For instance, if a quadvar `qv' has a `vals' of type `*[2]
+     *[36000] float' then the expression `qv.vals[0,100:199]' will be
+     an object consisting of the second 100 values of the first
+     variable.  (The expression `qv.vals[0][100:199]' would result in an
+     error message because `qv.vals[0]' returns an object with the type
+     `[1] *[36000] float' to which is then applied the `[100:199]' that
+     is invalid because the array only has one element.)
+
+EXPR `|' COMMAND
+     The expression EXPR has its output redirected to the shell command
+     COMMAND.
+
+EXPR `>' FILE
+     The expression EXPR has its output redirected to the file FILE,
+     which is created or truncated.
+
+EXPR `>>' FILE
+     The expression EXPR has its output appended to the file FILE,
+     which is created if it doesn't exist.
+
+`{' EXPRESSIONS `}'
+     This operator takes zero or more operands occurring between the
+     curly braces (optionally separated by commas) and returns a list
+     of those unevaluated operands. If only one operand is given then
+     that operand is returned unevluated and not in a list.
+
+MINIMUM `:' MAXIMUM
+     The range operator is used to construct a range object which
+     represents all integers between MINIMUM and MAXIMUM, inclusive.
+
+
+
+File: browser.info,  Node: Internal Variables,  Next: Startup File,  Prev: Operators,  Up: Top
+
+Internal Variables
+******************
+
+   Certain aspects of the browser can be configured by setting browser
+variables with the `=' operator described above.  The current value of
+an internal variable can be displayed by typing the variable's name.
+The variables are initialized with default values when the browser
+starts and may then be overridden by command-line options, the
+initialization file, or interactively. All predefined browser variables
+begin with a dollar sign.
+
+* Menu:
+
+* Differencing Variables::
+* Output Variables::
+* File Variables::
+
+
+File: browser.info,  Node: Differencing Variables,  Next: Output Variables,  Prev: Internal Variables,  Up: Internal Variables
+
+Differencing Variables
+======================
+
+   These variables affect the operation of the `diff' function.
+
+`$diff'
+     This variable's value is a list of symbols which control the
+     details of the `diff' function. The default is `$diff = {detail,
+     two_column}'. This variable is set by the `--diff' command-line
+     switch.
+
+    `detail'
+          This is the default, which causes the `diff' function to
+          report all details about detected differences.
+
+    `brief'
+          If this word is present then `diff' doesn't actually display
+          any data. The output will consist of a single line for each
+          file object which differs between file A and file B.  This
+          option allows some short circuiting of the work required for
+          the `detail' mode.
+
+    `summary'
+          This key word causes `diff' to report by a single line of
+          output when the two operands of the `diff' function are
+          different. No output is produced if they are the same. This
+          option allows some short circuiting of the work required for
+          the `brief' mode.
+
+    `ignore_additions'
+          If this is specified then `diff' will not report differences
+          due to data appearing in file B but not in file A.
+
+    `ignore_deletions'
+          If this is specified then `diff' will not report differences
+          due to data appearing in file A but not in file B.
+
+    `two_column'
+          If this is specified then the output will list differences
+          side-by-side instead of one after the other (that is, output
+          will resemble `pdbdiff' instead of `diff'). This setting is
+          only applicable for detailed output.
+
+`$exclude'
+     The `diff' function normally recurses into directories and compares
+     the contents of those directories. However, the `$exclude' variable
+     can be a list of character strings which specify object names
+     and/or types which should be excluded from recursive comparison.
+     The object names may include shell wildcards such as `*', `?', and
+     `[]'. If a name pattern is relative (doesn't start with a slash) it
+     will be compared to the base name of the objects about to be
+     differenced; but if the name pattern is absolute (begins with a
+     slash) it will be compared to the full path names of the objects
+     being differenced. If the `$exclude' string begins with the string
+     `type:' then the following part should be one of the object types
+     printed by the `ls' function.  A difference operation between two
+     objects is suppressed if either object matches any of the strings
+     stored in the `$exclude' list.
+
+     For example, to prevent `diff' from comparing any objects with the
+     base name `cycle', or any objects whose full name is
+     `/VM/typelist', or any objects whose name ends with `_list', or
+     any object of type `obj' one would issue the following browser
+     command:
+
+          > $exclude = {"cycle", "/VM/typelist", "*_list", "type:obj"}
+
+     or invoke the browser with the switch
+          --exclude='cycle,/VM/typelist,*_list,type:obj'
+
+`$diff_int8_abs'
+`$diff_int8_rel'
+`$diff_short_abs'
+`$diff_short_rel'
+`$diff_int_abs'
+`$diff_int_rel'
+`$diff_long_abs'
+`$diff_long_rel'
+`$diff_float_abs'
+`$diff_float_rel'
+`$diff_double_abs'
+`$diff_double_rel'
+     These variables control how the `diff' function determines whether
+     two numeric values are the same or different. The ones that end
+     with `_abs' specify the maximum absolute difference allowed
+     between two values A and B.  The `diff' command considers A and B
+     to be different if `|A-B|>ABS'.  The variables that end with
+     `_rel' specify the maximum absolute difference relative to the
+     mean of two values.  The `diff' command considers A and B to be
+     different if `|A-B|/|A+B| > REL/2'.
+
+     If both tests are performed then A and B are considered different
+     if either test indicates they are different. If an ABS or REL
+     parameter is not defined (or has a non-positive value) then the
+     corresponding test is not performed. If neither test is performed
+     then an exact comparison is used.
+
+     All `diff' variables have a default value of zero and are set by
+     the `--absolute' and `--relative' command-line switches.
+
+
+File: browser.info,  Node: Output Variables,  Next: File Variables,  Prev: Differencing Variables,  Up: Internal Variables
+
+Output Variables
+================
+
+`$height'
+     The height of the output terminal in lines. If set to a positive
+     value then the browser will pause after each screenful of
+     interactive output (redirected output is unaffected by this
+     setting). This variable is set by the `--height' command-line
+     switch and is reset whenever the browser receives a window size
+     change signal (`SIGWINCH').
+
+`$width'
+     The width of the output terminal in characters. The browser will
+     try not to print data which would wrap from one line to the next.
+     This variable is set by the `--width' command-line switch and is
+     reset whenever the browser receives a window size change signal
+     (`SIGWINCH').
+
+`$verbosity'
+     This variable is set by the `--quiet' and `--verbose' switches.
+     The `--quiet' sets it to zero while `--verbose' sets it to two
+     (the default is one). Changing its value at runtime changes the
+     amount of chatter produced by the browser.
+
+`$truncate'
+     If this variable holds a non-negative integer value N, then the
+     browser shows only N values of each array; otherwise all values of
+     an array are displayed. Values which are omitted are indicated by a
+     string such as `...(2000 values omitted)...' appearing at the point
+     where the values were omitted. Truncation is disabled (all values
+     are printed) by setting this variable to nil (its default).
+
+`$trailing'
+     If this variable holds a positive integer value and `$truncate'
+     has a non-negative integer value, then up to N of the printed
+     array values will come from the end of the array rather than the
+     beginning. The default value is 50.
+
+`$fmt_double'
+     This variable holds a `printf' format string which is used to
+     format C `double' values.  The default value is `%1.10g'.
+
+`$fmt_float'
+     This variable holds a `printf' format string which is used to
+     format C `float' values.  The default value is `%1.5g'.
+
+`$fmt_int'
+     This variable holds a `printf' format string which is used to
+     format integer values.  The default value is `%d'.
+
+`$fmt_long'
+     This variable holds a `printf' format string which is used to
+     format long integer values.  The default value is `(long)%ld'.
+
+`$fmt_null'
+     This variable holds a `printf' format string which is printed for
+     null character strings.  The default value is `(null)'.
+
+`$fmt_int8'
+     This variable holds a `printf' format string which is used to
+     format 8-bit integer values.  The default is `(int8)%d' but people
+     often like to change it to ``%c'' to see the ASCII equivalent. Be
+     warned that output of non-printable ASCII characters in this
+     manner may not work if the terminal emulator interprets them as
+     commands.
+
+`$fmt_short'
+     This vairable holds a `printf' format string which is used to
+     format short integer values.  The default value is `(short)%d'.
+
+`$fmt_string'
+     This variable holds a `printf' format string which is used to
+     format character string values.  The default value is `\"%s\"'.
+
+`$obase Output of primitive data (integer, character, string, and'
+     floating-point), by default, uses the `$fmt_' variables described
+     above. However, by setting this variable to 16, 8, or 2 it is
+     possible to display primitive data in hexadecimal, octal, or
+     binary format.
+
+
+
+File: browser.info,  Node: File Variables,  Prev: Output Variables,  Up: Internal Variables
+
+File Variables
+==============
+
+`$pubinit'
+     This variable holds the name of the public initialization file and
+     is intended to be used as the first argument to the `include'
+     function in a user-private initialization file.
+
+`$lowlevel'
+     If this variable has any true value (nil, zero, and the empty
+     string are considered false), then the browser reads objects as
+     type `DBobject' even if that object has some other datatype such as
+     `DBquadvar'.  This variable is set by the `-l' command-line option
+     and is useful for debugging the low layers of Silo. The default
+     value is zero.
+
+     If the value is two or higher then the Silo definition of
+     `DBobject' is used and the values of the `comp_names' and
+     `pdb_names' arrays become part of the object.
+
+     If the value is one or two then the browser translates the Silo
+     `DBobject' structure into a structure which is more user friendly
+     by adding additional members to the object structure. Each member
+     has a name from the `comp_names' array and a value based on the
+     corresponding member of the `pdb_names' array(1).
+
+`$checksums'
+     If this variable has any true value (nil, zero, and the empty
+     string are considered false), and the database being read includes
+     checksums, then the browser performs checksum checks during read.
+     Note that currently, the only Silo driver that supports checksums
+     is the HDF5 driver.
+
+     If checksum checks are disabled, then if browser encounters
+     corrupt data, it will not know it. In particular, if checksums are
+     disabled, the diff operator can wind up reporting corrupted data
+     as diffs. If checksums are enabled, however, and the database
+     being read includes checksums, then browser will report errors
+     when it encounters corrupt data and fail to read the associated
+     Silo object. See the associated Silo call `DBSetEnableChecksums()'
+     for more information.
+
+`$rdonly'
+     If this variable has any true value (nil, zero, and the empty
+     string are considered false), then the browser opens files in
+     read-only mode instead of read-write mode.  Editing will not work
+     on a file open for reading only.
+
+   ---------- Footnotes ----------
+
+   (1) Changes should not be made to the `comp_names' or `pdb_names'
+arrays since the Silo `DBobject' is regenerated from the user-friendly
+fields before being saved back to the file.
+
+
+File: browser.info,  Node: Startup File,  Next: Editing,  Prev: Internal Variables,  Up: Top
+
+Initializing the Browser
+************************
+
+   When the browser starts, it looks for a file called `.browser_rc' in
+the user's home directory or a file called
+`/usr/local/include/browser_rc'(1).  However, an alternate startup file
+can be specified with the `--file' browser command-line switch.  The
+browser reads and executes each command found in the startup file.
+
+   The startup file should contain an assignment to the
+`$browser_version' variable which will be used to check that the
+version of the startup file is appropriate for the browser being run.
+Mismatched version numbers result in a rather verbose warning message
+(provided that the browser was even able to process the startup file).
+
+   The `$browser_version' number should be assigned some real constant
+like `3.004' where `3' is the browser major version number and `004' is
+the browser minor version number.  To determine what version number to
+specify, invoke the browser as `browser --version'.
+
+   ---------- Footnotes ----------
+
+   (1) The path name may be different depending on how the browser was
+compiled.
+
+
+File: browser.info,  Node: Editing,  Next: Paging,  Prev: Startup File,  Up: Top
+
+Editing Database Objects
+************************
+
+   The `=' operator can be used to set the value of an internal browser
+variable or to change the value of a database object.  If the left hand
+side of the `=' is an internal variable, then the value of the internal
+variable is changed. Otherwise if the left hand side is a database
+object, its value is changed.  Otherwise, a new internal variable is
+created and assigned an initial value.
+
+   The browser can change values for objects of type `DBobject' (most
+objects are of this type if the browser is running in low-level mode) or
+objects under the `var(s)' category in a directory listing.
+
+   When changing the value of a string database object like
+`_fileinfo', the new value will be truncated to the same length as the
+old value because of limitations in the underlying Silo database
+drivers.  This does not apply to string fields of a `DBobject'.
+
+   Assigning a scalar value to an array or slice of an array results in
+all selected elements of the array to be set to the same value.  For
+instance, if the type of `u_data' is `[31, 41, 31] float' then the
+statement `u_data[5]=0' sets all elements of "row" five to zero.
+
+
+File: browser.info,  Node: Paging,  Next: Redirection,  Prev: Editing,  Up: Top
+
+Paging
+******
+
+   The browser keeps track of how many lines of output have been
+displayed for the currently executing command and temporarily pauses
+that command whenever output is about to scroll off the top of the
+screen.  The height and width of the screen is determined by the
+browser making certain `ioctl' calls at startup and each time it gets a
+`SIGWINCH' signal.  The initial values can be set with `--height' and
+`--width' command-line switches.  If the appropriate `ioctl' is not
+available then the values of environment variables `LINES' and
+`COLUMNS' will be used. If all else fails then the browser uses zero
+for the number of lines (that is, no paging of output) and 80 for the
+number of columns.
+
+   When the browser pauses the output, the message `more? ('q' to
+quit)' is displayed. The following user responses are recognized:
+
+Quit
+     Cancels the command and returns to the browser prompt. This is
+     equivalent to the browser receiving a `SIGPIPE' signal.
+
+Continue
+     Pressing the EOF key (usually control-`d') causes the command to
+     continue without being paged. Output will simply scroll off the
+     screen).
+
+Next Diff
+     Pressing `n' causes output to be suspended until the next file
+     difference report or the next non-diff command.
+
+Interrupt
+     Pressing the interrupt key (usually control-`c') causes the command
+     to be interrupted as usual.
+
+   Output redirected to a file or command is not paged.  If the user is
+not satisfied with the limited paging ability of the browser, the output
+from a command can be redirected to the pager of the user's choice using
+output redirection.
+
+
+File: browser.info,  Node: Redirection,  Next: Interrupts,  Prev: Paging,  Up: Top
+
+Redirection
+***********
+
+   Output from any browser command can be redirected to a file or shell
+command by appending a redirection character and file name or shell
+command to the end of the command.
+
+   To save the output of a command in a file, destroying the previous
+contents of the file if any, append a `>' and the name of the file.
+Unless the file name looks like a browser symbol it must be enclosed in
+quotes.  For instance, `quadvar3d > saved' saves the value of Silo
+database variable `quadvar' in a text file named `saved'.
+
+   To append the output of a command to a file, append a `>>' and the
+file name to the end of the command.  Unless the file name looks like a
+browser symbol it must be enclosed in quotes.  For example, `typeof
+quadvar3d >> saved' appends type information to the `saved' file.
+
+   To send the output of a browser command to the standard input of a
+shell command, follow the browser command with a `|' followed by the
+shell command in quotes.  The quotes are not necessary if the shell
+command is a single symbol.  Since paging is disabled when output is to
+a shell command, one way to display a result without paging is to pipe
+the output through the `cat' command like `d | cat'.
+
+
+File: browser.info,  Node: Interrupts,  Next: Examples,  Prev: Redirection,  Up: Top
+
+Interrupts
+**********
+
+   Since some commands may require a long time to execute or produce a
+huge amount of output, the user may want to abort the command before it
+finishes.  If the output is paged interactively to the screen then
+pressing `q' at the `more?'  prompt accomplishes this.  Otherwise the
+user can press the interrupt character (usually control-c) and the
+browser command will be immediately terminated and the browser will
+prompt for the next command.  If the interrupt character is typed
+during command input the browser itself terminates.
+
+   If output from a browser command is being piped into a shell command
+and the shell command exits (or closes its standard input) before the
+browser command is finished, the browser command gets the `SIGPIPE'
+signal and terminates.
+
+
+File: browser.info,  Node: Examples,  Prev: Interrupts,  Up: Top
+
+Examples
+********
+
+   This chapter contains some sample output from the browser.
+
+   Normally, you will specify the name of a database file on the browser
+command-line(1) like in the following example, and sometimes it's
+convenient to open multiple files at the same time.  Each file name
+listed on the command-line is given an identifier like `$1', `$2',
+etc., and most of the browser commands operate on file `$1' by default.
+
+     % browser rect3d.pdb
+     INFO: opening `rect3d.pdb' as $1
+
+   The `ls' command is similar to the Unix `ls' command in that it
+lists the contents of the current working directory.  The heading
+fields on the left of the equal signs apply until the next heading.  The
+headings are the same as those used by MeshTV.  To list the contents of
+some subdirectory, say `ls', `ls dir1', `print dir1', or just `dir1'.
+
+     > ls
+     qmesh(s)          = quadmesh3d
+     
+     qvar(s)           = d                      p
+                       = t                      u
+                       = v                      w
+     
+     mat(s)            = mat1
+     
+     var(s)            = _fileinfo              _meshtv_defvars
+                       = _meshtvinfo            cycle
+                       = d_data                 d_dims
+                       = d_maxindex             dtime
+                       = mat1_dims              mat1_matlist
+                       = mat1_matnos            mat1_mix_mat
+                       = mat1_mix_next          mat1_mix_vf
+                       = mat1_mix_zone          p_data
+                       = p_dims                 p_maxindex
+                       = quadmesh3d_align_nodal quadmesh3d_align_zonal
+                       = quadmesh3d_coord0      quadmesh3d_coord1
+                       = quadmesh3d_coord2      quadmesh3d_dims
+                       = quadmesh3d_max_extents quadmesh3d_max_index_n
+                       = quadmesh3d_max_index_z quadmesh3d_min_extents
+                       = quadmesh3d_min_index   quadmesh3d_zonedims
+                       = t_data                 t_dims
+                       = t_maxindex             time
+                       = u_data                 u_dims
+                       = u_maxindex             v_data
+                       = v_dims                 v_maxindex
+                       = w_data                 w_dims
+                       = w_maxindex
+
+   To keep the size of these examples small, we've specified that at
+most 50 values should be printed from each array and that 25 of those
+values should be from the end of the array (and the other 25, from the
+beginning).  To truncate everything say `$truncate=0' and to turn
+truncating off say `$truncate=nil'.
+
+     > $truncate = 50
+                       = 50
+     > $trailing = 25
+                       = 25
+
+   The user can ask for the type of any object, including types built
+into the browser.  If the object is a structured type (like in this
+example) then the type of each component of that structure is printed.
+
+     > typeof d
+                       = struct DBquadvar {
+     id                =    +0 int
+     name              =    +4 string
+     units             =    +8 string
+     label             =    +12 string
+     cycle             =    +16 int
+     time              =    +20 float
+     dtime             =    +24 double
+     meshid            =    +32 int
+     datatype          =    +40 int (DBdatatype)
+     nels              =    +44 int
+     nvals             =    +48 int
+     ndims             =    +52 int
+     dims              =    +56 [3] int
+     major_order       =    +68 int (array order)
+     stride            =    +72 [3] int
+     min_index         =    +84 [3] int
+     max_index         =    +96 [3] int
+     origin            =    +108 int
+     align             =    +112 [3] float
+     mixlen            =    +128 int
+     use_specmf        =    +132 int (on/off)
+     mixvals           =    +124 *[1] *[0] float
+     vals              =    +36 *[1] *[36000] float
+                       = }
+
+   An integer following a plus sign indicates that the type corresponds
+to a byte offset from the beginning of the innermost enclosing structure
+or array.
+
+   A `*' means the object is a pointer to whatever type follows(2).
+
+   A list of array dimensions between `[' and `]' mean that the object
+is an array and each element of the array is the type that follows the
+`]'.
+
+   The final name is always one of the browser integral types `string'
+(same as the C `char*'), `short', `int', `long', `float', or `double'.
+If the integral type name is followed by parentheses then the
+parentheses contain the name of an underlying C `enum' type or a set of
+related C preprocessor constants.
+
+   Some data objects override one or more standard class methods.  Such
+objects will have flags like `__FLAG__' which appear inside the object
+type.
+
+   One can also ask for the Silo definition of a named data type like
+`DBquadvar'.  This prints the definition of the Silo `DBquadvar'
+structure which is the same as printed above for the type of `d' except
+that array sizes and some primitive types are not bound to actual
+values yet(3).
+
+     > DBquadvar
+                       = struct DBquadvar {
+     id                =    +0 int
+     name              =    +4 string
+     units             =    +8 string
+     label             =    +12 string
+     cycle             =    +16 int
+     time              =    +20 float
+     dtime             =    +24 double
+     meshid            =    +32 int
+     datatype          =    +40 int (DBdatatype)
+     nels              =    +44 int
+     nvals             =    +48 int
+     ndims             =    +52 int
+     dims              =    +56 [self.ndims] int
+     major_order       =    +68 int (array order)
+     stride            =    +72 [self.ndims] int
+     min_index         =    +84 [self.ndims] int
+     max_index         =    +96 [self.ndims] int
+     origin            =    +108 int
+     align             =    +112 [self.ndims] float
+     mixlen            =    +128 int
+     use_specmf        =    +132 int (on/off)
+     mixvals           =    +124 *[self.nvals] *[self.mixlen]
+     mixvals           =    self.datatype
+     vals              =    +36 *[self.nvals] *[self.nels] self.datatype
+                       = }
+
+   Giving just the name of the Silo object is short for `print $1.d'.
+Notice that the `vals' array has been truncated as requested and that
+MIXVALS has no value. The subscripts in the labels to the left of the
+equal sign correspond to the first value on that line (an entire array
+in the case of `vals[0]'.
+
+   One can also ask for tye type of a single structure component by
+typing the command `DBquadvar.vals'.
+
+     > d
+                       = DBquadvar: struct
+     id                =    0
+     name              =    "d"
+     units             =    (null)
+     label             =    (null)
+     cycle             =    48
+     time              =    4.80000
+     dtime             =    4.8000000000
+     meshid            =    0
+     datatype          =    float
+     nels              =    36000
+     nvals             =    1
+     ndims             =    3
+     dims[0]           =    {30, 40, 30}
+     major_order       =    row major
+     stride[0]         =    {1, 30, 1200}
+     min_index[0]      =    {0, 0, 0}
+     max_index[0]      =    {29, 39, 29}
+     origin            =    0
+     align[0]          =    {0.50000, 0.50000, 0.50000}
+     mixlen            =    0
+     use_specmf        =    off
+     mixvals           =    NULL
+     vals[0]           =    {{0.83957, 0.82083, 0.80304, 0.78626, 0.77056,
+     vals[0, 5]        =    0.75601, 0.74266, 0.73059, 0.71987, 0.71055,
+     vals[0, 10]       =    0.70269, 0.69633, 0.69153, 0.68831, 0.68669,
+     vals[0, 15]       =    0.68669, 0.68831, 0.69153, 0.69633, 0.70269,
+     vals[0, 20]       =    0.71055, 0.71987, 0.73059, 0.74266, 0.75601,
+     vals[0, 25]       =    ...(35950 values omitted)..., 0.75601,
+     vals[0, 35976]    =    0.74266, 0.73059, 0.71987, 0.71055, 0.70269,
+     vals[0, 35981]    =    0.69633, 0.69153, 0.68831, 0.68669, 0.68669,
+     vals[0, 35986]    =    0.68831, 0.69153, 0.69633, 0.70269, 0.71055,
+     vals[0, 35991]    =    0.71987, 0.73059, 0.74266, 0.75601, 0.77056,
+     vals[0, 35996]    =    0.78626, 0.80304, 0.82083, 0.83957}}
+
+   The browser does not attempt to be efficient about loading objects
+from the database into memory since the underlying Silo library makes it
+difficult to do so.  However, if one says `$lowlevel=1' then the
+browser uses lower-level Silo functions to read the file.  As a result,
+less data is moved from disk to memory.
+
+     > $lowlevel=1
+                       = 1
+     > d
+                       = struct
+     name              =    "d"
+     type              =    "quadvar"
+     meshid            =    "quadmesh"
+     align             =    "/quadmesh_align_zonal"
+     dims              =    "/d_dims"
+     max_index         =    "/d_maxindex"
+     value0            =    "/d_data"
+     ndims             =    3
+     nvals             =    1
+     nels              =    36000
+     origin            =    0
+     datatype          =    19
+     mixlen            =    0
+     major_order       =    0
+     cycle             =    48
+     time              =    "/time"
+     dtime             =    "/dtime"
+     min_index         =    "/quadmesh_min_index"
+     use_specmf        =    -1000
+
+   Now we'll decrease the number of values printed and increase the
+precision that's displayed for `float' values.
+
+     > $truncate = 12
+                       = 12
+     > $trailing = 6
+                       = 6
+     > $fmt_float = "%1.15f"
+                       = "%1.15f"
+     > d.vals[0]
+     [0]               = {0.839570403099060, 0.820833325386047,
+     [2]               = 0.803043246269226, 0.786264479160309,
+     [4]               = 0.770563006401062, 0.756006062030792,
+     [6]               = ...(35988 values omitted)...,
+     [35994]           = 0.756006062030792, 0.770563066005707,
+     [35996]           = 0.786264479160309, 0.803043246269226,
+     [35998]           = 0.820833325386047, 0.839570462703705}
+
+   The `diff' command compares two objects and reports differences
+between them.  The output is in groups of differences where the group is
+delimited at the beginning and end by a line of stars.  The first half
+of the group displays (part of) the first argument to `diff' while the
+part of the group after the line of dashes displays (part of) the
+second argument.  Subobjects that differ only partially (`stride' in
+this case) appear separately before those which completely differ.  The
+array truncating parameters apply to each array segment individually.
+
+     > diff d p
+     ***************
+     stride[1]         = {30, 1200}
+     ---------------
+     stride[1]         = {31, 1271}
+     ***************
+     ***************
+     name              = "d"
+     nels              = 36000
+     dims[0]           = {30, 40, 30}
+     max_index[0]      = {29, 39, 29}
+     vals[0]           = {{0.839570403099060, 0.820833325386047,
+     vals[0, 2]        = 0.803043246269226, 0.786264479160309,
+     vals[0, 4]        = 0.770563006401062, 0.756006062030792,
+     vals[0, 6]        = ...(35988 values omitted)...,
+     vals[0, 35994]    = 0.756006062030792, 0.770563066005707,
+     vals[0, 35996]    = 0.786264479160309, 0.803043246269226,
+     vals[0, 35998]    = 0.820833325386047, 0.839570462703705}}
+     ---------------
+     name              = "p"
+     nels              = 39401
+     dims[0]           = {31, 41, 31}
+     max_index[0]      = {30, 40, 30}
+     vals[0]           = {{1.190943479537964, 1.218125700950623,
+     vals[0, 2]        = 1.245107889175415, 1.271674990653992,
+     vals[0, 4]        = 1.297584056854248, 1.322565793991089,
+     vals[0, 6]        = ...(39389 values omitted)...,
+     vals[0, 39395]    = 0.000000000000000, 0.000000000000000,
+     vals[0, 39397]    = 0.000000000000000, 0.000000000000000,
+     vals[0, 39399]    = 0.000000000000000, 0.000000000000000}}
+     ***************
+
+   A compound array is composed of zero or more subarrays.  A subarray
+can be printed by saying something like `carray.b', but a subarray is
+also printed by saying just `b' as long as `b' is not some other type
+of object and `b' exists in exactly one compound array.
+
+     > carray
+                       = struct
+     name              =    "carray"
+     id                =    0
+     nelems            =    3
+     nvalues           =    18
+     datatype          =    float
+     a[0]              =    {0.00000, 0.34185, 0.64252, 0.86576}
+     b[0]              =    {0.98468, 0.98496, 0.86656, 0.64374, 0.34335,
+     b[5]              =    0.00159}
+     c[0]              =    {-0.34036, -0.64130, -0.86496, -0.98441,
+     c[4]              =    -0.98523, -0.86735, -0.64495, -0.34485}
+     
+     > b
+     [0]               = {0.98468, 0.98496, 0.86656, 0.64374, 0.34335,
+     [5]               = 0.00159}
+     
+     > b[2]
+     [2]               = {0.86656}
+
+   If the file is opened for reading and writing (the default) then
+variables can be given new values.  The new values are written back to
+the file immediately.
+
+     > _fileinfo
+                       = "3D rectilinear test file"
+     > _fileinfo = "testing"
+                       = "testing"
+     > _fileinfo
+                       = "testing"
+
+   A scalar variable assigned to an array (or slice of an array) sets
+all the elements of that array (or slice) to the specified value.  A
+list of values enclosed in curly braces can be assigned to an array (or
+slice of an array) causing each element of the array (or slice) to be
+set to one of the listed values.
+
+     > typeof v_data
+                       = [31, 41, 31] float
+     > v_data = 0
+                       = 0
+     > v_data[0, 0, 2:4]
+                       = {0, 0, 0}
+     > v_data[0, 0, 2:4] = {0.111, 0.222, 0.333}
+                       = {0.111, 0.222, 0.333}
+     > v_data
+     [0, 0, 0]         = {0, 0, 0.111, 0.222, 0.333, 0,
+     [0, 0, 6]         = ...(39389 values omitted)..., 0, 0, 0,
+     [30, 40, 28]      = 0, 0, 0}
+
+   Pressing control-c during a browser command aborts the command, but
+pressing control-c when the browser is asking for input aborts the
+browser.  It is more polite to press control-d or type `exit' instead
+since this gives the browser a chance to properly close database files.
+
+     > $truncate = nil
+     > d >data_file
+     control-c
+     
+     Command aborted.
+     > control-c
+     %
+
+   ---------- Footnotes ----------
+
+   (1) Opening a file on the command line is the same as saying `open
+"rect3d.pdb" $1' interactively.
+
+   (2)  Whether or not something is a pointer is generally not
+important to using the browser: a 1d array of pointers to 1d arrays of
+integers can be treated like a ragged-edge 2d array of integers.
+
+   (3) The word `self' refers to the object corresponding to the
+innermost structure which incloses the `self'.
+
+
+
+Tag Table:
+Node: Top231
+Node: Copying1208
+Node: Invocation3969
+Ref: Invocation-Footnote-111235
+Node: Syntax11367
+Node: Functions15208
+Node: Operators22930
+Node: Internal Variables26551
+Node: Differencing Variables27205
+Node: Output Variables31644
+Node: File Variables35138
+Ref: File Variables-Footnote-137486
+Node: Startup File37671
+Ref: Startup File-Footnote-138778
+Node: Editing38860
+Node: Paging40126
+Node: Redirection41841
+Node: Interrupts43145
+Node: Examples44024
+Ref: Examples-Footnote-158652
+Ref: Examples-Footnote-258755
+Ref: Examples-Footnote-358955
+
+End Tag Table
diff --git a/tools/browser/browser.init b/tools/browser/browser.init
new file mode 100755
index 0000000..eb047fc
--- /dev/null
+++ b/tools/browser/browser.init
@@ -0,0 +1,133 @@
+#!/bin/sh
+######################################################################
+#
+# Browser startup script.
+#
+######################################################################
+
+#
+# Determine the location of the browser directory.
+#
+arg0=$0
+mydir=`expr \
+  ${arg0-.}'/' : '\(/\)[^/]*/$' \
+  \| ${arg0-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
+  \| .`
+
+cdir=`pwd`
+case $mydir in
+/*)
+    thisdir=$mydir
+    ;;
+.)
+    thisdir=$cdir
+    ;;
+*)
+    thisdir=$cdir/$mydir
+    ;;
+esac
+browserdir=`expr \
+  ${thisdir-.}'/' : '\(/\)[^/]*/$' \
+  \| ${thisdir-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
+  \| .`
+
+TRAP_FPE=
+export TRAP_FPE
+
+SILOBROWSERHELPHOME=$browserdir/lib
+export SILOBROWSERHELPHOME
+
+#
+# Determine the location of the binaries for the machine.
+#
+browserbindir=unsupported
+[ -f /bin/uname ] && {
+   os=`/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
+   case $os in
+   irix)
+      mach=`/bin/uname -m`
+      machver=mips2
+      case $mach in
+      IP4|IP5|IP6|IP12)
+         machver=mips;;
+      IP17|IP19|IP20|IP22)
+         machver=mips2;;
+      IP25|IP26|IP27|IP28|IP29|IP30|IP31|IP32)
+         machver=mips2;;
+#         Temporary until a mips4 version is created.
+#         machver=mips4;;
+      esac
+      version=`/bin/uname -r`
+      osver=irix`expr $version : '\([456]\).*'`
+      case $osver in
+      irix4)
+         browserbindir=$browserdir/bin/sgi-irix4-mips;;
+      irix5)
+         browserbindir=$browserdir/bin/sgi-irix5-mips;;
+      irix6)
+         browserbindir=$browserdir/bin/sgi-irix6-mips2;;
+      esac
+      ;;
+   sunos)
+      mach=`/bin/uname -m`
+      machver=`expr $mach : '\(sun4\).*'`
+      version=`/bin/uname -r`
+      osver=sunos`expr $version : '\([45]\).*`
+      case $mach in
+      dino1)
+         browserbindir=$browserdir/bin/sun4-sunos5-sparc
+      esac
+      case $machver in
+      sun4|sun4u)
+         browserbindir=$browserdir/bin/sun4-$osver-sparc
+      esac
+      ;;
+   hp-ux)
+      mach=`/bin/uname -m`
+      machver=`expr $mach : '\(9000/[78]\).*'`
+      case $machver in
+      9000/7|9000/8)
+         browserbindir=$browserdir/bin/hp-hpux-pa
+      esac
+      ;;
+   aix)
+      browserbindir=$browserdir/bin/ibm-aix-pwr
+      ;;
+   osf)
+      browserbindir=$browserdir/bin/dec-osf1-alpha
+      ;;
+   linux)
+      browserbindir=$browserdir/bin/linux
+      ;;
+   luke|leia|jedi|sn)
+      browserbindir=$browserdir/bin/unicos
+      ;;
+   esac
+}
+
+if [ $browserbindir = unsupported ]
+then
+   echo "This hardware platform is not supported by browser."
+   exit 1
+fi
+
+[ ! -d $browserbindir ] && {
+   echo "The executables for this hardware platform have not"
+   echo "been installed."
+   exit 1
+}
+
+#
+# Set the names of the browser executable.
+#
+browser_patt='browser4.*'        # Name of GUI executable
+
+#
+# Find the latest (by last modification time) browser executable.
+#
+browser=`/bin/ls -rt $browserbindir/$browser_patt | tail -1`
+
+#
+# Start it up!
+#
+exec $browser -f $browserdir/include/browser_rc "$@"
diff --git a/tools/browser/browser.texi b/tools/browser/browser.texi
new file mode 100644
index 0000000..0aefbe8
--- /dev/null
+++ b/tools/browser/browser.texi
@@ -0,0 +1,1500 @@
+\input texinfo                                               @c -*- texinfo -*-
+ at c ----------------------------------------------------------------------------
+
+ at c %**start of header
+ at setfilename browser.info
+ at settitle Silo Browser User Manual
+ at setchapternewpage on
+ at c %**end of header
+
+ at ifinfo
+This file documents the Silo browser.
+
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+ at ignore
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+ at end ignore
+
+ at ignore
+
+  Modifications:
+    Mark C. Miller, Tue Jul 27 09:58:45 PDT 2010
+    Remove extraneous ifinfo sectioning commands causing problems
+    with sectioning.
+
+ at end ignore
+ at end ifinfo
+
+ at titlepage
+ at title Silo Browser User Manual
+ at subtitle @today{}
+ at vskip 1in
+
+ at author by Robb Matzke
+ at page
+ at vskip 0pt plus 1filll
+Copyright @copyright{} (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+ at end titlepage
+
+ at c ===========================================================================
+ at c ===========================================================================
+ at c ===========================================================================
+ at node Top, Copying, , (dir)
+ at top The Silo Browser User Manual
+
+This document describes the Silo file browser, an application program
+built on the Silo library for interactive viewing of Silo database
+files.
+
+ at menu
+* Copying::                     Copyright information.
+* Invocation::                  Invoking the browser.
+* Syntax::                      Command Syntax.
+* Functions::                   Builtin Functions.
+* Operators::                   Browser operators.
+* Internal Variables::          Controlling the browser personality.
+* Startup File::                Browser initialization.
+* Editing::                     Changing the values of objects.
+* Paging::                      Long output is paginated.
+* Redirection::                 Sending output to a file or command.
+* Interrupts::                  Interrupting a long-running command.
+* Examples::                    Some simple examples.
+ at end menu
+
+ at c ===========================================================================
+ at c ===========================================================================
+ at c ===========================================================================
+ at node Copying, Invocation, Top, Top
+ at unnumbered Copyright
+Copyright @copyright{} (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Invocation, Syntax, Copying, Top
+ at chapter The Browser Command Line
+
+The schnauzer is a small terrier with a wiry coat; the browser is a
+utility built on Silo for reading scientific database files.  The
+browser command line is
+
+ at code{browser} @b{[}@var{switches}@b{]} @b{[}@code{--}@b{]}
+ at b{[}@var{files}@b{]...}
+
+The browser recognizes the following command line switches.  Single
+letter switches that don't require an argument can be grouped together
+(so @samp{-l -q} is the same as @samp{-lq}). When a single-letter switch
+takes an argument the argument can appear either immediately after the
+letter or as the next argument such as @samp{-l3} or @samp{-l 3}. Long
+format switches are introduced by double hyphens and if they take an
+argument it must follow an equal sign such as @samp{--eval=exit}.
+Command-line options take effect before the initialization file is read,
+but also override any settings made in that file.
+
+Invoking the browser with the switch @samp{--help} will show a complete
+list of command-line switches and their descriptions.
+
+ at table @code
+ at item -A @var{tolerance}
+ at itemx --absolute=@var{tolerance}
+All absolute differencing tolerances are set to @var{tolerance}, a
+floating point number. All variables of the form @samp{$diff_*_abs} are
+set to the specified tolerance.
+
+ at item -R @var{tolerance}
+ at itemx --absolute=@var{tolerance}
+All relative differencing tolerances are set to @var{tolerance}, a
+floating point number.  All variables of the form @samp{$diff_*_rel} are 
+set to the specified tolerance.
+
+ at item -V
+ at itemx --version
+Prints the browser version number. If no other switches or files are
+specified then the browser will exit after printing the version number.
+
+ at item -d @var{words}
+ at itemx --diff=@var{words}
+This switch controls the behavior of the @code{diff} function of the
+browser. The @var{words} should be a comma-separated list of key words
+which will be assigned to the @code{$diff} browser variable. See its
+documentation for details.
+
+ at item -e @var{expression}
+ at itemx --eval=@var{expression}
+The browser expression is evaluated and the result is printed on the
+standard output stream.  More than one expression can be given to the
+browser by using multiple switches.  The expressions will be evaluated
+in the order given after the initialization file is read.  When a
+ at samp{-e} switch is present the browser exits after all expressions are
+processed instead of going into interactive mode. If standard output is
+a terminal then the browser pages the output in the normal way (see
+below).  If the interrupt character is pressed when an expression is
+being evaluated, the browser aborts at footnote{In contrast, pressing the
+interrupt character during an interactive browser command aborts the
+command but not the browser.}.
+
+ at item -E @var{list}
+ at itemx --exclude=@var{list}
+The browser @code{$exclude} variable is set to the comma-separated list
+of names and/or datatypes supplied as an argument to this switch. The
+switch may appear more than once. The names in the @code{$exclude} list
+will be excluded from recursive @code{diff} operations. See
+documentation for @code{$exclude} for details.
+
+ at item -f @var{initfile}
+ at itemx --file=@var{initfile}
+When the browser begins execution it attempts to read the file
+ at file{.browser_rc} in the user's home directory.  If that file isn't
+readable then it tries to read a system-wide browser initialization
+file.  The @samp{-f} command line switch causes the browser to try to
+read the specified file instead.  To prevent the browser from reading
+any initialization file, say @samp{-f /dev/null} (internal browser
+variables are still initialized to default values).  The initialization
+file is opened after the database(s) and therefore can contain commands
+that reference the database(s).
+
+ at item -h
+ at itemx --help
+Prints a browser usage message. If this is the only switch and no file
+names are specified then the browser will exit after showing the usage
+message.  The usage message will be paged if printed to a terminal.
+
+ at item -l @b{[}@var{value}@b{]}
+ at itemx --lowlevel at b{[}=@var{value}@b{]}
+This switch assigns an integer value to the @code{$lowlevel} browser
+variable, which causes the browser to load database objects as type
+ at code{DBobject} even if the object is some other composite Silo datatype
+like @code{DBquadvar}. If @var{value} is specified then it will be
+assigned to the @code{$lowlevel} variable; otherwise the value @samp{1}
+is assigned.
+
+ at item -c @b{[}@var{value}@b{]}
+ at itemx --checksums at b{[}=@var{value}@b{]}
+This switch assigns an integer value to the @code{$checksums} browser
+variable, which controls browser's use of checksums during read. 
+
+ at item -n @var{lines}
+ at itemx --height=@var{lines}
+The browser pages interactive output to prevent it from scrolling off
+the top of the screen. It normally decides how tall the window is by
+making @code{ioctl} calls, but this switch can be used to override that
+choice. The setting is valid only until the browser receives a
+ at code{SIGWINCH} signal and queries the terminal size.
+
+ at item -q
+ at itemx --quiet
+This option causes the browser to be less verbose than normal. This sets 
+the @code{$verbosity} variable to zero.
+
+ at item -o
+ at itemx --obase=@var{format}
+This switch sets the internal variable @code{$obase} to @var{format},
+which should be @samp{16} for hexadecimal, @samp{8} for octal, @samp{2}
+for binary, or anything else for the default decimal format. It controls
+how integer, floating-point, character, and string data are
+displayed. The default is that these types of data are displayed with a
+type-dependent @code{printf} format string which is user defined (e.g.,
+ at code{$fmt_int}).
+
+ at item -r @b{[}@var{boolean}@b{]}
+ at itemx --rdonly at b{[}=@var{boolean}@b{]}
+This option assigns a boolean value to the @code{$rdonly} browser
+variable, which causes the browser to open all subsequent files in
+read-only mode. Files that only have Unix read permission are always
+opened in read-only mode, but the browser issues a warning if the user
+had asked for read-write permission.  If no argument is given for this
+switch then true is assumed. The default if this switch does not appear
+is false.
+
+ at item -s @b{[}@var{boolean}@b{]}
+ at itemx --single at b{[}=@var{boolean}@b{]}
+This option causes the browser to call @code{DBForceSingle} with a value
+of one or zero depending on whether the argument is true or false. If no
+argument is given then it is assumed to be true.  Calling
+ at code{DBForceSingle} with a non-zero value causes most drivers to return
+floating point data with the C @code{float} type rather than the default
+ at code{double} type.
+
+ at item -v
+ at itemx --verbose
+This option causes the browser to be more verbose than normal. This sets 
+the @code{$verbosity} variable to two.
+
+ at item -w @var{columns}
+ at itemx --width=@var{columns}
+The browser normally breaks lines to prevent them from wrapping around
+from the right margin to the next line. It decides how many columns are
+appropriate by making @code{ioctl} calls, but this switch overrides that 
+choice.
+
+ at item --debug at b{[}=@var{boolean}@b{]}
+Tells Silo to display the names of the Silo API functions as they are
+called. This switch is probably only useful to those who debug the browser.
+
+ at end table
+
+If Silo database file names are specified then the files are opened in
+the order specified and associated with file symbols @code{$1},
+ at code{$2}, etc. These are opened before the initialization file is read, 
+which happens before any @code{--eval} statements are executed. However, 
+the command-line options are reevaluated after the initialization file
+is read.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Syntax, Functions, Invocation, Top
+ at chapter Command Syntax
+
+The browser command syntax is quite simple, consisting of function
+calls, operators, atoms, and lists. Comments begin with a hash mark and
+continue to the end of the line (except in strings). White space is
+generally ignored except as a token separator. Statements can be
+continued across multiple lines, but a backslash must escape the
+linefeed if the partial statement looks syntactically complete.
+
+A function call is a parenthetical expression where the first element is
+the name of the function and the subsequent elements are the arguments
+to that function.  Most functions evaluate all their arguments but
+others evaluate only some (or none). For example, the @code{Assign}
+function doesn't evaluate its first argument, but rather assignes the
+evaluated second argument to the l-value specified by the first
+argument. The parentheses can be omitted from around the top-level
+function call. Say @samp{help func} (or @samp{(help func)}) for a list
+of all functions.
+
+Most browser operators are infix, binary operators. They take two
+operands, one on each side of the operator, and call some function which
+is bound to the operator. For example the expression @samp{foo=1} is
+equivalent to @samp{(Assign foo 1)}. The @samp{@{@}} operator takes any
+number of arguments which appear between the open and close curly
+braces. Say @samp{help operators} for a list of all operators.
+
+The browser has three types of atoms: strings, numbers, and symbols. A
+string is a sequence of characters enclosed in single or double
+quotes. The normal C escaping mechanism can be used for special
+characters within the string. A single quote has no special significance
+in a double-quoted string and vice versa.  Numbers are positive or
+negative sequences of decimal digits with an optional embedded decimal
+point and trailing exponent. An exponent consists of the letter `e' or
+`E' followed by an optional sign and one or more decimal digits.  A
+symbol is any sequence of alphanumeric characters and may also include
+dollar signs, hyphens, underscores, and various other characters
+(although their use is discouraged).
+
+A list consists of zero or more atoms or lists enclosed in
+parentheses. Evaluation of the list results in the browser looking up
+the functional value of the first member of the list and calling that
+function with the subsequent list members as arguments. Evaluation of
+the list can be suppressed by using curly braces instead of parentheses
+(e.g., @samp{@{1 3 5@}} is equivalent to @samp{(Quote 1 3 5)')}.
+
+The browser reads commands interactively from its standard input. If
+available, the GNU readline library is used allowing the user to edit
+commands as they are entered using Emacs or vi editing commands. To
+quote from the readline library (documentation is available at
+ at file{http://www.cs.utah.edu/csinfo/texinfo/texinfo.html}):
+
+ at quotation
+Often during an interactive session you type in a long line of text,
+only to notice that the first word on the line is misspelled.  The
+Readline library gives you a set of commands for manipulating the text
+as you type it in, allowing you to just fix your typo, and not forcing
+you to retype the majority of the line.  Using these editing commands,
+you move the cursor to the place that needs correction, and delete or
+insert the text of the corrections.  Then, when you are satisfied with
+the line, you simply press @key{RETURN}.  You do not have to be at the
+end of the line to press @key{RETURN}; the entire line is accepted
+regardless of the location of the cursor within the line.
+ at end quotation
+
+The readline library default mode is Emacs.  If you prefer @code{vi} key
+bindings, then create a file called @file{.inputrc} in your home
+directory with the single line @samp{set editing-mode vi}.
+
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Functions, Operators, Syntax, Top
+ at chapter Builtin Functions
+
+Some of the browser functions have more than one form and are overloaded
+to do various things depending on the number of actual arguments
+supplied. Arguments shown between @samp{[} and @samp{]} are optional.
+
+ at table @code
+ at item array @var{dimensions} @b{...} @var{basetype}
+Creates a new array datatype. The arguments are the size of the array in 
+each dimension and the datatype of the array elements. The array size
+arguments can be either integers or strings that look like comma- and/or 
+space-separated integers. Browser arrays use C element ordering.
+
+ at item cd @var{dirname} @b{[}@var{filesym}@b{]}
+Each file has a current working directory (CWD) which is initially set
+to the root directory (@file{/}). This command will set the CWD to some
+other directory. The first argument is the name of the new CWD. If the
+name contains special characters it should be enclosed in quotes to
+protect it from the parser. If the name is relative (doesn't start with
+a @samp{/}) then the name is looked up with respect to the current
+CWD. The second optional argument is the file or list of files whose CWD
+is being set (default is the file represented by the browser variable
+ at samp{$1}).  The @var{dirname} is a string; it is not interpreted by the
+browser and thus a command like @samp{cd $1.domain_0.angle_walls} will
+fail while @samp{cd domain_0/angle_walls $1} would work.
+
+ at item close @var{filesym} @b{...}
+Closes the database files associated with the specified file symbols.
+If objects exist in the browser memory which are associated with the
+database then the database will be held open until those objects no
+longer exist, but the file symbol will be freed so another file can
+immediately be associated with that symbol. This command is equivalent
+to @samp{@var{filesym}=nil} (except with extra sanity checks).
+
+ at item diff @var{objects...}
+Calculates the differences between its arguments similar to the Unix
+ at code{diff} command. If called with an even number of arguments the
+argument list is split in half and each argument from the first half is
+compared with the corresponding argument of the second half. If called
+with no arguments then the argument list will be the SILO files from the 
+command-line (@samp{$1}, @samp{$2}, @i{etc.}).  If called with just one
+argument which is an object from the silo file @samp{$1} then that
+object will be compared to an object with the same name from file
+ at samp{$2}.  The behavior is influenced by the @samp{$diff} browser
+variable. In general, if no differences are found then no output is
+produced.
+
+ at item end
+See @code{exit}.
+
+ at item exit @b{[}@var{status}@b{]}
+Exits the browser with the specified @var{status}, an integer constant.
+If no exit status is supplied then zero (success) is assumed. Typing the
+end of file character (usually control-d) at the beginning of a line
+also invokes this command, causing a zero (success) exit.
+
+ at item file @var{filename}
+The Silo database @var{filename} is opened and returned but not
+associated with any symbol.  Therefore, as soon as nothing refers to the
+file, it is closed.  One common use of this function is with the
+ at code{ls} or @code{diff} commands which can take file objects as
+arguments.  For instance, the command @samp{ls (file curv2d.pdb)} opens
+the @file{curv2d.pdb} file and lists the root directory and @samp{ls
+(cd dirname (file curv2d.pdb))} lists the contents of the @var{dirname}
+directory of @file{curv2d.pdb}.  The file is open for read-write mode
+unless the @code{$rdonly} browser variable has a non-nil value or the
+file has only read permission.
+
+ at item help @b{[}@var{topic}@b{]} @b{[}@var{docstring}@b{]}
+Shows documentation for various parts of the browser. When invoked
+without arguments it will display a table of contents of @code{help}
+subcommands. With one argument it will display documentation for a help
+category (e.g., @code{help run}), a browser internal variable (e.g.,
+ at code{help $diff}), a function (e.g., @code{help diff}), a command-line
+switch (e.g., @code{help --diff}), an operator (e.g., @code{help
+"op="}), or the documentation string associated with the specified
+symbol. When invoked with a string argument it will print all help
+categories which contain the specified string (e.g., @code{help
+"diff"}). When called with two arguments it assigns the second argument
+as the documentation property of the first argument, which must be a
+symbol or string.
+
+ at item include @var{filename}
+Causes the specified file to be parsed and evaluated. This is often
+useful in user-private initialization files, @file{~/.browser_rc}, where 
+the user wants to augment the actions that would normally happen in the
+system-wide browser initialization file. The user-private file should
+contain the line @samp{include $pubinit}.
+
+ at item ls @b{[}@var{filesym}@b{]} @b{[}@var{objnames}@b{...]}
+This command lists the contents of the current working directory.  If no
+file is specified then the file associated with @samp{$1} is used. If a
+list of files is specified (e.g., @samp{$*}) then a listing is produced
+for each of those files. If object names are supplied, then only those
+objects are listed.  The object names can include the normal Unix
+filename wild cards @samp{*}, @samp{?}, and @samp{[]} (object names with
+ at samp{[]} wild cards require quotes so the @samp{[} and @samp{]} are not
+intrepretted as array selectors). Wild card matching is not available if
+the @code{fnmatch} function was not available when the browser was
+compiled.  If a single object name is supplied and that object is a
+directory, then the contents of that directory appear.  An alternative
+(and shorter) way to list the contents of a subdirectory is to type the
+name of the subdirectory on a line by itself (for instance,
+ at samp{dir1}).
+
+ at item
+Another way to list a directory is to just type the name of the
+directory at the prompt (you can use @samp{.} as the current working
+directory).  So saying @samp{$2.dir} is the same as saying @samp{ls $2
+dir} and @samp{$2..} is the same as @samp{ls $2} or @samp{ls $2 .}.
+
+ at item noprint
+See @code{print}.
+
+ at item open @var{filename} @b{[}@var{filesym}@b{]}
+The Silo database @var{filename} is opened and associated with the
+specified file symbol.  Any database previously associated with
+ at var{filesym} will be closed as soon as all objects associated with that
+file are freed.  If @var{filesym} is omitted then @samp{$1} is used.
+This command is equivalent to @samp{@var{filesym} =
+ at var{filename}}. Files are open in read-write mode unless the
+ at code{$rdonly} browser variable has a non-nil value or the file has only 
+read permission.
+
+ at item @b{[}no at b{]}print @var{expression} @b{...}
+Evaluates the expressions and prints (or suppresses) the result of each
+one.  The @code{print} command is normally not used because the browser
+prints all non-null expressions by default.  However, a @code{noprint}
+can be used to prevent the default output.
+
+ at item pwd @b{[}@var{filesym}@b{]}
+Prints the current working directory for the database associated with
+the specified file symbol, list of files, or @samp{$1}. This command
+also prints the name of the database.  This command is usually not used
+because a file symbol appearing by itself causes the database name and
+current working directory to be displayed.
+
+ at item quit
+See @code{exit}.
+
+ at item typeof @var{expression}
+The type of a Silo expression is printed.  For Silo database objects the
+type which is printed is fully qualified and bound to actual values. In
+contrast, printing the actual named type shows the unbound values.  For
+example, if @samp{d} is a Silo quadvar object, then @samp{typeof d.dims}
+might show @samp{[3] int} while @samp{print DBquadvar.dims} displays
+ at samp{[self.ndims] int}.
+
+ at end table
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Operators, Internal Variables, Functions, Top
+ at chapter Operators
+
+A browser expression is composed of terms and operators. The following
+operators are supported and overloaded depending on the number and type
+of arguments.
+
+ at table @var
+ at item symbol @code{=} value
+Assigns a value to a browser internal variable or a database object.  If
+ at var{symbol} is an internal variable and @var{value} is the word
+ at samp{nil} then the symbol loses its variable value.
+
+ at item filesym @code{.} varname
+The variable or directory with the name @var{varname} is loaded from the
+database associated with the specified file symbol and the Silo data
+object is returned.  The variable name must be enclosed in quotes unless
+it looks like a symbol and does not conflict with a browser internal
+variable. If @var{filesym} is @samp{$1} and the variable name is not
+enclosed in quotes and is not the name of an internal browser variable,
+then the file symbol and dot can be omitted.  Thus @samp{$1.quadmesh}
+can be written as just @samp{quadmesh}.
+
+ at item sdo @code{.} fieldname
+If @var{sdo} is some Silo data object which has a structured type, then
+this expression returns a new Silo data object which is the specified
+field of the @var{sdo} structure.  For instance, a quadmesh @samp{qm}
+has a field named @samp{dims} which holds the dimensions of the mesh.
+The expression @samp{qm.dims} returns just the dimensions.
+
+ at item list @code{.} anything
+If the first argument is a list then the dot operator is applied to each 
+member of the list and the result is a list of the results.
+
+ at item sdo @code{[} elmtnum @code{]}
+If @var{sdo} is some Silo data object which has an array type, then this
+expression returns the single specified element of that array.  The
+first element of an array is number zero.  For instance,
+ at samp{qm.dims[0]} returns the size of the first mesh dimension.
+
+ at item sdo @code{[} min @code{:} max @code{]}
+If @var{sdo} is some Silo data object which has an array type, then this
+expression returns a sub-array with elements @var{min} through
+ at var{max}, inclusive.  Thus, @samp{qm.dims[0:2]} are the first three
+mesh dimensions.
+
+ at item sdo @code{[} expr1 at code{,} expr2 at code{,} ... @code{]}
+If @var{sdo} is some Silo data object which has an array type, and
+ at var{expr} are element numbers or ranges, then one @var{expr} is applied
+to each array dimension in turn, automatically skipping over pointers.
+For instance, if a quadvar @samp{qv} has a @samp{vals} of type
+ at samp{*[2] *[36000] float} then the expression @samp{qv.vals[0,100:199]}
+will be an object consisting of the second 100 values of the first
+variable.  (The expression @samp{qv.vals[0][100:199]} would result in an
+error message because @samp{qv.vals[0]} returns an object with the type
+ at samp{[1] *[36000] float} to which is then applied the @samp{[100:199]}
+that is invalid because the array only has one element.)
+
+ at item expr @code{|} command
+The expression @var{expr} has its output redirected to the shell
+command @var{command}.
+
+ at item expr @code{>} file
+The expression @var{expr} has its output redirected to the file
+ at var{file}, which is created or truncated.
+
+ at item expr @code{>>} file
+The expression @var{expr} has its output appended to the file
+ at var{file}, which is created if it doesn't exist.
+
+ at item @code{@{} expressions @code{@}}
+This operator takes zero or more operands occurring between the curly
+braces (optionally separated by commas) and returns a list of those
+unevaluated operands. If only one operand is given then that operand is
+returned unevluated and not in a list.
+
+ at item minimum @code{:} maximum
+The range operator is used to construct a range object which represents
+all integers between @var{minimum} and @var{maximum}, inclusive.
+
+ at end table
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Internal Variables, Startup File, Operators, Top
+ at chapter Internal Variables
+
+Certain aspects of the browser can be configured by setting browser
+variables with the @samp{=} operator described above.  The current value
+of an internal variable can be displayed by typing the variable's name.
+The variables are initialized with default values when the browser
+starts and may then be overridden by command-line options, the
+initialization file, or interactively. All predefined browser variables
+begin with a dollar sign.
+
+ at menu
+* Differencing Variables::      
+* Output Variables::            
+* File Variables::              
+ at end menu
+
+ at c ======================================================================
+ at node Differencing Variables, Output Variables, Internal Variables, Internal Variables
+ at section Differencing Variables
+
+These variables affect the operation of the @code{diff} function.
+
+ at table @code
+ at item $diff
+This variable's value is a list of symbols which control the details of
+the @code{diff} function. The default is @code{$diff = @{detail,
+two_column@}}. This variable is set by the @samp{--diff} command-line
+switch.
+
+ at table @code
+ at item detail
+This is the default, which causes the @code{diff} function to report all 
+details about detected differences.
+
+ at item brief
+If this word is present then @code{diff} doesn't actually display any
+data. The output will consist of a single line for each file object
+which differs between file A and file B.  This option allows some
+short circuiting of the work required for the @code{detail} mode.
+
+ at item summary
+This key word causes @code{diff} to report by a single line of output
+when the two operands of the @code{diff} function are different. No
+output is produced if they are the same. This option allows some short
+circuiting of the work required for the @code{brief} mode.
+
+ at item ignore_additions
+If this is specified then @code{diff} will not report differences due to
+data appearing in file B but not in file A.
+
+ at item ignore_deletions
+If this is specified then @code{diff} will not report differences due to 
+data appearing in file A but not in file B.
+
+ at item two_column
+If this is specified then the output will list differences side-by-side
+instead of one after the other (that is, output will resemble
+ at code{pdbdiff} instead of @code{diff}). This setting is only applicable
+for detailed output.
+ at end table
+
+ at item $exclude
+The @code{diff} function normally recurses into directories and compares 
+the contents of those directories. However, the @code{$exclude} variable 
+can be a list of character strings which specify object names and/or
+types which should be excluded from recursive comparison.  The object
+names may include shell wildcards such as @samp{*}, @samp{?}, and
+ at samp{[]}. If a name pattern is relative (doesn't start with a slash) it 
+will be compared to the base name of the objects about to be
+differenced; but if the name pattern is absolute (begins with a slash)
+it will be compared to the full path names of the objects being
+differenced. If the @code{$exclude} string begins with the string
+ at samp{type:} then the following part should be one of the object types
+printed by the @code{ls} function.  A difference operation between two
+objects is suppressed if either object matches any of the strings stored 
+in the @code{$exclude} list.
+
+For example, to prevent @code{diff} from comparing any objects with the
+base name @samp{cycle}, or any objects whose full name is
+ at samp{/VM/typelist}, or any objects whose name ends with @samp{_list},
+or any object of type @samp{obj} one would issue the following browser
+command:
+
+ at example
+> $exclude = @{"cycle", "/VM/typelist", "*_list", "type:obj"@}
+ at end example
+
+ at noindent
+or invoke the browser with the switch
+ at example
+--exclude='cycle,/VM/typelist,*_list,type:obj'
+ at end example
+
+
+ at item $diff_int8_abs
+ at itemx $diff_int8_rel
+ at itemx $diff_short_abs
+ at itemx $diff_short_rel
+ at itemx $diff_int_abs
+ at itemx $diff_int_rel
+ at itemx $diff_long_abs
+ at itemx $diff_long_rel
+ at itemx $diff_float_abs
+ at itemx $diff_float_rel
+ at itemx $diff_double_abs
+ at itemx $diff_double_rel
+These variables control how the @code{diff} function determines whether
+two numeric values are the same or different. The ones that end with
+ at samp{_abs} specify the maximum absolute difference allowed between two
+values @var{a} and @var{b}.  The @code{diff} command considers @var{a}
+and @var{b} to be different if @samp{|@var{a}- at var{b}|>@var{abs}}.
+The variables that end with @samp{_rel} specify the maximum absolute
+difference relative to the mean of two values.  The @code{diff} command
+considers @var{a} and @var{b} to be different if
+ at samp{|@var{a}- at var{b}|/|@var{a}+ at var{b}| > @var{rel}/2}.
+
+If both tests are performed then @var{a} and @var{b} are considered
+different if either test indicates they are different. If an @var{abs} or
+ at var{rel} parameter is not defined (or has a non-positive value) then
+the corresponding test is not performed. If neither test is performed
+then an exact comparison is used.
+
+All @code{diff} variables have a default value of zero and are set by
+the @samp{--absolute} and @samp{--relative} command-line switches.
+ at end table
+
+ at c ======================================================================
+ at node Output Variables, File Variables, Differencing Variables, Internal Variables
+ at section Output Variables
+
+ at table @code
+ at item $height
+The height of the output terminal in lines. If set to a positive value
+then the browser will pause after each screenful of interactive output
+(redirected output is unaffected by this setting). This variable is set
+by the @samp{--height} command-line switch and is reset whenever the
+browser receives a window size change signal (@code{SIGWINCH}).
+
+ at item $width
+The width of the output terminal in characters. The browser will try not 
+to print data which would wrap from one line to the next. This variable
+is set by the @samp{--width} command-line switch and is reset whenever
+the browser receives a window size change signal (@code{SIGWINCH}).
+
+ at item $verbosity
+This variable is set by the @samp{--quiet} and @samp{--verbose}
+switches. The @samp{--quiet} sets it to zero while @samp{--verbose} sets 
+it to two (the default is one). Changing its value at runtime changes
+the amount of chatter produced by the browser.
+
+ at item $truncate
+If this variable holds a non-negative integer value @var{N}, then the
+browser shows only @var{N} values of each array; otherwise all values of
+an array are displayed. Values which are omitted are indicated by a
+string such as @samp{...(2000 values omitted)...} appearing at the point
+where the values were omitted. Truncation is disabled (all values are
+printed) by setting this variable to nil (its default).
+
+ at item $trailing
+If this variable holds a positive integer value and @samp{$truncate}
+has a non-negative integer value, then up to @var{n} of the printed
+array values will come from the end of the array rather than the
+beginning. The default value is 50.
+
+ at item $fmt_double
+This variable holds a @code{printf} format string which is used to
+format C @code{double} values.  The default value is @samp{%1.10g}.
+
+ at item $fmt_float
+This variable holds a @code{printf} format string which is used to
+format C @code{float} values.  The default value is @samp{%1.5g}.
+
+ at item $fmt_int
+This variable holds a @code{printf} format string which is used to
+format integer values.  The default value is @samp{%d}.
+
+ at item $fmt_long
+This variable holds a @code{printf} format string which is used to
+format long integer values.  The default value is @samp{(long)%ld}.
+
+ at item $fmt_null
+This variable holds a @code{printf} format string which is printed for
+null character strings.  The default value is @samp{(null)}.
+
+ at item $fmt_int8
+This variable holds a @code{printf} format string which is used to
+format 8-bit integer values.  The default is @samp{(int8)%d} but people
+often like to change it to @samp{`%c'} to see the ASCII equivalent. Be
+warned that output of non-printable ASCII characters in this manner may
+not work if the terminal emulator interprets them as commands.
+
+ at item $fmt_short
+This vairable holds a @code{printf} format string which is used to
+format short integer values.  The default value is @samp{(short)%d}.
+
+ at item $fmt_string
+This variable holds a @code{printf} format string which is used to
+format character string values.  The default value is
+ at samp{\"%s\"}.
+
+ at item $obase Output of primitive data (integer, character, string, and
+floating-point), by default, uses the @code{$fmt_} variables described
+above. However, by setting this variable to 16, 8, or 2 it is possible
+to display primitive data in hexadecimal, octal, or binary format.
+
+ at end table
+
+ at c ======================================================================
+ at node File Variables,  , Output Variables, Internal Variables
+ at section File Variables
+
+ at table @code
+ at item $pubinit
+This variable holds the name of the public initialization file and is
+intended to be used as the first argument to the `include' function in a 
+user-private initialization file.
+
+ at item $lowlevel
+If this variable has any true value (nil, zero, and the empty string are
+considered false), then the browser reads objects as type
+ at code{DBobject} even if that object has some other datatype such as
+ at code{DBquadvar}.  This variable is set by the @samp{-l} command-line
+option and is useful for debugging the low layers of Silo. The default
+value is zero.
+
+If the value is two or higher then the Silo definition of @code{DBobject}
+is used and the values of the @code{comp_names} and @code{pdb_names}
+arrays become part of the object.
+
+If the value is one or two then the browser translates the Silo
+ at code{DBobject} structure into a structure which is more user friendly
+by adding additional members to the object structure. Each member has a
+name from the @code{comp_names} array and a value based on the
+corresponding member of the @code{pdb_names} array at footnote{Changes
+should not be made to the @code{comp_names} or @code{pdb_names} arrays
+since the Silo @code{DBobject} is regenerated from the user-friendly
+fields before being saved back to the file.}.
+
+ at item $checksums
+If this variable has any true value (nil, zero, and the empty string are
+considered false), and the database being read includes checksums, then
+the browser performs checksum checks during read. Note that currently,
+the only Silo driver that supports checksums is the HDF5 driver.
+
+If checksum checks are disabled, then if browser encounters corrupt data,
+it will not know it. In particular, if checksums are disabled, the diff
+operator can wind up reporting corrupted data as diffs. If checksums are
+enabled, however, and the database being read includes checksums, then
+browser will report errors when it encounters corrupt data and fail to
+read the associated Silo object. See the associated Silo call 
+ at code{DBSetEnableChecksums()} for more information.
+
+ at item $rdonly
+If this variable has any true value (nil, zero, and the empty string are
+considered false), then the browser opens files in read-only mode
+instead of read-write mode.  Editing will not work on a file open for
+reading only.
+ at end table
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Startup File, Editing, Internal Variables, Top
+ at chapter Initializing the Browser
+
+When the browser starts, it looks for a file called @file{.browser_rc}
+in the user's home directory or a file called
+ at file{/usr/local/include/browser_rc}@footnote{The path name may be
+different depending on how the browser was compiled.}.  However, an
+alternate startup file can be specified with the @samp{--file} browser
+command-line switch.  The browser reads and executes each command found
+in the startup file.
+
+The startup file should contain an assignment to the
+ at code{$browser_version} variable which will be used to check that the
+version of the startup file is appropriate for the browser being
+run. Mismatched version numbers result in a rather verbose warning
+message (provided that the browser was even able to process the startup
+file).
+
+The @code{$browser_version} number should be assigned some real constant
+like @samp{3.004} where @samp{3} is the browser major version number and
+ at samp{004} is the browser minor version number.  To determine what
+version number to specify, invoke the browser as @samp{browser
+--version}.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Editing, Paging, Startup File, Top
+ at chapter Editing Database Objects
+
+The @samp{=} operator can be used to set the value of an internal
+browser variable or to change the value of a database object.  If the
+left hand side of the @samp{=} is an internal variable, then the value
+of the internal variable is changed. Otherwise if the left hand side is
+a database object, its value is changed.  Otherwise, a new internal
+variable is created and assigned an initial value.
+
+The browser can change values for objects of type @code{DBobject} (most
+objects are of this type if the browser is running in low-level mode) or
+objects under the @samp{var(s)} category in a directory listing.
+
+When changing the value of a string database object like
+ at samp{_fileinfo}, the new value will be truncated to the same length as
+the old value because of limitations in the underlying Silo database
+drivers.  This does not apply to string fields of a @code{DBobject}.
+
+Assigning a scalar value to an array or slice of an array results in all
+selected elements of the array to be set to the same value.  For
+instance, if the type of @samp{u_data} is @samp{[31, 41, 31] float} then
+the statement `u_data[5]=0' sets all elements of ``row'' five to zero.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Paging, Redirection, Editing, Top
+ at chapter Paging
+
+The browser keeps track of how many lines of output have been displayed
+for the currently executing command and temporarily pauses that command
+whenever output is about to scroll off the top of the screen.  The
+height and width of the screen is determined by the browser making
+certain @code{ioctl} calls at startup and each time it gets a
+ at code{SIGWINCH} signal.  The initial values can be set with
+ at samp{--height} and @samp{--width} command-line switches.  If the
+appropriate @code{ioctl} is not available then the values of environment 
+variables @code{LINES} and @code{COLUMNS} will be used. If all else
+fails then the browser uses zero for the number of lines (that is, no
+paging of output) and 80 for the number of columns.
+
+When the browser pauses the output, the message @samp{more? ('q' to
+quit)} is displayed. The following user responses are recognized:
+
+ at table @b
+ at item Quit
+Cancels the command and returns to the browser prompt. This is
+equivalent to the browser receiving a @code{SIGPIPE} signal.
+
+ at item Continue
+Pressing the EOF key (usually control- at samp{d}) causes the command to
+continue without being paged. Output will simply scroll off the screen).
+
+ at item Next Diff
+Pressing @samp{n} causes output to be suspended until the next file
+difference report or the next non-diff command.
+
+ at item Interrupt
+Pressing the interrupt key (usually control- at samp{c}) causes the command
+to be interrupted as usual.
+ at end table
+
+Output redirected to a file or command is not paged.  If the user is not
+satisfied with the limited paging ability of the browser, the output
+from a command can be redirected to the pager of the user's choice using
+output redirection.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Redirection, Interrupts, Paging, Top
+ at chapter Redirection
+
+Output from any browser command can be redirected to a file or shell
+command by appending a redirection character and file name or shell
+command to the end of the command.
+
+To save the output of a command in a file, destroying the previous
+contents of the file if any, append a @samp{>} and the name of the
+file.  Unless the file name looks like a browser symbol it must be
+enclosed in quotes.  For instance, @samp{quadvar3d > saved} saves the
+value of Silo database variable @samp{quadvar} in a text file named
+ at file{saved}.
+
+To append the output of a command to a file, append a @samp{>>} and the
+file name to the end of the command.  Unless the file name looks like a
+browser symbol it must be enclosed in quotes.  For example, @samp{typeof
+quadvar3d >> saved} appends type information to the @file{saved} file.
+
+To send the output of a browser command to the standard input of a shell
+command, follow the browser command with a @samp{|} followed by the
+shell command in quotes.  The quotes are not necessary if the shell
+command is a single symbol.  Since paging is disabled when output is to
+a shell command, one way to display a result without paging is to pipe
+the output through the @samp{cat} command like @samp{d | cat}.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Interrupts, Examples, Redirection, Top
+ at chapter Interrupts
+
+Since some commands may require a long time to execute or produce a huge
+amount of output, the user may want to abort the command before it
+finishes.  If the output is paged interactively to the screen then
+pressing @samp{q} at the @samp{more?}  prompt accomplishes
+this.  Otherwise the user can press the interrupt character (usually
+control-c) and the browser command will be immediately terminated and
+the browser will prompt for the next command.  If the interrupt
+character is typed during command input the browser itself terminates.
+
+If output from a browser command is being piped into a shell command and
+the shell command exits (or closes its standard input) before the
+browser command is finished, the browser command gets the @code{SIGPIPE}
+signal and terminates.
+
+ at c ======================================================================
+ at c ======================================================================
+ at c ======================================================================
+ at node Examples,  , Interrupts, Top
+ at chapter Examples
+
+This chapter contains some sample output from the browser.
+
+Normally, you will specify the name of a database file on the browser
+command-line at footnote{Opening a file on the command line is the same as
+saying @samp{open "rect3d.pdb" $1} interactively.} like in the following
+example, and sometimes it's convenient to open multiple files at the
+same time.  Each file name listed on the command-line is given an
+identifier like @samp{$1}, @samp{$2}, etc., and most of the browser
+commands operate on file @samp{$1} by default.
+
+ at example
+% @b{browser rect3d.pdb}
+INFO: opening `rect3d.pdb' as $1
+ at end example
+
+The @code{ls} command is similar to the Unix @code{ls} command in that
+it lists the contents of the current working directory.  The heading
+fields on the left of the equal signs apply until the next heading.  The
+headings are the same as those used by MeshTV.  To list the contents of
+some subdirectory, say @samp{ls}, @samp{ls dir1},
+ at samp{print dir1}, or just @samp{dir1}.
+
+ at example
+> @b{ls}
+qmesh(s)          = quadmesh3d            
+
+qvar(s)           = d                      p                     
+                  = t                      u                     
+                  = v                      w                     
+
+mat(s)            = mat1                  
+
+var(s)            = _fileinfo              _meshtv_defvars       
+                  = _meshtvinfo            cycle                 
+                  = d_data                 d_dims                
+                  = d_maxindex             dtime                 
+                  = mat1_dims              mat1_matlist          
+                  = mat1_matnos            mat1_mix_mat          
+                  = mat1_mix_next          mat1_mix_vf           
+                  = mat1_mix_zone          p_data                
+                  = p_dims                 p_maxindex            
+                  = quadmesh3d_align_nodal quadmesh3d_align_zonal
+                  = quadmesh3d_coord0      quadmesh3d_coord1     
+                  = quadmesh3d_coord2      quadmesh3d_dims       
+                  = quadmesh3d_max_extents quadmesh3d_max_index_n
+                  = quadmesh3d_max_index_z quadmesh3d_min_extents
+                  = quadmesh3d_min_index   quadmesh3d_zonedims   
+                  = t_data                 t_dims                
+                  = t_maxindex             time                  
+                  = u_data                 u_dims                
+                  = u_maxindex             v_data                
+                  = v_dims                 v_maxindex            
+                  = w_data                 w_dims                
+                  = w_maxindex            
+ at end example
+
+To keep the size of these examples small, we've specified that at most
+50 values should be printed from each array and that 25 of those values
+should be from the end of the array (and the other 25, from the
+beginning).  To truncate everything say @samp{$truncate=0} and to turn
+truncating off say @samp{$truncate=nil}.
+
+ at example
+> @b{$truncate = 50}
+                  = 50
+> @b{$trailing = 25}
+                  = 25
+ at end example
+
+The user can ask for the type of any object, including types built into
+the browser.  If the object is a structured type (like in this example)
+then the type of each component of that structure is printed.
+
+ at example
+> @b{typeof d}
+                  = struct DBquadvar @{
+id                =    +0 int
+name              =    +4 string
+units             =    +8 string
+label             =    +12 string
+cycle             =    +16 int
+time              =    +20 float
+dtime             =    +24 double
+meshid            =    +32 int
+datatype          =    +40 int (DBdatatype)
+nels              =    +44 int
+nvals             =    +48 int
+ndims             =    +52 int
+dims              =    +56 [3] int
+major_order       =    +68 int (array order)
+stride            =    +72 [3] int
+min_index         =    +84 [3] int
+max_index         =    +96 [3] int
+origin            =    +108 int
+align             =    +112 [3] float
+mixlen            =    +128 int
+use_specmf        =    +132 int (on/off)
+mixvals           =    +124 *[1] *[0] float
+vals              =    +36 *[1] *[36000] float
+                  = @}
+ at end example
+
+An integer following a plus sign indicates that the type corresponds to
+a byte offset from the beginning of the innermost enclosing structure
+or array.
+
+A @samp{*} means the object is a pointer to whatever type
+follows at footnote{ Whether or not something is a pointer is generally not
+important to using the browser: a 1d array of pointers to 1d arrays of
+integers can be treated like a ragged-edge 2d array of integers.}.
+
+A list of array dimensions between @samp{[} and @samp{]} mean that the
+object is an array and each element of the array is the type that
+follows the @samp{]}.
+
+The final name is always one of the browser integral types @samp{string}
+(same as the C @samp{char*}), @samp{short}, @samp{int}, @samp{long},
+ at samp{float}, or @samp{double}.  If the integral type name is followed
+by parentheses then the parentheses contain the name of an underlying C
+ at samp{enum} type or a set of related C preprocessor constants.
+
+Some data objects override one or more standard class methods.  Such
+objects will have flags like @samp{__ at var{flag}__} which appear inside
+the object type.
+
+One can also ask for the Silo definition of a named data type like
+ at samp{DBquadvar}.  This prints the definition of the Silo
+ at samp{DBquadvar} structure which is the same as printed above for the
+type of @samp{d} except that array sizes and some primitive types are
+not bound to actual values yet at footnote{The word @samp{self} refers to the
+object corresponding to the innermost structure which incloses the
+ at samp{self}.}.
+
+ at example
+> @b{DBquadvar}
+                  = struct DBquadvar @{
+id                =    +0 int
+name              =    +4 string
+units             =    +8 string
+label             =    +12 string
+cycle             =    +16 int
+time              =    +20 float
+dtime             =    +24 double
+meshid            =    +32 int
+datatype          =    +40 int (DBdatatype)
+nels              =    +44 int
+nvals             =    +48 int
+ndims             =    +52 int
+dims              =    +56 [self.ndims] int
+major_order       =    +68 int (array order)
+stride            =    +72 [self.ndims] int
+min_index         =    +84 [self.ndims] int
+max_index         =    +96 [self.ndims] int
+origin            =    +108 int
+align             =    +112 [self.ndims] float
+mixlen            =    +128 int
+use_specmf        =    +132 int (on/off)
+mixvals           =    +124 *[self.nvals] *[self.mixlen] 
+mixvals           =    self.datatype
+vals              =    +36 *[self.nvals] *[self.nels] self.datatype
+                  = @}
+ at end example
+
+Giving just the name of the Silo object is short for @samp{print $1.d}.
+Notice that the @samp{vals} array has been truncated as requested and
+that @var{mixvals} has no value. The subscripts in the labels to the
+left of the equal sign correspond to the first value on that line (an
+entire array in the case of @samp{vals[0]}.
+
+One can also ask for tye type of a single structure component by typing the
+command @samp{DBquadvar.vals}.
+
+ at example
+> @b{d}
+                  = DBquadvar: struct
+id                =    0
+name              =    "d"
+units             =    (null)
+label             =    (null)
+cycle             =    48
+time              =    4.80000
+dtime             =    4.8000000000
+meshid            =    0
+datatype          =    float
+nels              =    36000
+nvals             =    1
+ndims             =    3
+dims[0]           =    @{30, 40, 30@}
+major_order       =    row major
+stride[0]         =    @{1, 30, 1200@}
+min_index[0]      =    @{0, 0, 0@}
+max_index[0]      =    @{29, 39, 29@}
+origin            =    0
+align[0]          =    @{0.50000, 0.50000, 0.50000@}
+mixlen            =    0
+use_specmf        =    off
+mixvals           =    NULL
+vals[0]           =    @{@{0.83957, 0.82083, 0.80304, 0.78626, 0.77056,
+vals[0, 5]        =    0.75601, 0.74266, 0.73059, 0.71987, 0.71055,
+vals[0, 10]       =    0.70269, 0.69633, 0.69153, 0.68831, 0.68669,
+vals[0, 15]       =    0.68669, 0.68831, 0.69153, 0.69633, 0.70269,
+vals[0, 20]       =    0.71055, 0.71987, 0.73059, 0.74266, 0.75601,
+vals[0, 25]       =    ...(35950 values omitted)..., 0.75601, 
+vals[0, 35976]    =    0.74266, 0.73059, 0.71987, 0.71055, 0.70269, 
+vals[0, 35981]    =    0.69633, 0.69153, 0.68831, 0.68669, 0.68669, 
+vals[0, 35986]    =    0.68831, 0.69153, 0.69633, 0.70269, 0.71055, 
+vals[0, 35991]    =    0.71987, 0.73059, 0.74266, 0.75601, 0.77056, 
+vals[0, 35996]    =    0.78626, 0.80304, 0.82083, 0.83957@}@}
+ at end example
+
+The browser does not attempt to be efficient about loading objects from
+the database into memory since the underlying Silo library makes it
+difficult to do so.  However, if one says @samp{$lowlevel=1} then the
+browser uses lower-level Silo functions to read the file.  As a result,
+less data is moved from disk to memory.
+
+ at example
+> @b{$lowlevel=1}
+                  = 1
+> @b{d}
+                  = struct
+name              =    "d"
+type              =    "quadvar"
+meshid            =    "quadmesh"
+align             =    "/quadmesh_align_zonal"
+dims              =    "/d_dims"
+max_index         =    "/d_maxindex"
+value0            =    "/d_data"
+ndims             =    3
+nvals             =    1
+nels              =    36000
+origin            =    0
+datatype          =    19
+mixlen            =    0
+major_order       =    0
+cycle             =    48
+time              =    "/time"
+dtime             =    "/dtime"
+min_index         =    "/quadmesh_min_index"
+use_specmf        =    -1000
+ at end example
+
+Now we'll decrease the number of values printed and increase the
+precision that's displayed for @samp{float} values.
+
+ at example
+> @b{$truncate = 12}
+                  = 12
+> @b{$trailing = 6}
+                  = 6
+> @b{$fmt_float = "%1.15f"}
+                  = "%1.15f"
+> @b{d.vals[0]}
+[0]               = @{0.839570403099060, 0.820833325386047,
+[2]               = 0.803043246269226, 0.786264479160309,
+[4]               = 0.770563006401062, 0.756006062030792,
+[6]               = ...(35988 values omitted)..., 
+[35994]           = 0.756006062030792, 0.770563066005707, 
+[35996]           = 0.786264479160309, 0.803043246269226, 
+[35998]           = 0.820833325386047, 0.839570462703705@}
+ at end example
+
+The @samp{diff} command compares two objects and reports differences
+between them.  The output is in groups of differences where the group is
+delimited at the beginning and end by a line of stars.  The first half
+of the group displays (part of) the first argument to @samp{diff} while
+the part of the group after the line of dashes displays (part of) the
+second argument.  Subobjects that differ only partially (@samp{stride} in
+this case) appear separately before those which completely differ.  The
+array truncating parameters apply to each array segment individually.
+
+ at example
+> @b{diff d p}
+***************
+stride[1]         = @{30, 1200@}
+---------------
+stride[1]         = @{31, 1271@}
+***************
+***************
+name              = "d"
+nels              = 36000
+dims[0]           = @{30, 40, 30@}
+max_index[0]      = @{29, 39, 29@}
+vals[0]           = @{@{0.839570403099060, 0.820833325386047,
+vals[0, 2]        = 0.803043246269226, 0.786264479160309,
+vals[0, 4]        = 0.770563006401062, 0.756006062030792,
+vals[0, 6]        = ...(35988 values omitted)..., 
+vals[0, 35994]    = 0.756006062030792, 0.770563066005707, 
+vals[0, 35996]    = 0.786264479160309, 0.803043246269226, 
+vals[0, 35998]    = 0.820833325386047, 0.839570462703705@}@}
+---------------
+name              = "p"
+nels              = 39401
+dims[0]           = @{31, 41, 31@}
+max_index[0]      = @{30, 40, 30@}
+vals[0]           = @{@{1.190943479537964, 1.218125700950623,
+vals[0, 2]        = 1.245107889175415, 1.271674990653992,
+vals[0, 4]        = 1.297584056854248, 1.322565793991089,
+vals[0, 6]        = ...(39389 values omitted)..., 
+vals[0, 39395]    = 0.000000000000000, 0.000000000000000, 
+vals[0, 39397]    = 0.000000000000000, 0.000000000000000, 
+vals[0, 39399]    = 0.000000000000000, 0.000000000000000@}@}
+***************
+ at end example
+
+A compound array is composed of zero or more subarrays.  A subarray can
+be printed by saying something like @samp{carray.b}, but a subarray is
+also printed by saying just @samp{b} as long as @samp{b} is not some
+other type of object and @samp{b} exists in exactly one compound array.
+
+ at example
+> @b{carray}
+                  = struct
+name              =    "carray"
+id                =    0
+nelems            =    3
+nvalues           =    18
+datatype          =    float
+a[0]              =    @{0.00000, 0.34185, 0.64252, 0.86576@}
+b[0]              =    @{0.98468, 0.98496, 0.86656, 0.64374, 0.34335,
+b[5]              =    0.00159@}
+c[0]              =    @{-0.34036, -0.64130, -0.86496, -0.98441, 
+c[4]              =    -0.98523, -0.86735, -0.64495, -0.34485@}
+
+> @b{b}
+[0]               = @{0.98468, 0.98496, 0.86656, 0.64374, 0.34335, 
+[5]               = 0.00159@}
+
+> @b{b[2]}
+[2]               = @{0.86656@}
+ at end example
+
+If the file is opened for reading and writing (the default) then
+variables can be given new values.  The new values are written back to
+the file immediately.
+
+ at example
+> @b{_fileinfo}
+                  = "3D rectilinear test file"
+> @b{_fileinfo = "testing"}
+                  = "testing"
+> @b{_fileinfo}
+                  = "testing"
+ at end example
+
+A scalar variable assigned to an array (or slice of an array) sets all
+the elements of that array (or slice) to the specified value.  A list of
+values enclosed in curly braces can be assigned to an array (or slice of
+an array) causing each element of the array (or slice) to be set to one
+of the listed values.
+
+ at example
+> @b{typeof v_data}
+                  = [31, 41, 31] float
+> @b{v_data = 0}
+                  = 0
+> @b{v_data[0, 0, 2:4]}
+                  = @{0, 0, 0@}
+> @b{v_data[0, 0, 2:4] = @{0.111, 0.222, 0.333@}}
+                  = @{0.111, 0.222, 0.333@}
+> @b{v_data}
+[0, 0, 0]         = @{0, 0, 0.111, 0.222, 0.333, 0, 
+[0, 0, 6]         = ...(39389 values omitted)..., 0, 0, 0,
+[30, 40, 28]      = 0, 0, 0@}
+ at end example
+
+Pressing control-c during a browser command aborts the command, but
+pressing control-c when the browser is asking for input aborts the
+browser.  It is more polite to press control-d or type @samp{exit}
+instead since this gives the browser a chance to properly close database
+files.
+
+ at example
+> @b{$truncate = nil}
+> @b{d >data_file}
+ at b{control-c}
+
+Command aborted.
+> @b{control-c}
+%
+ at end example
+
+
+ at bye
+------------------------------------------------------------------------------
+Local Variables:
+compile-command: "texi2dvi browser.texi"
+End:
diff --git a/tools/browser/cons.c b/tools/browser/cons.c
new file mode 100644
index 0000000..a3f1c9e
--- /dev/null
+++ b/tools/browser/cons.c
@@ -0,0 +1,373 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             cons.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             The CONS class.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#define MYCLASS(X)      ((obj_cons_t*)(X))
+
+typedef struct obj_cons_t {
+   obj_pub_t    pub;
+   obj_t        head, tail;
+} obj_cons_t;
+
+class_t         C_CONS;
+static obj_t    cons_new (va_list);
+static obj_t    cons_dest (obj_t);
+static obj_t    cons_copy (obj_t, int);
+static void     cons_print (obj_t, out_t*);
+static obj_t    cons_eval (obj_t);
+static obj_t    cons_deref(obj_t, int, obj_t*);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_class
+ *
+ * Purpose:     Initializes the cons cell class.
+ *
+ * Return:      Success:        Ptr to the cons class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+cons_class (void)
+{
+    class_t     cls = calloc(1, sizeof(*cls));
+
+    cls->name = safe_strdup("CONS");
+    cls->new = cons_new;
+    cls->dest = cons_dest;
+    cls->copy = cons_copy;
+    cls->print = cons_print;
+    cls->eval = cons_eval;
+    cls->feval = cons_eval;     /*same as eval*/
+    cls->deref = cons_deref;
+    return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_new
+ *
+ * Purpose:     Creates a new CONS object with the specified head and tail.
+ *
+ * Return:      Success:        Ptr to the new cons object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+cons_new (va_list ap) {
+
+   obj_cons_t   *self = calloc (1, sizeof(obj_cons_t));
+
+   assert (self);
+   self->head = va_arg (ap, obj_t);
+   self->tail = va_arg (ap, obj_t);
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_dest
+ *
+ * Purpose:     Destroys a CONS object be destroying the head and tail.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+cons_dest (obj_t _self) {
+
+   obj_cons_t   *self = MYCLASS(_self);
+
+   obj_dest (self->head);
+   obj_dest (self->tail);
+
+   if (0==self->pub.ref) {
+      self->head = self->tail = NIL;
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_copy
+ *
+ * Purpose:     Copy constructor.
+ *
+ * Return:      Success:        Ptr to copy of SELF.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+cons_copy (obj_t _self, int flag) {
+
+   obj_t        hd=NIL, tl=NIL, ret=NIL;
+   obj_cons_t   *self = MYCLASS(_self);
+
+   assert (SHALLOW==flag);
+
+   hd = obj_copy (self->head, SHALLOW);
+   tl = obj_copy (self->tail, SHALLOW);
+
+   if (hd!=self->head || tl!=self->tail) {
+      ret = obj_new (C_CONS, hd, tl);
+   } else {
+      ret = _self;
+   }
+   return ret;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_print
+ *
+ * Purpose:     Prints a cons cell to the specified file.
+ *
+ * Return:      Void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+cons_print (obj_t cur, out_t *f) {
+
+   int          i;
+
+   out_puts (f, "(");
+   for (i=0; cur; cur=MYCLASS(cur)->tail,i++) {
+      assert (C_CONS==cur->pub.cls);
+      if (i) out_puts (f, " ");
+      obj_print (MYCLASS(cur)->head, f);
+   }
+   out_puts (f, ")");
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_eval
+ *
+ * Purpose:     Evaluates a list by evaluating the head in a function
+ *              context and then applying the result to the rest of
+ *              the arguments.
+ *
+ * Return:      Success:        Ptr to the result.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+cons_eval (obj_t _self) {
+
+   obj_cons_t   *self = MYCLASS(_self);
+   obj_t        func=NIL, retval=NIL;
+
+   /*
+    * Try to evaluate this as a function.  If that doesn't work, evaluate
+    * the head normally and then try to evaluate that result as a function.
+    */
+   func = obj_feval (self->head);
+   if (!func) {
+      obj_t tmp = obj_eval (self->head);
+      if (tmp) {
+         func = obj_feval (tmp);
+         tmp = obj_dest (tmp);
+      }
+   }
+
+   if (!func) {
+      out_error ("expression head is not a function: ", _self);
+      return NULL;
+   }
+
+   retval = obj_apply (func, self->tail);
+   func = obj_dest (func);
+   return retval;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Invokes the obj_deref() on each member of the list and
+ *              returns a list of results.
+ *
+ * Return:      List of results or NIL
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, July  5, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static obj_t
+cons_deref(obj_t _self, int argc, obj_t argv[])
+{
+    obj_cons_t  *self = MYCLASS(_self);
+    obj_t       tail=NIL, head=NIL;
+
+    /* Dereference the head and then tail */
+    head = obj_deref(self->head, argc, argv);
+    if (self->tail) {
+        tail = obj_deref(self->tail, argc, argv);
+    }
+
+    return obj_new(C_CONS, head, tail);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_head
+ *
+ * Purpose:     Returns the head of a cons cell.
+ *
+ * Return:      Success:        Ptr to the head.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+cons_head (obj_t _self) {
+
+   if (!_self || C_CONS!=_self->pub.cls) return NIL;
+   return MYCLASS(_self)->head;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    cons_tail
+ *
+ * Purpose:     Returns the tail of a cons cell.
+ *
+ * Return:      Success:        Ptr to the tail.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+cons_tail (obj_t _self) {
+
+   if (!_self || C_CONS!=_self->pub.cls) return NIL;
+   return MYCLASS(_self)->tail;
+}
+
diff --git a/tools/browser/file.c b/tools/browser/file.c
new file mode 100644
index 0000000..8b1e89e
--- /dev/null
+++ b/tools/browser/file.c
@@ -0,0 +1,2806 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             file.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             File I/O
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#ifdef HAVE_FNMATCH_H
+#  include <fnmatch.h>
+#endif
+
+#include <config.h>     /*Silo configuration record*/
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+
+#define CHECK_SYMBOL(A)  if (!strncmp(str, #A, strlen(str))) return A
+
+#define CHECK_SYMBOLN_INT(A)				\
+if (!strncmp(tmp, #A"=", strlen(#A)+1))			\
+{							\
+    int n = sscanf(tmp, #A"=%d", &driver_ints[driver_nints]);\
+    if (n == 1)						\
+    {							\
+        DBAddOption(opts, A, &driver_ints[driver_nints]);\
+        driver_nints++;					\
+        got_it = 1;					\
+    }							\
+}
+
+#define CHECK_SYMBOLN_STR(A)				\
+if (!strncmp(tmp, #A"=", strlen(#A)+1))			\
+{							\
+    driver_strs[driver_nstrs] = safe_strdup(&tmp[strlen(#A)]+1);\
+    DBAddOption(opts, A, driver_strs[driver_nstrs]);	\
+    driver_nstrs++;					\
+    got_it = 1;						\
+}
+
+#define CHECK_SYMBOLN_SYM(A)				\
+if (!strncmp(tmp, #A"=", strlen(#A)+1))			\
+{							\
+    driver_ints[driver_nints] = StringToOptval(&tmp[strlen(#A)]+1);\
+    DBAddOption(opts, A, &driver_ints[driver_nints]);	\
+    driver_nints++;					\
+    got_it = 1;						\
+}
+
+static DBoptlist *driver_opts[] = {0,0,0,0,0,0,0,0,0,0,0};
+static int driver_ints[100];
+static int driver_nints = 0;
+static char *driver_strs[] = {0,0,0,0,0,0,0,0,0,0};
+static int driver_nstrs = 0;
+static const int driver_nopts = sizeof(driver_opts)/sizeof(driver_opts[0]);
+
+static void CleanupDriverStuff()
+{
+    int i;
+    for (i = 0; i < driver_nopts; i++)
+        if (driver_opts[i]) DBFreeOptlist(driver_opts[i]);
+    for (i = 0; i < sizeof(driver_strs)/sizeof(driver_strs[0]); i++)
+        if (driver_strs[i]) free(driver_strs[i]);
+    memset(driver_opts, 0, sizeof(driver_opts));
+    memset(driver_strs, 0, sizeof(driver_strs));
+    memset(driver_ints, 0, sizeof(driver_ints));
+    driver_nints = 0;
+    driver_nstrs = 0;
+}
+
+static void MakeDriverOpts(DBoptlist **_opts, int *opts_id)
+{
+    DBoptlist *opts = DBMakeOptlist(30);
+    int i;
+
+    for (i = 0; i < driver_nopts; i++)
+    {
+        if (driver_opts[i] == 0)
+        {
+            driver_opts[i] = opts;
+            break;
+        }
+    }
+
+    *_opts = opts;
+    *opts_id = DBRegisterFileOptionsSet(opts);
+}
+
+static int StringToOptval(const char *str)
+{
+    CHECK_SYMBOL(DB_PDB);
+    CHECK_SYMBOL(DB_HDF5);
+    CHECK_SYMBOL(DB_HDF5_SEC2);
+    CHECK_SYMBOL(DB_HDF5_STDIO);
+    CHECK_SYMBOL(DB_HDF5_CORE);
+    CHECK_SYMBOL(DB_HDF5_SPLIT);
+    CHECK_SYMBOL(DB_HDF5_MPIO);
+    CHECK_SYMBOL(DB_HDF5_MPIP);
+    CHECK_SYMBOL(DB_HDF5_LOG);
+    CHECK_SYMBOL(DB_HDF5_DIRECT);
+    CHECK_SYMBOL(DB_HDF5_FAMILY);
+    CHECK_SYMBOL(DB_HDF5_SILO);
+    
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_DEFAULT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SEC2);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_STDIO);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_CORE);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_LOG);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SPLIT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_DIRECT);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_FAMILY);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_MPIP);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_MPIO);
+    CHECK_SYMBOL(DB_FILE_OPTS_H5_DEFAULT_SILO);
+
+    CHECK_SYMBOL(DB_H5VFD_DEFAULT);
+    CHECK_SYMBOL(DB_H5VFD_SEC2);
+    CHECK_SYMBOL(DB_H5VFD_STDIO);
+    CHECK_SYMBOL(DB_H5VFD_CORE);
+    CHECK_SYMBOL(DB_H5VFD_LOG);
+    CHECK_SYMBOL(DB_H5VFD_SPLIT);
+    CHECK_SYMBOL(DB_H5VFD_DIRECT);
+    CHECK_SYMBOL(DB_H5VFD_FAMILY);
+    CHECK_SYMBOL(DB_H5VFD_MPIO);
+    CHECK_SYMBOL(DB_H5VFD_MPIP);
+    CHECK_SYMBOL(DB_H5VFD_SILO);
+}
+
+#define MYCLASS(X)      ((obj_file_t*)(X))
+
+typedef struct obj_file_t {
+   obj_pub_t    pub;
+   int          rdonly;
+   char         *name;
+   DBfile       *f;
+} obj_file_t;
+
+class_t         C_FILE;
+static obj_t    file_new (va_list);
+static obj_t    file_dest (obj_t);
+static void     file_print (obj_t, out_t*);
+static char *   file_name (obj_t);
+static obj_t    file_deref (obj_t, int, obj_t*);
+static int      file_diff (obj_t, obj_t);
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_class
+ *
+ * Purpose:     Initializes the class.
+ *
+ * Return:      Success:        Ptr to the FILE class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+file_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("FILE");
+   cls->new = file_new;
+   cls->dest = file_dest;
+   cls->copy = NULL;
+   cls->print = file_print;
+   cls->objname = file_name;
+   cls->deref = file_deref;
+   cls->diff = file_diff;
+   return cls;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    file_reset_hdf5_vfd_options
+ *
+ * Purpose:     Sets hdf5 virtual file driver options for opening. 
+ *
+ * Programmer:  Mark C. Miller, Fri Feb 12 08:25:07 PST 2010
+ *              The code to parse $h5vfdopts was cut-n-pasted from
+ *              Robb Matzke's code in func.c for $exclude variable.
+ *
+ * Modifications:
+ *   Mark C. Miller, Thu Mar 18 18:19:00 PDT 2010
+ *   Recoded entirely to accomodate new interface for HDF5 options.
+ *-------------------------------------------------------------------------
+ */
+#define MAX_FILE_OPTIONS_SETS 32
+void file_reset_hdf5_vfd_options (void) {
+
+    obj_t head=NIL, value=NIL, symbol=NIL, word=NIL;
+    int opts_id;
+    int added_options = 0;
+    DBoptlist *opts;
+
+    /* free all the old file options sets */
+    DBUnregisterAllFileOptionsSets();
+    CleanupDriverStuff();
+
+    /* start a new driver options set */
+    MakeDriverOpts(&opts, &opts_id);
+
+    /* parse $h5vfdopts to get extensions */
+    symbol = obj_new(C_SYM, "$h5vfdopts");
+    head = sym_vboundp(symbol);
+    symbol = obj_dest(symbol);
+    if (head && C_CONS!=head->pub.cls) {
+        head = obj_new(C_CONS, obj_copy(head, SHALLOW), NIL);
+    }
+    for (value=head; value; value=cons_tail(value)) {
+        if (C_CONS!=value->pub.cls) {
+            out_errorn("invalid value for $h5vfdopts");
+            goto done;
+        }
+        word = cons_head(value);
+        if (C_STR==word->pub.cls) {
+            int got_it = 0;
+            char *tmp = safe_strdup(obj_name(word));
+            if (!strncmp(tmp,"_NEWSET_",8))
+                MakeDriverOpts(&opts, &opts_id);
+            CHECK_SYMBOLN_SYM(DBOPT_H5_VFD)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_RAW_FILE_OPTS)
+            CHECK_SYMBOLN_STR(DBOPT_H5_RAW_EXTENSION)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_META_FILE_OPTS)
+            CHECK_SYMBOLN_STR(DBOPT_H5_META_EXTENSION)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CORE_ALLOC_INC)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CORE_NO_BACK_STORE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_META_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SMALL_RAW_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_ALIGN_MIN)
+            CHECK_SYMBOLN_INT(DBOPT_H5_ALIGN_VAL)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_MEM_ALIGN)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_DIRECT_BUF_SIZE)
+            CHECK_SYMBOLN_STR(DBOPT_H5_LOG_NAME)
+            CHECK_SYMBOLN_INT(DBOPT_H5_LOG_BUF_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SIEVE_BUF_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CACHE_NELMTS)
+            CHECK_SYMBOLN_INT(DBOPT_H5_CACHE_NBYTES)
+            CHECK_SYMBOLN_INT(DBOPT_H5_FAM_SIZE)
+            CHECK_SYMBOLN_SYM(DBOPT_H5_FAM_FILE_OPTS)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_BLOCK_SIZE)
+            CHECK_SYMBOLN_INT(DBOPT_H5_SILO_BLOCK_COUNT)
+            free(tmp);
+            if (!got_it)
+            {
+                out_errorn("invalid value for $h5vfdopts");
+                goto done;
+            }
+            added_options = 1;
+        } else {
+            out_errorn("$h5vfdopts values should be strings");
+            goto done;
+        }
+    }
+    head = obj_dest(head);
+
+    /* if the options set is empty, just get rid of it */
+    if (!added_options)
+    {
+        DBUnregisterAllFileOptionsSets();
+        CleanupDriverStuff();
+    }
+
+done:
+
+    /* Free temp expressions */
+    obj_dest(symbol);
+    obj_dest(head);
+
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_new
+ *
+ * Purpose:     File constructor takes the name of the file to open for
+ *              read-only.
+ *
+ * Return:      Success:        Ptr to a SILO file object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Apr 1997
+ *      The second argument indicates if the file should be open for
+ *      reading only.
+ *
+ *      Robb Matzke, 2 Apr 1997
+ *      Opening a file with filters does not fail if the filter is not
+ *      installed.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      The read-only flag is kept with the file.
+ *
+ *      Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *      I changed strdup to safe_strdup.
+ *
+ *      Robb Matzke, 2000-03-24
+ *      If we ever see two different files being opened then turn off
+ *      the `lowlevel' flag corresponding to the `-l' command-line
+ *      switch. This will prevent someone from trying to diff a PDB and
+ *      HDF5 file using the `-l' flag.
+ *
+ *      Mark C. Miller, Wed Sep  2 16:43:48 PDT 2009
+ *      Made it turn off $lowlevel for certain HDF5 situations. The problem
+ *      with HDF5 files is that the low-level data arrays for aggregate
+ *      objects do NOT appear in the toc by default. They appear only if
+ *      HDF5-friendly names are enabled. When they do NOT appear, doing
+ *      a diff with $lowlevel set to anything other than zero means the
+ *      low-level data arrays will NOT be diffed. I also added a warning
+ *      about performance of diff for PDB files when lowlevel is turned
+ *      off. In the PDB case, since low level arrays ALWAYS appear in the
+ *      toc, doing a diff with them means those arrays are diffed twice;
+ *      once as parts of aggregate objects and once as raw arrays.
+ *
+ *      Mark C. Miller, Fri Feb 12 08:26:07 PST 2010
+ *      Added call to file_reset_split_vfd_extensions.
+ *
+ *      Mark C. Miller, Fri Mar 12 01:22:11 PST 2010
+ *      Changed to call file_reset_hdf5_vfd_options
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+file_new (va_list ap)
+{
+   obj_file_t   *self;
+   char         *fname=NULL;
+   DBfile       *f;
+   int          rdonly;
+   int          old_err_level;
+   static int   seen_file_format = -1;
+
+   fname = va_arg (ap, char*);
+   rdonly = va_arg (ap, int);
+
+   /* reset hdf5 vfd options (whether the are used or not) */
+   file_reset_hdf5_vfd_options();
+
+   /*
+    * Open the file, and if that fails because the file doesn't have write
+    * permission then try opening it for read-only
+    */
+#define DEFAULT_DB_TYPE DB_UNKNOWN 
+   f = DBOpen (fname, DEFAULT_DB_TYPE, rdonly ? DB_READ : DB_APPEND);
+   if (!f && E_FILENOWRITE==db_errno && !rdonly) {
+      f = DBOpen (fname, DEFAULT_DB_TYPE, DB_READ);
+      if (f) {
+         out_info ("file opened, but without write permission");
+      }
+      rdonly = true;
+   }
+
+   /*
+    * If the file could not be opened because a filter was missing then turn
+    * on full error reporting and try again.  This causes the missing filter
+    * to be a warning instead of an error.  See DBOpen() for documentation.
+    */
+   if (!f && E_NOTFILTER==db_errno) {
+      old_err_level = DBErrlvl();
+      DBShowErrors(DB_ALL, NULL);
+      f = DBOpen (fname, DEFAULT_DB_TYPE, rdonly ? DB_READ : DB_APPEND);
+      DBShowErrors(old_err_level, NULL);
+   }
+
+   if (!f) {
+      out_errorn ("unable to open file: %s", fname);
+   }
+
+   if (!f) return NIL ; /*error already printed*/
+   self = calloc (1, sizeof(obj_file_t));
+   self->name = safe_strdup (fname);
+   self->f = f;
+   self->rdonly = rdonly;
+
+   /* If we see any file which is not PDB then turn off the `$lowlevel'
+    * flag for fear of the caller attempting a `diff' operation across
+    * file formats. */
+   if (seen_file_format<0) {
+       seen_file_format = f->pub.type;
+   } else if (seen_file_format!=f->pub.type && sym_bi_true("lowlevel")) {
+       out_info("turning $lowlevel off due mixing file types");
+       sym_bi_set("lowlevel", "0", NULL, NULL);
+   } else if (DBGetDriverType(f) == DB_HDF5 && sym_bi_true("lowlevel") != 0 &&
+              !DBGuessHasFriendlyHDF5Names(f)) {
+      out_info("turning $lowlevel off because this is an HDF5 file without friendly names.");
+      sym_bi_set("lowlevel", "0", NULL, NULL);
+   } else if (DBGetDriverType(f) == DB_PDB && sym_bi_true("lowlevel") == 0) {
+      out_info("having $lowlevel turned off for PDB files results in slower diff performance.");
+   }
+
+   return (obj_t)self;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_dest
+ *
+ * Purpose:     Destroys a file object, closing the file when all
+ *              references are gone.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+file_dest (obj_t _self) {
+
+   obj_file_t   *self = MYCLASS(_self);
+
+   if (0==self->pub.ref) {
+      if (Verbosity>=2) out_info ("file_dest: closing file: %s", self->name);
+      DBClose (self->f);
+      memset (self, 0, sizeof(obj_file_t));
+   }
+   return NIL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_print
+ *
+ * Purpose:     Prints a file object.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Prints only the file name and current working directory since the
+ *      `pwd' and `cd' commands use this.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+file_print (obj_t _self, out_t *f) {
+
+   obj_file_t   *self = MYCLASS(_self);
+   char         cwd[1024];
+
+   if (DBGetDir (self->f, cwd)<0) strcpy (cwd, "???");
+   out_printf (f, "%s%s:%s", self->name, self->rdonly?"[RDONLY]":"", cwd);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_name
+ *
+ * Purpose:     Gets the name of a file.
+ *
+ * Return:      Success:        Ptr to the name of a file.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+file_name (obj_t _self) {
+
+   return MYCLASS(_self)->name;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_file
+ *
+ * Purpose:     Returns the DBfile associated with the object.
+ *
+ * Return:      Success:        Ptr to the DBfile
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+DBfile *
+file_file (obj_t _self) {
+
+   if (!_self || C_FILE!=_self->pub.cls) return NULL;
+   return MYCLASS(_self)->f;
+}
+
+/*---------------------------------------------------------------------------
+ * Function:    fix_objdups
+ *
+ * Purpose:     If the DBobject has multiple fields with the same name
+ *              then the second and subsequent fields are renamed by
+ *              appending a unique string.  These changes are destructive.
+ *
+ * Return:      Input argument.
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, May 19, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static DBobject *
+fix_objdups(DBobject *obj)
+{
+    char        **new_names, suffix[32];
+    int         i, j, occur;
+    
+    if (!obj) return NULL;
+    new_names = calloc(obj->ncomponents, sizeof(char*));
+
+    /* Look for duplicates and generate new names */
+    for (i=1; i<obj->ncomponents; i++) {
+        for (j=0, occur=1; j<i; j++) {
+            if (!strcmp(obj->comp_names[i], obj->comp_names[j])) occur++;
+        }
+        if (occur>1) {
+            if (1==occur%10 && 11!=occur) {
+                sprintf(suffix, " [%dst occurrence]", occur);
+            } else if (2==occur%10 && 12!=occur) {
+                sprintf(suffix, " [%dnd occurrence]", occur);
+            } else if (3==occur%10 && 13!=occur) {
+                sprintf(suffix, " [%drd occurrence]", occur);
+            } else {
+                sprintf(suffix, " [%dth occurrence]", occur);
+            }
+            new_names[i] = malloc(strlen(obj->comp_names[i])+strlen(suffix)+1);
+            strcpy(new_names[i], obj->comp_names[i]);
+            strcat(new_names[i], suffix);
+        }
+    }
+    
+    /* Replace old names with new names */
+    for (i=0; i<obj->ncomponents; i++) {
+        if (new_names[i]) {
+            free(obj->comp_names[i]);
+            obj->comp_names[i] = new_names[i];
+        }
+    }
+
+    return obj;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetObject
+ *
+ * Purpose:     Reads a SILO DBobject from the specified database and
+ *              returns an object which can be printed nicely.  The
+ *              new object is a structure whose fields are named according
+ *              to the `comp_names' field of DBobject and whose values
+ *              are based on the `pdb_names' field.  However, values that
+ *              have type information like `<i>50' are converted to a
+ *              numeric type.
+ *
+ *              The first few fields point to things like the DBobject,
+ *              its name and type, and extra information about each field.
+ *
+ * Return:      Success:        Ptr to a new object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 31 1997
+ *
+ * Modifications:
+ *              Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *              I changed strdup to safe_strdup.
+ *
+ *              Robb Matzke, 2000-01-13
+ *              Since we're building the datatype for these things on the fly
+ *              we have to watch out for alignment constraints. We'll just
+ *              assume that an object whose size is N must be aligned on a
+ *              byte which is divisible by N.
+ *
+ *              Brad Whitlock, Thu Jan 20 18:01:32 PST 2000
+ *              Added support for double precision components.
+ *
+ *              Robb Matzke, 2000-05-23
+ *              If `$lowlevel' is `3' then only the true DBObject type
+ *              information is returned. This can sometimes speed up the
+ *              `diff' operator.  The values of $lowlevel are:
+ *
+ *                      0, 1, or unset: spontaneous members
+ *                      2:              spontaneous and original members
+ *                      3:              original members
+ *
+ *              The original members are the `comp_names' and `pdb_names'
+ *              character string arrays which are stored in the file. The
+ *              spontaneous members are created by taking the comp_names
+ *              strings as names of members of a compound datatype and the
+ *              corresponding pdb_names string as an encoded value which
+ *              is translated into a string, integer, etc.
+ *-------------------------------------------------------------------------
+ */
+static void *
+browser_DBGetObject (DBfile *file, char *name, obj_t *type_ptr)
+{
+    DBobject    *obj=NULL;
+    char        *b_obj=NULL, *s=NULL;
+    int         i, need, offset, *flags=NULL, field_size;
+    obj_t       type=NIL;
+    int         lowlevel;
+
+    obj = DBGetObject(file, name);
+    if (!obj) return NULL;
+
+    /*
+     * Determine the value of the `$lowlevel' variable.  If it is large
+     * enough, then the user wants really low level info, so we give him
+     * the raw DBobject and our `flags' as fields of the structure.
+     */
+    lowlevel = sym_bi_true("lowlevel");
+
+    /*
+     * Count the space we need. The four void pointers are and the following
+     * integer are properly aligned. We have to explicitly align all that
+     * follows.
+     */
+    need = 4 * sizeof(void*) + sizeof (int);    /*header fields*/
+    if (lowlevel<3) {
+        obj = fix_objdups(obj);
+        for (i=0; i<obj->ncomponents; i++) {
+            if (!strncmp("'<i>", obj->pdb_names[i], 4)) {
+                field_size = sizeof(int);
+            } else if (!strncmp("'<f>", obj->pdb_names[i], 4)) {
+                field_size = sizeof(double);
+            } else if (!strncmp("'<d>", obj->pdb_names[i], 4)) {
+                field_size = sizeof(double);
+            } else if (!strncmp ("'<s>", obj->pdb_names[i], 4)) {
+                field_size = sizeof(char*);
+            } else {
+                field_size = sizeof(char*);
+            }
+
+            while (need % field_size) need++;
+            need += field_size;
+        }
+    }
+
+    /*
+     * Allocate the new object and fill in the header fields. The first five
+     * fields (four pointers and an integer) are properly aligned when packed.
+     */
+    assert(sizeof(char*)==sizeof(void*));
+    b_obj = malloc (need);
+    *((DBobject**)b_obj) = obj;
+    *((char**)(b_obj+sizeof(void*))) = obj->name;
+    *((char**)(b_obj+2*sizeof(void*))) = obj->type;
+    flags = calloc (obj->ncomponents, sizeof(int));
+    *((int**)(b_obj+3*sizeof(void*))) = flags;
+    *((int*)(b_obj+4*sizeof(void*))) = obj->ncomponents;
+    offset = 4 * sizeof(void*) + sizeof(int);
+    type = obj_new (C_STC, NULL, NULL);
+    
+    if (lowlevel>=2) {
+        stc_add (type, obj_new (C_PTR,obj_new(C_STR,"DBobject")), 0, "raw");
+    }
+    if (lowlevel<3) {
+        stc_add (type, obj_new (C_PRIM, "string"), 1*sizeof(char*), "name");
+        stc_add (type, obj_new (C_PRIM, "string"), 2*sizeof(char*), "type");
+    }
+    
+    /*
+     * Fill in all the value fields.  If a value should be freed later
+     * then the flags will be set to 0x00000001. Care is taken to make sure
+     * that the fields we're defining on the fly are properly aligned.
+     */
+    if (lowlevel<3) {
+        for (i=0; i<obj->ncomponents; i++) {
+
+            if (!strncmp("'<i>", obj->pdb_names[i], 4)) {
+                /*
+                 * The value is an integer of some type.  Store the
+                 * integer, not the string, so the user can say things like
+                 * `typeof x.y' and get `int' instead of `string'.  Even at
+                 * the low level, Eric would like this hidden.
+                 */
+                flags[i] = 0;
+                while (offset % sizeof(int)) offset++;
+                *((int*)(b_obj+offset)) = strtol(obj->pdb_names[i]+4, NULL, 0);
+                stc_add(type, obj_new(C_PRIM, "int"), offset,
+                        obj->comp_names[i]);
+                offset += sizeof(int);
+
+            } else if (!strncmp("'<f>", obj->pdb_names[i], 4) ||
+                       !strncmp("'<d>", obj->pdb_names[i], 4)) {
+                /*
+                 * The value is a float or double.  We store it as double for
+                 * the same reasons as <i> above.
+                 */
+                flags[i] = 0;
+                while (offset % sizeof(double)) offset++;
+                *((double*)(b_obj+offset)) = strtod(obj->pdb_names[i]+4, NULL);
+                stc_add(type, obj_new(C_PRIM, "double"), offset,
+                        obj->comp_names[i]);
+                offset += sizeof(double);
+
+            } else if (!strncmp ("'<s>", obj->pdb_names[i], 4)) {
+                /*
+                 * The value is a string, but the user should see only the
+                 * part after the type.  Remember to get rid of the trailing
+                 * single quote.
+                 */
+                flags[i] = 1;
+                while (offset % sizeof(char*)) offset++;
+                s = safe_strdup(obj->pdb_names[i]+4);
+                *((char**)(b_obj+offset)) = s;
+                if (*s) s[strlen(s)-1] = '\0';
+                stc_add(type, obj_new(C_PRIM, "string"), offset,
+                        obj->comp_names[i]);
+                offset += sizeof(char*);
+
+            } else {
+                /*
+                 * Either we don't recognize the type specifier or there is
+                 * none.  We treat the entire value like a string.
+                 */
+                flags[i] = 1;
+                while (offset % sizeof(char*)) offset++;
+                *((char**)(b_obj+offset)) = safe_strdup(obj->pdb_names[i]);
+                stc_add(type, obj_new(C_PRIM, "string"), offset,
+                        obj->comp_names[i]);
+                offset += sizeof(char*);
+            }
+        }
+    }
+
+    *type_ptr = type;
+    return b_obj;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBSaveObject
+ *
+ * Purpose:     Writes a DBobject over the top of some already existing
+ *              DBobject.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *    Brad Whitlock, Thu Jan 20 17:59:59 PST 2000
+ *    Added support for double precision components.
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+browser_DBSaveObject (obj_t _self, char *unused, void *mem, obj_t type) {
+
+   obj_file_t   *self = MYCLASS(_self);
+   char         *b_obj = (char*)mem;
+   DBobject     *obj = *((DBobject**)b_obj);
+   int          i, n, offset, nerrors=0, nchanges=0;
+   char         *s, buf[64];
+   double       d;
+   obj_t        comp_name;
+
+   if (self->rdonly) {
+      out_errorn ("file `%s' is read-only", self->name);
+      return -1;
+   }
+
+   for (i=0; i<obj->ncomponents; i++) {
+      comp_name = obj_new (C_SYM, obj->comp_names[i]);
+      offset = stc_offset (type, comp_name);
+      comp_name = obj_dest (comp_name);
+
+      if (offset<0) {
+         out_errorn ("browser_DBPutObject: cannot find the structure byte "
+                     "offset for field `%s'", obj->comp_names[i]);
+         nerrors++;
+         continue;
+      }
+
+      if (!strncmp ("'<i>", obj->pdb_names[i], 4)) {
+         n = *((int*)(b_obj+offset));
+         sprintf (buf, "'<i>%d'", n);
+         if (strcmp (obj->pdb_names[i], buf)) {
+            free (obj->pdb_names[i]);
+            obj->pdb_names[i] = safe_strdup (buf);
+            nchanges++;
+         }
+
+      } else if (!strncmp ("'<f>", obj->pdb_names[i], 4)) {
+         d = *((double*)(b_obj+offset));
+         sprintf (buf, "'<f>%g'", d);
+         if (strcmp (obj->pdb_names[i], buf)) {
+            free (obj->pdb_names[i]);
+            obj->pdb_names[i] = safe_strdup (buf);
+            nchanges++;
+         }
+
+      } else if (!strncmp ("'<d>", obj->pdb_names[i], 4)) {
+         d = *((double*)(b_obj+offset));
+         sprintf (buf, "'<d>%.30g'", d);
+         if (strcmp (obj->pdb_names[i], buf)) {
+            free (obj->pdb_names[i]);
+            obj->pdb_names[i] = safe_strdup (buf);
+            nchanges++;
+         }
+
+      } else if (!strncmp ("'<s>", obj->pdb_names[i], 4)) {
+         s = *((char**)(b_obj+offset));
+         if (strncmp(obj->pdb_names[i]+4, s, strlen(s))) {
+            free (obj->pdb_names[i]);
+            obj->pdb_names[i] = malloc (strlen(s)+5);
+            strcpy (obj->pdb_names[i], "'<s>");
+            strcpy (obj->pdb_names[i]+4, s);
+            nchanges++;
+         }
+
+      } else {
+         s = *((char**)(b_obj+offset));
+         if (strcmp(obj->pdb_names[i], s)) {
+            free (obj->pdb_names[i]);
+            obj->pdb_names[i] = safe_strdup (s);
+            nchanges++;
+         }
+      }
+   }
+
+   return DBChangeObject (file_file(_self), obj);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetMultimeshadj
+ *
+ * Purpose:     Deal with non-standard get-API for DBmultimeshadj objects 
+ *
+ * Return:      DBmultimeshadj 
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 24, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+static DBmultimeshadj*
+browser_DBGetMultimeshadj(DBfile *file, char *name)
+{
+    return DBGetMultimeshadj(file, name, 0, NULL);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeObject
+ *
+ * Purpose:     Frees a modified SILO DBobject which was created with the
+ *              browser_DBGetObject function.  The underlying DBobject
+ *              is freed as are any fields whose flag value has the least
+ *              significant bit set.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 31 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+browser_DBFreeObject (void *mem, obj_t type) {
+
+   char         *b_obj = (char*)mem;
+   DBobject     *obj=NULL;
+   int          i, n, *flags=NULL, offset;
+   void         *comp_mem=NULL;
+   obj_t        comp_name=NIL;
+
+   if (!mem) return;
+   obj = *((DBobject**)b_obj);
+   flags = *((int**)(b_obj+3*sizeof(void*)));
+   n = *((int*)(b_obj+4*sizeof(void*)));
+
+   for (i=0; i<n; i++) {
+      if (0 == (flags[i] & 0x01)) continue; /*no memory to free*/
+      comp_name = obj_new (C_SYM, obj->comp_names[i]);
+      offset = stc_offset (type, comp_name);
+      if (offset<0) continue; /*field doesn't exist!*/
+      comp_mem = *((void**)(b_obj+offset));
+      if (comp_mem) free (comp_mem);
+   }
+
+   free (flags);
+   DBFreeObject (obj);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetCompoundarray
+ *
+ * Purpose:     Reads a SILO DBcompoundarray from the specified database and
+ *              returns an object which can be printed nicely.
+ *
+ * Return:      Success:        Ptr to a new object
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Feb  5 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+browser_DBGetCompoundarray (DBfile *file, char *name, obj_t *type_ptr) {
+
+   DBcompoundarray      *ca;
+   char                 **b_ca;
+   char                 buf[64];
+   int                  i, at, nbytes;
+   obj_t                type=NIL, tmp=NIL;
+
+   /*
+    * Read the compound array and create a browser compound array.  The
+    * first entry in the browser compound array points to the beginning
+    * of the silo compound array so we can free it later.
+    */
+   ca = DBGetCompoundarray (file, name);
+   if (!ca) return NULL;
+   b_ca = calloc (ca->nelems+7, sizeof(char*));
+   type = obj_new (C_STC, NULL, NULL);
+   b_ca[0] = (char*)ca;
+
+   /*
+    * The browser compound array should point to the silo compound array
+    * fields so that modifying the browser object actually modifies the
+    * silo object.
+    */
+   b_ca[1] = ca->name;
+   stc_add (type, obj_new(C_PRIM, "string"),
+            1*sizeof(char*), "name");
+
+   b_ca[2] = (char*)&(ca->id);
+   stc_add (type, obj_new(C_PTR, obj_new(C_PRIM, "int")),
+            2*sizeof(char*), "id");
+
+   b_ca[3] = (char*)&(ca->nelems);
+   stc_add (type, obj_new(C_PTR, obj_new(C_PRIM, "int")),
+            3*sizeof(char*), "nelems");
+
+   b_ca[4] = (char*)&(ca->nvalues);
+   stc_add (type, obj_new(C_PTR, obj_new(C_PRIM, "int")),
+            4*sizeof(char*), "nvalues");
+
+   b_ca[5] = (char*)&(ca->datatype);
+   tmp = obj_new (C_PRIM, "int");
+   prim_set_io_assoc (tmp, PA_DATATYPE);
+   stc_add (type, obj_new(C_PTR, tmp), 5*sizeof(char*), "datatype");
+   tmp = NIL;
+
+   tmp = obj_new (C_PRIM, "int");
+   obj_bind (tmp, NULL);
+   b_ca[6] = (char*)ca->elemlengths;
+   sprintf (buf, "%d", ca->nelems);
+   stc_add (type, obj_new(C_PTR, obj_new(C_ARY, buf, obj_copy(tmp,SHALLOW))),
+            6*sizeof(char*), "elemlengths");
+   tmp = NIL;
+
+   /*
+    * Create the array base type.
+    */
+   sprintf (buf, "%d", ca->datatype);
+   tmp = obj_new (C_PRIM, buf);
+   obj_bind (tmp, NULL);
+   nbytes = obj_sizeof(tmp);
+   assert (nbytes>0);
+
+   /*
+    * Create browser entries for each of the sub arrays.
+    */
+   for (i=at=0; i<ca->nelems; i++) {
+      b_ca[7+i] = (char*)(ca->values) + at * nbytes;
+      if (1==ca->elemlengths[i]) {
+         stc_add (type, obj_new (C_PTR, obj_copy (tmp, SHALLOW)),
+                  (i+7)*sizeof(char*), ca->elemnames[i]);
+      } else {
+         sprintf (buf, "%d", ca->elemlengths[i]);
+         stc_add (type, obj_new (C_PTR,
+                                 obj_new (C_ARY, buf, obj_copy(tmp,SHALLOW))),
+                  (i+7)*sizeof(char*), ca->elemnames[i]);
+      }
+      at += ca->elemlengths[i];
+   }
+
+   /*
+    * Sort the sub arrays into alphabetical order, but don't sort the
+    * first five entries because they are part of the entire compound
+    * array.
+    */
+   stc_sort (type, 6);
+
+
+   /*
+    * Free temp data and return
+    */
+   tmp = obj_dest (tmp);
+   *type_ptr = type;
+   return b_ca;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeCompoundarray
+ *
+ * Purpose:     Frees a browser compound array and the silo compound array
+ *              to which it points.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Feb  5 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeCompoundarray (void *mem, obj_t type) {
+
+   char                 *b_ca = (char*)mem;
+   DBcompoundarray      *ca;
+
+   if (!b_ca) return;
+   ca = *((DBcompoundarray**)b_ca);
+   if (!ca) return;
+   DBFreeCompoundarray (ca);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetDirectory
+ *
+ * Purpose:     Reads a directory.
+ *
+ * Return:      Success:        Ptr to a new DBDirectory type.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+browser_DBGetDirectory (DBfile *file, char *name)
+{
+   char         cwd[1024];
+   toc_t        *toc;
+   int          nentries=0, i;
+   DBdirectory  *dir;
+
+   if (DBGetDir (file, cwd)<0) return NULL;
+   if (DBSetDir (file, name)<0) return NULL;
+   toc = browser_DBGetToc (file, &nentries, sort_toc_by_type);
+   if (DBSetDir (file, cwd)<0) return NULL;
+
+   dir = calloc (1, sizeof(DBdirectory));
+   dir->nsyms = nentries;
+   dir->toc = toc;
+   if (nentries) dir->entry_ptr = calloc (nentries, sizeof (toc_t *));
+   for (i=0; i<nentries; i++) {
+      dir->entry_ptr[i] = dir->toc + i;
+   }
+   return dir;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBGetSubarray
+ *
+ * Purpose:     Creates a browser object and associated type for one
+ *              subarray from an array.
+ *
+ * Return:      Success:        Ptr to a browser object which also points
+ *                              to the compound array from which it is
+ *                              derived.  DO NOT FREE THE COMPOUND ARRAY
+ *                              since that array is freed automatically
+ *                              when this browser subarray object is
+ *                              freed.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  5 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+browser_DBGetSubarray (DBcompoundarray *ca, int elmtno, obj_t *type_ptr) {
+
+   char         **b_ca;
+   obj_t        type=NIL;
+   int          i, at, nbytes;
+   char         buf[64];
+
+   assert (ca);
+   assert (elmtno>=0 && elmtno<ca->nelems);
+
+   b_ca = calloc (2, sizeof(char*));
+   b_ca[1] = (char*)ca;
+
+   /*
+    * Create a type for the subarray.
+    */
+   sprintf (buf, "%d", ca->datatype);
+   type = obj_new (C_PRIM, buf);
+   obj_bind (type, NULL);
+   nbytes = obj_sizeof(type);
+   assert (nbytes>0);
+
+   /*
+    * Where does this subarray start?
+    */
+   for (i=at=0; i<elmtno; i++) at += ca->elemlengths[i];
+   b_ca[0] = (char*)(ca->values) + at*nbytes;
+
+   /*
+    * And what type is it?
+    */
+   if (1==ca->elemlengths[elmtno]) {
+      type = obj_new (C_PTR, type);
+   } else {
+      sprintf (buf, "%d", ca->elemlengths[elmtno]);
+      type = obj_new (C_PTR, obj_new (C_ARY, buf, type));
+   }
+
+   *type_ptr = type;
+   return b_ca;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeSubarray
+ *
+ * Purpose:     Frees a compound array subarray and the associated compound
+ *              array.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  5 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeSubarray (void *mem, obj_t type) {
+
+   char                 *b_ca = (char*)mem;
+   DBcompoundarray      *ca;
+
+   if (!b_ca) return;
+   ca = *((DBcompoundarray**)(b_ca+sizeof(void*)));
+   if (!ca) return;
+   DBFreeCompoundarray (ca);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeDefvars
+ *
+ * Purpose:     Frees a DBdefvars
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 9, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeDefvars (void *mem, obj_t type) {
+
+   DBFreeDefvars ((DBdefvars*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeCsgmesh
+ *
+ * Purpose:     Frees a DBcsgmesh
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 9, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeCsgmesh (void *mem, obj_t type) {
+
+   DBFreeCsgmesh ((DBcsgmesh*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeCsgvar
+ *
+ * Purpose:     Frees a DBcsgvar
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 9, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeCsgvar (void *mem, obj_t type) {
+
+   DBFreeCsgvar ((DBcsgvar*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeCSGZonelist
+ *
+ * Purpose:     Frees a DBcsgzonelist
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 9, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeCSGZonelist (void *mem, obj_t type) {
+
+   DBFreeCSGZonelist ((DBcsgzonelist*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeCurve
+ *
+ * Purpose:     Frees a DBcurve
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeCurve (void *mem, obj_t type) {
+
+   DBFreeCurve ((DBcurve*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMultimesh
+ *
+ * Purpose:     Frees a DBmultimesh.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMultimesh (void *mem, obj_t type) {
+
+   DBFreeMultimesh ((DBmultimesh*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMultimeshadj
+ *
+ * Purpose:     Frees a DBmultimeshadj.
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              August 24, 2005 
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMultimeshadj (void *mem, obj_t type) {
+
+   DBFreeMultimeshadj ((DBmultimeshadj*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMultivar
+ *
+ * Purpose:     Frees a DBmultivar
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMultivar (void *mem, obj_t type) {
+
+   DBFreeMultivar ((DBmultivar*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMultimat
+ *
+ * Purpose:     Frees a browser_DBmultimat
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller
+ *              April 21, 2005 
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMultimat (void *mem, obj_t type) {
+
+   DBFreeMultimat((DBmultimat*) mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMultimatspecies
+ *
+ * Purpose:     Frees a DBmultimatspecies
+ *
+ * Return:      void
+ *
+ * Programmer:  Jeremy S.Meredith
+ *              Sept 17 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMultimatspecies (void *mem, obj_t type) {
+
+   DBFreeMultimatspecies((DBmultimatspecies*) mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeQuadmesh
+ *
+ * Purpose:     Frees a DBquadmesh.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeQuadmesh (void *mem, obj_t type) {
+
+   DBFreeQuadmesh ((DBquadmesh*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeQuadvar
+ *
+ * Purpose:     Frees a DBquadvar.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeQuadvar (void *mem, obj_t type) {
+
+   DBFreeQuadvar ((DBquadvar*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeUcdmesh
+ *
+ * Purpose:     Frees a DBucdmesh.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeUcdmesh (void *mem, obj_t type) {
+
+   DBFreeUcdmesh ((DBucdmesh*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeUcdvar
+ *
+ * Purpose:     Frees a DBucdvar
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeUcdvar (void *mem, obj_t type) {
+
+   DBFreeUcdvar ((DBucdvar*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreePointmesh
+ *
+ * Purpose:     Frees a DBpointmesh
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreePointmesh (void *mem, obj_t type) {
+
+   DBFreePointmesh ((DBpointmesh*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMeshvar
+ *
+ * Purpose:     Frees a DBmeshvar
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMeshvar (void *mem, obj_t type) {
+
+   DBFreeMeshvar ((DBmeshvar*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMaterial
+ *
+ * Purpose:     Frees a DBmaterial
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMaterial (void *mem, obj_t type) {
+
+   DBFreeMaterial ((DBmaterial*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeMatspecies
+ *
+ * Purpose:     Frees a DBmatspecies
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeMatspecies (void *mem, obj_t type) {
+
+   DBFreeMatspecies ((DBmatspecies*)mem);
+}
+
+/*ARGSUSED*/
+static void 
+browser_DBFreeMrgtree(void *mem, obj_t type) {
+   DBFreeMrgtree ((DBmrgtree*)mem);
+}
+
+/*ARGSUSED*/
+static void 
+browser_DBFreeGroupelmap(void *mem, obj_t type) {
+   DBFreeGroupelmap ((DBgroupelmap*)mem);
+}
+
+/*ARGSUSED*/
+static void 
+browser_DBFreeMrgvar(void *mem, obj_t type) {
+   DBFreeMrgvar ((DBmrgvar*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeVar
+ *
+ * Purpose:     Frees a silo variable.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Mar  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+browser_DBFreeVar (void *mem, obj_t type) {
+
+   if (type && C_PRIM==type->pub.cls &&
+       !strcmp(obj_name(type), "string")) {
+      /*
+       * Free the string too
+       */
+      char *s = *((char**)mem);
+      if (s) free (s);
+   }
+
+   free (mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeDirectory
+ *
+ * Purpose:     Frees a directory struct.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+browser_DBFreeDirectory (void *mem, obj_t type)
+{
+   DBdirectory  *dir = (DBdirectory *)mem;
+   int          i;
+
+   for (i=0; i<dir->nsyms; i++) {
+      free (dir->toc[i].name);
+   }
+   free (dir->entry_ptr);
+   free (dir->toc);
+   free (dir);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeFacelist
+ *
+ * Purpose:     Frees a facelist struct
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, January 14, 2000
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+static void
+browser_DBFreeFacelist(void *mem, obj_t type)
+{
+    DBFreeFacelist((DBfacelist*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreeZonelist
+ *
+ * Purpose:     Frees a zonelist struct
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, January 14, 2000
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+static void
+browser_DBFreeZonelist(void *mem, obj_t type)
+{
+    DBFreeZonelist((DBzonelist*)mem);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBFreePHZonelist
+ *
+ * Purpose:     Frees a phzonelist struct
+ *
+ * Return:      void
+ *
+ * Programmer:  Mark C. Miller 
+ *              Wednesday, July 28, 2004
+ *
+ *-------------------------------------------------------------------------*/
+/* ARGSUSED */
+static void
+browser_DBFreePHZonelist(void *mem, obj_t type)
+{
+    DBFreePHZonelist((DBphzonelist*)mem);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    browser_DBSaveVar
+ *
+ * Purpose:     Rewrites a changed variable to the file.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 1999-07-15
+ *              If the datatype is primitive 'string' then treat it as if it
+ *              were a null terminated array of characters.
+ *-------------------------------------------------------------------------
+ */
+static int
+browser_DBSaveVar (obj_t _self, char *name, void *mem, obj_t type)
+{
+    obj_file_t     *self = MYCLASS(_self);
+    int             dims[NDIMS], ndims;
+    int             status, datatype;
+    DBdatatype      silotype;
+    DBfile         *dbfile = file_file(_self);
+
+    if (self->rdonly)
+    {
+        out_errorn("file `%s' is read-only", self->name);
+        return -1;
+    }
+    if (!type)
+    {
+        out_errorn("browser_DBSaveVar: cannot save %s (no type info)", name);
+        return -1;
+    }
+    if (C_PRIM == type->pub.cls)
+    {
+        silotype = prim_silotype(type);
+        if (C_PRIM == type->pub.cls)
+        {
+            silotype = prim_silotype(type);
+            if (DB_NOTYPE == silotype && obj_name(type) &&
+                !strcmp(obj_name(type), "string"))
+            {
+                /* A string */
+                silotype = DB_CHAR;
+                mem = *((char **)mem);
+                dims[0] = strlen((char *)mem) + 1;
+            } else if (DB_CHAR == silotype)
+            {
+                /* An array of characters (a.k.a., silo string) */
+                mem = *((char **)mem);
+                dims[0] = strlen((char *)mem) + 1;
+            } else
+            {
+                dims[0] = 1;
+            }
+        }
+        status = DBWrite(dbfile, name, mem, dims, 1, silotype);
+        if (status < 0)
+        {
+            out_errorn("browser_DBSaveVar: cannot save %s", name);
+            return -1;
+        }
+    } else
+    {
+        datatype = DBGetVarType(dbfile, name);
+        ndims = DBGetVarDims(dbfile, name, NDIMS, dims);
+        status = DBWrite(dbfile, name, mem, dims, ndims, datatype);
+        if (status < 0)
+        {
+            out_errorn("browser_DBSaveVar: cannot save %s", name);
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_deref_DBdirectory
+ *
+ * Purpose:     Dereferences a directory.  If one says `foo.bar' where
+ *              `foo' is a directory and `bar' is a member of the directory
+ *              then the return value is the same as if one had said
+ *              `foo/bar'.
+ *
+ * Return:      Success:        Ptr to an object in the directory.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Aug 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static obj_t
+file_deref_DBdirectory (obj_t _self, int argc, obj_t argv[])
+{
+   DBdirectory  *dir;
+   int          i;
+   char         *name=NULL, buf[4096];
+   obj_t        retval=NIL, tmp_argv[1];
+
+   dir = sdo_mem (_self);
+   name = obj_name (argv[0]);
+
+   /*
+    * Watch out for special names that might not appear in the
+    * table of contents.
+    */
+   if (!strcmp(name, ".")) {
+      return obj_copy (_self, SHALLOW);
+   }
+
+   /*
+    * Now look for normal names.
+    */
+   for (i=0; i<dir->nsyms; i++) {
+      if (!strcmp(dir->toc[i].name, name)) {
+         sprintf (buf, "%s/%s", obj_name(_self), name);
+         tmp_argv[0] = obj_new (C_STR, buf);
+         retval = file_deref (sdo_file(_self), 1, tmp_argv);
+         tmp_argv[0] = obj_dest (tmp_argv[0]);
+         return retval;
+      }
+   }
+
+   out_errorn ("not a directory member: %s", name);
+   return NIL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_deref
+ *
+ * Purpose:     Loads a silo object from a file.  SELF is the file and
+ *              VARNAME is a symbol or variable name.
+ *
+ * Return:      Success:        PTR to a C_SDO silo data object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 31 Jan 1997
+ *      When reading a DBobject silo thingy, we do so with browser_DBGetObject
+ *      which is a wrapper around the silo DBGetObject function that creates
+ *      a data type that's more user friendly and will support assignments
+ *      directly to the object.
+ *
+ *      Robb Matzke, 31 Jan 1997
+ *      If `$lowlevel' is set and the object can't be loaded with a
+ *      call to DBGetObject then we try to read the object as a miscellaneous
+ *      silo variable.
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The prototype changed, but the functionality remains the same.
+ *
+ *      Robb Matzke, 21 Feb 1997
+ *      A `savefunc' can be registered with the silo data object and that
+ *      function is invoked if the object is dirty when it is destroyed.
+ *
+ *      Jeremy Meredith, Sept 21 1998
+ *      Added support for multi-block material species.
+ *
+ *      Robb Matzke, 2000-05-23
+ *      The documentation for DBGetToc() mentions that the returned
+ *      pointer could be rendered invalid by calling any silo function.
+ *      Therefore, we call DBGetToc() each time we call some silo function.
+ *
+ *      Robb Matzke, 2000-05-24
+ *      Fixed bugs when dereferencing "/" in the file.
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+file_deref (obj_t _self, int argc, obj_t argv[]) {
+
+    obj_file_t  *self = MYCLASS(_self);
+    char        *name=NULL, *orig=NULL, cwd[1024], fullname[1024];
+    char        path[1024], *base=NULL, buf[1024];
+    char        *typename=NULL;
+    DBfile      *file=NULL;
+    DBtoc       *toc=NULL;
+    void        *r_mem=NULL;
+    obj_t       type=NIL, retval=NIL, in=NIL, tmp=NIL;
+    obj_t       varname=NIL;
+    void        (*freefunc)(void*, obj_t)=NULL;
+    void        *(*loadfunc)(DBfile*,char*)=NULL;
+    int         (*savefunc)(obj_t,char*,void*,obj_t)=NULL;
+    obj_t       (*dereffunc)(obj_t,int,obj_t[])=NULL;
+    int         i, j, datatype, nelmts, ndims, dims[NDIMS];
+    lex_t       *lex_in=NULL;
+    DBobject    *obj=NULL;
+
+    if (1!=argc) {
+        out_errorn("file_deref: wrong number of arguments");
+        return NIL;
+    }
+    varname = argv[0];
+
+    assert(self && varname);
+    assert(C_FILE==self->pub.cls);
+    assert(C_SYM==varname->pub.cls || C_STR==varname->pub.cls);
+
+    if (NULL==(name=orig=obj_name(varname))) {
+        out_errorn ("file_deref: no variable name specified");
+        return NIL;
+    }
+    file = self->f;
+
+    /*
+     * If the name doesn't start with `/' then create the full name.
+     */
+    if (DBGetDir(file, cwd)<0) return NIL;
+    if ('/'!=name[0]) {
+        if (!strcmp(cwd, "/")) {
+            sprintf(fullname, "/%s", name);
+        } else {
+            sprintf(fullname, "%s/%s", cwd, name);
+        }
+        name = fullname;
+    }
+
+
+    /*
+     * Split the name into a path and base name.
+     */
+    base = strrchr(name, '/');
+    strncpy(path, name, base-name);
+    path[base-name] = '\0';
+    base++ ;    /*skip the `/'*/
+
+    /*
+     * If the name ended with a slash or it is "." or ".." then it must
+     * be a directory.
+     */
+    if (!base || !base[0] || !strcmp(base, ".") || !strcmp(base, "..")) {
+        if (NULL==(r_mem = browser_DBGetDirectory(file, name))) {
+            return NIL;
+        }
+        savefunc = NULL;
+        freefunc = browser_DBFreeDirectory;
+        dereffunc = file_deref_DBdirectory;
+        typename = "DBdirectory";
+        goto done;
+    }
+
+    /*
+     * Temporarily change to the specified directory so the table of
+     * contents is loaded. According to DBGetToc() comments we should
+     * request the table of contents each time we make a silo call.
+     */
+    if (DBSetDir(file, path[0]?path:"/")<0) return NIL;
+    toc = DBGetToc(file);
+    if (!toc) {
+        out_errorn("file_deref: no table of contents for `%s' in `%s'",
+                   path[0]?path:"/", self->name);
+        goto error;
+    }
+
+    if (sym_bi_true("checksums"))
+        DBSetEnableChecksums(1);
+    else
+        DBSetEnableChecksums(0);
+
+    /*
+     * If the user wants low-level information then get that instead of
+     * the normal high-level stuff.
+     */
+    if (sym_bi_true("lowlevel")) {
+        DBShowErrors(DB_SUSPEND, NULL);
+        r_mem = browser_DBGetObject(file, base, &type);
+        DBShowErrors(DB_RESUME, NULL);
+        savefunc = browser_DBSaveObject;
+        freefunc = browser_DBFreeObject;
+        if (r_mem) goto done;
+    }
+    
+    toc = DBGetToc(file); /*insure pointer is valid*/
+    for (i=0; i<toc->ncurve; i++) {
+        if (!strcmp(toc->curve_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetCurve;
+            savefunc = NULL;
+            freefunc = browser_DBFreeCurve;
+            typename = "DBcurve";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->ncsgmesh; i++) {
+        if (!strcmp(toc->csgmesh_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetCsgmesh;
+            savefunc = NULL;
+            freefunc = browser_DBFreeCsgmesh;
+            typename = "DBcsgmesh";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->ncsgvar; i++) {
+        if (!strcmp(toc->csgvar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetCsgvar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeCsgvar;
+            typename = "DBcsgvar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->ndefvars; i++) {
+        if (!strcmp(toc->defvars_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetDefvars;
+            savefunc = NULL;
+            freefunc = browser_DBFreeDefvars;
+            typename = "DBdefvars";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmultimesh; i++) {
+        if (!strcmp(toc->multimesh_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMultimesh;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMultimesh;
+            typename = "DBmultimesh";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmultimeshadj; i++) {
+        if (!strcmp(toc->multimeshadj_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))browser_DBGetMultimeshadj;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMultimeshadj;
+            typename = "DBmultimeshadj";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmultivar; i++) {
+        if (!strcmp(toc->multivar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMultivar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMultivar;
+            typename = "DBmultivar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmultimat; i++) {
+        if (!strcmp(toc->multimat_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMultimat;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMultimat;
+            typename = "DBmultimat";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmultimatspecies; i++) {
+        if (!strcmp(toc->multimatspecies_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMultimatspecies;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMultimatspecies;
+            typename = "DBmultimatspecies";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nqmesh; i++) {
+        if (!strcmp(toc->qmesh_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetQuadmesh;
+            savefunc = NULL;
+            freefunc = browser_DBFreeQuadmesh;
+            typename = "DBquadmesh";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nqvar; i++) {
+        if (!strcmp(toc->qvar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetQuadvar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeQuadvar;
+            typename = "DBquadvar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nucdmesh; i++) {
+        if (!strcmp(toc->ucdmesh_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetUcdmesh;
+            savefunc = NULL;
+            freefunc = browser_DBFreeUcdmesh;
+            typename = "DBucdmesh";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nucdvar; i++) {
+        if (!strcmp(toc->ucdvar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetUcdvar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeUcdvar;
+            typename = "DBucdvar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nptmesh; i++) {
+        if (!strcmp(toc->ptmesh_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetPointmesh;
+            savefunc = NULL;
+            freefunc = browser_DBFreePointmesh;
+            typename = "DBpointmesh";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nptvar; i++) {
+        if (!strcmp(toc->ptvar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetPointvar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMeshvar;
+            typename = "DBmeshvar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmat; i++) {
+        if (!strcmp(toc->mat_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMaterial;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMaterial;
+            typename = "DBmaterial";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmatspecies; i++) {
+        if (!strcmp(toc->matspecies_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMatspecies;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMatspecies;
+            typename = "DBmatspecies";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmrgtrees; i++) {
+        if (!strcmp(toc->mrgtree_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMrgtree;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMrgtree;
+            typename = "DBmrgtree";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->ngroupelmaps; i++) {
+        if (!strcmp(toc->groupelmap_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetGroupelmap;
+            savefunc = NULL;
+            freefunc = browser_DBFreeGroupelmap;
+            typename = "DBgroupelmap";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->nmrgvars; i++) {
+        if (!strcmp(toc->mrgvar_names[i], base)) {
+            loadfunc = (void*(*)(DBfile*,char*))DBGetMrgvar;
+            savefunc = NULL;
+            freefunc = browser_DBFreeMrgvar;
+            typename = "DBmrgvar";
+            goto done;
+        }
+    }
+
+    for (i=0; i<toc->narrays; i++) {
+        if (!strcmp(toc->array_names[i], base)) {
+            if (Verbosity>=2) {
+                out_info("file_deref: loading DBcompoundarray %s:%s",
+                         self->name, name);
+            }
+            r_mem = browser_DBGetCompoundarray(file, base, &type);
+            savefunc = NULL;
+            freefunc = browser_DBFreeCompoundarray;
+            if (r_mem) goto done;
+        }
+    }
+
+    toc = DBGetToc(file); /*insure pointer is valid*/
+    for (i=0; i<toc->ndir; i++) {
+        if (!strcmp(toc->dir_names[i], base)) {
+            if (Verbosity>=2) {
+                out_info("file_deref: loading DBdirectory %s:%s",
+                         self->name, name);
+            }
+            r_mem = browser_DBGetDirectory(file, base);
+            toc = DBGetToc(file); /*insure pointer is valid*/
+            savefunc = NULL;
+            freefunc = browser_DBFreeDirectory;
+            dereffunc = file_deref_DBdirectory;
+            typename = "DBdirectory";
+            if (r_mem) goto done;
+        }
+    }
+
+    for (i=0; i<toc->nvar; i++) {
+        if (!strcmp(toc->var_names[i], base)) {
+            if (Verbosity>=2) {
+                out_info("file_deref: loading variable %s:%s", self->name,
+                         name);
+            }
+            datatype = DBGetVarType(file, base);
+            nelmts   = DBGetVarLength(file, base);
+            ndims    = DBGetVarDims(file, base, NDIMS, dims);
+            r_mem    = DBGetVar(file, base);
+            if (!r_mem) goto error;
+            savefunc = browser_DBSaveVar;
+            freefunc = browser_DBFreeVar;
+
+            if (1==ndims && DB_CHAR==datatype) {
+                /*
+                 * Add a null terminator just to be sure.  Also make the data
+                 * a pointer to a string instead of the string itself.
+                 */
+                char **s_ptr = malloc(sizeof(char*));
+                *s_ptr = malloc(nelmts+1);
+                memcpy(*s_ptr, r_mem, nelmts);
+                (*s_ptr)[nelmts] = '\0';
+                free(r_mem);
+                r_mem = s_ptr;
+                nelmts = 1;
+                strcpy(buf, "primitive 'string'");
+
+            } else if (1==nelmts) {
+                /*
+                 * Some other primitive type, not a string.
+                 */
+                sprintf(buf, "primitive %d", datatype);
+
+            } else {
+                /*
+                 * An array of non-string primitive types.  We currently don't
+                 * support an array of strings because silo overloads
+                 * `DB_CHAR[]' to mean a string or an array of 8-bit integers.
+                 */
+                strcpy(buf, "array");
+                for (j=0; j<ndims; j++) sprintf(buf+strlen(buf), " %d",
+                                                dims[j]);
+                sprintf(buf+strlen(buf), " (primitive %d)", datatype);
+            }
+
+            lex_in = lex_string(buf);
+            typename = NULL;
+            in = parse_stmt(lex_in, false);
+            lex_in = lex_close(lex_in);
+            type = obj_eval(in);
+            in = obj_dest(in);
+            goto done;
+        }
+        toc = DBGetToc(file); /*insure pointer is valid*/
+    }
+
+    /*
+     * The object was not found.  If it's a component of some compound
+     * array then print a warning message to that effect.
+     */
+    if (!strchr(orig, '/')) {
+        for (i=0; i<toc->narrays; i++) {
+            DBcompoundarray *ca = DBGetCompoundarray(file,
+                                                     toc->array_names[i]);
+            assert(ca);
+            for (j=0; ca && j<ca->nelems; j++) {
+                if (!strcmp(ca->elemnames[j], orig)) {
+                    if (r_mem) {
+                        out_errorn("file_deref: `%s' is ambiguous", orig);
+                        browser_DBFreeSubarray(r_mem, type);
+                        r_mem = NULL;
+                        type = obj_dest(type);
+                        goto error;
+                    } else {
+                        r_mem = browser_DBGetSubarray(ca, j, &type);
+                        assert(r_mem);
+                        savefunc = NULL;
+                        freefunc = browser_DBFreeSubarray;
+                    }
+                }
+            }
+            if (r_mem) goto done;
+            toc = DBGetToc(file); /*insure pointer is valid*/
+        }
+    }
+
+    /*
+     * Some objects are special although silo doesn't have a dedicated list
+     * for them in the table of contents.
+     */
+    if ((obj=fix_objdups(DBGetObject(file, base))) && obj->type) {
+        if (!strcmp(obj->type, "facelist")) {
+            loadfunc = (void*(*)(DBfile*, char*))DBGetFacelist;
+            savefunc = NULL;
+            freefunc = browser_DBFreeFacelist;
+            typename = "DBfacelist";
+            goto done;
+        } else if (!strcmp(obj->type, "zonelist")) {
+            loadfunc = (void*(*)(DBfile*, char*))DBGetZonelist;
+            savefunc = NULL;
+            freefunc = browser_DBFreeZonelist;
+            typename = "DBzonelist";
+            goto done;
+        } else if (!strcmp(obj->type, "polyhedral-zonelist")) {
+            loadfunc = (void*(*)(DBfile*, char*))DBGetPHZonelist;
+            savefunc = NULL;
+            freefunc = browser_DBFreePHZonelist;
+            typename = "DBphzonelist";
+            goto done;
+        } else if (!strcmp(obj->type, "csgzonelist")) {
+            loadfunc = (void*(*)(DBfile*, char*))DBGetCSGZonelist;
+            savefunc = NULL;
+            freefunc = browser_DBFreeCSGZonelist;
+            typename = "DBcsgzonelist";
+            goto done;
+        } else if (!strcmp(obj->type, "edgelist")) {
+            out_info("file_deref: edgelists are retrieved with DBGetObject() "
+                     "because there is no DBGetEdgelist() function");
+        }
+    }
+
+    /*
+     * If all else fails then read the object as a DBObject (a low-level
+     * PDB-like data structure).
+     */
+    DBShowErrors(DB_SUSPEND, NULL);
+    r_mem = browser_DBGetObject(file, base, &type);
+    typename = NULL;
+    savefunc = browser_DBSaveObject;
+    freefunc = browser_DBFreeObject;
+    DBShowErrors(DB_RESUME, NULL);
+    if (r_mem) goto done;
+
+    out_errorn("file_deref: `%s' is not a database object in `%s'",
+               name, self->name);
+
+ error:
+    if (obj) {
+        DBFreeObject(obj);
+        obj=NULL;
+    }
+    if (DBSetDir(file, cwd)<0) {
+        out_errorn("file_deref: cannot restore cwd `%s' in `%s'",
+                   cwd, self->name);
+    }
+    return NIL;
+
+ done:
+    assert(r_mem || loadfunc);
+
+    if (obj) {
+        DBFreeObject(obj);
+        obj=NULL;
+    }
+
+    if (!r_mem) {
+        if (Verbosity>=2) {
+            out_info("file_deref: loading %s %s:%s",
+                     typename?typename:"void type", self->name, name);
+        }
+        r_mem = (loadfunc)(file, name);
+        if (!r_mem) goto error;
+    }
+
+    if (DBSetDir(file, cwd)<0) {
+        out_errorn("file_deref: cannot restore cwd `%s' in `%s'",
+                   cwd, self->name);
+    }
+
+    if (typename) {
+        in = obj_new(C_SYM, typename);
+        type = obj_copy(tmp=sym_vboundp(in), DEEP);
+        tmp = obj_dest(tmp);
+        in = obj_dest(in);
+    }
+
+    retval = obj_new(C_SDO, self, name, r_mem, type, r_mem, type,
+                     freefunc, savefunc, dereffunc);
+    type = obj_dest(type);
+
+    /*
+     * Bind the type quantities to actual values.
+     */
+    r_mem = sdo_mem(retval);
+    type = sdo_typeof(retval);
+    if (NIL==obj_bind(type, r_mem)) {
+        out_error("file_deref: problems binding array dimensions", retval);
+        retval = obj_dest(retval);
+    }
+    return retval;
+}
+
+/*---------------------------------------------------------------------------
+ * Description: Determines if the SILO object named NAME matches one or
+ *              more of the DiffOpt.exclude names from the $exclude
+ *              variable.  NAME should be the full name of the object.
+ *
+ * Return:      Non-zero if NAME should be excluded; zero otherwise.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June 29, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static int
+file_exclude(const char *cwd, const char *basename, int type)
+{
+    int                 i, exclude=false;
+    char                fullname[1024];
+
+    if (!DiffOpt.exclude.nused) return false;
+
+    /* Construct full name */
+    strcpy(fullname, cwd);
+    strcat(fullname, basename);
+
+    /* Look at each excluded name */
+    for (i=0; i<DiffOpt.exclude.nused && !exclude; i++) {
+        if (!strncmp(DiffOpt.exclude.value[i], "type:", 5)) {
+            exclude = !strcmp(DiffOpt.exclude.value[i]+5, ObjTypeName[type]);
+        } else {
+#ifdef HAVE_FNMATCH
+            if ('/'==DiffOpt.exclude.value[i][0]) {
+                exclude = !fnmatch(DiffOpt.exclude.value[i], fullname, 0);
+            } else {
+                exclude = !fnmatch(DiffOpt.exclude.value[i], basename, 0);
+            }
+#else
+            if ('/'==DiffOpt.exclude.value[i][0]) {
+                exclude = !strcmp(DiffOpt.exclude.value[i], fullname);
+            } else {
+                exclude = !strcmp(DiffOpt.exclude.value[i], basename);
+            }
+#endif
+        }
+    }
+    return exclude;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    file_diff
+ *
+ * Purpose:     Compares file A and file B.
+ *
+ * Return:      Success:        0:      No differences
+ *                              1:      Some differences
+ *                              2:      Completely different.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *              Robb Matkze, 2000-05-19
+ *              It is possible for browser_DBGetToc() to return NULL if the
+ *              specified directory is empty.
+ *
+ *              Robb Matzke, 2000-06-28
+ *              Handles two-column output style.
+ *-------------------------------------------------------------------------
+ */
+static int
+file_diff (obj_t a, obj_t b)
+{
+    toc_t       *atoc=NULL, *btoc=NULL;
+    DBfile      *afile, *bfile;
+    int         i, j, an, bn, ndiff=0, status;
+    obj_t       sym=NIL, aobj=NIL, bobj=NIL;
+    out_t       *f = OUT_STDOUT;
+    char        a_cwd[1024], b_cwd[1024];
+
+    /* Get the table of contents for each file. */    
+    afile = file_file(a);
+    bfile = file_file(b);
+    assert (afile && bfile);
+    atoc = browser_DBGetToc(afile, &an, sort_toc_by_name);
+    btoc = browser_DBGetToc(bfile, &bn, sort_toc_by_name);
+    assert ((!an || atoc) && (!bn || btoc));
+
+    /* Free any compression resources */
+    DBFreeCompressionResources(afile, 0);
+    DBFreeCompressionResources(bfile, 0);
+
+    /* We may need to know our cwd below. */
+    DBGetDir(afile, a_cwd);
+    if (strcmp(a_cwd,"/")) strcat(a_cwd, "/");
+    DBGetDir(bfile, b_cwd);
+    if (strcmp(b_cwd,"/")) strcat(b_cwd, "/");
+
+    for (i=j=ndiff=0; i<an || j<bn; i++,j++) {
+        out_section(f);
+        if (out_brokenpipe(f)) break;
+
+        /* List the names of objects that appear only in A or
+         * only in B. */
+        while (i<an || j<bn) {
+            while (i<an && (j>=bn || strcmp (atoc[i].name, btoc[j].name)<0)) {
+                out_section(f);
+                if (!file_exclude(a_cwd, atoc[i].name, atoc[i].type)) {
+                    switch (DiffOpt.report) {
+                    case DIFF_REP_ALL:
+                    case DIFF_REP_BRIEF:
+                        if (!DiffOpt.ignore_dels) {
+                            ndiff++;
+                            out_push(f, atoc[i].name);
+                            out_puts(f, "appears only in file A");
+                            out_nl(f);
+                            out_pop(f);
+                        }
+                        break;
+                    case DIFF_REP_SUMMARY:
+                        return 1;
+                    }
+                } else if (Verbosity>=2) {
+                    out_info("excluded %s%s", a_cwd, atoc[i].name);
+                }
+                i++;
+            }
+
+            while (j<bn && (i>=an || strcmp(btoc[j].name, atoc[i].name)<0)) {
+                out_section(f);
+                if (!file_exclude(b_cwd, btoc[j].name, btoc[j].type)) {
+                    switch (DiffOpt.report) {
+                    case DIFF_REP_ALL:
+                        if (!DiffOpt.ignore_adds) {
+                            ndiff++;
+                            out_push(f, btoc[j].name);
+                            if (DiffOpt.two_column) {
+                                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                            }
+                            out_puts(f, "appears only in file B");
+                            out_nl(f);
+                            out_pop(f);
+                        }
+                        break;
+                    case DIFF_REP_BRIEF:
+                        if (!DiffOpt.ignore_adds) {
+                            ndiff++;
+                            out_push(f, btoc[j].name);
+                            out_puts(f, "appears only in file B");
+                            out_nl(f);
+                            out_pop(f);
+                        }
+                        break;
+                    case DIFF_REP_SUMMARY:
+                        return 1;
+                    }
+                } else if (Verbosity>=2) {
+                    out_info("excluded %s%s", b_cwd, btoc[i].name);
+                }
+                j++;
+            }
+            if (i<an && j<bn && !strcmp(atoc[i].name, btoc[j].name)) break;
+        }
+
+        if (i<an && BROWSER_DB_DIR==atoc[i].type &&
+            j<bn && BROWSER_DB_DIR==btoc[j].type) {
+            /* Diff two subdirectories. */
+            out_section(f);
+            assert (0==strcmp (atoc[i].name, btoc[j].name));
+            if (!file_exclude(a_cwd, atoc[i].name, atoc[i].type) &&
+                !file_exclude(b_cwd, btoc[j].name, btoc[j].type)) {
+                if (DBSetDir (afile, atoc[i].name)<0) {
+                    out_errorn ("file_diff: cannot cd to `%s:%s'",
+                                obj_name(a), atoc[i].name);
+                    ndiff++; /*assume different*/
+                } else if (DBSetDir (bfile, btoc[j].name)<0) {
+                    out_errorn ("file_diff: cannot cd to `%s:%s'",
+                                obj_name(b), btoc[j].name);
+                    status = DBSetDir (afile, "..");
+                    assert (status>=0);
+                    ndiff++; /*assume different*/
+                } else {
+                    out_push (f, atoc[i].name);
+                    status = file_diff(a, b);
+                    out_pop (f);
+                    status = DBSetDir (afile, "..");
+                    assert (status>=0);
+                    status = DBSetDir (bfile, "..");
+                    assert (status>=0);
+
+                    if (status) {
+                        ndiff++;
+                        if (DIFF_REP_SUMMARY==DiffOpt.report) return 1;
+                    }
+                }
+            } else if (Verbosity>=2) {
+                out_info("excluded %s%s versus %s%s",
+                         a_cwd, atoc[i].name, b_cwd, btoc[j].name);
+            }
+            
+        } else if (i<an && j<bn) {
+            /* Diff two objects. */            
+            out_section(f);
+            if (!file_exclude(a_cwd, atoc[i].name, atoc[i].type) &&
+                !file_exclude(b_cwd, btoc[j].name, btoc[j].type)) {
+                if (Verbosity>=1) {
+                    char tmp[1024];
+                    strcpy(tmp, "Differencing: ");
+                    strcat(tmp, a_cwd);
+                    strcat(tmp, atoc[i].name);
+                    out_progress (tmp);
+                }
+                sym = obj_new (C_SYM, atoc[i].name);
+                aobj = obj_deref (a, 1, &sym);
+                bobj = obj_deref (b, 1, &sym);
+                sym = obj_dest (sym);
+                out_push (f, atoc[i].name);
+                status = obj_diff (aobj, bobj);
+                if (status) ndiff++;
+
+                switch (DiffOpt.report) {
+                case DIFF_REP_ALL:
+                    if (2==status) {
+                        out_line (f, "***************");
+                        obj_print (aobj, f);
+                        out_line (f, "---------------");
+                        obj_print (bobj, f);
+                        out_line (f, "***************");
+                    }
+                    break;
+                case DIFF_REP_BRIEF:
+                    if (2==status) {
+                        out_puts(f, "different value(s)");
+                        out_nl(f);
+                    }
+                    break;
+                case DIFF_REP_SUMMARY:
+                    if (status) {
+                        out_pop(f);
+                        aobj = obj_dest (aobj);
+                        bobj = obj_dest (bobj);
+                        out_progress(NULL);
+                        return 1;
+                    }
+                    break;
+                }
+
+                out_pop(f);
+                aobj = obj_dest (aobj);
+                bobj = obj_dest (bobj);
+            } else if (Verbosity>=2) {
+                out_info("excluded %s%s versus %s%s",
+                         a_cwd, atoc[i].name, b_cwd, btoc[j].name);
+            }
+        }
+    }
+
+    out_progress (NULL);
+    return ndiff ? 1 : 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function:    file_rdonly
+ *
+ * Purpose:     Determines if the file is read-only.
+ *
+ * Return:      Success:        0 if writable, 1 if read-only.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Jul 29 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+file_rdonly (obj_t _self)
+{
+   obj_file_t   *self = MYCLASS(_self);
+
+   return self->rdonly;
+}
diff --git a/tools/browser/func.c b/tools/browser/func.c
new file mode 100644
index 0000000..5310ee5
--- /dev/null
+++ b/tools/browser/func.c
@@ -0,0 +1,2366 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             func.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Builtin functions.
+ *
+ * Modifications:       
+ *
+ *      Thomas Treadway, Thu Jun  8 16:56:35 PDT 2006
+ *      Modified readline definitions to support new configure macro.
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <config.h>     /*MeshTV configuration record*/
+
+#include <assert.h>
+#include <browser.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#ifdef HAVE_FNMATCH_H
+#  include <fnmatch.h>
+#  ifndef FNM_FILE_NAME
+#     define FNM_FILE_NAME 0
+#  endif
+#endif
+#ifdef HAVE_READLINE_HISTORY
+#  if defined(HAVE_READLINE_HISTORY_H)
+#    include <readline/history.h>
+#  elif defined(HAVE_HISTORY_H)
+#    include <history.h>
+#  else /* !defined(HAVE_HISTORY_H) */
+extern void add_history ();
+extern int write_history ();
+extern int read_history ();
+#  endif /* defined(HAVE_READLINE_HISTORY_H) */
+  /* no history */
+#endif /* HAVE_READLINE_HISTORY */
+#include <stdlib.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+/* Non-posix functions */
+extern FILE *popen (const char *, const char *);
+extern int pclose (FILE*);
+
+/* Global variables. */
+diffopt_t       DiffOpt;
+helptoc_t       HelpFuncToc[25];
+int             NHelpFuncToc;
+helptoc_t       HelpVarToc[50];
+int             NHelpVarToc;
+helptoc_t       HelpOpToc[25];
+int             NHelpOpToc;
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_array
+ *
+ * Purpose:     Creates a new array type.
+ *
+ * Return:      Success:        Ptr to new array type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 30 Jul 1997
+ *      Fixed a bug with the comma disappearing between string arguments.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_array (int argc, obj_t argv[]) {
+
+   char         buf[1024];
+   int          i, at=0;
+   char         *s;
+
+   if (argc<2) {
+      out_errorn ("Array: wrong number of arguments");
+      return NIL;
+   }
+
+   buf[0] = '\0';
+   for (i=0; i<argc-1; i++) {
+      if (argv[i] && C_NUM==argv[i]->pub.cls) {
+         sprintf (buf+at, "%s%d", at?", ":"", num_int (argv[i]));
+         at += strlen (buf+at);
+
+      } else if (argv[i] && (s=obj_name(argv[i]))) {
+         if (at) {
+            buf[at++] = ',';
+            buf[at++] = ' ';
+         }
+         strcpy (buf+at, s);
+         at += strlen (buf+at);
+
+      } else {
+         out_error ("Array: inappropriate dimension: ", argv[i]);
+         return NIL;
+      }
+   }
+
+   return obj_new (C_ARY, buf, obj_copy (argv[argc-1], SHALLOW));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_assign
+ *
+ * Purpose:     Assigns an RVALUE to an LVALUE.  If LVALUE is a symbol
+ *              that has a variable value, then we assign RVALUE to that
+ *              symbol.  Otherwise, if LVALUE evaluates to an silo data
+ *              object, we assign RVALUE to that SDO.  Otherwise if LVALUE
+ *              (unevaluated) is a symbol we assign RVALUE to that new
+ *              symbol.
+ *
+ * Return:      Success:        The RVALUE
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 19 Feb 1997
+ *      Supports assignments to silo data objects.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_assign (int argc, obj_t argv[]) {
+
+   int          isa_symbol;
+   obj_t        val=NIL, retval=NIL;
+
+   if (2!=argc) {
+      out_errorn ("Assign: wrong number of arguments");
+      return NIL;
+   }
+
+   if (!argv[0]) return NIL;    /*error detected below*/
+   isa_symbol = (C_SYM == argv[0]->pub.cls);
+
+   /*
+    * The LVALUE is a symbol with a variable value. Make the RVALUE the
+    * new variable value for that symbol.
+    */
+   if (isa_symbol && (val=sym_vboundp(argv[0]))) {
+      val = obj_dest (val);
+      sym_vbind (argv[0], obj_copy (argv[1], SHALLOW));
+      return obj_copy (argv[1], SHALLOW);
+   }
+
+   /*
+    * Eval the LVALUE to see if it's a silo data object.
+    */
+   out_error_disable();
+   val = obj_eval (argv[0]);
+   out_error_restore();
+   if (val && C_SDO==val->pub.cls) {
+      retval = sdo_assign (val, argv[1]);
+      val = obj_dest (val);
+      return retval;
+   }
+   val = obj_dest (val);
+
+   /*
+    * The LVALUE is a symbol that doesn't evaluate to a silo data object.
+    * Assign the RVALUE as the variable value of the symbol.
+    */
+   if (isa_symbol) {
+      sym_vbind (argv[0], obj_copy (argv[1], SHALLOW));
+      return obj_copy (argv[1], SHALLOW);
+   }
+
+   /*
+    * The LVALUE is not a symbol and doesn't evaluate to a silo
+    * data object.
+    */
+   out_errorn ("Assign: left operand has no L-value");
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_close
+ *
+ * Purpose:     Closes the files associated with the specified symbols.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 20 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_close (int argc, obj_t argv[]) {
+
+   int          i;
+   char         ebuf[1024];
+   obj_t        file=NIL;
+
+   for (i=0; i<argc; i++) {
+      if (!argv[i] || C_SYM!=argv[i]->pub.cls) {
+         sprintf (ebuf, "close: inappropriate file symbol as arg-%d: ", i+1);
+         out_error (ebuf, argv[i]);
+      } else if (NIL==(file=sym_vboundp(argv[i])) || C_FILE!=file->pub.cls) {
+         out_errorn ("close: no file associated with %s", obj_name(argv[i]));
+         file = obj_dest (file);
+      } else {
+         file = obj_dest (file);
+         sym_vbind (argv[i], NIL);
+      }
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    F_cons
+ *
+ * Purpose:     Creates a new cons cell with a HEAD and TAIL.
+ *
+ * Return:      Success:        Ptr to new cons cell.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+F_cons (obj_t head, obj_t tail) {
+
+   return obj_new (C_CONS, obj_copy(head, SHALLOW), obj_copy(tail, SHALLOW));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    diff_lookup
+ *
+ * Purpose:     Looks up a diff constant in the symbol table and returns
+ *              its value.  If the symbol has a value which is not a
+ *              number or a value which is a negative number then the value
+ *              is removed with a warning.
+ *
+ * Return:      Success:        Double value of the variable.
+ *
+ *              Failure:        -1.0
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  6 1997
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Nov 17 22:34:51 PST 2009
+ *   Added logic to exclude epsilon diff params from requirement to not be
+ *   less than zero.
+ *-------------------------------------------------------------------------
+ */
+static double
+diff_lookup (char *ascii_name) {
+
+   obj_t        name=NIL, val=NIL;
+   char         buf[1024];
+   double       retval = -1.0;
+
+
+   name = obj_new (C_SYM, ascii_name);
+   if ((val=sym_vboundp(name))) {
+      if (!num_isfp(val)) {
+         sprintf (buf, "diff: value of `%s' is inappropriate: ", ascii_name);
+         out_error (buf, val);
+         sym_vbind (name, NIL);
+      } else if ((retval=num_fp(val))<0.0 && !strstr(ascii_name, "_eps")) {
+         out_errorn ("diff: value of `%s' is inappropriate: %d",
+                     ascii_name, retval);
+         sym_vbind (name, NIL);
+         retval = -1.0;
+      }
+      val = obj_dest (val);
+   }
+   name = obj_dest (name);
+
+   if (Verbosity>=2) {
+      if (retval<=0.0) {
+         out_info ("diff: %-15s is disabled", ascii_name);
+      } else {
+         out_info ("diff: %-15s = %e", ascii_name, retval);
+      }
+   }
+
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_diff
+ *
+ * Purpose:     Determines whether two things differ.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-27
+ *              Added the `two_column' diff option.
+ *
+ *              Robb Matzke, 2000-06-28
+ *              If more than two arguments are given then the argument
+ *              list is split in half and operands from the first half are
+ *              differenced against corresponding operands from the second
+ *              half. If called with no arguments then the command-line
+ *              database files are used as arguments.
+ *
+ *              Robb Matzke, 2000-06-29
+ *              The contents of the $exclude variable is parsed and cached
+ *              in the DiffOpts.
+ *
+ *              Robb Matzke, 2000-07-05
+ *              If invoked with one argument and that argument is a silo
+ *              database object from file $1 then it will be differenced
+ *              against an object of the same name from file $2.
+ *
+ *              Robb Matzke, 2000-07-10
+ *              Fixed a memory corruption bug when called with no
+ *              arguments and no files opened on the command-line
+ *
+ *              Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *              Added suppot for alternate relative diff option using
+ *              epsilon.
+ *
+ *              Mark C. Miller, Mon Jan 11 16:21:21 PST 2010
+ *              Added support for long long diffing params.
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_diff (int argc, obj_t argv[])
+{
+    int         status;
+    int         old_rtmargin = OUT_STDOUT->rtmargin;
+    obj_t       opands[1024], head=NIL, value=NIL, symbol=NIL, word=NIL;
+    int         nopands=0, i, j;
+
+    memset(&DiffOpt, 0, sizeof DiffOpt);
+    
+    if (0==argc) {
+        /* When invoked with no arguments use the list of command-line
+         * files as arguments. */  
+        for (nopands=0; nopands<NELMTS(opands); nopands++) {
+            char tmp[32];
+            
+            sprintf(tmp, "$%d", nopands+1);
+            symbol = obj_new(C_SYM, tmp);
+            opands[nopands] = sym_vboundp(symbol);
+            symbol = obj_dest(symbol);
+            if (!opands[nopands] || C_FILE!=opands[nopands]->pub.cls) {
+                /*we reached the last file or something isn't a file*/
+                opands[nopands] = obj_dest(opands[nopands]);
+                break;
+            }
+        }
+    } else if (1==argc) {
+        /* When invoked with one argument which is a silo object from the
+         * file represented by `$1', the second argument is the silo
+         * object of the same name from file `$2'. */
+        obj_t my_file=NIL, file_1=NIL, file_2=NIL;
+        
+        if (!argv[0] || C_SDO!=argv[0]->pub.cls) {
+            out_errorn("diff: single-argument must be a silo object");
+            goto done;
+        }
+        my_file = sdo_file(argv[0]);
+        
+        symbol = obj_new(C_SYM, "$1");
+        file_1 = sym_vboundp(symbol);
+        symbol = obj_dest(symbol);
+        if (!file_1 || C_FILE!=file_1->pub.cls) {
+            out_errorn("diff: single-argument must be from file $1");
+            my_file = obj_dest(my_file);
+            file_1 = obj_dest(file_1);
+            goto done;
+        }
+        if (strcmp(obj_name(my_file), obj_name(file_1))) {
+            out_errorn("diff: single-argument must be from file $1");
+            my_file = obj_dest(my_file);
+            file_1 = obj_dest(file_1);
+            goto done;
+        }
+        my_file = obj_dest(my_file);
+        file_1 = obj_dest(file_1);
+        
+
+        symbol = obj_new(C_SYM, "$2");
+        file_2 = sym_vboundp(symbol);
+        symbol = obj_dest(symbol);
+        if (!file_2 || C_FILE!=file_2->pub.cls) {
+            out_errorn("diff: file $2 is not defined");
+            file_2 = obj_dest(file_2);
+            goto done;
+        }
+
+        symbol = obj_new(C_SYM, obj_name(argv[0]));
+        opands[nopands++] = obj_copy(argv[0], SHALLOW);
+        opands[nopands++] = obj_deref(file_2, 1, &symbol);
+        symbol = obj_dest(symbol);
+        
+    } else {
+        for (nopands=0; nopands<argc && nopands<NELMTS(opands); nopands++) {
+            opands[nopands] = obj_copy(argv[nopands], SHALLOW);
+        }
+    }
+
+    /* The number of operands had better be even */
+    if (nopands % 2) {
+        out_errorn("diff requires an even number of arguments or "
+                   "command-line database files");
+        goto done;
+    }
+    if (0==nopands) {
+        out_errorn("nothing to difference");
+        goto done;
+    }
+    
+    /* Parse and cache $diff value */
+    symbol = obj_new(C_SYM, "$diff");
+    head = sym_vboundp(symbol);
+    symbol = obj_dest(symbol);
+    if (head && C_CONS!=head->pub.cls) {
+        head = obj_new(C_CONS, obj_copy(head, SHALLOW), NIL);
+    }
+    for (value=head; value; value=cons_tail(value)) {
+        if (C_CONS!=value->pub.cls) {
+            out_errorn("diff: invalid value for $diff");
+            goto done;
+        }
+        word = cons_head(value);
+        if (C_SYM==word->pub.cls) {
+            if (!strcmp(obj_name(word), "all")) {
+                DiffOpt.report = DIFF_REP_ALL;
+            } else if (!strcmp(obj_name(word), "detail")) {
+                DiffOpt.report = DIFF_REP_ALL;
+            } else if (!strcmp(obj_name(word), "detailed")) {
+                DiffOpt.report = DIFF_REP_ALL;
+            } else if (!strcmp(obj_name(word), "brief")) {
+                DiffOpt.report = DIFF_REP_BRIEF;
+            } else if (!strcmp(obj_name(word), "sum")) {
+                DiffOpt.report = DIFF_REP_SUMMARY;
+            } else if (!strcmp(obj_name(word), "summary")) {
+                DiffOpt.report = DIFF_REP_SUMMARY;
+            } else if (!strcmp(obj_name(word), "summarize")) {
+                DiffOpt.report = DIFF_REP_SUMMARY;
+            } else if (!strcmp(obj_name(word), "ignore_additions")) {
+                DiffOpt.ignore_adds = true;
+            } else if (!strcmp(obj_name(word), "ignore_deletions")) {
+                DiffOpt.ignore_dels = true;
+            } else if (!strcmp(obj_name(word), "two_column")) {
+                DiffOpt.two_column = true;
+            } else {
+                out_errorn("word `%s' of $diff isn't recognized (ignored)",
+                           obj_name(word));
+            }
+        } else {
+            out_errorn("diff: invalid value for $diff");
+            goto done;
+        }
+    }
+    head = obj_dest(head);
+
+    /* Parse and cache $exclude values */
+    symbol = obj_new(C_SYM, "$exclude");
+    head = sym_vboundp(symbol);
+    symbol = obj_dest(symbol);
+    if (head && C_CONS!=head->pub.cls) {
+        head = obj_new(C_CONS, obj_copy(head, SHALLOW), NIL);
+    }
+    for (value=head; value; value=cons_tail(value)) {
+        if (C_CONS!=value->pub.cls) {
+            out_errorn("diff: invalid value for $exclude");
+            goto done;
+        }
+        if (DiffOpt.exclude.nused>=NELMTS(DiffOpt.exclude.value)) {
+            out_errorn("diff: too many exclusions (limit %lu)",
+                       (unsigned long)NELMTS(DiffOpt.exclude.value));
+            goto done;
+        }
+        word = cons_head(value);
+        if (C_STR==word->pub.cls) {
+            i = DiffOpt.exclude.nused++;
+            DiffOpt.exclude.value[i] = safe_strdup(obj_name(word));
+#ifndef HAVE_FNMATCH
+            if (strpbrk(DiffOpt.exclude.value[i], "*?[]")) {
+                out_errorn("diff: $exclude = \"%s\" contains wildcards but "
+                           "your C library doesn't have the `fnmatch' "
+                           "function. Names will be matched literally.",
+                           DiffOpt.exclude.value[i]);
+            }
+#endif
+        } else {
+            out_errorn("diff: $exclude values should be strings");
+            goto done;
+        }
+    }
+    head = obj_dest(head);
+
+    /* Cache tolerances */
+    DiffOpt.c_abs = diff_lookup("$diff_int8_abs");
+    DiffOpt.c_rel = diff_lookup("$diff_int8_rel");
+    DiffOpt.c_eps = diff_lookup("$diff_int8_eps");
+    DiffOpt.s_abs = diff_lookup("$diff_short_abs");
+    DiffOpt.s_rel = diff_lookup("$diff_short_rel");
+    DiffOpt.s_eps = diff_lookup("$diff_short_eps");
+    DiffOpt.i_abs = diff_lookup("$diff_int_abs");
+    DiffOpt.i_rel = diff_lookup("$diff_int_rel");
+    DiffOpt.i_eps = diff_lookup("$diff_int_eps");
+    DiffOpt.l_abs = diff_lookup("$diff_long_abs");
+    DiffOpt.l_rel = diff_lookup("$diff_long_rel");
+    DiffOpt.l_eps = diff_lookup("$diff_long_eps");
+    DiffOpt.f_abs = diff_lookup("$diff_float_abs");
+    DiffOpt.f_rel = diff_lookup("$diff_float_rel");
+    DiffOpt.f_eps = diff_lookup("$diff_float_eps");
+    DiffOpt.d_abs = diff_lookup("$diff_double_abs");
+    DiffOpt.d_rel = diff_lookup("$diff_double_rel");
+    DiffOpt.d_eps = diff_lookup("$diff_double_eps");
+    DiffOpt.ll_abs = diff_lookup("$diff_llong_abs");
+    DiffOpt.ll_rel = diff_lookup("$diff_llong_rel");
+    DiffOpt.ll_eps = diff_lookup("$diff_llong_eps");
+
+            
+    for (i=0; i<nopands/2; i++) {
+        char header[8192], a_buf[32], b_buf[32];
+        const char *a_name, *b_name;
+        
+        /* Print a table header for each pair of arguments */
+        if (NULL==(a_name=obj_name(opands[i]))) {
+            sprintf(a_buf, "Argument %d", i+1);
+            a_name = a_buf;
+        }
+        if (NULL==(b_name=obj_name(opands[nopands/2+i]))) {
+            sprintf(b_buf, "Argument %d", nopands/2+i+1);
+            b_name = b_buf;
+        }
+
+        /* Skip a line between each pair of arguments */
+        strcpy(header, i?"\n":"");
+
+        /* Choose a header line appropriate for the output style */
+        if (DIFF_REP_ALL==DiffOpt.report && DiffOpt.two_column) {
+            sprintf(header+strlen(header), "%-*s%-*s%*s%s\n",
+                    OUT_LTMAR, "Object", OUT_COL2-OUT_LTMAR, a_name,
+                    (int)strlen(DIFF_SEPARATOR), "", b_name);
+            OUT_STDOUT->rtmargin = 0; /*don't split long lines*/
+        } else {
+            sprintf(header+strlen(header), "Differences between %s and %s\n",
+                    a_name, b_name);
+        }
+
+        /* Put a line below the header */
+        for (j=0; j<OUT_NCOLS-2; j++) strcat(header, "-");
+        out_header(OUT_STDOUT, header);
+    
+        /* The difference... */
+        status = obj_diff(opands[i], opands[nopands/2+i]);
+        if (!out_brokenpipe(OUT_STDOUT)) {
+            switch (DiffOpt.report) {
+            case DIFF_REP_ALL:
+                if (2==status) {
+                    out_line(OUT_STDOUT, "***************");
+                    obj_print(opands[i], OUT_STDOUT);
+                    out_line(OUT_STDOUT, "---------------");
+                    obj_print(opands[nopands/2+i], OUT_STDOUT);
+                    out_line(OUT_STDOUT, "***************");
+                }
+                break;
+            case DIFF_REP_BRIEF:
+                if (2==status) {
+                    out_puts(OUT_STDOUT, "different value(s)");
+                    out_nl(OUT_STDOUT);
+                }
+                break;
+            case DIFF_REP_SUMMARY:
+                if (status>0) {
+                    out_line(OUT_STDOUT, "objects differ");
+                }
+                break;
+            }
+        }
+    }
+    
+ done:
+    /* Restore output margins and cancel table headers*/
+    OUT_STDOUT->rtmargin = old_rtmargin;
+    out_header(OUT_STDOUT, NULL);
+
+    /* Free temp expressions */
+    obj_dest(symbol);
+    obj_dest(head);
+
+    /* Free operands */
+    for (i=0; i<nopands; i++) obj_dest(opands[i]);
+
+    /* Free DiffOpt */
+    for (i=0; i<DiffOpt.exclude.nused; i++) {
+        if (DiffOpt.exclude.value[i]) {
+            free(DiffOpt.exclude.value[i]);
+            DiffOpt.exclude.value[i] = NULL;
+        }
+    }
+    
+    return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_dot
+ *
+ * Purpose:     A binary operator.  The left operand should be a file
+ *              and the right operand should be an object name within
+ *              that file.
+ *
+ *              Or the left operand should be memory with a structure
+ *              type and the right operand should be a field name within
+ *              that structure.
+ *
+ *              Or the left operand should be memory with an array type
+ *              and the right operand(s) should be indices or ranges
+ *              thereof.
+ *
+ * Return:      Success:        Ptr to a SILO database object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      More than one argument is allowed.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_dot (int argc, obj_t argv[]) {
+
+   obj_t        retval=NIL;
+
+   if (argv[0]) {
+      retval = obj_deref(argv[0], argc-1, argv+1);
+   } else {
+      out_error ("Dot: inappropriate left operand: ", argv[0]);
+   }
+
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_exit
+ *
+ * Purpose:     Exit the program.  If a numeric argument is specified then
+ *              we exit with that value.
+ *
+ * Return:      Success:        Does not return
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      If an argument is supplied then it must be an integer.
+ *
+ *      Robb Matzke, 10 Feb 1997
+ *      History is saved in a history file.
+ *
+ *      Sean Ahern, Fri Feb 28 14:12:58 PST 1997
+ *      Added a check for the readline library.
+ *
+ *      Thomas R. Treadway, Tue Jun 27 13:59:21 PDT 2006
+ *      Added HAVE_STRERROR wrapper
+ *
+ *      Thomas R. Treadway, Thu Mar  1 09:37:31 PST 2007
+ *      Corrected write history logic
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_exit (int argc, obj_t argv[]) {
+
+#if defined(HAVE_READLINE_HISTORY_H) && defined(HISTORY_FILE) && defined(HAVE_READLINE_HISTORY)
+   if (HistoryFile[0] && write_history (HistoryFile)) 
+      ;
+   else
+   {
+#ifdef HAVE_STRERROR
+      out_errorn ("command history not saved in %s (%s)",
+                  HistoryFile, strerror(errno));
+#else
+      out_errorn ("command history not saved in %s (errno=%d)",
+                  HistoryFile, errno);
+#endif
+   }
+#endif
+
+   if (0==argc) {
+      exit (0);
+      
+   }
+   if (1==argc) {
+      if (!num_int(argv[0])) {
+         out_errorn ("exit: arg-1 is not an integer");
+         return NIL;
+      }
+      exit (num_int(argv[0]));
+   }
+
+   out_errorn ("exit: wrong number of arguments");
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    F_fbind
+ *
+ * Purpose:     Bind a function to a name.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+F_fbind (obj_t self, obj_t func) {
+
+   assert (self && C_SYM==self->pub.cls);
+   sym_fbind (self, obj_copy(func, SHALLOW));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_file
+ *
+ * Purpose:     Opens a SILO file but does not associate that file with
+ *              a symbol.  Thus, as soon as all references to this file
+ *              object dissappear, the file is closed.
+ *
+ * Return:      Success:        Ptr to a silo file object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      Changed the name of this function from F_open to V_file.
+ *
+ *      Robb Matzke, 2 Apr 1997
+ *      If `$rdonly' is true then the file is open for reading only.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_file (int argc, obj_t argv[]) {
+
+   obj_t        retval=NIL, filename=NIL;
+   char         *fname;
+   int          rdonly = sym_bi_true("rdonly");
+
+   if (1!=argc) {
+      out_errorn ("file: wrong number of arguments");
+      return NIL;
+   }
+   filename = argv[0];
+   
+   if (!filename) {
+      out_errorn ("file: no file name given");
+      
+   } else if (C_FILE==filename->pub.cls) {
+      retval = obj_copy (filename, SHALLOW);    /*already opened*/
+      
+   } else if (NULL==(fname=obj_name(filename))) {
+      out_errorn ("file: arg-1 is inappropriate");
+
+   } else if (NIL==(retval=obj_new (C_FILE, fname, rdonly))) {
+#if 0 /*error message already printed*/
+      out_errorn ("file: could not open `%s'", fname);
+#endif
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    F_flatten
+ *
+ * Purpose:     Flattens a list so (a (b (c)) d) becomes (a b c d).
+ *
+ * Return:      Success:        A new list with shallow copies of the atoms.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+F_flatten (obj_t lst) {
+
+   obj_t        opstack=NIL;
+   obj_t        ptr=NIL;
+   obj_t        retval=NIL;
+
+   if (!lst || C_CONS!=lst->pub.cls) {
+      return obj_copy (lst, SHALLOW); /*nothing to flatten*/
+   }
+
+   /*
+    * Create a stack of all the atoms.
+    */
+   for (/*void*/; lst; lst=cons_tail(lst)) {
+      obj_t hd = cons_head (lst);
+      if (!hd) {
+         /*
+          * Head is NIL
+          */
+         opstack = obj_new (C_CONS, NIL, opstack);
+         
+      } else if (C_CONS==hd->pub.cls) {
+         /*
+          * Head is a list.  Flatten it and then add those elements
+          * into the opstack.
+          */
+         obj_t flattened = F_flatten (hd);
+         for (ptr=flattened; ptr; ptr=cons_tail(ptr)) {
+            opstack = obj_new (C_CONS, F_head(ptr), opstack);
+         }
+         flattened = obj_dest (flattened);
+         
+      } else {
+         /*
+          * Add a copy of the head to the opstack.
+          */
+         opstack = obj_new (C_CONS, obj_copy(hd, SHALLOW), opstack);
+      }
+   }
+
+   /*
+    * Return the reversal of the stack.
+    */
+   retval = F_reverse (opstack);
+   opstack = obj_dest (opstack);
+   return retval;
+}
+         
+

+/*-------------------------------------------------------------------------
+ * Function:    F_head
+ *
+ * Purpose:     Returns the head of a list.
+ *
+ * Return:      Success:        Ptr to the head.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+F_head (obj_t lst) {
+
+   if (!lst) return NIL;
+   if (C_CONS!=lst->pub.cls) return NIL;
+
+   return obj_copy (cons_head(lst), SHALLOW);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Callback for help apropos function.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, June  7, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static int
+help_apropos(obj_t sym, void *cdata)
+{
+    const char  *s = (const char*)cdata;
+    obj_t       doc = sym_dboundp(sym);
+    int         found = false;
+
+    if (doc && C_STR==doc->pub.cls) {
+        const char *docstr = obj_name(doc);
+        if (strstr(obj_name(sym), s) || strstr(docstr, s)) {
+            char buf[256];
+            sprintf(buf, "help %s", obj_name(sym));
+            out_line(OUT_STDOUT, buf);
+            found = true;
+        }
+    }
+    obj_dest(doc);
+    return found;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_help
+ *
+ * Purpose:     Offers help.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  3 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Real users want a quick-and-dirty text-based help system a la
+ *      meshtvx.  This command takes zero or one argument. When invoked
+ *      with zero arguments is prints a table of contents (TOC). When
+ *      invoked with a symbol name it prints the documentation string for
+ *      that symbol. When invoked with a string it searches all symbols
+ *      for the specified word and prints those that match. When invoked
+ *      with a symbol and a string it assigns the string as the
+ *      documentation for the symbol and returns null.
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_help (int argc, obj_t argv[])
+{
+    int                 i, is_run;
+    obj_t               doc=NIL, sym=NIL;
+    static int          ncalls=0;
+    static helptoc_t    toc[] = {
+        {"help",        "Help on the `help' function"},
+        {"delta",       "Changes since previous version"},
+        {"faq",         "Frequently asked questions"},
+        {"run",         "Browser execution and switches"},
+        {"syntax",      "Browser syntax"},
+        {"functions",   "Built-in functions"},
+        {"operators",   "Operators and precedence"},
+        {"variables",   "Predefined variables"},
+        {"formats",     "Data output formats"},
+        {"paging",      "Paging long output"},
+        {"redirection", "Piping and output redirection"},
+        {"interrupts",  "Interrupting long-running commands"},
+        {"traps",       "Traps for the unwary"},
+        {"$FOO",        "Help for variable $FOO"},
+        {"--FOO",       "Help for command-line switch --FOO"},
+        {"FOO",         "Help for built-in function FOO"},
+        {"\"opFOO\"",   "Help for operator FOO"},
+        {"\"FOO\"",     "Help containing string \"FOO\""}, 
+    };
+
+    if (0==ncalls++) {
+        /* Table of Contents */
+        obj_t type = obj_new(C_STC, NULL, NULL);
+        for (i=0; i<NELMTS(toc); i++) {
+            char buf[32];
+            sprintf(buf, "help %s", toc[i].name);
+            stc_add(type, obj_new(C_PRIM, "string"),
+                    i*sizeof(*toc)+sizeof(char*), buf);
+        }
+        doc = obj_new(C_SDO, NIL, NULL, toc, type, toc, type,
+                      NULL, NULL, NULL);
+        sym = obj_new(C_SYM, "$toc");
+        sym_dbind(sym, doc);
+        obj_dest(sym);
+        obj_dest(type);
+
+        /* Function list */
+        type = obj_new(C_STC, NULL, NULL);
+        for (i=0; i<NHelpFuncToc; i++) {
+            char buf[32];
+            sprintf(buf, "help %s", HelpFuncToc[i].name);
+            stc_add(type, obj_new(C_PRIM, "string"),
+                    i*sizeof(helptoc_t)+sizeof(char*), buf);
+        }
+        doc = obj_new(C_SDO, NIL, NULL, HelpFuncToc, type, HelpFuncToc, type,
+                      NULL, NULL, NULL);
+        sym = obj_new(C_SYM, "functions");
+        sym_dbind(sym, doc);
+        obj_dest(sym);
+        obj_dest(type);
+
+        /* Operator list */
+        type = obj_new(C_STC, NULL, NULL);
+        for (i=0; i<NHelpOpToc; i++) {
+            char buf[32];
+            sprintf(buf, "help %s", HelpOpToc[i].name);
+            stc_add(type, obj_new(C_PRIM, "string"),
+                    i*sizeof(helptoc_t)+sizeof(char*), buf);
+        }
+        doc = obj_new(C_SDO, NIL, NULL, HelpOpToc, type, HelpOpToc, type,
+                      NULL, NULL, NULL);
+        sym = obj_new(C_SYM, "operators");
+        sym_dbind(sym, doc);
+        obj_dest(sym);
+        obj_dest(type);
+
+        /* Variable list */
+        type = obj_new(C_STC, NULL, NULL);
+        for (i=0; i<NHelpVarToc; i++) {
+            char buf[32];
+            sprintf(buf, "help %s", HelpVarToc[i].name);
+            stc_add(type, obj_new(C_PRIM, "string"),
+                    i*sizeof(helptoc_t)+sizeof(char*), buf);
+        }
+        doc = obj_new(C_SDO, NIL, NULL, HelpVarToc, type, HelpVarToc, type,
+                      NULL, NULL, NULL);
+        sym = obj_new(C_SYM, "variables");
+        sym_dbind(sym, doc);
+        obj_dest(sym);
+        obj_dest(type);
+    }
+
+    /* Obtain the symbol */
+    if (0==argc) {
+        sym = obj_new(C_SYM, "$toc");
+    } else if (!argv[0]) {
+        out_errorn("help: first argument cannot be NIL");
+        return NIL;
+    } else if (C_STR==argv[0]->pub.cls) {
+        const char *s = obj_name(argv[0]);
+        if (!strncmp("op", s, 2) && s[2]) {
+            sym = obj_new(C_SYM, s);
+        } else {
+            if (!sym_map(help_apropos, (void*)s)) {
+                out_errorn("help: nothing appropriate");
+            }
+            return NIL;
+        }
+    } else if (C_SYM==argv[0]->pub.cls) {
+        sym = argv[0];
+    } else {
+        out_errorn("help: wrong type for first argument");
+        return NIL;
+    }
+    
+    /* Set documentation string? */
+    if (2==argc) {
+        sym_dbind(argv[0], obj_copy(argv[1], SHALLOW));
+        return NIL;
+    } else if (argc>2) {
+        out_errorn("help: wrong number of arguments");
+        return NIL;
+    }
+    
+    /* Obtain documentation string */
+    assert(sym);
+    is_run = !strcmp("run", obj_name(sym));
+    doc = sym_dboundp(sym);
+    if (sym!=argv[0]) obj_dest(sym);
+    sym = NIL;
+
+    /* `help run' is a special case */
+    if (!doc && is_run) {
+        usage();
+        return NIL;
+    }
+    
+    /* Print documentation */
+    if (doc) {
+        /* Turn off string formating -- use out_putw() instead */
+        obj_t fmt_string = obj_new(C_SYM, "$fmt_string");
+        obj_t old_fmt = sym_vboundp(fmt_string);
+        sym_bi_set("$fmt_string", NULL, NULL, NULL);
+
+        /* Print documentation */
+        obj_print(doc, OUT_STDOUT);
+        out_nl(OUT_STDOUT);
+
+        /* Restore previous string format */
+        sym_vbind(fmt_string, old_fmt);
+        obj_dest(fmt_string);
+        doc = obj_dest(doc);
+    } else {
+        out_errorn("help: no documentation found.");
+    }
+    return doc;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Cause subsequent input to come from the file named by the
+ *              argument. When that input source is exhausted then input
+ *              will begin to come from the original source again.
+ *
+ * Return:      NIL
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, July 10, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+obj_t
+V_include(int argc, obj_t argv[])
+{
+    char        *name;
+    lex_t       *f;
+    
+    if (1!=argc) {
+        out_errorn("include: wrong number of arguments");
+        return NIL;
+    }
+    if (NULL==(name=obj_name(argv[0]))) {
+        out_errorn("include: no file name given");
+        return NIL;
+    }
+    if (!LEX_STDIN) {
+        out_errorn("include: internal error -- no input source");
+        return NIL;
+    }
+    if (NULL==(f=lex_open(name))) return NULL;
+    lex_push(LEX_STDIN, f);
+    return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    F_length
+ *
+ * Purpose:     Returns the number of elements in a list.
+ *
+ * Return:      Success:        Length of LST
+ *
+ *              Failure:        -1 if not a list, 0 if LST is NIL.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+F_length (obj_t lst) {
+
+   int          i;
+
+   for (i=0; lst; lst=cons_tail(lst),i++) {
+      if (C_CONS!=lst->pub.cls) return -1;
+   }
+   return i;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_list
+ *
+ * Purpose:     Lists the current working directory in the specified
+ *              file.  If no file is specified then `$1' is assumed.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *      Robb Matzke, 6 Feb 1997
+ *      We list the objects ourselves instead of calling DBListDir because
+ *      it allows us to redirect and/or page the output.  It also allows
+ *      us to make the output look more like the rest of the browser output.
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      Now takes any number of arguments.  If the first argument is
+ *      a symbol with a file value, then use that file for the listing.
+ *      If the first argument is not a symbol, then evaluate it to get the
+ *      file to use for listing.  Otherwise treat the first argument as
+ *      an item to list.  All other arguments are items to list.
+ *
+ *      Robb Matzke, 25 Jul 1997
+ *      This function was indented to list the table of contents for the
+ *      current directory of a subset thereof.  If object names and/or
+ *      wild cards are given, they apply to the names of the objects in the
+ *      current working directory.  However, many people want to be able to
+ *      list the contents of a subdirectory by saying `ls dir1' where `dir1'
+ *      is a member of the current working directory.  Therefore, after
+ *      wild-card expansion occurs, if the display list contains a single
+ *      object and that object is a directory, then we load the table of
+ *      contents from that directory and display it rather than the
+ *      directory name.
+ *
+ *      Robb Matzke, 26 Aug 1997
+ *      Fixed a memory bug when the only argument is a directory name.
+ *
+ *      Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *      I changed strdup to safe_strdup.
+ *
+ *      Robb Matzke, 2000-05-17
+ *      If the argument is a directory name and that directory is empty
+ *      then the error message will be `ls: no table of contents' instead
+ *      of `ls: no matches'.
+ *
+ *      Robb Matzke, 2000-07-03
+ *      If the first argument is a list of files then perform the
+ *      operation once for each file of that list.
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_list (int argc, obj_t argv[])
+{
+    obj_t       fileobjs=NIL, ptr=NIL;
+    int         first_arg = 0;
+
+    if (argc>=1 && C_SYM==argv[0]->pub.cls) {
+        /* Is the first symbol bound to a file or is it a special symbol
+         * which evaluates to a file or list of files? */
+        if ((fileobjs=sym_vboundp(argv[0]))) {
+            if (C_FILE==fileobjs->pub.cls) {
+                first_arg = 1;
+                fileobjs = obj_new(C_CONS, fileobjs, NIL);
+            } else {
+                fileobjs = obj_dest(fileobjs);
+            }
+        } else if ((fileobjs=obj_eval(argv[0]))) {
+            if (C_CONS==fileobjs->pub.cls) {
+                first_arg = 1;
+            } else {
+                fileobjs = obj_dest(fileobjs);
+            }
+        }
+
+    } else if (argc>=1 && C_STR!=argv[0]->pub.cls) {
+        /* The file is the result of evaluating the first expression. */
+        fileobjs = obj_eval(argv[0]);
+        if (!fileobjs) return NIL; /*error in eval*/
+        if (C_FILE==fileobjs->pub.cls) {
+            first_arg = 1;
+            fileobjs = obj_new(C_CONS, fileobjs, NIL);
+        } else {
+            out_errorn("ls: arg-1 does not evaluate to a file");
+            goto error;
+        }
+    }
+
+    /* Use the default file. */    
+    if (!fileobjs) {
+        obj_t b1 = obj_new(C_SYM, "$1");
+        fileobjs = sym_vboundp(b1);
+        b1 = obj_dest(b1);
+
+        if (!fileobjs) {
+            out_errorn("ls: no default open file (`$1' has no value)");
+            return NIL;
+        }
+        fileobjs = obj_new(C_CONS, fileobjs, NIL);
+    }
+
+    for (ptr=fileobjs; ptr; ptr=cons_tail(ptr)) {
+        DBfile  *file;
+        toc_t   *toc;
+        int     i, nentries, width, old_type=(-1);
+        int     argno, nprint;
+        int     *selected=NULL, last_selected=-1;
+        char    buf[256], *needle, nselected=0;
+        char    cwd[1024], *subdir;
+
+        /* Do we have a file? */    
+        obj_t fileobj = cons_head(ptr);
+        if (!fileobj || C_FILE!=fileobj->pub.cls ||
+            NULL==(file=file_file(fileobj))) {
+            out_error("ls: inappropriate file: ", fileobj);
+            goto error;
+        }
+
+        /* Get the table of contents sorted first by object type and
+         * then by object name. */
+        toc = browser_DBGetToc(file, &nentries, sort_toc_by_type);
+        if (!toc || 0==nentries) {
+            out_errorn("ls: no table of contents");
+            goto error;
+        }
+
+        /* Prune the table of contents based on the arguments supplied. */    
+        selected = calloc(nentries, sizeof(int));
+        if (first_arg==argc) {
+            for (i=0; i<nentries; i++) selected[i] = true;
+        } else {
+            for (argno=first_arg; argno<argc; argno++) {
+                if (NULL==(needle=obj_name(argv[argno]))) {
+                    out_errorn("ls: arg-%d is not an object name", argno+1);
+                } else {
+#ifndef HAVE_FNMATCH
+                    if (strpbrk(needle, "*?[]")) {
+                        out_errorn("ls: arg-%d contains wildcards but your C "
+                                   "library doesn't have the `fnmatch' "
+                                   "function", argno+1);
+                    }
+#endif
+                    for (i=0; i<nentries; i++) {
+#ifdef HAVE_FNMATCH
+                        if (0==fnmatch(needle, toc[i].name,
+                                       FNM_FILE_NAME|FNM_PERIOD)) {
+                            selected[i] = true;
+                            nselected++;
+                            last_selected = i;
+                        }
+#else
+                        if (!strcmp(toc[i].name, needle)) {
+                            selected[i] = true;
+                            nselected++;
+                            last_selected = i;
+                        }
+#endif
+                    }
+                }
+            }
+        }
+
+        /* If the result is a single directory, then list the contents of
+         * the directory instead of the directory name. */
+        if (1==nselected && BROWSER_DB_DIR==toc[last_selected].type) {
+            subdir = safe_strdup(toc[last_selected].name);
+            for (i=0; i<nentries; i++) free(toc[i].name);
+            free(toc);
+            if (DBGetDir(file, cwd)<0) return NIL;
+            if (DBSetDir(file, subdir)<0) return NIL;
+            toc = browser_DBGetToc(file, &nentries, sort_toc_by_type);
+            if (DBSetDir(file, cwd)<0) return NIL;
+            if (!toc || 0==nentries) {
+                out_errorn("ls: no table of contents");
+                goto error;
+            }
+            out_info("Listing file: %s, directory: %s:",
+                     obj_name(fileobj), subdir);
+            out_nl(OUT_STDOUT);
+            free(subdir);
+            subdir = NULL;
+
+            /* select all entries of that directory for display */
+            free(selected);
+            selected = calloc(nentries, sizeof(int));
+            for (i=0; i<nentries; i++) selected[i] = true;
+        } else {
+            out_info("Listing from file %s", obj_name(fileobj));
+        }
+        
+        /* Find the widest entry and if any entries were even selected. */    
+        width = 0;
+        for (i=0; i<nentries; i++) {
+            if (selected[i]) width = MAX(width, strlen(toc[i].name));
+        }
+        if (0==width) {
+            out_errorn("ls: no matches");
+        }
+
+        /* Print the objects grouped by object type.  Each group of objects
+         * has a prefix only on the first line. */
+        if (width>0) {
+            for (i=nprint=0; i<nentries && !out_brokenpipe(OUT_STDOUT); i++) {
+                if (!selected[i]) continue;
+                if (toc[i].type!=old_type) {
+                    if (nprint) {
+                        out_nl(OUT_STDOUT);
+                        out_nl(OUT_STDOUT);
+                    }
+                    sprintf(buf, "%s(s)", ObjTypeName[toc[i].type]);
+                    out_push(OUT_STDOUT, buf);
+                }
+                out_printf(OUT_STDOUT, " %-*s", width, toc[i].name);
+                if (toc[i].type!=old_type) {
+                    out_pop(OUT_STDOUT);
+                    old_type = toc[i].type;
+                }
+                nprint++;
+            }
+            out_nl(OUT_STDOUT);
+        }
+
+        /* Free data */    
+        for (i=0; i<nentries; i++) free(toc[i].name);
+        free(toc);
+        free(selected);
+    }
+    return NIL;
+
+ error:
+    obj_dest(fileobjs);
+    return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_make_list
+ *
+ * Purpose:     Returns a list of the arguments.  The list is not the
+ *              same list as the original arguments since the arguments
+ *              have been evaluated.
+ *
+ * Return:      Success:        Ptr to a new list with shallow copies of
+ *                              the caller-evaluated arguments
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_make_list (int argc, obj_t argv[]) {
+
+   obj_t        opstack=NIL, retval=NIL;
+   int          i;
+
+   for (i=0; i<argc; i++) {
+      opstack = obj_new (C_CONS,
+                         obj_copy (argv[i], SHALLOW),
+                         opstack);
+   }
+   retval = F_reverse (opstack);
+   opstack = obj_dest (opstack);
+   return retval;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    V_noprint
+ *
+ * Purpose:     Returns NIL.  Used to suppress the output of a non-nil
+ *              expression.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 23 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+obj_t
+V_noprint (int argc, obj_t argv[]) {
+
+   return NIL;
+}
+         
+

+/*-------------------------------------------------------------------------
+ * Function:    V_open
+ *
+ * Purpose:     Sets the current file to be the named SILO file.  The
+ *              current file is called `$1'.  If an even number of
+ *              arguments are present then the first argument of each pair
+ *              is the name of a SILO file and the second argument is the
+ *              name of the variable that will hold that file.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Changed the name displayed in error messages to `open' since
+ *      this function is usually invoked with the `open' command.
+ *
+ *      Robb Matzke, 6 Feb 1997
+ *      The previous file is closed even if the new file can't be opened.
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      Takes just one or two arguments.  Changed the name of this function
+ *      from V_with to V_open.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_open (int argc, obj_t argv[]) {
+
+   obj_t        file=NIL, filename=NIL, var=NIL;
+
+   /*
+    * Get the variable name
+    */
+   if (2==argc) {
+      filename = obj_copy (argv[0], SHALLOW);
+      var = obj_copy (argv[1], SHALLOW);
+   } else if (1==argc) {
+      filename = obj_copy (argv[0], SHALLOW);
+      var = obj_new (C_SYM, "$1");
+   } else {
+      out_errorn ("open: wrong number of arguments");
+      goto error;
+   }
+
+   if (C_SYM!=var->pub.cls) {
+      out_errorn ("open: arg-2 should be a symbol");
+      goto error;
+   }
+   
+   /*
+    * Open the file.
+    */
+   if (Verbosity>=1) {
+      char *ascii_name = obj_name (filename);
+      out_info ("opening `%s' as %s",
+                ascii_name?ascii_name:"***NO NAME***", obj_name (var));
+   }
+   file = V_file (1, &filename);
+   if (!file) {
+      sym_vbind (var, NIL);
+      goto error;
+   }
+
+   /*
+    * Assign the file to the variable.
+    */
+   sym_vbind (var, file);
+   var = obj_dest (var);
+   file = NIL ; /*do not destroy file*/
+   return NIL;
+
+error:
+   if (file    ) file     = obj_dest (file    );
+   if (var     ) var      = obj_dest (var     );
+   if (filename) filename = obj_dest (filename);
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_pipe
+ *
+ * Purpose:     Evaluates and prints the first argument with standard output
+ *              redirected to the shell command specified by the second
+ *              argument.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_pipe (int argc, obj_t argv[]) {
+
+   out_t        saved;
+   FILE         *f;
+   char         *command, *fmode;
+   obj_t        out=NIL;
+   int          status;
+
+
+   if (3!=argc) {
+      out_errorn ("Pipe: wrong number of arguments");
+      return NIL;
+   }
+   if (NULL==(command=obj_name(argv[1]))) {
+      out_error ("Pipe: arg-2 (command) is inappropriate: ", argv[1]);
+      return NIL;
+   }
+   if (NULL==(fmode=obj_name(argv[2]))) {
+      out_error ("Pipe: arg-3 (mode) is inappropriate: ", argv[2]);
+      return NIL;
+   }
+   if (NULL==(f=popen(command, fmode))) {
+      out_errorn ("Pipe: could not run: %s", command);
+      return NIL;
+   }
+
+   /*
+    * Point OUT_STDOUT at the pipe.
+    */
+   fflush (stderr);
+   fflush (stdout);
+   saved = *OUT_STDOUT;
+   out_reset (OUT_STDOUT);
+   OUT_STDOUT->f = f;
+   OUT_STDOUT->paged = false;
+
+   /*
+    * Evaluate the first argument.
+    */
+   out = obj_eval (argv[0]);
+   if (out || Verbosity>=2) {
+      obj_print (out, OUT_STDOUT);
+      out_nl (OUT_STDOUT);
+   }
+   out = obj_dest (out);
+
+   /*
+    * Point OUT_STDOUT at the original stream.
+    */
+   *OUT_STDOUT = saved;
+
+   /*
+    * Close the command
+    */
+   status = pclose (f);
+   if (WIFEXITED(status)) {
+      if (WEXITSTATUS(status)) {
+         out_errorn ("Pipe: command failed with exit status: %d",
+                     WEXITSTATUS(status));
+      }
+   } else if (WIFSIGNALED(status)) {
+      out_errorn ("Pipe: command received signal %d", WTERMSIG(status));
+   }
+   
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_pointer
+ *
+ * Purpose:     Creates a pointer to the first argument.
+ *
+ * Return:      Success:        Pointer type object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at callisto.nuance.mdn.com
+ *              Dec  9, 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_pointer (int argc, obj_t argv[]) {
+
+   if (1!=argc) {
+      out_errorn ("pointer: wrong number of arguments");
+      return NIL;
+   }
+   return obj_new (C_PTR, obj_copy (argv[0], SHALLOW));
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_primitive
+ *
+ * Purpose:     Given the name of a primitive type, return a new
+ *              primitive type object.
+ *
+ * Return:      Success:        Primitive type object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_primitive (int argc, obj_t argv[]) {
+
+   char         *s, buf[32];
+
+   if (1!=argc) {
+      out_errorn ("primitive: wrong number of arguments");
+      return NIL;
+   }
+
+   if (num_isint(argv[0])) {
+      sprintf (buf, "%d", num_int(argv[0]));
+      s = buf;
+   } else if (NULL==(s=obj_name(argv[0]))) {
+      out_error ("primitive: type name is inappropriate: ", argv[0]);
+      return NIL;
+   }
+
+   return obj_new (C_PRIM, s);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_print
+ *
+ * Purpose:     Prints each argument to standard output.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      NIL arguments are ignored.  We do this because a command like `XXX'
+ *      is parsed as `print XXX' and if `XXX' is not an object we get an
+ *      error message and the `XXX' turns into a NIL pointer.  Printing
+ *      `nil' would be redundant.  However, this means that the command
+ *      `print nil' won't do anything!
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_print (int argc, obj_t argv[]) {
+
+   int          i;
+
+   for (i=0; i<argc && !out_brokenpipe(OUT_STDOUT); i++) {
+      if (argv[i]) {
+         obj_print (argv[i], OUT_STDOUT);
+         out_nl (OUT_STDOUT);
+      }
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_pwd
+ *
+ * Purpose:     Prints the current working directory of the specified file,
+ *              or `$1' if no file is specified.  Actually, this function
+ *              doesn't really do anything but return the file, since the
+ *              print form of a file includes the current working
+ *              directory name.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 20 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 3 Feb 1997
+ *              Cleaned up error messages.
+ *
+ *              Robb Matzke, 2000-07-03
+ *              If invoked with a single argument which is a list of files
+ *              just return that list of files.  This allows us to invoke
+ *              this command as `pwd $*' to show the current working
+ *              directories of all the command-line files.
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_pwd (int argc, obj_t argv[])
+{
+    obj_t       retval=NIL;
+
+    if (0==argc) {
+        obj_t name = obj_new(C_SYM, "$1");
+        retval = sym_vboundp(name);
+        name = obj_dest(name);
+        if (!retval) {
+            out_errorn("pwd: no default open file (`$1' has no value)");
+            goto error;
+        }
+    } else if (1==argc) {
+        retval = obj_copy(argv[0], SHALLOW);
+    } else {
+        out_errorn("pwd: wrong number of arguments");
+        goto error;
+    }
+
+    if (!retval) {
+        out_errorn("pwd: no file specified");
+        goto error;
+    } else if (C_CONS==retval->pub.cls) {
+        obj_t ptr, f;
+        for (ptr=retval; ptr; ptr=cons_tail(ptr)) {
+            f = cons_head(ptr);
+            if (!f || C_FILE!=f->pub.cls) {
+                out_errorn("pwd: arg is not a list of files");
+                goto error;
+            }
+        }
+    } else if (C_FILE!=retval->pub.cls) {
+        out_errorn("pwd: argument is not a file");
+        goto error;
+    }
+    
+    return retval;
+
+ error:
+    obj_dest(retval);
+    return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_quote
+ *
+ * Purpose:     Just returns a copy of the first argument.  If there's more
+ *              than one argument then return a list of the arguments.
+ *
+ * Return:      Success:        A copy of the first argument.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_quote (int argc, obj_t argv[]) {
+
+   if (argc<1) return NIL;
+   if (1==argc) return obj_copy (argv[0], SHALLOW);
+   return V_make_list (argc, argv);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_redirect
+ *
+ * Purpose:     Redirects standard output to the specified file then evaluates
+ *              and prints the first argument.  The file name is the
+ *              second argument.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *      Thomas R. Treadway, Tue Jun 27 13:59:21 PDT 2006
+ *      Added HAVE_STRERROR wrapper
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_redirect (int argc, obj_t argv[]) {
+
+   out_t        saved;
+   FILE         *f;
+   obj_t        out=NIL;
+   char         *fname=NULL, *fmode=NULL;
+
+   if (3!=argc) {
+      out_errorn ("Redirect: wrong number of arguments");
+      return NIL;
+   }
+   if (!argv[1] || NULL==(fname=obj_name(argv[1]))) {
+      out_error ("Redirect: arg-2 (file name) is inappropriate", argv[1]);
+      return NIL;
+   }
+   if (!argv[2] || NULL==(fmode=obj_name(argv[2]))) {
+      out_error ("Redirect: arg-3 (mode) is inappropriate", argv[2]);
+      return NIL;
+   }
+   if (NULL==(f=fopen(fname, fmode))) {
+#ifdef HAVE_STRERROR
+      out_errorn ("Redirect: cannot open `%s' (%s)",
+                  fname, strerror(errno));
+#else
+      out_errorn ("Redirect: cannot open `%s' (errno=%d)",
+                  fname, errno);
+#endif
+      return NIL;
+   }
+
+
+   fflush (stderr);
+   fflush (stdout);
+   saved = *OUT_STDOUT;
+   out_reset (OUT_STDOUT);
+   OUT_STDOUT->f = f;
+   OUT_STDOUT->paged = false;
+
+   out = obj_eval (argv[0]);
+   if (out || Verbosity>=2) {
+      obj_print (out, OUT_STDOUT);
+      out_nl (OUT_STDOUT);
+   }
+   out = obj_dest (out);
+
+   *OUT_STDOUT = saved;
+   fclose (f);
+
+   return NIL;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    F_reverse
+ *
+ * Purpose:     Reverses list LST.
+ *
+ * Return:      Success:        Ptr to a new list.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+F_reverse (obj_t lst) {
+
+   obj_t        ret=NIL, b1, b2;
+
+   if (!lst) return NIL;
+   if (C_CONS!=lst->pub.cls) return obj_copy(lst, SHALLOW);
+
+   for (/*void*/; lst; lst=cons_tail(lst)) {
+
+      b1 = F_head (lst);
+      b2 = F_cons (b1, ret);
+      obj_dest (b1);
+      obj_dest (ret);
+      ret = b2;
+   }
+   return ret;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_setcwd
+ *
+ * Purpose:     Sets the current working directory for a file (or for `$1'
+ *              if no file is specified).
+ *
+ * Return:      Success:        The file.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 20 1997
+ *
+ * Modifications:
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *      Robb Matzke, 5 Feb 1997
+ *      The first argument is always the directory name.  The second
+ *      argument is the optional file.
+ *
+ *      Robb Matzke, 2000-07-03
+ *      If the second argument is a list of files (instead of just a file)
+ *      then the current working directory is changed for all listed files
+ *      and the file list is returned.  The return value is always the list
+ *      of files, even if something goes wrong (this allows the user to see
+ *      what the CWD is for each file).
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_setcwd (int argc, obj_t argv[])
+{
+    obj_t       files=NIL, cwd=NIL, ptr=NIL;
+    char        *dirname=NULL;
+    DBfile      *dbfile;
+
+    /* Get arguments */
+    if (1==argc) {
+        obj_t name = obj_new (C_SYM, "$1");
+        files = sym_vboundp (name);
+        name = obj_dest (name);
+        cwd  = argv[0];
+
+        if (!files) {
+            out_errorn ("cd: no default open file (`$1' has no value)");
+            return NIL;
+        }
+    } else if (2==argc) {
+        files = obj_copy (argv[1], SHALLOW);
+        cwd  = argv[0];
+    } else {
+        out_errorn ("cd: wrong number of arguments");
+        return NIL;
+    }
+
+    /* Make sure `files' is a list of files and the directory name is some
+    * name string. */
+    if (C_CONS!=files->pub.cls) {
+        files = obj_new(C_CONS, files, NIL);
+    }
+    if (!cwd || NULL==(dirname=obj_name(cwd))) {
+        out_error ("cd: inappropriate directory name: ", cwd);
+        goto error;
+    }
+
+    /* Change directories for each file */
+    for (ptr=files; ptr; ptr=cons_tail(ptr)) {
+        obj_t f = cons_head(ptr);
+        if (!f || C_FILE!=f->pub.cls || NULL==(dbfile=file_file(f))) {
+            out_error("cd: inappropriate file: ", f);
+        } else if (DBSetDir (dbfile, dirname)<0) {
+            out_errorn ("cd: cannot set CWD to \"%s\" for file %s",
+                        dirname, obj_name(f));
+        }
+    }
+   
+    return files;
+
+ error:
+    obj_dest(files);
+    return NIL;
+}
+      
+

+/*-------------------------------------------------------------------------
+ * Function:    V_setf
+ *
+ * Purpose:     Sets the symbols functional value (and removes an
+ *              existing value).
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_setf (int argc, obj_t argv[]) {
+
+   if (2!=argc) {
+      out_errorn ("fsetf: wrong number of arguments");
+      return NIL;
+   }
+   if (!argv[0] || C_SYM!=argv[0]->pub.cls) {
+      out_error ("fsetf: arg-1 (symbol) is inappropriate: ", argv[0]);
+      return NIL;
+   }
+
+   sym_fbind (argv[0], obj_copy(argv[1], SHALLOW));
+   return NIL;
+}
+      
+

+/*-------------------------------------------------------------------------
+ * Function:    V_struct
+ *
+ * Purpose:     Creates a structure. The first argument is the name
+ *              and the remaining arguments are offset and subtype pairs.
+ *
+ * Return:      Success:        Ptr to a struct type object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_struct (int argc, obj_t argv[]) {
+
+   obj_t        sub[32];
+   int          offset[32], i, argno;
+   char         *structname, *name[32];
+
+   if (argc<4 || argc>NELMTS(sub)*3+1) {
+      out_errorn ("struct: wrong number of arguments");
+      return NIL;
+   }
+
+   memset (sub, 0, sizeof(sub));
+   memset (offset, 0, sizeof(offset));
+   memset (name, 0, sizeof(name));
+   
+   structname = obj_name (argv[0]);
+
+   for (i=0,argno=1; i<NELMTS(sub) && argno+1<argc; i++,argno+=3) {
+      /*
+       * The offset.
+       */
+      if (!argv[argno] || C_NUM!=argv[argno]->pub.cls) {
+         out_errorn ("struct: offset for component %d is not numeric", i+1);
+         return NIL;
+      }
+      if ((offset[i]=num_int(argv[argno]))<0) {
+         out_errorn ("struct: offset for component %d is out of range", i+1);
+         return NIL;
+      }
+
+      /*
+       * The name.
+       */
+      if (NULL==(name[i]=obj_name(argv[argno+1]))) {
+         out_errorn ("struct: component %d has no name", i+1);
+         return NIL;
+      }
+      
+      /*
+       * The component type.
+       */
+      sub[i] = argv[argno+2];
+      if (!sub[i]) {
+         out_errorn ("struct: component type %d is missing", i+1);
+         return NIL;
+      }
+   }
+
+   return obj_new (C_STC, structname,
+                   obj_copy(sub[ 0], SHALLOW), offset[ 0], name[ 0],
+                   obj_copy(sub[ 1], SHALLOW), offset[ 1], name[ 1],
+                   obj_copy(sub[ 2], SHALLOW), offset[ 2], name[ 2],
+                   obj_copy(sub[ 3], SHALLOW), offset[ 3], name[ 3],
+                   obj_copy(sub[ 4], SHALLOW), offset[ 4], name[ 4],
+                   obj_copy(sub[ 5], SHALLOW), offset[ 5], name[ 5],
+                   obj_copy(sub[ 6], SHALLOW), offset[ 6], name[ 6],
+                   obj_copy(sub[ 7], SHALLOW), offset[ 7], name[ 7],
+                   obj_copy(sub[ 8], SHALLOW), offset[ 8], name[ 8],
+                   obj_copy(sub[ 9], SHALLOW), offset[ 9], name[ 9],
+                   obj_copy(sub[10], SHALLOW), offset[10], name[10],
+                   obj_copy(sub[11], SHALLOW), offset[11], name[11],
+                   obj_copy(sub[12], SHALLOW), offset[12], name[12],
+                   obj_copy(sub[13], SHALLOW), offset[13], name[13],
+                   obj_copy(sub[14], SHALLOW), offset[14], name[14],
+                   obj_copy(sub[15], SHALLOW), offset[15], name[15],
+                   obj_copy(sub[16], SHALLOW), offset[16], name[16],
+                   obj_copy(sub[17], SHALLOW), offset[17], name[17],
+                   obj_copy(sub[18], SHALLOW), offset[18], name[18],
+                   obj_copy(sub[19], SHALLOW), offset[19], name[19],
+                   obj_copy(sub[20], SHALLOW), offset[20], name[20],
+                   obj_copy(sub[21], SHALLOW), offset[21], name[21],
+                   obj_copy(sub[22], SHALLOW), offset[22], name[22],
+                   obj_copy(sub[23], SHALLOW), offset[23], name[23],
+                   obj_copy(sub[24], SHALLOW), offset[24], name[24],
+                   obj_copy(sub[25], SHALLOW), offset[25], name[25],
+                   obj_copy(sub[26], SHALLOW), offset[26], name[26],
+                   obj_copy(sub[27], SHALLOW), offset[27], name[27],
+                   obj_copy(sub[28], SHALLOW), offset[28], name[28],
+                   obj_copy(sub[29], SHALLOW), offset[29], name[29],
+                   obj_copy(sub[30], SHALLOW), offset[30], name[30],
+                   obj_copy(sub[31], SHALLOW), offset[31], name[31], NULL);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    F_tail
+ *
+ * Purpose:     Returns the tail of a list.
+ *
+ * Return:      Success:        Ptr to the tail
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+F_tail (obj_t lst) {
+
+   if (!lst) return NIL;
+   if (C_CONS!=lst->pub.cls) return NIL;
+
+   return obj_copy (cons_tail(lst), SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    V_typeof
+ *
+ * Purpose:     Prints the type of some object.
+ *
+ * Return:      Success:        The type
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  6 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Works for all types of objects.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+V_typeof (int argc, obj_t argv[]) {
+
+   obj_t        retval=NIL;
+   char         buf[256];
+
+   if (1!=argc) {
+      out_errorn ("typeof: wrong number of arguments");
+      return NIL;
+   }
+   
+   if (!argv[0]) {
+      retval = NIL;
+
+   } else if (C_SDO==argv[0]->pub.cls) {
+      retval = obj_copy (sdo_typeof(argv[0]), SHALLOW);
+
+   } else if (num_isint(argv[0])) {
+      sprintf (buf, "%s_int", argv[0]->pub.cls->name);
+      retval = obj_new (C_SYM, buf);
+
+   } else if (num_isfp(argv[0])) {
+      sprintf (buf, "%s_fp", argv[0]->pub.cls->name);
+      retval = obj_new (C_SYM, buf);
+      
+   } else {
+      retval = obj_new (C_SYM, argv[0]->pub.cls->name);
+
+   }
+   return retval;
+}
+
diff --git a/tools/browser/lex.c b/tools/browser/lex.c
new file mode 100644
index 0000000..4df8964
--- /dev/null
+++ b/tools/browser/lex.c
@@ -0,0 +1,904 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             lex.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Lexical analysis functions.
+ *
+ * Modifications:
+ *      Sean Ahern, Mon Oct 12 17:43:52 PDT 1998
+ *      Removed references to AIO, since it's no longer supported.
+ *      Converted tabs to spaces, removed trailing whitespace.
+ *
+ *      Thomas Treadway, Thu Jun  8 16:56:35 PDT 2006
+ *      Modified readline definitions to support new configure macro.
+ *
+ *-------------------------------------------------------------------------
+ */
+#include "config.h"     /*MeshTV configuration record*/
+
+#include <assert.h>
+#include "browser.h"
+#include <ctype.h>
+#include <errno.h>
+#ifdef HAVE_LIBREADLINE
+#  if defined(HAVE_READLINE_READLINE_H)
+#    include <readline/readline.h>
+#  elif defined(HAVE_READLINE_H)
+#    include <readline.h>
+#  else /* !defined(HAVE_READLINE_H) */
+extern char *readline ();
+#  endif /* !defined(HAVE_READLINE_H) */
+/***char *cmdline = NULL;***/ /* defined in main */
+#else /* !defined(HAVE_READLINE_READLINE_H) */
+  /* no readline */
+#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE_HISTORY
+#  if defined(HAVE_READLINE_HISTORY_H)
+#    include <readline/history.h>
+#  elif defined(HAVE_HISTORY_H)
+#    include <history.h>
+#  else /* !defined(HAVE_HISTORY_H) */
+extern void add_history ();
+extern int write_history ();
+extern int read_history ();
+#  endif /* defined(HAVE_READLINE_HISTORY_H) */
+  /* no history */
+#endif /* HAVE_READLINE_HISTORY */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif /* HAVE_SYS_STAT_H */
+
+#define LEX_PROMPT      "> "
+#define LEX_PROMPT2     "...> "
+
+/*
+ * Non-posix functions
+ */
+lex_t *LEX_STDIN = NULL;
+extern FILE *fdopen(int, const char *);
+
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_open
+ *
+ * Purpose:     Open a file for reading.
+ *
+ * Return:      Success:        Ptr to a lex_t input file.
+ *
+ *              Failure:        NULL, error printed.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-07
+ *              This function fails unless FNAME is a readable _file_.
+ *
+ *              Robb Matzke, 2000-07-10
+ *              Sets LEX_STDIN if unset.
+ *
+ *      Thomas R. Treadway, Tue Jun 27 13:59:21 PDT 2006
+ *      Added HAVE_STRERROR wrapper
+ *-------------------------------------------------------------------------
+ */
+lex_t *
+lex_open(const char *fname)
+{
+    lex_t       *f=NULL;
+    struct stat sb;
+    FILE        *stream;
+
+    /* Check the file */
+    if (stat(fname, &sb)<0) {
+#ifdef HAVE_STRERROR
+        out_errorn("lex_open: cannot open file `%s' (%s)",
+                   fname, strerror(errno));
+#else
+        out_errorn("lex_open: cannot open file `%s' (errno=%d)",
+                   fname, errno);
+#endif
+        return NULL;
+    }
+    if (!S_ISREG(sb.st_mode)) {
+        out_errorn("lex_open: cannot open file `%s' (Not a regular file)",
+                   fname);
+        return NULL;
+    }
+
+    /* Open the stream */
+    if (NULL==(stream=fopen(fname, "r"))) {
+#ifdef HAVE_STRERROR
+        out_errorn("lex_open: cannot open file `%s' (%s)",
+                   fname, strerror(errno));
+#else
+        out_errorn("lex_open: cannot open file `%s' (errno=%d)",
+                   fname, errno);
+#endif
+        return NULL;
+    }
+
+    /* Create the lex file pointer */
+    f = calloc(1, sizeof(lex_t));
+    assert(f);
+    f->f = stream;
+    f->prompt = LEX_PROMPT;
+    if (!LEX_STDIN) LEX_STDIN = f;
+    return f;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_stream
+ *
+ * Purpose:     Reopens a stream for reading.
+ *
+ * Return:      Success:        Ptr to a lex_t input file.
+ *
+ *              Failure:        NULL, error printed.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-07-10
+ *              Sets LEX_STDIN if unset.
+ *
+ *      Thomas R. Treadway, Tue Jun 27 13:59:21 PDT 2006
+ *      Added HAVE_STRERROR wrapper
+ *-------------------------------------------------------------------------
+ */
+lex_t *
+lex_stream(FILE *stream)
+{
+    lex_t        *f = calloc(1, sizeof(lex_t));
+
+    assert (f);
+    if (NULL==(f->f=fdopen(fileno(stream), "r"))) {
+#ifdef HAVE_STRERROR
+        out_errorn ("lex_stream: cannot reopen stream (%s)",
+                    strerror(errno));
+#else
+        out_errorn ("lex_stream: cannot reopen stream (errno=%d)", errno);
+#endif
+        free(f);
+        return NULL;
+    }
+    f->prompt = LEX_PROMPT;
+    if (!LEX_STDIN) LEX_STDIN = f;
+    return f;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_string
+ *
+ * Purpose:     Creates a lexer input object which reads a buffer supplied
+ *              by the caller.
+ *
+ * Return:      Success:        Ptr to a new lex_t input object.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *              Jeremy Meredith, Thu Aug 26 09:59:44 PDT 1999
+ *              Changed use of strdup() to safe_strdup().
+ *
+ *              Robb Matzke, 2000-07-10
+ *              Sets LEX_STDIN if unset.
+ *-------------------------------------------------------------------------
+ */
+lex_t *
+lex_string(const char *s)
+{
+    lex_t        *f = calloc(1, sizeof(lex_t));
+
+    assert(f);
+    f->s = safe_strdup(s?s:"");
+    f->prompt = LEX_PROMPT;
+    if (!LEX_STDIN) LEX_STDIN = f;
+    return f;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Create an input object which is a sequence of other input
+ *              objects.
+ *
+ * Return:      New stack input object.
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, July 10, 2000
+ *
+ * Modifications:
+ *-----------------------------------------------------------------------------
+ */
+lex_t *
+lex_stack(void)
+{
+    lex_t       *f = calloc(1, sizeof(lex_t));
+    if (!LEX_STDIN) LEX_STDIN = f;
+    return f;
+}
+
+/*-----------------------------------------------------------------------------
+ * Purpose:     Push a new input item onto the stack.
+ *
+ * Programmer:  Robb Matzke
+ *              Monday, July 10, 2000
+ *
+ * Modifications:
+ *-----------------------------------------------------------------------------
+ */
+void
+lex_push(lex_t *f, lex_t *item)
+{
+    if (f->nstack+1>=NELMTS(f->stack)) {
+        out_errorn("file inclusion nested too deeply");
+    } else {
+        f->stack[f->nstack++] = item;
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_close
+ *
+ * Purpose:     Closes a lexer input file.
+ *
+ * Return:      Success:        NULL
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-07-10
+ *              Modified to work with stack input items.
+ *-------------------------------------------------------------------------
+ */
+lex_t *
+lex_close(lex_t *f)
+{
+    int         i;
+
+    assert(f);
+
+    if (f==LEX_STDIN) LEX_STDIN=NULL;
+
+    if (f->f) fclose(f->f);
+    if (f->s) free(f->s);
+    for (i=0; i<f->nstack; i++) lex_close(f->stack[i]);
+    memset(f, 0, sizeof(lex_t));
+    free(f);
+    return NULL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_getc
+ *
+ * Purpose:     Similar to getc(3) except uses the GNU readline library
+ *              and issues prompts as necessary.
+ *
+ * Return:      Success:        Next character
+ *
+ *              Failure:        EOF
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *      Robb Matzke, 29 Jul 1997
+ *      If the line-feed is escaped with a backslash, then the backslash
+ *      and line-feed are both ignored.
+ *
+ *      Jeremy Meredith, Thu Aug 26 09:59:44 PDT 1999
+ *      Changed use of strdup() to safe_strdup().
+ *
+ *      Robb Matzke, 2000-07-10
+ *      Modified to work with stacked input streams.
+ *-------------------------------------------------------------------------
+ */
+int
+lex_getc(lex_t *f)
+{
+    int          c=EOF;
+#ifdef HAVE_READLINE_HISTORY
+    static char  buf[1024];
+#endif
+
+    if (f->s) {
+        c = f->s[f->at++];
+        if (!f->s[f->at]) {
+            free(f->s);
+            f->s = NULL;
+            f->at = 0;
+        }
+
+    } else if (f->f && isatty(fileno(f->f))) {
+        /* Input is from the standard input stream.  Use readline() to
+         * get it and add it to the history if different than the
+         * previous line. */
+#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_LIBREADLINE)
+        char *temp = readline(f->prompt);
+        if (temp) {
+            f->s = malloc(strlen(temp)+2);
+            strcpy(f->s, temp);
+            strcat(f->s, "\n");
+        }
+#else
+        char temp[4096];
+        fputs(f->prompt, stdout);
+        if (fgets(temp, sizeof(temp), f->f)) {
+            f->s = safe_strdup(temp);
+        } else {
+            f->s = NULL;
+        }
+#endif
+        f->at = 0;
+#if defined(HAVE_READLINE_READLINE_H) && defined(HAVE_READLINE_HISTORY)
+        if (f->s && f->s[0] && strncmp(buf, f->s, sizeof(buf))) {
+            add_history(f->s);
+            strncpy(buf, f->s, sizeof(buf));
+        }
+#endif
+        c = (f->s ? lex_getc(f) : EOF);
+
+    } else if (f->f) {
+        /* Input is from a non-interactive stream. */        
+        c = getc(f->f);
+        
+    } else if (f->nstack) {
+        while (f->nstack && EOF==(c=lex_getc(f->stack[f->nstack-1]))) {
+            lex_close(f->stack[f->nstack-1]);
+            f->stack[--f->nstack] = NULL;
+        }
+        return c;
+   
+    } else {
+        return EOF;
+    }
+
+    /* If this character is a backslash and the following character
+     * is a line-feed, then ignore both of them and return the following
+     * character instead.  This allows us to always continue a line by
+     * escaping the line-feed. */
+    if ('\\'==c) {
+        int peek = lex_getc(f);
+        if ('\n'!=peek) lex_ungetc(f, peek);
+        else c = lex_getc(f);
+    }
+
+    return c;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_ungetc
+ *
+ * Purpose:     Pushes a character back onto the input stream.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *              Jeremy Meredith, Thu Aug 26 09:59:44 PDT 1999
+ *              Changed use of strdup() to safe_strdup().
+ *
+ *              Robb Matzke, 2000-07-10
+ *              Modified to work with stacked input.
+ *-------------------------------------------------------------------------
+ */
+int
+lex_ungetc(lex_t *f, int c)
+{
+    int          status = (-1);
+
+    if (EOF==c) {
+        status = -1;
+
+    } else if (f->s) {
+        /* Input is from a string or the GNU readline library.  Just
+         * back up the string offset. */
+        if (f->at>0 && f->s[f->at-1]==c) {
+            f->at -= 1;
+            status = 0;
+        } else {
+            status = -1;
+        }
+        
+    } else if (f->f && !isatty(fileno(f->f))) {
+        /* Input is from a file. */        
+        status = ungetc(c, f->f);
+
+    } else {
+        /* Allocate a buffer for the pushback */
+        f->s = malloc(2);
+        f->s[0] = c;
+        f->s[1] = '\0';
+        f->at = 0;
+    }
+    return status;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_gets
+ *
+ * Purpose:     Like fgets(3) except using the lexer input stream.  The
+ *              current token (if any) is not affected.
+ *
+ * Return:      Success:        BUF
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lex_gets(lex_t *f, char *buf, int size)
+{
+    int          c, at=0;
+
+    while (EOF!=(c=lex_getc(f)) && '\n'!=c) {
+        if (at+1<size) buf[at++] = c;
+    }
+    if (size>0) buf[at] = '\0';
+    return (EOF!=c || at>0) ? buf : NULL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_token
+ *
+ * Purpose:     Figures out what token is next on the input stream.  If
+ *              skipnl is non-zero then the new-line token is skipped.
+ *
+ * Return:      Success:        Token number, optional lexeme returned
+ *                              through the LEXEME argument.
+ *
+ *              Failure:        TOK_INVALID
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Cleaned up error messages.
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      Added the `=' token.
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      The `*' and `?'characters are now legal as part of a symbol name
+ *      so we can give those pattern matching characters to the `ls'
+ *      command.
+ *
+ *      Robb Matzke, 12 Mar 1997
+ *      Since we don't have mathematical expressions yet, a numeric
+ *      constant is allowed to begin with a `-'.
+ *
+ *      Robb Matzke, 2000-06-06
+ *      Symbol names may include `-'. Something that starts with a `-' is
+ *      only a number if it's followed by a digit.
+ *
+ *      Mark C. Miller, Mon Nov  9 18:08:05 PST 2009
+ *      Added logic to support parsing of '#nnnnnn' dataset names,
+ *      but only when in '/.silo' dir.
+ *-------------------------------------------------------------------------
+ */
+int
+lex_token(lex_t *f, char **lexeme, int skipnl)
+{
+    int          c, at, quote, inDotSiloDir=0;
+    static const char *symcharsA = "_$/*?";
+    static const char *symcharsB = "_$/*?#";
+    const char *symchars = symcharsA;
+
+    /* Return the current token if appropriate. */    
+    if (f->tok && (!skipnl || TOK_EOL!=f->tok)) {
+        if (lexeme) *lexeme = f->lexeme;
+        return f->tok;
+    }
+
+    /* Skip leading space. */    
+    f->prompt = skipnl ? LEX_PROMPT2 : LEX_PROMPT;
+    while (EOF!=(c=lex_getc(f)) && '\n'!=c && isspace(c)) /*void*/;
+
+    /* handle special case of leading '#' and see if we're in .silo dir */
+    if ('#'==c) {
+        obj_t   f1, val;
+        DBfile *file;
+        char cwd[1024];
+
+        f1 = obj_new (C_SYM, "$1");
+        val = sym_vboundp (f1);
+        f1 = obj_dest (f1);
+        if (NULL!=(file=file_file(val)) && 
+            DBGetDir(file, cwd)>=0 &&
+            !strncmp(cwd,"/.silo",6)) {
+            inDotSiloDir = 1;
+            symchars = symcharsB;
+        }
+    }
+
+    /* Store the next token. */    
+    if (EOF==c) {
+        f->lexeme[0] = '\0';
+        f->tok = EOF;
+
+    } else if ('\n'==c) {
+        if (skipnl) {
+            f->tok = lex_token(f, NULL, true);
+        } else {
+            f->lexeme[0] = '\n';
+            f->lexeme[1] = '\0';
+            f->tok = TOK_EOL;
+        }
+
+    } else if ('#'==c && !inDotSiloDir) {
+        while (EOF!=(c=lex_getc(f)) && '\n'!=c) /*void*/;
+        lex_ungetc(f, c);
+        return lex_token(f, lexeme, skipnl);
+
+    } else if ('>'==c) {
+        c = lex_getc(f);
+        if ('>'==c) {
+            strcpy(f->lexeme, ">>");
+            f->tok = TOK_RTRT;
+        } else {
+            lex_ungetc(f, c);
+            strcpy(f->lexeme, ">");
+            f->tok = TOK_RT;
+        }
+
+    } else if (strchr("|.()[]{}:,=", c)) {
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        f->tok = c;
+
+    } else if (isalpha(c) || strchr(symchars,c)) {
+        /* A symbol. */        
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        at = 1;
+        while (EOF!=(c=lex_getc(f)) &&
+               (isalpha(c) || isdigit(c) || strchr(symchars, c))) {
+            if (at+1<sizeof(f->lexeme)) {
+                f->lexeme[at++] = c;
+                f->lexeme[at] = '\0';
+            }
+        }
+        lex_ungetc(f, c);
+        f->tok = TOK_SYM;
+      
+    } else if ('-'==c) {
+        /* Could be a number or a symbol */
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        if (EOF!=(c=lex_getc(f)) && ('.'==c || isdigit(c))) {
+            f->lexeme[1] = c;
+            f->lexeme[2] = '\0';
+            at = 2;
+            while (EOF!=(c=lex_getc(f)) &&
+                   (isdigit(c) || strchr("+-.eE", c))) {
+                if (at+1<sizeof(f->lexeme)) {
+                    f->lexeme[at++] = c;
+                    f->lexeme[at] = '\0';
+                }
+            }
+            lex_ungetc(f, c);
+            f->tok = TOK_NUM;
+        } else {
+            at=1;
+            while (EOF!=c &&
+                   (isalpha(c) || isdigit(c) || strchr("_$/*?-", c))) {
+                if (at+1<sizeof(f->lexeme)) {
+                    f->lexeme[at++] = c;
+                    f->lexeme[at] = '\0';
+                }
+                c = lex_getc(f);
+            }
+            lex_ungetc(f, c);
+            f->tok = TOK_SYM;
+        }
+       
+    } else if ('-'==c || isdigit(c)) {
+        /* A number */        
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        at = 1;
+        while (EOF!=(c=lex_getc(f)) &&
+               (isdigit(c) || strchr("+-.eE", c))) {
+            if (at+1<sizeof(f->lexeme)) {
+                f->lexeme[at++] = c;
+                f->lexeme[at] = '\0';
+            }
+        }
+        lex_ungetc(f, c);
+        f->tok = TOK_NUM;
+
+    } else if ('"'==c || '\''==c) {
+        /* A string */        
+        quote = c;
+        at = 0;
+        f->lexeme[0] = '\0';
+        while (EOF!=(c=lex_getc(f)) && quote!=c && '\n'!=c) {
+            if ('\\'==c) {
+                switch ((c=lex_getc(f))) {
+                case 'b':
+                    c = '\b';
+                    break;
+                case 'n':
+                    c = '\n';
+                    break;
+                case 'r':
+                    c = '\r';
+                    break;
+                case 't':
+                    c = '\t';
+                    break;
+                case EOF:
+                    c = '\\';
+                    break;
+                default:
+                    if (c>='0' && c<='7') {
+                        int c2 = lex_getc(f);
+                        if (c2>='0' && c2<='7') {
+                            int c3 = lex_getc(f);
+                            if (c3>='0' && c3<='7') {
+                                c = ((c-'0')*8+c2-'0')*8+c3-'0';
+                            } else {
+                                lex_ungetc(f, c3);
+                                c = (c-'0')*8+c2-'0';
+                            }
+                        } else {
+                            lex_ungetc(f, c2);
+                            c -= '0';
+                        }
+                    }
+                    break;
+                }
+            }
+            if (at+1<sizeof(f->lexeme)) {
+                f->lexeme[at++] = c;
+                f->lexeme[at] = '\0';
+            }
+        }
+        if ('\n'==c) {
+            out_errorn("linefeed inside string constant (truncated at EOL)");
+            lex_ungetc(f, c);
+        } else if (c<0) {
+            out_errorn("EOF inside string constant (truncated at EOF)");
+        }
+        f->tok = TOK_STR;
+
+    } else {
+        /* Invalid character.  Don't print an error message since a
+         * syntax error will result in the parser anyway. */
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        f->tok = TOK_INVALID;
+    }
+
+    if (lexeme) *lexeme = f->lexeme;
+    return f->tok;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_special
+ *
+ * Purpose:     Special parsing for the next token.  For instance, the next
+ *              token might be an unquoted file name `file.pdb' which would
+ *              normally be returned as (SYM DOT SYM).  Instead, this function
+ *              would parse it as a single string.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+lex_special(lex_t *f, int skipnl)
+{
+    int          c, at=0;
+
+    if (skipnl && f->tok) {
+        f->tok = 0;
+        f->lexeme[0] = 0;
+    }
+
+    assert(0==f->tok);          /*too late for special lexical analysis*/
+
+    /* Skip leading space.  Skip line-feeds too if SKIPNL is non-zero. */    
+    f->prompt = skipnl ? LEX_PROMPT2 : LEX_PROMPT;
+    while (EOF!=(c=lex_getc(f)) && isspace(c) && (skipnl || '\n'!=c)) /*void*/;
+    if (EOF==c) return;
+
+    if (isalpha(c) || isdigit(c) || strchr ("!@$%^&*-_=+,.?/;:~", c)) {
+        f->lexeme[0] = c;
+        f->lexeme[1] = '\0';
+        at = 1;
+        while (EOF!=(c=lex_getc(f)) &&
+               (isalpha(c) || isdigit(c) || strchr("!@$%^&*-_=+,.?/;:~", c))) {
+            if (at+1<sizeof(f->lexeme)) {
+                f->lexeme[at++] = c;
+                f->lexeme[at] = '\0';
+            }
+        }
+        f->tok = TOK_STR;
+    }
+    lex_ungetc (f, c);
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_consume
+ *
+ * Purpose:     Consumes the current token.
+ *
+ * Return:      Success:        Token that was consumed.
+ *
+ *              Failure:        EOF
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+lex_consume(lex_t *f)
+{
+    int          retval;
+
+    retval = lex_token (f, NULL, false);
+    f->tok = 0;
+    return retval;
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_set
+ *
+ * Purpose:     Sets the current token and lexeme to that which is
+ *              specified.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+lex_set(lex_t *f, int tok, char *lexeme)
+{
+    f->tok = tok;
+    if (lexeme) strcpy (f->lexeme, lexeme);
+    else f->lexeme[0] = '\0';
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    lex_strtok
+ *
+ * Purpose:     Same as strtok(3) except it takes an extra argument and
+ *              it's reentrant.
+ *
+ * Return:      Success:        Ptr to next token.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.com
+ *              Jul 30 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+lex_strtok(char *s, const char *delim, strtok_t *state)
+{
+    if (!s) {
+        /* Continue from a previous time... */        
+        if (state->stop) {
+            *(state->stop) = state->save;
+            s = state->stop + 1;
+        }
+    }
+
+
+    if (s) {
+        /* Get the next token. */        
+        s += strspn(s, delim);
+        state->stop = strpbrk(s, delim);
+        if (state->stop) {
+            state->save = *(state->stop);
+            *(state->stop) = '\0';
+        }
+    }
+
+    return s;
+}
+
diff --git a/tools/browser/num.c b/tools/browser/num.c
new file mode 100644
index 0000000..02b9327
--- /dev/null
+++ b/tools/browser/num.c
@@ -0,0 +1,416 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             num.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Number functions.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#include <ctype.h>
+#include <math.h>
+
+#define MYCLASS(X)      ((obj_num_t*)(X))
+
+typedef struct obj_num_t {
+   obj_pub_t    pub;
+   int          fp;
+   union {
+      int       i;
+      double    d;
+   } u;
+} obj_num_t;
+
+class_t         C_NUM;
+static obj_t    num_new (va_list);
+static void     num_print (obj_t, out_t*);
+static int      num_diff (obj_t, obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_class
+ *
+ * Purpose:     Initializes the number class.
+ *
+ * Return:      Success:        Ptr to the num class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+num_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("NUM");
+   cls->new = num_new;
+   cls->dest = NULL;
+   cls->copy = NULL;
+   cls->print = num_print;
+   cls->diff = num_diff;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_new
+ *
+ * Purpose:     Creates a new number object from a string.  The string can
+ *              have leading and trailing space.  Strings that start with
+ *              `0x' are hexadecimal and strings starting with `0' are
+ *              octal.
+ *
+ * Return:      Success:        Ptr to new number object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+num_new (va_list ap) {
+
+   obj_num_t    *self = calloc (1, sizeof(obj_num_t));
+   char         *lexeme;
+
+   lexeme = va_arg (ap, char*);
+   if (strchr(lexeme, '.') ||
+       strchr(lexeme, 'e') ||
+       strchr(lexeme, 'E')) {
+      self->fp = true;
+      self->u.d = strtod (lexeme, NULL);
+   } else {
+      self->fp = false;
+      self->u.i = strtol (lexeme, NULL, 0);
+   }
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_print
+ *
+ * Purpose:     Prints a number.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-28
+ *              Uses the $fmt_int or $fmt_double format.
+ *
+ *              Robb Matzke, 2000-10-23
+ *              Looks at $obase.
+ *-------------------------------------------------------------------------
+ */
+static void
+num_print(obj_t _self, out_t *f)
+{
+    obj_num_t           *self=MYCLASS(_self);
+    int                 obase=sym_bi_true("obase");
+    unsigned char       *mem=NULL;
+    int                 i, j;
+    char                buf[512];
+    unsigned            u, mask, nbits;
+
+    if (self->fp) {
+        mem = (unsigned char*)&(self->u.d);
+        if (16==obase) {
+            for (i=0; i<sizeof(double); i++) {
+                sprintf(buf+2*i, "%02x", *(mem+i));
+            }
+            out_puts(f, buf);
+        } else if (8==obase) {
+            prim_octal(buf, mem, sizeof(double));
+            out_puts(f, buf);
+        } else if (2==obase) {
+            for (i=0; i<sizeof(double); i++) {
+                u = *((unsigned char*)mem+i);
+                for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                    sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                }
+            }
+            out_puts(f, buf);
+        } else {
+            char *fmt = sym_bi_gets("fmt_double");
+            if (!fmt || !*fmt) fmt = "%g";
+            out_printf(f, fmt, self->u.d);
+        }
+    } else {
+
+        mem = (unsigned char*)&(self->u.i);
+        u = *((unsigned*)mem);
+        nbits = 8*sizeof(self->u.i);
+
+        if (16==obase) {
+            out_printf(f, "%0*x", 2*sizeof(int), (unsigned)(self->u.i));
+        } else if (8==obase) {
+            out_printf(f, "%0*o", (nbits+2)/3, (unsigned)(self->u.i));
+        } else if (2==obase) {
+            for (i=0; i<sizeof(self->u.i); i++) {
+                u = *((unsigned char*)mem+i);
+                for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                    sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                }
+            }
+            out_puts(f, buf);
+        } else {
+            char *fmt = sym_bi_gets("fmt_int");
+            if (!fmt || !*fmt) fmt = "%d";
+            out_printf (f, fmt, self->u.i);
+        }
+    }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_diff
+ *
+ * Purpose:     Determines if two numbers are the same or different.
+ *
+ * Return:      Success:
+ *                 0:   Numbers are the same (or close enough)
+ *                 1:   Numbers are different and the difference was printed.
+ *                 2:   Numbers are sufficiently different.
+ *
+ *              Failure:
+ *                 -1:  Some type of failure.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *      Robb Matzke, 7 Feb 1997
+ *      If both numbers are integers then we use the integer differencing
+ *      tolerances.
+ *
+ *      Robb Matzke, 2000-06-28
+ *      Honors the DiffOpt settings. Supports two-column output.
+ *
+ *  Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *  Added suppot for alternate relative diff option using epsilon param.
+ *-------------------------------------------------------------------------
+ */
+static int
+num_diff (obj_t _a, obj_t _b) {
+
+   obj_num_t    *a = MYCLASS(_a);
+   obj_num_t    *b = MYCLASS(_b);
+   double       ad, bd, abs, rel, eps;
+   int          status;
+   out_t        *f = OUT_STDOUT;
+
+   if (a->fp || b->fp) {
+      ad = a->fp ? a->u.d : (double)(a->u.i);
+      bd = b->fp ? b->u.d : (double)(b->u.i);
+      abs = DiffOpt.d_abs;
+      rel = DiffOpt.d_rel;
+      eps = DiffOpt.d_eps;
+   } else {
+      ad = a->u.i;
+      bd = b->u.i;
+      abs = DiffOpt.i_abs;
+      rel = DiffOpt.i_rel;
+      eps = DiffOpt.i_eps;
+   }
+
+   status = different (ad, bd, abs, rel, eps) ? 2 : 0;
+   if (status>0 && DIFF_REP_ALL==DiffOpt.report && DiffOpt.two_column) {
+       obj_print(_a, f);
+       out_column(f, OUT_COL2, DIFF_SEPARATOR);
+       obj_print(_b, f);
+       out_nl(f);
+       status = 1;
+   }
+   return status;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_int
+ *
+ * Purpose:     Returns the integer value of SELF
+ *
+ * Return:      Success:        An integer value.
+ *
+ *              Failure:        Floating point values are truncated.
+ *                              If SELF is not a number then -1 is returned.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      It is safe to call this function for any type of object.
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+num_int (obj_t _self) {
+
+   int          retval;
+   obj_num_t    *self = MYCLASS(_self);
+
+   if (!self || C_NUM!=self->pub.cls) return -1;
+   if (self->fp) retval = (int)(self->u.d);
+   else retval = self->u.i;
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_isint
+ *
+ * Purpose:     Returns true iff the object is an integer.
+ *
+ * Return:      Success:        true or false.
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+num_isint (obj_t _self) {
+
+   obj_num_t    *self = MYCLASS(_self);
+
+   return (self && C_NUM==self->pub.cls && !self->fp);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_fp
+ *
+ * Purpose:     Returns the floating point value of SELF
+ *
+ * Return:      Success:        A double value.
+ *
+ *              Failure:        Never fails
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+double
+num_fp (obj_t _self) {
+
+   obj_num_t    *self = MYCLASS(_self);
+   
+   return self->fp ? self->u.d : (double)(self->u.i);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    num_isfp
+ *
+ * Purpose:     Returns true iff the object is an integer or floating
+ *              point value.
+ *
+ * Return:      Success:        true or false.
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+num_isfp (obj_t _self) {
+
+   obj_num_t    *self = MYCLASS(_self);
+
+   return (self && C_NUM==self->pub.cls);
+}
diff --git a/tools/browser/obj.c b/tools/browser/obj.c
new file mode 100644
index 0000000..9fd8845
--- /dev/null
+++ b/tools/browser/obj.c
@@ -0,0 +1,829 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             obj.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Class methods.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+
+int             DebugPrinting;
+static int      NObjs;
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_init
+ *
+ * Purpose:     Initializes the object oriented stuff.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+obj_init (void) {
+
+   C_ARY   = ary_class  ();
+   C_BIF   = bif_class  ();
+   C_CONS  = cons_class ();
+   C_FILE  = file_class ();
+   C_NUM   = num_class  ();
+   C_PRIM  = prim_class ();
+   C_PTR   = ptr_class  ();
+   C_RANGE = range_class ();
+   C_SDO   = sdo_class  ();
+   C_STC   = stc_class  ();
+   C_STR   = str_class  ();
+   C_SYM   = sym_class  ();
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_new
+ *
+ * Purpose:     Given the class name (CELL_CONS, CELL_SYM, etc.) create
+ *              a new object by calling the appropriate constructor.
+ *
+ * Return:      Success:        Ptr to a new cell.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_new (class_t cls, ...) {
+
+   va_list      ap;
+   obj_t        self=NIL;
+   
+   assert (cls);
+   
+
+   /*
+    * Initialize the object if a constructor is defined.
+    */
+   if (cls->new) {
+      va_start (ap, cls);
+      self = (cls->new)(ap);
+      va_end (ap);
+   } else {
+      self = calloc (1, sizeof(*self));
+   }
+
+   /*
+    * Initialize public stuff.
+    */
+   if (self) {
+      self->pub.cls = cls;
+      self->pub.ref = 1;
+      NObjs++;
+   }
+
+   return self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_copy
+ *
+ * Purpose:     Copies an object by incrementing the reference count and
+ *              invoking the copy constructor for the object.
+ *
+ * Return:      Success:        Ptr to a copy of SELF.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_copy (obj_t self, int flag) {
+
+   obj_t        new=NIL;
+   int          oldref;
+
+   if (self) {
+      oldref = self->pub.ref;
+      
+      if (self->pub.cls->copy) {
+         new = (self->pub.cls->copy)(self, flag);
+      } else {
+         assert (SHALLOW==flag);
+         new = self;
+      }
+      
+      if (new==self) {
+         assert (new->pub.ref==oldref);
+         new->pub.ref += 1;
+      } else {
+         assert (0==new->pub.ref    || 1==new->pub.ref);
+         assert (NULL==new->pub.cls || self->pub.cls==new->pub.cls);
+         new->pub.cls = self->pub.cls;
+         new->pub.ref = 1;
+      }
+   }
+
+   if (new) NObjs++;
+   return new;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_dest
+ *
+ * Purpose:     Destroys an object by invoking the destructor for the
+ *              class of which the object belongs.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_dest (obj_t self) {
+
+   class_t      cls;
+   
+   if (!self || self->pub.ref<1) return self;
+
+   --NObjs;
+   self->pub.ref -= 1;
+   cls = self->pub.cls;
+   if (cls->dest) (cls->dest)(self);
+
+   if (0==self->pub.ref) {
+      memset (&(self->pub), 0, sizeof(self->pub)) ; /*just to be sure*/
+      free (self);
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_bind
+ *
+ * Purpose:     (Re)binds array symbolic dimensions to numeric values.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_bind (obj_t self, void *mem) {
+
+   obj_t        retval=NIL;
+
+   if (self && self->pub.cls->bind) {
+      retval = (self->pub.cls->bind)(self, mem);
+   } else {
+      retval = self;
+   }
+   return retval;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_print
+ *
+ * Purpose:     Prints SELF to file F.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+obj_print (obj_t self, out_t *f) {
+
+   char         *s;
+
+   if (out_brokenpipe(f)) return;
+
+   if (DebugPrinting) {
+      if (self) {
+         out_printf (f, "<0x%08lx %d %s ",
+                     (long)self, self->pub.ref, self->pub.cls->name);
+      } else {
+         out_printf (f, "<0x00000000 ");
+      }
+   }
+   
+   if (!self) {
+      out_puts (f, "Nil");
+   } else if (self->pub.cls->print) {
+      (self->pub.cls->print)(self, f);
+   } else {
+      out_printf (f, "<0x%08lx %s", (long)self, self->pub.cls->name);
+      if ((s=obj_name(self))) out_printf (f, " %s", s);
+      out_printf (f, ">");
+   }
+
+   if (DebugPrinting) out_printf (f, ">");
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_eval
+ *
+ * Purpose:     Evaluate an object.  If no eval method is defined then
+ *              just return a copy of the object.
+ *
+ * Return:      Success:        Result object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_eval (obj_t self) {
+
+   obj_t        retval=NIL;
+
+   if (self) {
+      if (!self->pub.cls->eval) {
+         retval = obj_copy (self, SHALLOW);
+      } else {
+         retval = (self->pub.cls->eval)(self);
+      }
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_feval
+ *
+ * Purpose:     Evaluates an object for a function reference.  The result
+ *              should be a BIF object or some other type of function.
+ *
+ * Return:      Success:        Ptr to a function object
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_feval (obj_t self) {
+
+   obj_t        retval=NIL;
+
+   if (self && self->pub.cls->feval) {
+      retval = (self->pub.cls->feval)(self);
+   } else {
+      retval = NIL;
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_apply
+ *
+ * Purpose:     Applies SELF to some arguments.  The arguments should be
+ *              a list.
+ *
+ * Return:      Success:        Ptr to result
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_apply (obj_t self, obj_t args) {
+
+   obj_t        retval=NIL;
+
+   if (args && C_CONS!=args->pub.cls) {
+      out_error ("apply: function arguments are not a list: ", args);
+      out_error ("apply: function was: ", self);
+      
+   } else if (NULL==self->pub.cls->apply) {
+      out_error ("apply: cannot apply: ", self);
+
+   } else {
+      retval = (self->pub.cls->apply)(self, args);
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_name
+ *
+ * Purpose:     Returns a pointer to the name of the object, or NULL if
+ *              the object has no name.
+ *
+ * Return:      Success:        Ptr to object name
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+obj_name (obj_t self) {
+
+   char         *s = NULL;
+
+   if (self && self->pub.cls->objname) {
+      s = (self->pub.cls->objname)(self);
+   }
+   return s;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_usage
+ *
+ * Purpose:     Returns the number of objects currently allocated.
+ *
+ * Return:      Success:        Num objects existing.
+ *
+ *              Failure:        0
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+obj_usage (void) {
+
+   return NObjs;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_walk1
+ *
+ * Purpose:     Walk through MEM according to SELF, which is usually a
+ *              type specification, and perform some operation.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 5 Feb 1997
+ *      Removed printing hooks.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+obj_walk1 (obj_t self, void *mem, int oper, walk_t *wdata) {
+
+   if (self && self->pub.cls->walk1) {
+      (self->pub.cls->walk1)(self, mem, oper, wdata);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_walk2
+ *
+ * Purpose:     Walks through memory a_mem and b_mem according to type
+ *              a and b and report differences.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical.
+ *                 1: A and B partially differ.  A difference summary
+ *                    has already been printed.
+ *                 2: A and B are totally different.  The caller should
+ *                    print the difference summary.
+ *
+ *              Failure:
+ *                 -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 5 Feb 1997
+ *      Removed diffing hooks.
+ *
+ *      Robb Matzke, 18 Feb 1997
+ *      Two null values are identical even if they have different types.
+ *
+ *      Robb Matzke, 2000-06-28
+ *      Handles two-column output when the datatypes are completely different.
+ *-------------------------------------------------------------------------
+ */
+int
+obj_walk2 (obj_t a, void *a_mem, obj_t b, void *b_mem, walk_t *wdata) {
+
+    int         retval = -1;
+    out_t       *f = wdata->f;
+
+    if (!a || !b) {
+        /* Without type information we can only determine if A and B point
+         * to the same memory.  If they do then they're identical.  If
+         * they don't then we cannot make a determination of their
+         * `sameness'. */
+        retval = a_mem==b_mem ? 0 : -1;
+
+    } else if (a==b && a_mem==b_mem) {
+        /* Trivially identical. */        
+        retval = 0;
+
+    } else if (!a_mem && !b_mem) {
+        /* Different types, but both are null.  We'll assume they're the
+         * same value. */
+        retval = 0;
+
+    } else if (a->pub.cls != b->pub.cls) {
+        /* A and B have different types.  We assume that they're totally
+         * different for simplicity's sake even though there are cases where
+         * we might have reported that A and B are the same.  For instance,
+         * if we have `A: *int' and `B: int' we might want to return `same'
+         * if A points to the same value as B. */
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_puts(f, "incompatible datatypes");
+                out_nl(f);
+                retval = 1;
+            } else {
+                retval = 2;
+            }
+            break;
+        case DIFF_REP_BRIEF:
+            out_puts(f, "incompatible datatypes");
+            out_nl(f);
+            retval = 1;
+            break;
+        case DIFF_REP_SUMMARY:
+            retval = 1;
+        }
+        
+    } else if ((!a_mem && b_mem) || (!b_mem && a_mem)) {
+        /* If one is null and the other isn't then automatically assume
+         * they're totally different. */
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_puts(f, a_mem?"non-null":"null");
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                out_puts(f, b_mem?"non-null":"null");
+                out_nl(f);
+                retval = 1;
+            } else {
+                retval = 2;
+            }
+            break;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "incompatible pointers [A is %s; B is %s]",
+                       a_mem?"non-null":"null", b_mem?"non-null":"null");
+            out_nl(f);
+            retval = 1;
+            break;
+        case DIFF_REP_SUMMARY:
+            retval = 1;
+        }
+
+    } else if (NULL==a->pub.cls->walk2) {
+        /* No differencing method. */        
+        retval = -1;
+
+    } else {
+        /* Diff it! */        
+        retval = (a->pub.cls->walk2) (a, a_mem, b, b_mem, wdata);
+    }
+
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_walk3
+ *
+ * Purpose:     Walks through memory assigning values from VAL to MEM.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+obj_walk3 (void *mem, obj_t type, obj_t val) {
+
+   if (type && type->pub.cls->walk3) {
+      return (type->pub.cls->walk3)(mem, type, val);
+   }
+   
+   out_error ("assign: cannot assign to type ", type);
+   return -1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_sizeof
+ *
+ * Purpose:     Returns the number of bytes represented by the specified
+ *              object.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+obj_sizeof (obj_t self) {
+
+   if (self && self->pub.cls->size_of) {
+      return (self->pub.cls->size_of)(self);
+   }
+   return -1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_deref
+ *
+ * Purpose:     Dereferences an object according to the object's deref
+ *              method.  The HOW parameter is just an extra argument to
+ *              pass to the dereferencing method and varies according
+ *              to the type of object being dereferenced.
+ *
+ * Return:      Success:        Pointer to a new object resulting from
+ *                              dereferencing the given object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      This function now takes more than one argument because the
+ *      array dereferencing can be called iteratively.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+obj_deref (obj_t self, int argc, obj_t argv[]) {
+
+   if (self && self->pub.cls->deref) {
+      return (self->pub.cls->deref)(self, argc, argv);
+   }
+   out_error ("deref: cannot dereference: ", self);
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_diff
+ *
+ * Purpose:     Reports differences between A and B.
+ *
+ * Return:      Success:
+ *                0: A and B are identical.
+ *                1: A and B partially differ; the difference summary
+ *                   has been printed.
+ *                2: A and B are totally different; the caller should
+ *                   print the difference summary.
+ *
+ *              Failure:
+ *                -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-28
+ *              Handles DiffOpt settings.
+ *-------------------------------------------------------------------------
+ */
+int
+obj_diff (obj_t a, obj_t b)
+{
+    out_t       *f = OUT_STDOUT;
+
+    /* Handle nil cases */
+    if (a  ==  b) return 0;
+    if (!a || !b) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_puts(f, a?"non-nil":"nil");
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                out_puts(f, b?"non-nil":"nil");
+                out_nl(f);
+                return 1;
+            }
+            return 2;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "incompatible objects [A is %s; B is %s]",
+                       a?"non-nil":"nil", b?"non-nil":"nil");
+            return 1;
+        case DIFF_REP_SUMMARY:
+            return 1;
+        }
+    }
+    
+    /* We don't try to refine differences between classes */
+    if (a->pub.cls != b->pub.cls) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                out_printf(f, "Class %s", a->pub.cls->name);
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                out_printf(f, "Class %s", b->pub.cls->name);
+                out_nl(f);
+                return 1;
+            }
+            return 2;
+        case DIFF_REP_BRIEF:
+            out_printf(f, "incompatible classes [A is %s; B is %s]",
+                       a->pub.cls->name, b->pub.cls->name);
+            out_nl(f);
+            return 1;
+        case DIFF_REP_SUMMARY:
+            return 1;
+        }
+    }
+   
+    if (NULL==a->pub.cls->diff) {
+        out_errorn ("diff: no difference method for %s objects",
+                    a->pub.cls->name);
+        return -1;
+    }
+    return (a->pub.cls->diff)(a, b);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    obj_truth
+ *
+ * Purpose:     Returns false iff self is nil, integer zero, floating point
+ *              zero, or the empty string.
+ *
+ * Return:      Success:        true
+ *
+ *              Failure:        false
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+obj_truth (obj_t self) {
+
+   char         *s;
+
+   if (!self) return false;
+   if (num_isint(self) && 0==num_int(self)) return false;
+   if (num_isfp(self) && 0.0==num_fp(self)) return false;
+   if (C_STR==self->pub.cls && (NULL==(s=obj_name(self)) || !*s)) return false;
+   return true;
+}
+   
diff --git a/tools/browser/output.c b/tools/browser/output.c
new file mode 100644
index 0000000..9690bb9
--- /dev/null
+++ b/tools/browser/output.c
@@ -0,0 +1,1286 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             output.c
+ *                      Dec 11 1996
+ *                      Robb Matzke <robb at maya.nuance.mdn.com>
+ *
+ * Purpose:             Output functions.
+ *
+ * Modifications:       
+ *              Robb Matzke, 2000-06-01
+ *              Added const qualifiers to formal arguments.
+ *
+ *              Thomas R. Treadway, Tue Jun 27 14:19:57 PDT 2006
+ *              Added config.h for HAVE_STRERROR wrapper
+ *-------------------------------------------------------------------------
+ */
+#include "config.h"
+#include <assert.h>
+#include <browser.h>
+#include <ctype.h>
+#include <errno.h>
+#include <signal.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+
+#define         OUT_INDENT 3            /*chars per indentation level   */
+#define         OUT_RTMAR 2             /*right margin                  */
+int             OUT_NROWS=0;            /*lines per screen, or zero     */
+int             OUT_NCOLS=80;           /*columns per screen, or zero   */
+int             OUT_LTMAR=20;           /*left margin                   */
+int             OUT_COL2=50;            /*beginning of second column    */
+static int      ErrorDisable=0;         /*disable error messages        */
+static int      BrokenPipe=0;           /*incremented by SIGPIPE        */
+static int      CaughtSigint=0;         /*incremented by SIGINT         */
+static int      Progress=0;             /*current progress report size  */
+
+out_t           *OUT_STDOUT;            /*standard output               */
+out_t           *OUT_STDERR;            /*standard error                */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    handle_signals
+ *
+ * Purpose:     Gets called for SIGPIPE and SIGINT signals.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+handle_signals(int signo)
+{
+    switch (signo) {
+    case SIGPIPE:
+        BrokenPipe++;
+        break;
+
+    case SIGINT:
+        CaughtSigint++;
+        break;
+    }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_brokenpipe
+ *
+ * Purpose:     Determines if output needs to be disabled for some
+ *              reason.  Output is disabled if we've received SIGPIPE or
+ *              SIGINT or the user has set some non-default pager mode for
+ *              the specified file.
+ *
+ *              Pending SIGINT and SIGPIPE signals are assigned to the
+ *              specified file as a side effect.
+ *
+ * Returns:     Returns zero (PAGER_OKAY) if output can continue as
+ *              normal. Returns one of the non-zero PAGER_* constants
+ *              otherwise.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+pflags_t
+out_brokenpipe(out_t *f)
+{
+    /* Assign pending signals to this file */
+    if (BrokenPipe) {
+        BrokenPipe = 0;
+        f->pflags = PAGER_PIPE;
+    } else if (CaughtSigint) {
+        CaughtSigint = 0;
+        f->pflags = PAGER_INTERRUPT;
+    }
+
+    /* PAGER_NEXT_CMD does not turn off output, but rather temporarily
+     * disables the pager itself. */
+    if (PAGER_NEXT_CMD==f->pflags) return PAGER_OKAY;
+
+    /* Pipe status */
+    return f->pflags;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_section
+ *
+ * Purpose:     Resets pager to handle a new section of output from the
+ *              current command. This is used by the `diff' command (for
+ *              example) so that the user can skip from one variable to
+ *              the next without wading through lots of gunk.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke, 2001-02-09
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+void
+out_section(out_t *f)
+{
+    if (PAGER_NEXT_SECTION==f->pflags) f->pflags = PAGER_OKAY;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_error
+ *
+ * Purpose:     Prints an error message followed by an object.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Changed prefix name from `error' to `***ERROR***' to make it
+ *      stand out more.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_error (const char *mesg, obj_t obj) {
+
+   if (!ErrorDisable) {
+      out_reset (OUT_STDERR);
+      out_push (OUT_STDERR, "***ERROR***");
+      out_putw (OUT_STDERR, mesg);
+      obj_print (obj, OUT_STDERR);
+      out_pop (OUT_STDERR);
+      out_nl (OUT_STDERR);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_errorn
+ *
+ * Purpose:     Print an error message to the standard error stream,
+ *              followed by a linefeed.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Changed prefix name from `error' to `***ERROR***' to make it
+ *      stand out more.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_errorn (const char *fmt, ...) {
+
+   char         buf[4096];
+   va_list      ap;
+
+   if (!ErrorDisable) {
+      va_start (ap, fmt);
+      vsprintf (buf, fmt, ap);
+      va_end (ap);
+
+      if (OUT_STDERR && OUT_STDERR->f) {
+         out_reset (OUT_STDERR);
+         out_push (OUT_STDERR, "***ERROR***");
+         out_putw (OUT_STDERR, buf);
+         out_pop (OUT_STDERR);
+         out_nl (OUT_STDERR);
+      } else {
+         fputs (buf, stderr);
+         fputc ('\n', stderr);
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_error_disable
+ *
+ * Purpose:     Disables error messages.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+out_error_disable (void) {
+
+   ErrorDisable++;
+   return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_error_restore
+ *
+ * Purpose:     Restores previous error reporting state.
+ *
+ * Return:      Success:        0 if errors are re-enabled, positive if
+ *                              errors are still disabled because of
+ *                              other outstanding calls to out_error_disable().
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+out_error_restore (void) {
+
+   if (ErrorDisable>0) {
+      --ErrorDisable;
+   } else {
+      return -1;
+   }
+   return ErrorDisable;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_indent
+ *
+ * Purpose:     Increase the indentation level by one.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_indent (out_t *f) {
+
+   f->indent += 1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_info
+ *
+ * Purpose:     Prints an informational message.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Informational messages are just printed to the standard error
+ *      stream with no formatting except adding the word `INFO: ' to
+ *      the beginning and adding a trailing linefeed.
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      If the message starts with `WARNING: ' or `INFO: ' then `INFO: '
+ *      is not printed before the message.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_info (const char *fmt, ...) {
+
+   char         buf[4096];
+   int          n;
+   va_list      ap;
+
+   out_progress (NULL);
+   va_start (ap, fmt);
+   vsprintf (buf, fmt, ap);
+   va_end (ap);
+
+   if (strncmp(buf, "INFO: ", 6) && strncmp(buf, "WARNING: ", 9)) {
+      fputs ("INFO: ", stderr);
+   }
+   fputs (buf, stderr);
+   n = strlen (buf);
+   if (0==n || '\n'!=buf[n-1]) fputc ('\n', stderr);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Gets the height and width of the output tty.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June  6, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+out_init_size(void)
+{
+    int         width = 80;             /*the default                   */
+    int         height = 0;             /*the default is no paging info */
+    const char  *s;
+
+    /*
+     * Try to get it from the COLUMNS environment variable first since it's
+     * value is sometimes wrong.
+     */
+    if ((s=getenv("COLUMNS")) && isdigit(*s)) {
+        width = strtol(s, NULL, 0);
+    }
+    if ((s=getenv("LINES")) && isdigit(*s)) {
+        height = strtol(s, NULL, 0);
+    }
+#if defined(TIOCGWINSZ)
+    {
+        /* Unix with ioctl(TIOCGWINSZ) */
+        struct winsize w;
+        if (ioctl(2, TIOCGWINSZ, &w)>=0 && w.ws_col>0) {
+            width = w.ws_col;
+            height = w.ws_row;
+        }
+    }
+#elif defined(TIOCGETD)
+    {
+        /* Unix with ioctl(TIOCGETD) */
+        struct uwdata w;
+        if (ioctl(2, WIOCGETD, &w)>=0 && w.uw_width>0) {
+            width = w.uw_width / w.uw_hs;
+            height = w.uw_height / w.uw_vs; /*is this right? -rpm*/
+        }
+    }
+#endif
+    
+    /* Set width to at least 1, height to at least zero */
+    if (width<1) width = 1;
+    if (height<0) height = 0;
+
+    /* Set the global values */
+    OUT_NCOLS = width;
+    OUT_NROWS = height;
+    OUT_LTMAR = 0.25 * OUT_NCOLS;
+    OUT_COL2 = (OUT_LTMAR+OUT_NCOLS)/2;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_init
+ *
+ * Purpose:     Initialize output.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-05-23
+ *              The column in which the equal sign appears is 25 percent
+ *              of the way across the screen.
+ *
+ *              Robb Matzke, 2000-06-01
+ *              The window size is obtained by ioctl() when possible.
+ *
+ *              Robb Matzke, 2000-06-28
+ *              Signal handlers are registered with sigaction() since its
+ *              behavior is more consistent.
+ *-------------------------------------------------------------------------
+ */
+void
+out_init (void)
+{
+    struct sigaction    action;
+    
+    /* Keep track of terminal size changes */
+    out_init_size();
+    
+    /* Open standard streams */
+    OUT_STDOUT = out_stream (stdout);
+    OUT_STDERR = out_stream (stderr);
+
+    /* Arrange to handle broken pipes and interrupts */
+    action.sa_handler = handle_signals;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = SA_RESTART;
+    sigaction(SIGPIPE, &action, NULL);
+    sigaction(SIGINT, &action, NULL);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_literal
+ *
+ * Purpose:     Turns on or off literal output.  When literal mode is
+ *              on, no line splitting or white-space eating occurs.
+ *
+ * Return:      Success:        Old literal setting
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+out_literal (out_t *f, int val) {
+
+   int          old_literal = f->literal;
+
+   f->literal = val;
+   return old_literal;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    out_nl
+ *
+ * Purpose:     Ends the current line.  The new line is not started until
+ *              output occurs on the new line.  If writing a linefeed would
+ *              cause information to scroll off the top of a terminal, then
+ *              the output is paused.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 23 Jan 1997
+ *      The `more?' prompt has been modified to be more interactive
+ *      by placing the terminal in raw mode.
+ *
+ *      Robb Matzke, 6 Feb 1997
+ *      Lines which would have nothing after the equal are left blank.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_nl(out_t *f)
+{
+    char                buf[256];
+    int                 i, n, rawmode=false;
+    struct termios      oldtio, tio;
+    static const char   *prompt = "more? ('q' to quit) ";
+
+    if (out_brokenpipe(f)) return;
+    if (isatty(fileno(f->f))) out_progress(NULL);
+
+    putc('\n', f->f);
+    f->row += 1;
+    f->col = 0;
+
+    /* Pause output if it's going to a terminal. */    
+ again:
+    if (PAGER_ACTIVE(f) && f->row+1==OUT_NROWS) {
+        fputs(prompt, f->f);
+        fflush(f->f);
+
+        if (tcgetattr(STDIN_FILENO, &tio)>=0) {
+            oldtio = tio;
+            tio.c_lflag &= ~(ECHO | ICANON);
+            tio.c_lflag &= ~ISIG; /*we handle them below*/
+            tio.c_cc[VMIN] = 1;
+            tio.c_cc[VTIME] = 0;
+            if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &tio)>=0) rawmode=true;
+        }
+
+        while (0==out_brokenpipe(f) &&
+               (n=read(STDIN_FILENO, &buf, 1))<0 &&
+               EINTR==errno) /*void*/;
+      
+        if (rawmode) {
+            tcsetattr(STDIN_FILENO, TCSAFLUSH, &oldtio);
+            for (i=0; i<strlen(prompt); i++) putc('\b', f->f);
+            for (i=0; i<strlen(prompt); i++) putc(' ', f->f);
+            for (i=0; i<strlen(prompt); i++) putc('\b', f->f);
+            fflush(f->f);
+        }
+        if (1==n && 'q'==buf[0]) handle_signals(SIGPIPE);
+        if (1==n && 'n'==buf[0]) {
+            f->pflags = PAGER_NEXT_SECTION;
+            fputs("Skipping...\n", f->f);
+        }
+        if (1==n && tio.c_cc[VEOF]==buf[0]) f->pflags = PAGER_NEXT_CMD;
+        if (1==n && tio.c_cc[VINTR]==buf[0]) handle_signals(SIGINT);
+        if (1==n && tio.c_cc[VQUIT]==buf[0]) kill(getpid(), SIGQUIT);
+        if (1==n && tio.c_cc[VSUSP]==buf[0]) {
+            kill(getpid(), SIGTSTP);
+            goto again;
+        }
+        f->row = 0;
+    }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_pop
+ *
+ * Purpose:     Pop the top-most field record from the output prefix
+ *              specifier.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_pop (out_t *f) {
+
+   int          n;
+
+   assert(f->nfields>0);
+   if (f->nfields>0) {
+      f->nfields -= 1;
+      n = f->nfields;
+
+      if (f->field[n].name) {
+         free (f->field[n].name);
+         f->field[n].name = NULL;
+      }
+   }
+}
+
+/*---------------------------------------------------------------------------
+ * Description: Similar to out_line() but the output doesn't occur until
+ *              the next line of output happens. Calling this function
+ *              with an empty string produces one line of output. Calling
+ *              this function with the null pointer cancels the header.
+ *              Headers are typically used above tabular output when it
+ *              isn't known whether any output would occur.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, June 28, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+out_header(out_t *f, const char *header)
+{
+    if (f->header) free(f->header);
+    f->header = safe_strdup(header);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_prefix
+ *
+ * Purpose:     Prints the prefix which appears at the left of every line
+ *              of output.  The prefix is printed only if the current
+ *              column number is zero.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Added the `silent' attribute to field descriptors.
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      If there is not prefix, then we print just space left of the
+ *      equal sign.
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      If two array prefix areas are adjacent then we combine them.
+ *
+ *      Robb Matzke, 2000-06-28
+ *      Prints table headers if any.
+ *-------------------------------------------------------------------------
+ */
+void
+out_prefix (out_t *f) {
+
+   int          i, j, k, n, stride;
+   int          in_array=false;
+   char         buf[256];
+
+   if (0==f->col && !out_brokenpipe(f)) {
+      if (isatty (fileno (f->f))) out_progress (NULL);
+
+      /* Print table headers if any */
+      if (f->header) {
+          char *header = f->header;
+          f->header = NULL;
+          out_line(f, header);
+          free(header);
+      }
+      
+      /*
+       * Print the field names separated from one another by a dot.
+       */
+      for (i=0; i<f->nfields; i++) {
+         if (f->field[i].silent) continue;
+         
+         /*
+          * The field name.
+          */
+         if (f->field[i].name) {
+            if (in_array) {
+               putc (']', f->f);
+               f->col += 1;
+               in_array = false;
+            }
+            if (f->col) {
+               putc ('.', f->f);
+               f->col += 1;
+            }
+            fputs (f->field[i].name, f->f);
+            f->col += strlen (f->field[i].name);
+         }
+         
+         /*
+          * Array indices.
+          */
+         if (f->field[i].ndims>0) {
+            if (in_array) {
+               fputs (", ", f->f);
+               f->col += 2;
+            } else {
+               putc ('[', f->f);
+               f->col += 1;
+               in_array = true;
+            }
+            n = f->field[i].elmtno;
+            for (j=0; j<f->field[i].ndims; j++) {
+               if (j) {
+                  fputs (", ", f->f);
+                  f->col += 2;
+               }
+               for (k=j+1,stride=1; k<f->field[i].ndims; k++) {
+                  stride *= f->field[i].dim[k];
+               }
+               sprintf (buf, "%d", f->field[i].offset[j]+n/stride);
+               n %= stride;
+               fputs (buf, f->f);
+               f->col += strlen(buf);
+            }
+         }
+      }
+
+      if (in_array) {
+         putc (']', f->f);
+         f->col += 1;
+         in_array = false;
+      }
+      
+      /*
+       * Print the equal sign so the value starts not earlier than
+       * the left margin.
+       */
+      if (f->col+1>=OUT_LTMAR) {
+         fputs ("=", f->f);
+         f->col += 1;
+      } else {
+         fprintf (f->f, "%*s= ", OUT_LTMAR-(f->col+2), "");
+         f->col = OUT_LTMAR;
+      }
+
+      /*
+       * Print the indentation
+       */
+      n = OUT_LTMAR + f->indent*OUT_INDENT - f->col;
+      if (n>0) {
+         fprintf (f->f, "%*s", n, "");
+         f->col += n;
+      }
+   }
+}
+
+/*---------------------------------------------------------------------------
+ * Description: Indent to at least the specified column.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June 27, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+out_column(out_t *f, int column, const char *separator)
+{
+    int oldlit = out_literal(f, true);
+    
+    while (f->col<column && !out_brokenpipe(f)) out_puts(f, " ");
+    out_puts(f, separator);
+    out_literal(f, oldlit);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_printf
+ *
+ * Purpose:     Formatted output.  The entire output is printed on the
+ *              current line if it fits.  Otherwise the entire output is
+ *              printed on the next line.  Linefeeds within the output
+ *              string force line breaks.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_printf (out_t *f, const char *fmt, ...) {
+
+   va_list      ap;
+   char         buf[4096], *s, *nextline;
+
+   va_start (ap, fmt);
+   vsprintf (buf, fmt, ap);
+   va_end (ap);
+
+   for (s=buf; s; s=nextline) {
+      nextline = strchr (s, '\n');
+      if (nextline) *nextline = '\0';
+      out_puts (f, s);
+      if (nextline) {
+         *nextline++ = '\n';
+         out_nl (f);
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_push
+ *
+ * Purpose:     Push another name onto the field list.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_push (out_t *f, const char *name) {
+
+   if (f->nfields>=OUT_NFIELDS) return;
+
+   memset (f->field + f->nfields, 0, sizeof(f->field[0]));
+   f->field[f->nfields].name = name ? safe_strdup (name) : NULL;
+   f->field[f->nfields].silent = false;
+   f->nfields += 1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_push_array
+ *
+ * Purpose:     Push another array onto the field list.
+ *
+ * Return:      Success:        Ptr to an integer that should always be
+ *                              kept up to date with the current linear
+ *                              array element number.  This value will
+ *                              be used by out_prefix() to generate the
+ *                              array subscripts.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *    Robb Matzke, 3 Feb 1997
+ *    If the `dim' field is NULL then the `silent' attribute is set
+ *    for this field.
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+int *
+out_push_array (out_t *f, const char *name, int ndims, const int *offset,
+                const int *dim) {
+
+   int          idx, i;
+
+   assert (f);
+   assert (ndims>0 && ndims<=NDIMS);
+   
+   idx = f->nfields;
+   if (idx>=OUT_NFIELDS) return NULL;
+   f->nfields += 1;
+
+   if (name && *name) {
+      f->field[idx].name = safe_strdup (name);
+   } else {
+      f->field[idx].name = NULL;
+   }
+   f->field[idx].elmtno = 0;
+   f->field[idx].ndims = ndims;
+
+   if (dim) {
+      for (i=0; i<ndims; i++) {
+         f->field[idx].offset[i] = offset ? offset[i] : 0;
+         f->field[idx].dim[i] = dim[i];
+      }
+      f->field[idx].silent = false;
+   } else {
+      f->field[idx].silent = true;
+   }
+
+   return &(f->field[idx].elmtno);
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    out_puts
+ *
+ * Purpose:     Prints string S to the specified file.  If S fits on the
+ *              current line then S is printed on the current line. Otherwise
+ *              S is printed on the next line.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 17 Dec 1996
+ *              If literal mode is on, then no linefeeds are inserted to
+ *              break up long lines.
+ *
+ *              Robb Matzke, 2000-06-27
+ *              If the file handle right margin is zero then no linefeeds
+ *              are inserted to break up long lines.
+ *-------------------------------------------------------------------------
+ */
+void
+out_puts (out_t *f, const char *s) {
+
+   int          n = strlen (s);
+
+   if (isatty (fileno (f->f))) out_progress (NULL);
+   if (!f->literal && f->rtmargin && n+f->col>OUT_NCOLS-f->rtmargin) {
+       out_nl (f);
+   }
+   
+   if (out_brokenpipe(f)) return;
+   if (s && *s) {
+      if (!f->literal && 0==f->col) {
+         while (*s && isspace(*s)) s++;
+      }
+      out_prefix (f);
+      fputs (s, f->f);
+      f->col += n;
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_line
+ *
+ * Purpose:     Prints S on a line by itself.
+ *
+ * Return:      Success:        
+ *
+ *              Failure:        
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-28
+ *              Handles embedded linefeeds.
+ *-------------------------------------------------------------------------
+ */
+void
+out_line (out_t *f, const char *string)
+{
+    int         oldlit;
+    const char  *s;
+
+    if (out_brokenpipe(f)) return;
+    if (isatty (fileno (f->f))) out_progress (NULL);
+    oldlit = out_literal (f, true);
+    if (f->col) out_nl (f);
+
+    /* The header */
+    if (f->header) {
+        for (s=f->header; *s; s++) {
+            if ('\n'==*s) {
+                out_nl(f);
+            } else {
+                putc(*s, f->f);
+                f->col++;
+            }
+        }
+        out_nl(f);
+        free(f->header);
+        f->header = NULL;
+    }
+    
+    /* The output */
+    for (s=string; *s; s++) {
+        if ('\n'==*s) {
+            out_nl(f);
+        } else {
+            fputc(*s, f->f);
+            f->col++;
+        }
+    }
+
+    /* The trailing line-feed */
+    out_nl(f);
+    out_literal (f, oldlit);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_progress
+ *
+ * Purpose:     Prints a progress report which is a single line w/o
+ *              a trailing line feed.  The other functions in this
+ *              file are aware of these progress reports and make sure
+ *              that the report is deleted properly when output occurs.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_progress (const char *s) {
+
+   int          nchars, i=0;
+   
+   if (Verbosity<1) s = NULL;
+
+   if (isatty (2) && Verbosity<=1) {
+      for (nchars=0; nchars<79 && s && s[nchars]; nchars++) {
+         fputc (s[nchars]>=' ' && s[nchars]<='~' ? s[nchars] : ' ', stderr);
+      }
+      for (i=nchars; i<Progress; i++) putc (' ', stderr);
+      for (i=nchars; i<Progress; i++) putc ('\b', stderr);
+      for (i=0; i<nchars; i++) putc ('\b', stderr);
+   } else if (s) {
+      fputs (s, stderr);
+      putc ('\n', stderr);
+   }
+   fflush (stderr);
+   Progress = i;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    out_putw
+ *
+ * Purpose:     Similar to out_puts() except the string can be split on
+ *              white space.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Apr 1997
+ *      Words can be split on `/', `-', or `_', and those characters appear
+ *      at the end of the previous line.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Only the first line of output gets the prefix.
+ *-------------------------------------------------------------------------
+ */
+void
+out_putw (out_t *f, const char *s) {
+
+    const char  *t;
+    char        buf[1024];
+    int         nl, i;
+    int         old_nfields = f->nfields;
+
+    while (s && *s) {
+        if (out_brokenpipe(f)) return;
+
+        /* Find the edges of the next word. */
+        for (t=s, nl=0; *t && strchr (" \t\n_-/", *t); t++) {
+            if ('\n'==*t) nl++; /*skip leading seps, remember newlines*/
+        }
+        t = strpbrk (t, " \t\n_-/"); /*find next word separator*/
+        while (t && *t && strchr("_-/",*t)) t++; /*these stay on current line*/
+        if (!t) t = s+strlen(s);
+
+        /* Extract the word. */
+        strncpy (buf, s, t-s);
+        buf[t-s] = '\0';
+
+        /* Print empty lines */
+        for (i=0; i<nl; i++) {
+            out_nl(f);
+            f->nfields=0;
+        }
+
+        /* Output the word including leading white space.  The out_puts()
+         * function will strip leading whitespace at the beginning of
+         * a line. */
+        out_puts (f, buf);
+        s = t;
+
+        /* Turn off prefix for subsequent lines */
+        f->nfields=0;
+    }
+    f->nfields = old_nfields; /*restore prefix*/
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_reset
+ *
+ * Purpose:     Call this function to reset the current line and column
+ *              number to zero in preparation for new output.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 20 Jan 1997
+ *      Also resets the BrokenPipe and CaughtSigint counters.
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_reset (out_t *f) {
+
+   BrokenPipe = CaughtSigint = 0;
+   f->row = f->col = 0;
+   out_progress (NULL);
+   f->pflags = PAGER_OKAY;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_stream
+ *
+ * Purpose:     Duplicates a FILE* for use as an output stream.
+ *
+ * Return:      Success:        Ptr to the new `out_t' structure.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *              Thomas R. Treadway, Tue Jun 27 14:19:57 PDT 2006
+ *              Added HAVE_STRERROR wrapper
+ *
+ *-------------------------------------------------------------------------
+ */
+out_t *
+out_stream (FILE *stream) {
+
+   out_t        *f = calloc (1, sizeof(out_t));
+
+   assert (f);
+   if (NULL==(f->f=fdopen(fileno(stream), "w"))) {
+#ifdef HAVE_STRERROR
+      out_errorn ("out_stream: cannot reopen stream (%s)",
+                  strerror (errno));
+#else
+      out_errorn ("out_stream: cannot reopen stream (errno=%d)", errno);
+#endif
+      free (f);
+      return NULL;
+   }
+
+   f->paged = isatty(fileno(stream));
+   f->rtmargin = OUT_RTMAR;
+   return f;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_undent
+ *
+ * Purpose:     Decrease the indentation level by one.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+out_undent (out_t *f) {
+
+   if (f->indent>0) f->indent -= 1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    out_getindex
+ *
+ * Purpose:     Returns the array index for array N (measured from the
+ *              top of the stack if N is negative).  Non-array entries
+ *              are not counted.
+ *
+ *              The first array is zero.  The last array is -1.
+ *
+ * Return:      Success:        Index number.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 14 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+out_getindex (out_t *f, int n) {
+
+   int          i;
+
+   if (n>0) {
+      for (i=0; i<f->nfields; i++) {
+         if (0==f->field[i].ndims) continue;
+         if (!n) return f->field[i].offset[0] + f->field[i].elmtno;
+         --n;
+      }
+   } else {
+      n++;
+      for (i=f->nfields-1; i>=0; --i) {
+         if (0==f->field[i].ndims) continue;
+         if (!n) return f->field[i].offset[0] + f->field[i].elmtno;
+         n++;
+      }
+   }
+   return -1;
+}
diff --git a/tools/browser/parse.c b/tools/browser/parse.c
new file mode 100644
index 0000000..6f76322
--- /dev/null
+++ b/tools/browser/parse.c
@@ -0,0 +1,1060 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             parse.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Functions for parsing input.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <browser.h>
+#include <ctype.h>
+#include <signal.h>
+#include <unistd.h>
+
+static void     bif (const char*, obj_t(*)(int,obj_t[]), int, const char*,
+                     const char*);
+static obj_t    parse_term (lex_t*, int);
+static obj_t    parse_dot (lex_t*, int);
+static obj_t    parse_selection (lex_t*, int);
+static obj_t    parse_expr (lex_t*, int);
+
+static struct obj_t ErrorCell ;         /*error return value    */
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_init
+ *
+ * Purpose:     Initialize the parse system.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Added commands `end' and `quit' as aliases for `exit'.  Renamed
+ *      command `with' as `open'.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      The `help' command doesn't evaluate its arguments.
+ *
+ *      Robb Matzke, 2000-06-06
+ *      Added documentation strings.
+ *-------------------------------------------------------------------------
+ */
+void
+parse_init (void) {
+
+   /*** user functions ***/
+   bif ("array",        V_array,        0,
+        "Create an array datatype.",
+        "Creates a new array datatype. The arguments are the "
+        "size of the array in each dimension and the datatype of the array "
+        "elements. The array size arguments can be either integers or strings "
+        "that look like comma- and/or space-separated integers. Browser "
+        "arrays use C element ordering.");
+
+   bif ("cd",           V_setcwd,       IMP_STRING,
+        "Change current working directory.",
+        "Each file has a current working directory (CWD) which is initially "
+        "set to the root directory (`/'). This command will set the CWD to "
+        "some other directory. The first argument is the name of the new CWD. "
+        "If the name contains special characters it should be enclosed in "
+        "quotes to protect it from the parser. If the name is relative "
+        "(doesn't start with a `/') then the name looked up with respect to "
+        "the current CWD.  The second optional argument is the file whose "
+        "CWD is being set (default is the file represented by the browser "
+        "variable `$1'). If the second argument evaluates to a list of files "
+        "then the CWD is set for each file of the list (e.g., `cd domain_0 "
+        "$*').");
+
+   bif ("close",        V_close,        HOLD,
+        "Close a SILO file.",
+        "This function takes zero or more arguments which should all be "
+        "symbol names (like `$1') and closes the files represented by each "
+        "symbol.  The symbol becomes unbound. Closing the file associated "
+        "with symbol FOO is equivalent to saying `FOO=nil', except with "
+        "extra sanity checks.");
+
+   bif ("diff",         V_diff,         0,
+        "Compare two objects.",
+        "Calculates the differences between its arguments similar to the "
+        "Unix `diff' command. If called with an even number of arguments "
+        "the argument list is split in half and each argument from the first "
+        "half is compared with the corresponding argument of the second half. "
+        "If called with no arguments then the argument list will be the "
+        "SILO files from the command-line ($1, $2, etc).  If called with a "
+        "single argument which is a silo object from file $1, that object "
+        "will be differenced against an object with the same name from file "
+        "$2. The behavior is influenced by the $diff browser variable (see "
+        "`help $diff'). In general, if no differences are found then no "
+        "output is produced.");
+
+   bif ("end",          V_exit,         0,
+        NULL,
+        "A synonym for `exit'");
+   
+   bif ("exit",         V_exit,         0,
+        "Exit the browser.", 
+        "Causes the browser to exit with zero status. If an integer argument "
+        "is supplied then the browser will use it as the exit status. End of "
+        "input (usually Control-D for interactive input) causes an implicit "
+        "call to `exit 0'.");
+
+   bif ("file",         V_file,         IMP_STRING,
+        "Dereference a name to get a SILO file.",
+        "Returns the file whose name is specified by the first argument. If "
+        "the file name contains special characters then the argument should "
+        "be enclosed in quotes to protect it from the parser. The file is "
+        "closed as soon as all references to the file dissappear. One common "
+        "use of this function is with the `ls' or `diff' functions which can "
+        "take file objects as arguments. For instance, the command `ls "
+        "(file curv2d.pdb)' opens the file, lists the root directory, and "
+        "then closes the file. The file is opened for read-write unless "
+        "the file has only read permission or the `$rdonly' variable is "
+        "non-zero and non-nil.  See also `help open'.");
+        
+   bif ("help",         V_help,         HOLDFIRST,
+        "Show documentation.",
+        "Shows documentation for various parts of the browser. When invoked "
+        "without arguments it will display a table of contents of `help' "
+        "subcommands. With one argument it will display documentation for a "
+        "help category (e.g., `help run'), a browser internal variable (e.g., "
+        "`help $diff'), a function (e.g., `help diff'), a command-line switch "
+        "(e.g., `help --diff'), an operator (e.g., `help \"op=\"'), or the "
+        "documentation string associated with the specified symbol.  When "
+        "invoked with a string argument it will print all help categories "
+        "which contain the specified string (e.g., `help \"diff\"'). When "
+        "called with two arguments it assigns the second argument as the "
+        "documentation property of the first argument, which must be a symbol "
+        "or string.");
+
+   bif("include",       V_include,      0,
+       "Include commands from another source.", 
+       "Parses and evaluates the browser commands in the file specified by "
+       "the argument, which should evaluate to a string.");
+   
+   bif ("ls",           V_list,         HOLD,
+        "List directory contents.",
+        "Lists the current working directory (CWD) of the specified file. If "
+        "no file is specified then list the CWD of the file represented by "
+        "browser internal variable `$1'. Subsequent arguments are the names "
+        "of the objects to be listed. If no names are supplied then all "
+        "objects of the CWD are listed. Shell wild-cards are allowed in the "
+        "names if the C library supports it.  When `ls' is invoked with an "
+        "optional file argument and exactly one name which is the name of "
+        "a directory, then the contents of that directory are listed.  If the "
+        "first argument evaluates to a list of files (e.g., `ls $*') then a "
+        "listing will be generated for each of those files.");
+
+   bif ("noprint",      V_noprint,      0,
+        "Supress output.",
+        "Takes any number of arguments and returns NIL. Since the browser "
+        "doesn't print NIL results by default, this function can be used to "
+        "suppress printing of some expression result. It is often used in "
+        "startup files.");
+
+   bif ("open",         V_open,         HOLDREST | IMP_STRING,
+        "Open a SILO file.",
+        "Sets the current file to be the file named by the first argument. "
+        "The current file is represented by the browser variable `$1'. If two "
+        "arguments are given then the second argument should be a symbol "
+        "to which will be bound the SILO file named by the first argument. "
+        "If some file was previously bound to the new file's symbol then the "
+        "old file is closed first. This function is equivalent to "
+        "`arg2=(file \"arg1\")'");
+
+   bif ("pointer",      V_pointer,      0,
+        "Create a pointer datatype.",
+        "Creates a pointer datatype. The first (and only) argument is the "
+        "datatype to which this pointer points.");
+
+   bif ("primitive",    V_primitive,    0,
+        "Create a primitive datatype.",
+        "Creates a primitive datatype. The first (and only) argument is the "
+        "name of the primitive type. Primitive types are: int8, short, int, "
+        "long, float, double, and string.");
+   
+   bif ("print",        V_print,        0,
+        "Print an expression.",
+        "Takes zero or more arguments and prints all that are non-nil, each "
+        "on its own line of output, returning nil. All expressions are "
+        "normally printed by the browser in its read-eval-print loop, so "
+        "calling this command explicitly is seldom necessary.");
+   
+   bif ("pwd",          V_pwd,          0,
+        "Show the current working directory name.",
+        "Prints the current working directory (CWD) of the specified file. If "
+        "no file is specified then print the CWD of the file represented by "
+        "browser variable `$1'.  If the argument is a list of files then the "
+        "CWD of each of those files is printed (e.g., `pwd $*'). This command "
+        "is identical to printing an expression that evaluates to a file or "
+        "list of files (e.g., `$1' or `$*').");
+   
+   bif ("quit",         V_exit,         0,
+        NULL,
+        "A synonym for `exit'.");
+
+   bif ("setf",         V_setf,         HOLDFIRST,
+        "Bind a function to a symbol.",
+        "Given a symbol as the first argument, sets the symbols functional "
+        "value to the second argument.");
+   
+   bif ("struct",       V_struct,       0,
+        "Create a compound datatype.",
+        "Creates a compound datatype. The first argument should be the name "
+        "for the datatype (or nil). The following arguments occur in triples, "
+        "one per compound datatype member. Each triple is an integer byte "
+        "offset from the beginning of memory of an instance of this type, the "
+        "name of the member, and the datatype of the member.");
+   
+   bif ("typeof",       V_typeof,       0,
+        "Obtain the datatype of an object.",
+        "Returns the datatype of a SILO or browser object. For SILO database "
+        "objects the type which is printed is fully qualified and bound to "
+        "actual values. In contract, printing the actual named type shows the "
+        "unbound values. For example, if `d' is a SILO DBquadvar object then "
+        "`typeof d.dims' might show `[3] int' while `print DBquadvar.dims' "
+        "displays `[self.ndims] int'.");
+
+   /*** Operators ***/
+   bif ("Assign",       V_assign,       HOLDFIRST,
+        "Assignment operator (`=').",
+        "The assignment operator is a binary in-fix operator whose left "
+        "operand should be the name of a browser symbol or an object (or "
+        "subobject) of a SILO file and whose right operand evaluates to "
+        "some value. The value of the right operand is assigned to the "
+        "left operand. The `=' operator and `Assign' symbol are bound to "
+        "the same function.");
+
+   bif ("Dot",          V_dot,          HOLDREST,
+        "Restriction operators (`.', `[]').",
+        "This is a restriction operator whose function depends on the "
+        "type of the left operand.\n"
+        "\n"
+        "If the left operand evaluates to a file (e.g., `$1') then the "
+        "variable or directory whose name is specified by the second argument "
+        "(a string or symbol) is loaded from that file and returned. If "
+        "the left operand refers to the same file as `$1' and the right "
+        "argument need not be enclosed in quotes and is not the name of "
+        "a browser variable, then the file symbol and dot can be omitted "
+        "(that is, `$1.quadmesh' is equivalent to just `quadmesh').\n"
+        "\n"
+        "If the left operand evaluates to some SILO data object which has "
+        "a structured type then the right operand should a the name of a "
+        "field of that compound type. This operator will return the "
+        "specified field of the SILO object.  For instance, if `qm' is "
+        "of type `DBquadmesh' then the expression `qm.dims' returns the "
+        "quadmesh dimension array.\n"
+        "\n"
+        "If the left operand evaluates to a compound datatype then the "
+        "right operand should be the name of one of the fields of that "
+        "datatype. This operator will return the datatype of the specified "
+        "field from the left operand.\n"
+        "\n"
+        "If the left operand is an array datatype or a silo object of "
+        "array datatype and the right operand is an integer then this "
+        "operator returns the specified array element (using C-like "
+        "zero-based indexing) Example: `mesh_3d.min_extents[0]'.\n"
+        "\n"
+        "If the left operand is an array datatype or a silo object of "
+        "array datatype and the right operand is a range `MIN:MAX' then "
+        "this operator returns a sub-array with elements MIN through "
+        "MAX, inclusive. Example: `mesh_3d.min_extents[0:1]'\n"
+        "\n"
+        "If the left operand is an array datatype or a silo object of "
+        "array datatype and the right operands are integers or ranges "
+        "then one operand is applied to each array dimension in turn, "
+        "automatically skipping over pointers. For instance, if a quadvar "
+        "`qv' has a `vals' field of type `*[2]*[36000]float' then the "
+        "expression `qv.vals[0,100:199]' will be an object consisting of the "
+        "second 100 values of the first variable. (The expression "
+        "`qv.vals[0][100:199]' would result in an errr because "
+        "`qv.vals[0]' returns an object with the type `[1]*[36000]float' "
+        "to which is then applied the `[100:199]', which is invalid because "
+        "the array has only one element.\n"
+        "\n"
+        "If the left operand is a list then this operator is applied to "
+        "each member of that list, returning a list of the results.");
+
+
+   bif ("Pipe",         V_pipe,         HOLD,
+        "Redirection operator (`|').",
+        "Evaluates the left operand and redirects its output to the shell "
+        "command specified by the right operand. The `|' operator and `Pipe' "
+        "symbol are bound to the same function, but when invoked as the "
+        "`Pipe' function a third argument is required. The third argument "
+        "is a popen(3c) mode string.");
+   
+   bif ("Quote",        V_quote,        HOLD,
+        "List quoting operator (`{}').",
+        "This operator takes zero or more operands occurring between the "
+        "curly brackes (optionally separated by commas) and returns a list "
+        "of those unevaluated operands. If only one operand is given then "
+        "that operand is returned unevaluated and not in a list. The `{}' "
+        "operator and `Quote' symbol are bound to the same function.");
+
+   bif ("Redirect",     V_redirect,     HOLD,
+        "Redirection operators (`>', `>>').",
+        "Evaluates the left operand and redirects its output to the file "
+        "whose name is specified by the right operand.  The `>' and `>>' "
+        "operators are bound to the same function as the `Redirect' symbol, "
+        "but invoking the function as `Redirect' requires a third argument "
+        "which is the fopen(3c) mode string.");
+
+   bif(NULL, NULL, 0,
+       "Range operator (`:').",
+       "The range operator is used to construct a range object which "
+       "represents all integers between the left and right operands, "
+       "inclusive.");
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    bif
+ *
+ * Purpose:     Installs a builtin function in the symbol table.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-06
+ *              Added the DESC and DOC arguments. DESC is an optional
+ *              one-line description to be added to the function table of
+ *              contents. DOC is a multi-line documentation string.
+ *-------------------------------------------------------------------------
+ */
+static void
+bif (const char *func_name, obj_t(*func_ptr)(int x, obj_t y[]), int flags,
+     const char *desc, const char *doc) {
+
+    obj_t       name = func_name?obj_new(C_SYM, func_name):NIL;
+    obj_t       func = func_ptr?obj_new(C_BIF, func_ptr, flags):NIL;
+
+    /* Bind the function to the symbol */
+    if (name) sym_fbind(name, func);
+   
+    /* Function table of contents */
+    if (name && desc) {
+        HelpFuncToc[NHelpFuncToc].name = safe_strdup(func_name);
+        HelpFuncToc[NHelpFuncToc].desc = safe_strdup(desc);
+        NHelpFuncToc++;
+    }
+
+    /* Operator table of contents. Operators are added to the operator
+     * table of contents if the description contains the string `operator'
+    * and the operators are listed in quotes like `this'. */
+    if (desc && strstr(desc, "operator")) {
+        const char *s=desc, *first, *last;
+
+        while ((first=strchr(s, '`')) && (last=strchr(++first, '\''))) {
+            char opname[64];
+            strcpy(opname, "op");
+            strncpy(opname+2, first, last-first);
+            opname[2+last-first] = '\0';
+            if (opname[2]) {
+                if (doc) {
+                    obj_t sym = obj_new(C_SYM, opname);
+                    obj_t docval = obj_new(C_STR, doc);
+                    sym_dbind(sym, docval);
+                    obj_dest(sym);
+                }
+                strcpy(opname, "\"op");
+                strncpy(opname+3, first, last-first);
+                strcpy(opname+(3+last-first), "\"");
+                HelpOpToc[NHelpOpToc].name = safe_strdup(opname);
+                HelpOpToc[NHelpOpToc].desc = safe_strdup(desc);
+                NHelpOpToc++;
+            }
+            s = last+1;
+        }
+    }
+
+    /* Bind the documentation string to the symbol */
+    if (name && doc) {
+        obj_t docval = obj_new(C_STR, doc);
+        sym_dbind(name, docval);
+    }
+   
+    if (name) obj_dest (name);
+    /*dont destroy func or doc*/
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_stmt
+ *
+ * Purpose:     Parses a statement which is a function name followed by
+ *              zero or more arguments.
+ *
+ * Return:      Success:        Ptr to parse tree.
+ *
+ *              Failure:        NIL, input consumed through end of line.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 11 Dec 1996
+ *      If IMPLIED_PRINT is true then wrap the input in a call to the
+ *      `print' function if it isn't already obviously a call to `print'.
+ *
+ *      Robb Matzke, 20 Jan 1997
+ *      Turn off handling of SIGINT during parsing.
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      If the first thing on the line is a symbol which has a built in
+ *      function (BIF) as its f-value, and the BIF has the lex_special
+ *      property, then we call lex_special() to prepare the next token.
+ *
+ *      Robb Matzke, 2000-06-28
+ *      Signal handlers are registered with sigaction() since its behavior
+ *      is more consistent.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+parse_stmt (lex_t *f, int implied_print) {
+
+   char         *lexeme, buf[1024], *s, *fmode;
+   int          tok, i;
+   obj_t        head=NIL, opstack=NIL, b1=NIL, retval=NIL, tmp=NIL;
+   struct sigaction new_action, old_action;
+
+   /* SIGINT should have the default action while we're parsing */
+   new_action.sa_handler = SIG_DFL;
+   sigemptyset(&new_action.sa_mask);
+   new_action.sa_flags = SA_RESTART;
+   sigaction(SIGINT, &new_action, &old_action);
+
+   tok = lex_token (f, &lexeme, false);
+
+   /*
+    * At the end of the file, return `(exit)'.
+    */
+   if (TOK_EOF==tok) {
+      lex_consume (f);
+      if (f->f && isatty (fileno (f->f))) {
+         printf ("exit\n");
+         retval = obj_new (C_CONS,
+                           obj_new (C_SYM, "exit"),
+                           NIL);
+         goto done;
+      } else {
+         retval = obj_new (C_SYM, "__END__");
+         goto done;
+      }
+   }
+
+   /*
+    * For an empty line, eat the linefeed token and try again.
+    */
+   if (TOK_EOL==tok) {
+      lex_consume (f);
+      retval = parse_stmt (f, implied_print);
+      goto done;
+   }
+
+   /*
+    * A statement begins with a function name.  If the first token
+    * is not a symbol then assume `print'.
+    */
+   if (implied_print && TOK_SYM==tok) {
+      head = obj_new (C_SYM, lexeme);
+      if ((tmp=sym_fboundp (head))) {
+         tmp = obj_dest (tmp);
+         lex_consume (f);
+      } else {
+         obj_dest (head);
+         head = obj_new (C_SYM, "print");
+      }
+   } else if (implied_print) {
+      head = obj_new (C_SYM, "print");
+   } else {
+      head = &ErrorCell ;       /*no function yet*/
+   }
+
+   /*
+    * Some functions take a weird first argument that isn't really a
+    * normal token.  Like `open' which wants the name of a file.  We
+    * call lex_special() to try to get such a token if it appears
+    * next.
+    */
+   if (head && &ErrorCell!=head && (tmp=sym_fboundp(head))) {
+      if (bif_lex_special (tmp)) lex_special (f, false);
+      tmp = obj_dest (tmp);
+   }
+
+   /*
+    * Read the arguments...
+    */
+   while (&ErrorCell!=(b1=parse_expr(f, false))) {
+      opstack = obj_new(C_CONS, b1, opstack);
+   }
+
+   /*
+    * Construct a function call which is the HEAD applied to the
+    * arguments on the operand stack.
+    */
+   b1 = F_reverse (opstack);
+   opstack = obj_dest (opstack);
+
+   if (&ErrorCell==head) {
+      head = NIL;
+      if (1==F_length(b1)) {
+         retval = obj_copy (cons_head (b1), SHALLOW);
+         b1 = obj_dest (b1);
+      } else {
+         retval = b1;
+         b1 = NIL;
+      }
+   } else {
+      retval = F_cons (head, b1);
+      head = obj_dest (head);
+      b1 = obj_dest (b1);
+   }
+      
+
+   /*
+    * A statement can end with `>' or `>>' followed by the name of
+    * a file, or `|' followed by an unquoted shell command.  Leading
+    * and trailing white space is stripped from the file or command.
+    */
+   tok = lex_token (f, &lexeme, false);
+   if (TOK_RT==tok || TOK_RTRT==tok || TOK_PIPE==tok) {
+      lex_consume (f);
+      if (NULL==lex_gets (f, buf, sizeof(buf))) {
+         out_errorn ("file name required after `%s' operator", lexeme);
+         goto error;
+      }
+      lex_set (f, TOK_EOL, "\n");
+      for (s=buf; isspace(*s); s++) /*void*/;
+      for (i=strlen(s)-1; i>=0 && isspace(s[i]); --i) s[i] = '\0';
+      if (!*s) {
+         out_errorn ("file name required after `%s' operator", lexeme);
+         goto error;
+      }
+      switch (tok) {
+      case TOK_RT:
+         lexeme = "Redirect";
+         fmode = "w";
+         break;
+      case TOK_RTRT:
+         lexeme = "Redirect";
+         fmode = "a";
+         break;
+      case TOK_PIPE:
+         lexeme = "Pipe";
+         fmode = "w";
+         break;
+      default:
+         abort();
+      }
+      retval = obj_new (C_CONS,
+                        obj_new (C_SYM, lexeme),
+                        obj_new (C_CONS,
+                                 retval,
+                                 obj_new (C_CONS,
+                                          obj_new (C_STR, s),
+                                          obj_new (C_CONS,
+                                                    obj_new (C_STR, fmode),
+                                                    NIL))));
+   }
+
+   /*
+    * We should be at the end of a line.
+    */
+   tok = lex_token (f, &lexeme, false);
+   if (TOK_EOL!=tok && TOK_EOF!=tok) {
+      s = lex_gets (f, buf, sizeof(buf));
+      if (s && strlen(s)>0 && '\n'==s[strlen(s)-1]) s[strlen(s)-1] = '\0';
+      out_errorn ("syntax error before: %s%s", lexeme, s?s:"");
+      lex_consume(f);
+      goto error;
+   } else {
+      lex_consume(f);
+   }
+
+done:
+   sigaction(SIGINT, &old_action, NULL);
+   return retval;
+
+error:
+   if (head) head = obj_dest (head);
+   if (opstack) opstack = obj_dest (opstack);
+   if (retval) retval = obj_dest (retval);
+   sigaction(SIGINT, &old_action, NULL);
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_term
+ *
+ * Purpose:     Parses a term which is a symbol, a string, or a number.
+ *
+ * Return:      Success:        Ptr to the term object or NIL
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 7 Feb 1997
+ *      If the first thing after a parenthesis is a symbol which has a
+ *      built in function (BIF) as its f-value, and the BIF has the
+ *      lex_special property, then we call lex_special() to prepare the
+ *      next token.
+ *
+ *      Robb Matzke, 26 Aug 1997
+ *      The term `.' means current working directory.
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_term (lex_t *f, int skipnl) {
+
+   char         *lexeme;
+   obj_t        retval=&ErrorCell, opstack=NIL, tmp=NIL, fval=NIL;
+   int          tok, nargs;
+
+   switch ((tok=lex_token(f, &lexeme, skipnl))) {
+   case TOK_DOT:
+      retval = obj_new (C_SYM, lexeme);
+      lex_consume (f);
+      break;
+      
+   case TOK_SYM:
+      if (!strcmp (lexeme, "nil")) {
+         retval = NIL;
+      } else {
+         retval = obj_new (C_SYM, lexeme);
+      }
+      lex_consume (f);
+      break;
+
+   case TOK_NUM:
+      retval = obj_new (C_NUM, lexeme);
+      lex_consume (f);
+      break;
+
+   case TOK_STR:
+      retval = obj_new (C_STR, lexeme);
+      lex_consume (f);
+      break;
+
+   case TOK_LTPAREN:
+      nargs = 0;
+      lex_consume (f);
+      while (TOK_RTPAREN!=(tok=lex_token(f, NULL, true)) && TOK_EOF!=tok) {
+
+         /*
+          * If the first token after the left paren is a symbol, and
+          * the symbol has a BIF f-value, and the BIF has the lex_special
+          * attribute, then call lex_special().
+          */
+         if (0==nargs++ && TOK_SYM==tok) {
+            tmp = obj_new (C_SYM, f->lexeme);
+            lex_consume (f);
+            fval = sym_fboundp (tmp);
+            if (bif_lex_special (fval)) lex_special (f, true);
+            fval = obj_dest (fval);
+         } else {
+            tmp = parse_expr (f, true);
+         }
+         if (&ErrorCell==tmp) {
+            opstack = obj_dest (opstack);
+            goto done;
+         }
+         opstack = obj_new (C_CONS, tmp, opstack);
+      }
+      if (TOK_RTPAREN!=tok) {
+         out_errorn ("right paren expected near end of input");
+         opstack = obj_dest (opstack);
+         goto done;
+      }
+      lex_consume (f);
+      retval = F_reverse (opstack);
+      opstack = obj_dest (opstack);
+      break;
+
+   case TOK_LTCURLY:
+      /*
+       * A list of items inside curly braces `{A B ... Z}' is just short for
+       * `(Quote A B ... Z)' and `Quote' is like the LISP `quote' function in
+       * that (Quote X) returns X without trying to evaluate it.  People tend
+       * to use commas, so we accept commas between items.
+       */
+      lex_consume (f);
+      while (TOK_RTCURLY!=(tok=lex_token(f, NULL, true)) && TOK_EOF!=tok) {
+         tmp = parse_expr (f, true);
+         if (&ErrorCell==tmp) {
+            opstack = obj_dest (opstack);
+            goto done;
+         }
+         opstack = obj_new (C_CONS, tmp, opstack);
+         if (TOK_COMMA==lex_token(f, NULL, true)) lex_consume (f);
+      }
+      if (TOK_RTCURLY!=tok) {
+         out_errorn ("right curly brace expected near end of input");
+         opstack = obj_dest (opstack);
+         goto done;
+      }
+      lex_consume (f);
+      retval = F_reverse (opstack);
+      opstack = obj_dest (opstack);
+      retval = obj_new (C_CONS,
+                        obj_new (C_SYM, "Quote"),
+                        retval);
+      break;
+      
+   }
+
+done:
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_range
+ *
+ * Purpose:     Tries to parse a range expression of the form `I1:I2'
+ *              where I1 and I2 are integer constants.
+ *
+ * Return:      Success:        A range object.
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_range (lex_t *f, int skipnl) {
+
+   obj_t        lt=NIL, rt=NIL, retval=NIL;
+   int          lo, hi;
+
+   lt = parse_term (f, skipnl);
+   if (&ErrorCell==lt) return &ErrorCell;
+
+   if (TOK_COLON==lex_token (f, NULL, skipnl)) {
+      lex_consume (f);
+      rt = parse_term (f, skipnl);
+      if (&ErrorCell==rt) {
+         obj_dest (rt);
+         return &ErrorCell;
+      }
+
+      /*
+       * Both arguments must be integer constants.
+       */
+      if (!num_isint(lt)) {
+         out_error ("Range: left limit is not an integer constant: ", lt);
+         obj_dest (lt);
+         obj_dest (rt);
+         return &ErrorCell;
+      }
+      if (!num_isint(rt)) {
+         out_error ("Range: right limit is not an integer constant: ", rt);
+         obj_dest (lt);
+         obj_dest (rt);
+         return &ErrorCell;
+      }
+
+      /*
+       * The constants must be in a reasonable order.
+       */
+      lo = num_int (lt);
+      hi = num_int (rt);
+      if (hi<lo) {
+         out_errorn ("Range: inverted range %d:%d changed to %d:%d",
+                     lo, hi, hi, lo);
+         lo = num_int (rt);
+         hi = num_int (lt);
+      }
+
+      /*
+       * Create the range object.
+       */
+      lt = obj_dest (lt);
+      rt = obj_dest (rt);
+      retval = obj_new (C_RANGE, lo, hi);
+   } else {
+      retval = lt;
+   }
+   return retval;
+}
+      
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_dot
+ *
+ * Purpose:     Tries to parse an expression followed by the dot operator
+ *              followed by another expression.  If the dot is not present
+ *              then just the left operand is returned.
+ *
+ * Return:      Success:        The expression.
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_dot (lex_t *f, int skipnl) {
+
+   obj_t        rt=NIL, retval=NIL;
+
+   retval = parse_range (f, skipnl);
+   if (&ErrorCell==retval) return &ErrorCell;
+
+   while (TOK_DOT==lex_token(f, NULL, skipnl)) {
+      lex_consume (f);
+      rt = parse_range (f, skipnl);
+      if (&ErrorCell==rt) {
+         obj_dest (retval);
+         return &ErrorCell;
+      }
+      retval = obj_new (C_CONS,
+                        obj_new (C_SYM, "Dot"),
+                        obj_new (C_CONS,
+                                 retval,
+                                 obj_new (C_CONS,
+                                          rt,
+                                          NIL)));
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_subscripts
+ *
+ * Purpose:     Parses a subscripted expression.  The subscript is
+ *              enclosed in `[' and `]' after the main expression.
+ *
+ * Return:      Success:        Ptr to the expression.
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The contents of the `[]' can now be a comma-separated list
+ *      of expressions.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_selection (lex_t *f, int skipnl) {
+
+   obj_t        retval=NIL;             /*first argument, left of `['   */
+   obj_t        tmp=NIL;                /*a subscript argument          */
+   obj_t        operands=NIL;           /*operand list                  */
+   int          septok;                 /*separator token               */
+
+   retval = parse_dot (f, skipnl);
+   if (&ErrorCell==retval) return &ErrorCell;
+
+   /*
+    * Zero or more array selectors.
+    */
+   while ('['==lex_token (f, NULL, skipnl)) {
+      lex_consume (f);
+      operands = obj_new (C_CONS, retval, NIL);
+      retval = NIL;
+
+      /*
+       * One or more comma-separated expressions per selection.
+       */
+      for (;;) {
+         tmp = parse_expr (f, skipnl);
+         if (&ErrorCell==tmp) {
+            obj_dest (retval);
+            return &ErrorCell;
+         }
+         operands = obj_new (C_CONS, tmp, operands);    /*push*/
+         septok = lex_token (f, NULL, skipnl);
+         if (','==septok) {
+            lex_consume (f);
+         } else if (']'==septok) {
+            lex_consume (f);
+            break;
+         } else {
+            out_errorn ("expected ']'");
+            obj_dest (operands);
+            return &ErrorCell;
+         }
+      }
+
+      /*
+       * Put the operands in the correct order.
+       */
+      tmp = F_reverse (operands);
+      obj_dest (operands);
+      operands = tmp;
+      tmp = NIL;
+      
+      /*
+       * Add the function name `Dot' to the beginning of the
+       * list.
+       */
+      retval = obj_new (C_CONS,
+                        obj_new (C_SYM, "Dot"),
+                        operands);
+   }
+   
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_assignment
+ *
+ * Purpose:     Parses an assignment statement of the form
+ *
+ *                      LVALUE = RVALUE
+ *
+ * Return:      Success:        the resulting parse tree.
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_assignment (lex_t *f, int skipnl) {
+
+   obj_t        rt=NIL, retval=NIL;
+
+   retval = parse_selection (f, skipnl);
+   if (&ErrorCell==retval) return &ErrorCell;
+
+   if (TOK_EQ==lex_token (f, NULL, skipnl)) {
+      lex_consume (f);
+      rt = parse_selection (f, skipnl);
+      if (&ErrorCell==rt) {
+         obj_dest(retval);
+         return &ErrorCell;
+      }
+      retval = obj_new (C_CONS,
+                        obj_new (C_SYM, "Assign"),
+                        obj_new (C_CONS,
+                                 retval,
+                                 obj_new (C_CONS,
+                                          rt,
+                                          NIL)));
+   }
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    parse_expr
+ *
+ * Purpose:     Parses an expression.
+ *
+ * Return:      Success:        The expression.
+ *
+ *              Failure:        &ErrorCell
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+parse_expr (lex_t *f, int skipnl) {
+
+   return parse_assignment (f, skipnl);
+}
diff --git a/tools/browser/prim.c b/tools/browser/prim.c
new file mode 100644
index 0000000..a0423c0
--- /dev/null
+++ b/tools/browser/prim.c
@@ -0,0 +1,1586 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             prim.c
+ *                      Dec  5 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Primitive type class. A primitive type is one
+ *                      of the strings `string', `int', `float' or `double'
+ *                      or one of the SILO primitive type constants stored
+ *                      as ASCII, or the name of a silo object or component
+ *                      thereof holding a SILO primitive type constant.
+ *
+ * Modifications:       Jeremy Meredith, Sept 21, 1998
+ *                      Added multimatspecies type.
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#include <config.h>
+#include <ctype.h>
+#include <math.h>
+#define MYCLASS(X)      ((obj_prim_t*)(X))
+
+#define BROWSER_STR     0               /*char string (ptr to array of char) */
+#define BROWSER_INT8    1               /*8-bit signed integers              */
+#define BROWSER_SHORT   2
+#define BROWSER_INT     3
+#define BROWSER_LONG    4
+#define BROWSER_FLOAT   5
+#define BROWSER_DOUBLE  6
+#define BROWSER_LONG_LONG 7
+
+#define PA_NAME         (-999999)
+
+typedef struct obj_prim_t {
+   obj_pub_t    pub;
+   char         *name ;                 /*name of type or variable      */
+   char         *tname ;                /*name of type (var resolved)   */
+   int          browser_type ;          /*browser type constant         */
+   int          nbytes ;                /*size of the type              */
+   prim_assoc_t *assoc ;                /*I/O association table         */
+} obj_prim_t;
+
+class_t         C_PRIM;
+static obj_t    prim_new (va_list);
+static obj_t    prim_copy (obj_t, int);
+static obj_t    prim_dest (obj_t);
+static char *   prim_name (obj_t);
+static obj_t    prim_feval (obj_t);
+static obj_t    prim_apply (obj_t, obj_t);
+static void     prim_print (obj_t, out_t*);
+static void     prim_walk1 (obj_t, void*, int, walk_t*);
+static int      prim_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+static int      prim_walk3 (void*, obj_t, obj_t);
+static int      prim_sizeof (obj_t);
+static obj_t    prim_bind (obj_t, void*);
+static int      prim_diff (obj_t, obj_t);
+
+prim_assoc_t    PA_BR_OBJTYPE[] = {
+   {PA_NAME,                                    "FileObjectType"},
+   {BROWSER_DB_CURVE,           "curve"},
+   {BROWSER_DB_MULTIMESH,       "multimesh"},
+   {BROWSER_DB_MULTIMESHADJ,    "multimeshadj"},
+   {BROWSER_DB_MULTIVAR,        "multivar"},
+   {BROWSER_DB_MULTIMAT,        "multimat"},
+   {BROWSER_DB_MULTIMATSPECIES, "multimatspecies"},
+   {BROWSER_DB_QMESH,           "quadmesh"},
+   {BROWSER_DB_QVAR,            "quadvar"},
+   {BROWSER_DB_UCDMESH,         "ucdmesh"},
+   {BROWSER_DB_UCDVAR,          "ucdvar"},
+   {BROWSER_DB_PTMESH,          "ptmesh"},
+   {BROWSER_DB_PTVAR,           "ptvar"},
+   {BROWSER_DB_MAT,             "material"},
+   {BROWSER_DB_MATSPECIES,      "matspecies"},
+   {BROWSER_DB_VAR,             "var"},
+   {BROWSER_DB_OBJ,             "obj"},
+   {BROWSER_DB_DIR,             "directory"},
+   {BROWSER_DB_ARRAY,           "array"},
+   {BROWSER_DB_DEFVARS,         "defvars"},
+   {BROWSER_DB_CSGMESH,         "csgmesh"},
+   {BROWSER_DB_CSGVAR,          "csgvar"},
+   {BROWSER_DB_MRGTREE,         "mrgtree"},
+   {BROWSER_DB_GROUPELMAP,      "groupelmap"},
+   {BROWSER_DB_MRGVAR,          "mrgvar"},
+   {0,                          NULL}};
+
+prim_assoc_t    PA_OBJTYPE[] = {
+   {PA_NAME,                                    "DBObjectType"},
+   {DB_QUADMESH,        "DB_QUADMESH"},
+   {DB_QUADVAR,         "DB_QUADVAR"},
+   {DB_UCDMESH,         "DB_UCDMESH"},
+   {DB_UCDVAR,          "DB_UCDVAR"},
+   {DB_MULTIMESH,       "DB_MULTIMESH"},
+   {DB_MULTIMESHADJ,    "DB_MULTIMESHADJ"},
+   {DB_MULTIVAR,        "DB_MULTIVAR"},
+   {DB_MULTIMAT,        "DB_MULTIMAT"},
+   {DB_MULTIMATSPECIES, "DB_MULTIMATSPECIES"},
+   {DB_MULTIBLOCKMESH,  "DB_MULTIBLOCKMESH"},
+   {DB_MULTIBLOCKVAR,   "DB_MULTIBLOCKVAR"},
+   {DB_MATERIAL,        "DB_MATERIAL"},
+   {DB_MATSPECIES,      "DB_MATSPECIES"},
+   {DB_FACELIST,        "DB_FACELIST"},
+   {DB_ZONELIST,        "DB_ZONELIST"},
+   {DB_PHZONELIST,      "DB_PHZONELIST"},
+   {DB_EDGELIST,        "DB_EDGELIST"},
+   {DB_CURVE,           "DB_CURVE"},
+   {DB_POINTMESH,       "DB_POINTMESH"},
+   {DB_POINTVAR,        "DB_POINTVAR"},
+   {DB_ARRAY,           "DB_ARRAY"},
+   {DB_DEFVARS,         "DB_DEFVARS"},
+   {DB_CSGMESH,         "DB_CSGMESH"},
+   {DB_CSGVAR,          "DB_CSGVAR"},
+   {DB_MRGTREE,         "DB_MRGTREE"},
+   {DB_GROUPELMAP,      "DB_GROUPELMAP"},
+   {DB_MRGVAR,          "DB_MRGVAR"},
+   {DB_USERDEF,         "DB_USERDEF"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_DATATYPE[] = {
+   {PA_NAME,                                    "DBdatatype"},
+   {DB_INT,             "int"},
+   {DB_SHORT,           "short"},
+   {DB_LONG,            "long"},
+   {DB_FLOAT,           "float"},
+   {DB_DOUBLE,          "double"},
+   {DB_CHAR,            "char"},
+   {DB_LONG_LONG,       "long_long"},
+   {DB_NOTYPE,          "notype"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_ORDER[] = {
+   {PA_NAME,                                    "array order"},
+   {DB_ROWMAJOR,        "row major"},
+   {DB_COLMAJOR,        "column major"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_ONOFF[] = {
+   {PA_NAME,                                    "on/off"},
+   {DB_ON,              "on"},
+   {DB_OFF,             "off"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_BOOLEAN[] = {
+   {PA_NAME,                                    "Boolean"},
+   {1,                  "true"},
+   {0,                  "false"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_COORDSYS[] = {
+   {PA_NAME,                                    "coordinate system"},
+   {DB_CARTESIAN,       "Cartesian"},
+   {DB_CYLINDRICAL,     "cylindrical"},
+   {DB_SPHERICAL,       "spherical"},
+   {DB_NUMERICAL,       "numerical"},
+   {DB_OTHER,           "other"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_COORDTYPE[] = {
+   {PA_NAME,                                    "coordinate type"},
+   {DB_COLLINEAR,       "collinear"},
+   {DB_NONCOLLINEAR,    "noncollinear"},
+   {DB_QUAD_RECT,       "quad_rect"},
+   {DB_QUAD_CURV,       "quad_curv"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_FACETYPE[] = {
+   {PA_NAME,                                    "face type"},
+   {DB_RECTILINEAR,     "rectilinear"},
+   {DB_CURVILINEAR,     "curvilinear"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_PLANAR[] = {
+   {PA_NAME,                                    "planar"},
+   {DB_AREA,            "area"},
+   {DB_VOLUME,          "volume"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_CENTERING[] = {
+   {PA_NAME,                                    "centering"},
+   {DB_NOTCENT,         "not centered"},
+   {DB_NODECENT,        "node centered"},
+   {DB_ZONECENT,        "zone centered"},
+   {DB_FACECENT,        "face centered"},
+   {DB_EDGECENT,        "edge centered"},
+   {DB_BNDCENT,         "bondary centered"},
+   {DB_BLOCKCENT,       "block centered"},
+   {0,                  NULL}};
+    
+prim_assoc_t    PA_DEFVARTYPE[] = {
+   {PA_NAME,                                    "derived variable type"},
+   {DB_VARTYPE_SCALAR,    "scalar"},
+   {DB_VARTYPE_VECTOR,    "vector"},
+   {DB_VARTYPE_TENSOR,    "tensor"},
+   {DB_VARTYPE_SYMTENSOR, "symmetric tensor"},
+   {DB_VARTYPE_ARRAY,     "array"},
+   {DB_VARTYPE_MATERIAL,  "material"},
+   {DB_VARTYPE_SPECIES,   "species"},
+   {DB_VARTYPE_LABEL,     "LABEL"},
+   {0,                    NULL}};
+    
+prim_assoc_t    PA_REGIONOP[] = {
+   {PA_NAME,                                    "region op"},
+   {DBCSG_INNER,        "INNER"},
+   {DBCSG_OUTER,        "OUTER"},
+   {DBCSG_ON,           "ON"},
+   {DBCSG_UNION,        "UNION"},
+   {DBCSG_INTERSECT,    "INTERSECT"},
+   {DBCSG_DIFF,         "DIFF"},
+   {DBCSG_XFORM,        "XFORM"},
+   {DBCSG_COMPLIMENT,   "COMPLIMENT"},
+   {DBCSG_SWEEP,        "SWEEP"},
+   {0,                  NULL}};
+
+prim_assoc_t    PA_BOUNDARYTYPE[] = {
+   {PA_NAME,                                    "boundary type"},
+   {DBCSG_QUADRIC_G,        "QUADRIC_G"},
+   {DBCSG_SPHERE_PR,        "SPHERE_PR"},
+   {DBCSG_ELLIPSOID_PRRR,   "ELLIPSOID_PRRR"},
+   {DBCSG_PLANE_G,          "PLANE_G"},
+   {DBCSG_PLANE_X,          "PLANE_X"},
+   {DBCSG_PLANE_Y,          "PLANE_Y"},
+   {DBCSG_PLANE_Z,          "PLANE_Z"},
+   {DBCSG_PLANE_PN,         "PLANE_PN"},
+   {DBCSG_PLANE_PPP,        "PLANE_PPP"},
+   {DBCSG_CYLINDER_PNLR,    "CYLINDER_PNLR"},
+   {DBCSG_CYLINDER_PPR,     "CYLINDER_PPR"},
+   {DBCSG_BOX_XYZXYZ,       "BOX_XYZXYZ"},
+   {DBCSG_CONE_PNLA,        "CONE_PNLA"},
+   {DBCSG_CONE_PPA,         "CONE_PPA"},
+   {DBCSG_POLYHEDRON_KF,    "POLYHEDRON_KF"},
+   {DBCSG_HEX_6F,           "HEX_6F"},
+   {DBCSG_TET_4F,           "TET_4F"},
+   {DBCSG_PYRAMID_5F,       "PYRAMID_5F"},
+   {DBCSG_PRISM_5F,         "PRISM_5F"},
+   {DBCSG_QUADRATIC_G,      "QUADRATIC_G"},
+   {DBCSG_CIRCLE_PR,        "CIRCLE_PR"},
+   {DBCSG_ELLIPSE_PRR,      "ELLIPSE_PRR"},
+   {DBCSG_LINE_G,           "LINE_G"},
+   {DBCSG_LINE_X,           "LINE_X"},
+   {DBCSG_LINE_Y,           "LINE_Y"},
+   {DBCSG_LINE_PN,          "LINE_PN"},
+   {DBCSG_LINE_PP,          "LINE_PP"},
+   {DBCSG_BOX_XYXY,         "BOX_XYXY"},
+   {DBCSG_ANGLE_PNLA,       "ANGLE_PNLA"},
+   {DBCSG_ANGLE_PPA,        "ANGLE_PPA"},
+   {DBCSG_POLYGON_KP,       "POLYGON_KP"},
+   {DBCSG_TRI_3P,           "TRI_3P"},
+   {DBCSG_QUAD_4P,          "QUAD_4P"},
+   {0,                      NULL}};
+
+prim_assoc_t PA_TOPODIM[] = {
+   {PA_NAME,                                    "topological dimension"},
+   {-1,        "not specified"},
+   { 0,        "0"},
+   { 1,        "1"},
+   { 2,        "2"},
+   { 3,        "3"},
+};
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_class
+ *
+ * Purpose:     Initializes the PRIM class.
+ *
+ * Return:      Success:        Ptr to the class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+prim_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("PRIM");
+   cls->new = prim_new;
+   cls->copy = prim_copy;
+   cls->dest = prim_dest;
+   cls->objname = prim_name;
+   cls->feval = prim_feval;
+   cls->apply = prim_apply;
+   cls->print = prim_print;
+   cls->walk1 = prim_walk1;
+   cls->walk2 = prim_walk2;
+   cls->walk3 = prim_walk3;
+   cls->size_of = prim_sizeof;
+   cls->bind = prim_bind;
+   cls->diff = prim_diff;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_new
+ *
+ * Purpose:     Creates a new primitive type.
+ *
+ * Return:      Success:        Ptr to new PRIM object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+prim_new (va_list ap) {
+
+   obj_prim_t   *self = calloc (1, sizeof(obj_prim_t));
+   char         *s;
+
+   assert (self);
+   s = va_arg (ap, char*);
+   self->name = safe_strdup (s);
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_copy
+ *
+ * Purpose:     Copies a primitive type.
+ *
+ * Return:      Success:        Ptr to copy of SELF
+ *
+ *              Failure:        abort()
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 22 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+prim_copy (obj_t _self, int flag) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+   obj_prim_t   *retval = NULL;
+
+   if (SHALLOW==flag) {
+      retval = self;
+
+   } else {
+      retval = calloc (1, sizeof(obj_prim_t));
+      retval->name = safe_strdup (self->name);
+      retval->tname = self->tname ? safe_strdup (self->tname) : NULL;
+      retval->browser_type = self->browser_type;
+      retval->nbytes = self->nbytes;
+      retval->assoc = self->assoc;
+      
+   }
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_dest
+ *
+ * Purpose:     Destroys a primitive type object.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+prim_dest (obj_t _self) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+
+   if (0==self->pub.ref) {
+      free (self->name);
+      if (self->tname) free (self->tname);
+      memset (self, 0, sizeof(obj_prim_t));
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_name
+ *
+ * Purpose:     Returns a pointer to the name of the primitive type.
+ *
+ * Return:      Success:        Ptr to name.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+prim_name (obj_t _self) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+
+   return self->tname ? self->tname : self->name;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_feval
+ *
+ * Purpose:     Functional value of a type is the type itself.
+ *
+ * Return:      Success:        Copy of SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+prim_feval (obj_t _self) {
+
+   return obj_copy (_self, SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_apply
+ *
+ * Purpose:     Applying a primitive type to an argument list consisting of
+ *              a single SILO database object (SDO) causes the object to
+ *              be cast to that type.
+ *
+ * Return:      Success:        Ptr to a new SDO object with the appropriate
+ *                              type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+prim_apply (obj_t _self, obj_t args) {
+
+   obj_t        sdo=NIL, retval=NIL;
+
+   if (1!=F_length(args)) {
+      out_errorn ("typecast: wrong number of arguments");
+      return NIL;
+   }
+   
+   sdo = obj_eval (cons_head (args));
+   retval = sdo_cast (sdo, _self);
+   obj_dest (sdo);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_print
+ *
+ * Purpose:     Prints the name of a primitive type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 5 Feb 1997
+ *      Prints the name of the I/O assoc array if the primitive type
+ *      has one and the array has a name.
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+prim_print (obj_t _self, out_t *f) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+
+   if (self->tname) {
+      out_puts (f, self->tname);
+   } else {
+      out_puts (f, self->name);
+   }
+   if (self->assoc && PA_NAME==self->assoc[0].n && self->assoc[0].s) {
+      out_printf (f, " (%s)", self->assoc[0].s);
+   }
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Given a pointer to some memory of known length, render that
+ *              memory as an unsigned octal integer stored in big-endian
+ *              order. The complication is that an octal "digit" is three
+ *              bits, which is not a divisor of eight.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, October 19, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+prim_octal(char *buf/*out*/, const void *_mem, size_t nbytes)
+{
+    unsigned char       *mem = (unsigned char*)_mem;
+    size_t              qlen=0, at=0, stride=(8*nbytes)%3;
+    unsigned            q=0, d;
+
+    
+    while (nbytes>0 || qlen) {
+
+        /* fill the queue */
+        if (qlen<3) {
+            assert(nbytes);
+            q = (q<<8) | *mem++;
+            qlen += 8;
+            --nbytes;
+        }
+
+        /* use up the high-order bits */
+        qlen -= stride;
+        buf[at++] = "01234567"[q>>qlen];
+        q &= (1<<qlen)-1;
+        stride = 3;
+    }
+    buf[at] = '\0';
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_walk1
+ *
+ * Purpose:     Print memory cast as a primitive type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Added the BROWSER_INT8 data type.
+ *
+ *      Robb Matzke, 2000-06-01
+ *      Added `$' to the built-in format symbols.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      If the $fmt_string format is nothing then call out_putw(). This is
+ *      used by the documentation system.
+ *
+ *      Robb Matzke, 2000-10-19
+ *      Use the $obase variable. Reindented.
+ *
+ *      Mark C. Miller, Wed Sep 23 11:51:52 PDT 2009
+ *      Added long long case.
+ *
+ *      Mark C. Miller, Mon Jan 11 16:08:57 PST 2010
+ *      Fixed handling base16/8 for long and long long types.
+ *-------------------------------------------------------------------------
+ */
+static void
+prim_walk1 (obj_t _self, void *mem, int operation, walk_t *wdata)
+{
+    obj_prim_t          *self = MYCLASS(_self);
+    char                buf[1024], *s;
+    out_t               *f=NULL;
+    int                 i, j, obase;
+    unsigned long       u, nbits, mask;
+    unsigned long long  ull;
+
+    switch (operation) {
+    case WALK_PRINT:
+        f = (wdata && wdata->f) ? wdata->f : OUT_STDOUT;
+
+        /* Find the format string. The special strings `b16', `b8', and
+         * `b2' mean hexadecimal, octal, or binary format. */
+        obase = sym_bi_true("obase");
+        if (16==obase) {
+            strcpy(buf, "b16");
+        } else if (8==obase) {
+            strcpy(buf, "b8");
+        } else if (2==obase) {
+            strcpy(buf, "b2");
+        } else {
+            obase = 0;
+            sprintf(buf, "fmt_%s", obj_name(_self));
+            if ((s=sym_bi_gets(buf))) {
+                strcpy(buf, s);
+                free(s);
+            } else {
+                buf[0] = '\0';
+            }
+        }
+
+        /* We better have a format string by now. */
+        if (!buf[0] && BROWSER_STR!=self->browser_type) {
+            out_errorn("no format for primitive type %s", obj_name(_self));
+        } else if (!mem) {
+            out_printf(f, "(%s*)NULL", obj_name(_self));
+        } else {
+            switch (self->browser_type) {
+            case BROWSER_STR:
+                if (NULL==*((char**)mem)) {
+                    if ((s=sym_bi_gets("fmt_null"))) {
+                        strcpy(buf, s);
+                        free(s);
+                    } else {
+                        strcpy(buf, "%s");
+                    }
+                    out_printf(f, buf, "(null)");
+                } else if (!buf[0]) {
+                    out_putw(f, *((char**)mem));
+                } else {
+                    str_doprnt(f, buf, *((char**)mem));
+                }
+                break;
+                
+            case BROWSER_INT8:
+                u = *((unsigned char*)mem);
+                nbits = 8;
+                if (16==obase) {
+                    out_printf(f, "%02x", u);
+                } else if (8==obase) {
+                    out_printf(f, "%03x", u);
+                } else if (2==obase) {
+                    for (i=0, mask=1<<(nbits-1); i<nbits; i++, mask>>=1) {
+                        sprintf(buf+i, "%c", u&mask?'1':'0');
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((signed char*)mem));
+                }
+                break;
+                
+            case BROWSER_SHORT:
+                u = *((unsigned short*)mem);
+                nbits = 8*sizeof(short);
+                if (16==obase) {
+                    out_printf(f, "%0*x", 2*sizeof(short), u);
+                } else if (8==obase) {
+                    out_printf(f, "%0*o", (nbits+2)/3, u);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(short); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((short*)mem));
+                }
+                break;
+
+            case BROWSER_INT:
+                u = *((unsigned*)mem);
+                nbits = 8*sizeof(int);
+                for (i=0; self->assoc && self->assoc[i].s; i++) {
+                    if (*((int*)mem) == self->assoc[i].n) break;
+                }
+                if (self->assoc && self->assoc[i].s) {
+                    out_printf(f, "%s", self->assoc[i].s);
+                } else if (16==obase) {
+                    out_printf(f, "%0*x", 2*sizeof(int), u);
+                } else if (8==obase) {
+                    out_printf(f, "%0*o", (nbits+2)/3, u);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(int); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((int*)mem));
+                }
+                break;
+                
+            case BROWSER_LONG:
+                u = *((unsigned long*)mem);
+                nbits = 8*sizeof(long);
+                if (16==obase) {
+                    out_printf(f, "%0*lx", 2*sizeof(long), u);
+                } else if (8==obase) {
+                    out_printf(f, "%0*lo", (nbits+2)/3, u);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(long); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((long*)mem));
+                }
+                break;
+
+            case BROWSER_LONG_LONG:
+                ull = *((unsigned long long*)mem);
+                nbits = 8*sizeof(long long);
+                if (16==obase) {
+                    out_printf(f, "%0*llx", 2*sizeof(long long), ull);
+                } else if (8==obase) {
+                    out_printf(f, "%0*llo", (nbits+2)/3, ull);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(long long); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((long long*)mem));
+                }
+                break;
+
+            case BROWSER_FLOAT:
+                if (16==obase) {
+                    for (i=0; i<sizeof(float); i++) {
+                        sprintf(buf+2*i, "%02x", *((unsigned char*)mem+i));
+                    }
+                    out_puts(f, buf);
+                } else if (8==obase) {
+                    prim_octal(buf, mem, sizeof(float));
+                    out_puts(f, buf);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(float); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((float*)mem));
+                }
+                break;
+                
+            case BROWSER_DOUBLE:
+                if (16==obase) {
+                    for (i=0; i<sizeof(double); i++) {
+                        sprintf(buf+2*i, "%02x", *((unsigned char*)mem+i));
+                    }
+                    out_puts(f, buf);
+                } else if (8==obase) {
+                    prim_octal(buf, mem, sizeof(double));
+                    out_puts(f, buf);
+                } else if (2==obase) {
+                    for (i=0; i<sizeof(double); i++) {
+                        u = *((unsigned char*)mem+i);
+                        for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                            sprintf(buf+i*8+j, "%c", u&mask?'1':'0');
+                        }
+                    }
+                    out_puts(f, buf);
+                } else {
+                    out_printf(f, buf, *((double*)mem));
+                }
+                break;
+
+            default:
+                abort();
+            }
+        }
+        break;
+
+    case WALK_RETRIEVE:
+        /* Retrieve the integer value into a buffer. */        
+        if (wdata->nvals<0) return ;    /*error already detected*/
+        assert(self->tname);
+        if (strcmp(self->tname, "int")) {
+            out_errorn("prim_walk1: cannot retrieve a non-integer type");
+            wdata->nvals = -1;
+            return;
+        }
+        if (!mem) {
+            out_errorn("prim_walk1: no associated memory for value retrieval");
+            wdata->nvals = -1;
+            return;
+        }
+        if (wdata->nvals>=wdata->maxvals) {
+            out_errorn("prim_walk1: overflow at %d value%s",
+                       wdata->maxvals,
+                       1==wdata->maxvals?"":"s");
+            wdata->nvals = -1;
+            return;
+        }
+        wdata->vals[wdata->nvals] = *((int *)mem);
+        wdata->nvals += 1;
+        break;
+
+    default:
+        abort();
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    prim_getval 
+ *
+ * Purpose:     Return value of primitive as long long.
+ *
+ * Mark C. Miller, Mon Jan 11 16:10:26 PST 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static long long
+prim_getval_ll(int type, void *mem)
+{
+    switch (type) {
+    case BROWSER_STR:       return 0;
+    case BROWSER_INT8:      return (long long) *((signed char*)mem);
+    case BROWSER_SHORT:     return (long long) *((short*)mem);
+    case BROWSER_INT:       return (long long) *((int*)mem);
+    case BROWSER_LONG:      return (long long) *((long*)mem);
+    case BROWSER_LONG_LONG: return (long long) *((long long*)mem);
+    case BROWSER_FLOAT:     return (long long) *((float*)mem);
+    case BROWSER_DOUBLE:    return (long long) *((double*)mem);
+    }
+}
+
+/*-------------------------------------------------------------------------
+ * Function:    prim_getval 
+ *
+ * Purpose:     Return value of primitive as double.
+ *
+ * Mark C. Miller, Mon Jan 11 16:10:26 PST 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static double
+prim_getval(int type, void *mem)
+{
+    switch (type) {
+    case BROWSER_STR:       return 0;
+    case BROWSER_INT8:      return (double) *((signed char*)mem);
+    case BROWSER_SHORT:     return (double) *((short*)mem);
+    case BROWSER_INT:       return (double) *((int*)mem);
+    case BROWSER_LONG:      return (double) *((long*)mem);
+    case BROWSER_LONG_LONG: return (double) *((long long*)mem);
+    case BROWSER_FLOAT:     return (double) *((float*)mem);
+    case BROWSER_DOUBLE:    return (double) *((double*)mem);
+    }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_walk2
+ *
+ * Purpose:     Determines if the memory pointed to by a_mem and b_mem
+ *              is the same thing.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical.
+ *                 1: A and B are partially different, we printed the
+ *                    summary already.
+ *                 2: A and B are totally different, the caller should
+ *                    print the summary.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Added differencing for BROWSER_INT8 datatypes.
+ *
+ *      Mark C. Miller, Wed Sep 23 11:52:20 PDT 2009
+ *      Added support for long long type
+ *
+ *  Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *  Added suppot for alternate relative diff option using epsilon param.
+ *
+ *  Mark C. Miller, Sun Dec  6 16:01:01 PST 2009
+ *  Added support for diffing values of different type. Added special
+ *  diffing logic for diffing long long values as double mantissa is not
+ *  long enough to store all possible long long values.
+ *
+ *  Mark C. Miller, Mon Dec  7 09:52:54 PST 2009
+ *  Expand above mods to handle case where sizeof(long)>=sizeof(double).
+ *
+ *  Mark C. Miller, Mon Jan 11 16:11:11 PST 2010
+ *  Split logic handling same types for a and b operands and logic handling
+ *  case where a/b operands are of different type. For same type case,
+ *  all diffing is done as before, in double precision, except long long
+ *  which is done using long long. For differing types, all integral
+ *  valued data is handled using long long and all float data is handled
+ *  using double. If for the differing types one is float and the other
+ *  is integral, then it will diff using double also. Added support
+ *  for Diffopt.ll_xxx options also.
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+prim_walk2 (obj_t _a, void *a_mem, obj_t _b, void *b_mem, walk_t *wdata)
+{
+    obj_prim_t  *a = MYCLASS(_a);
+    obj_prim_t  *b = MYCLASS(_b);
+    char                *a_s=NULL, *b_s=NULL;
+    int          status = 0;
+    out_t       *f = wdata->f;
+
+    if (a->browser_type == b->browser_type)
+    {
+        if (a->browser_type == BROWSER_STR)
+        {
+            a_s = *((char**)a_mem);
+            b_s = *((char**)b_mem);
+
+            if ((a_s && !b_s) || (!a_s && b_s)) {
+                /* One is null, the other isn't */
+                status = 2;
+            } else if (a_s && b_s && strcmp(a_s, b_s)) {
+                /* Non-null and different */
+                status = 2;
+            }
+        }
+        else if (a->browser_type == BROWSER_LONG_LONG)
+        {
+            long long a_ll = prim_getval_ll(a->browser_type, a_mem);
+            long long b_ll = prim_getval_ll(b->browser_type, b_mem);
+            double d_abs = DiffOpt.ll_abs;
+            double d_rel = DiffOpt.ll_rel;
+            double d_eps = DiffOpt.ll_eps;
+            status = differentll(a_ll, b_ll, d_abs, d_rel, d_eps) ? 2 : 0;
+        }
+        else
+        {
+            double a_d = prim_getval(a->browser_type, a_mem);
+            double b_d = prim_getval(b->browser_type, b_mem);
+            double d_abs, d_rel, d_eps;
+
+            switch (a->browser_type) {
+            case BROWSER_INT8:
+                d_abs = DiffOpt.c_abs;
+                d_rel = DiffOpt.c_rel;
+                d_eps = DiffOpt.c_eps;
+                break;
+            case BROWSER_SHORT:
+                d_abs = DiffOpt.s_abs;
+                d_rel = DiffOpt.s_rel;
+                d_eps = DiffOpt.s_eps;
+                break;
+            case BROWSER_INT:
+                d_abs = DiffOpt.i_abs;
+                d_rel = DiffOpt.i_rel;
+                d_eps = DiffOpt.i_eps;
+                break;
+            case BROWSER_LONG:
+                d_abs = DiffOpt.l_abs;
+                d_rel = DiffOpt.l_rel;
+                d_eps = DiffOpt.l_eps;
+                break;
+            case BROWSER_FLOAT:
+                d_abs = DiffOpt.f_abs;
+                d_rel = DiffOpt.f_rel;
+                d_eps = DiffOpt.f_eps;
+                break;
+            case BROWSER_DOUBLE:
+                d_abs = DiffOpt.d_abs;
+                d_rel = DiffOpt.d_rel;
+                d_eps = DiffOpt.d_eps;
+                break;
+            default:
+                abort();
+            }
+
+            status = different(a_d, b_d, d_abs, d_rel, d_eps) ? 2 : 0;
+        }
+    }
+    else
+    {
+        if (a->browser_type == BROWSER_STR ||
+            b->browser_type == BROWSER_STR)
+        {
+            /* different types but one is string. Can't handle that */
+            status = 2;
+        }
+        else if ((a->browser_type == BROWSER_INT8 ||
+                  a->browser_type == BROWSER_SHORT ||
+                  a->browser_type == BROWSER_INT ||
+                  a->browser_type == BROWSER_LONG ||
+                  a->browser_type == BROWSER_LONG_LONG) &&
+                 (b->browser_type == BROWSER_INT8 ||
+                  b->browser_type == BROWSER_SHORT ||
+                  b->browser_type == BROWSER_INT ||
+                  b->browser_type == BROWSER_LONG ||
+                  b->browser_type == BROWSER_LONG_LONG))
+        {
+            /* diff using largest integral type logic we can */
+            long long a_ll = prim_getval_ll(a->browser_type, a_mem);
+            long long b_ll = prim_getval_ll(b->browser_type, b_mem);
+            double d_abs = DiffOpt.ll_abs;
+            double d_rel = DiffOpt.ll_rel;
+            double d_eps = DiffOpt.ll_eps;
+            status = differentll(a_ll, b_ll, d_abs, d_rel, d_eps) ? 2 : 0;
+        }
+        else
+        {
+            /* diff using double precision logic */
+            double a_d = prim_getval(a->browser_type, a_mem);
+            double b_d = prim_getval(b->browser_type, b_mem);
+            double d_abs = DiffOpt.d_abs;
+            double d_rel = DiffOpt.d_rel;
+            double d_eps = DiffOpt.d_eps;
+            status = different(a_d, b_d, d_abs, d_rel, d_eps) ? 2 : 0;
+        }
+    }
+
+    if (status) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                obj_walk1(_a, a_mem, WALK_PRINT, wdata);
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                obj_walk1(_b, b_mem, WALK_PRINT, wdata);
+                out_nl(f);
+                status = 1;
+            }
+            break;
+        case DIFF_REP_BRIEF:
+        case DIFF_REP_SUMMARY:
+            break;
+        }
+    }
+   
+    return status;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_walk3
+ *
+ * Purpose:     Assigns a value to a silo primitive object.
+ *
+ * Return:      Success:        0
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *    Robb Matzke, 2 Sep 1997
+ *    Added the BROWSER_INT8 datatype.
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+prim_walk3 (void *mem, obj_t _type, obj_t val) {
+
+   char         *s, *tmp_s;
+   obj_prim_t   *type = MYCLASS(_type);
+
+   assert (type->tname);
+
+   if (!strcmp (type->tname, "int8")) {
+      if (!num_isint (val)) {
+         out_error ("prim_walk3: cannot be assigned to an int8: ", val);
+         return -1;
+      }
+      *((signed char*)mem) = num_int (val);
+
+   } else if (!strcmp (type->tname, "short")) {
+      if (!num_isint (val)) {
+         out_error ("prim_walk3: cannot be assigned to a short: ", val);
+         return -1;
+      }
+      *((short*)mem) = num_int (val);
+         
+   } else if (!strcmp (type->tname, "int")) {
+      if (!num_isint (val)) {
+         out_error ("prim_walk3: cannot be assigned to an int: ", val);
+         return -1;
+      }
+      *((int*)mem) = num_int (val);
+
+   } else if (!strcmp (type->tname, "long")) {
+      if (!num_isint (val)) {
+         out_error ("prim_walk3: cannot be assigned to a long: ", val);
+         return -1;
+      }
+      *((long*)mem) = num_int (val);
+
+   } else if (!strcmp (type->tname, "float")) {
+      if (!num_isfp (val)) {
+         out_error ("prim_walk3: cannot be assigned to a float: ", val);
+         return -1;
+      }
+      *((float*)mem) = num_fp (val);
+
+   } else if (!strcmp (type->tname, "double")) {
+      if (!num_isfp (val)) {
+         out_error ("prim_walk3: cannot be assigned to a double: ", val);
+         return -1;
+      }
+      *((double*)mem) = num_fp (val);
+
+   } else if (!strcmp (type->tname, "string")) {
+      s = obj_name (val);
+      if (!s) {
+         out_error ("prim_walk3: cannot be assigned to a string: ", val);
+         return -1;
+      }
+      tmp_s = *((char**)mem);
+      if (tmp_s) free (tmp_s);
+      *((char**)mem) = safe_strdup (s);
+
+   } else {
+      out_error ("sdo_assign: unknown primitive type: ", _type);
+   }
+   return 0;
+}
+         
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_sizeof
+ *
+ * Purpose:     Returns the number of bytes represented by the primitive
+ *              type.
+ *
+ * Return:      Success:        Number of bytes
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+prim_sizeof (obj_t _self) {
+
+   if (NULL==MYCLASS(_self)->tname) return -1;
+   return MYCLASS(_self)->nbytes;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_bind
+ *
+ * Purpose:     Given a primitive type name or variable containing a SILO
+ *              primitive type integer, fill in additional information in
+ *              the object to describe the type.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Due to the ambiguity of the words `char' and `character' they will
+ *      no longer be accepted to mean `string'.  `String' is a pointer to
+ *      an array of characters and the array is interpreted as a character
+ *      string.  `Int8' is a character which is interpreted as an 8-bit
+ *      signed integer.
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      The silo datatype `DB_CHAR' is always translated to BROWSER_INT8
+ *      because the only silo datatypes that use this feature want to
+ *      interpret the values as integers.  Example:
+ *
+ *              mixvals: *[self.nvals] *[self.mixlen] self.datatype
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *    Mark C. Miller, Wed Sep 23 11:52:45 PDT 2009
+ *    Added support for long long type.
+ *
+ *    Mark C. Miller, Fri Nov 13 15:38:07 PST 2009
+ *    Changed name of "long long" type to "longlong" as PDB is sensitive
+ *    to spaces in type names.
+ *
+ *    Mark C. Miller, Tue Nov 17 22:30:30 PST 2009
+ *    Changed name of long long datatype to match PDB proper.
+ *
+ *    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+ *    Conditionally compile long long support only when its
+ *    different from long.
+ *
+ *    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+ *    Made long long support UNconditionally compiled.
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static obj_t
+prim_bind (obj_t _self, void *mem) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+   obj_t        in=NIL, sdo=NIL;
+   lex_t        *lex_input=NULL;
+   walk_t       wdata;
+   int          silo_type = -1;
+
+   assert (self && C_PRIM==self->pub.cls);
+   if (self->tname) {
+      free (self->tname);
+      self->tname = NULL;
+   }
+
+   if (!strcmp (self->name, "char") || !strcmp (self->name, "character")) {
+      out_errorn ("prim_bind: do not use `string' or `int8' instead of %s",
+                  self->name);
+      return NIL;
+      
+   } else if (!strcmp (self->name, "string")) {
+      self->tname = safe_strdup ("string");
+      self->browser_type = BROWSER_STR;
+      self->nbytes = sizeof(char*);
+
+   } else if (!strcmp (self->name, "int8")) {
+      self->tname = safe_strdup ("int8");
+      self->browser_type = BROWSER_INT8;
+      self->nbytes = sizeof(char);
+
+   } else if (!strcmp (self->name, "short")) {
+      self->tname = safe_strdup ("short");
+      self->browser_type = BROWSER_SHORT;
+      self->nbytes = sizeof(short);
+
+   } else if (!strcmp (self->name, "int") ||
+              !strcmp (self->name, "integer")) {
+      self->tname = safe_strdup ("int");
+      self->browser_type = BROWSER_INT;
+      self->nbytes = sizeof(int);
+
+   } else if (!strcmp (self->name, "long_long")) {
+      self->tname = safe_strdup ("long_long");
+      self->browser_type = BROWSER_LONG_LONG;
+      self->nbytes = sizeof(long long);
+
+   } else if (!strcmp (self->name, "long")) {
+      self->tname = safe_strdup ("long");
+      self->browser_type = BROWSER_LONG;
+      self->nbytes = sizeof(long);
+
+   } else if (!strcmp (self->name, "float")) {
+      self->tname = safe_strdup ("float");
+      self->browser_type = BROWSER_FLOAT;
+      self->nbytes = sizeof(float);
+
+   } else if (!strcmp (self->name, "double")) {
+      self->tname = safe_strdup ("double");
+      self->browser_type = BROWSER_DOUBLE;
+      self->nbytes = sizeof(double);
+
+   } else {
+      if (isdigit(self->name[0])) {
+         silo_type = strtol (self->name, NULL, 0);
+      } else {
+         lex_input = lex_string (self->name);
+         in = parse_stmt (lex_input, false);
+         lex_close (lex_input);
+         sdo = obj_eval (in);
+         in = obj_dest (in);
+         if (!sdo || C_SDO!=sdo->pub.cls) {
+            out_error ("prim_bind: data type is not appropriate: ", sdo);
+            obj_dest (sdo);
+            return NIL;
+         }
+         wdata.vals = &silo_type;
+         wdata.nvals = 0;
+         wdata.maxvals = 1;
+         obj_walk1 (sdo, NULL, WALK_RETRIEVE, &wdata);
+         obj_dest (sdo);
+         if (1!=wdata.nvals) {
+            out_errorn ("prim_bind: could not read data type from %s",
+                        self->name);
+            return NIL;
+         }
+      }
+      
+      switch (silo_type) {
+      case DB_CHAR:
+         self->tname = safe_strdup ("int8");
+         self->browser_type = BROWSER_INT8;
+         self->nbytes = sizeof(char);
+         break;
+
+      case DB_SHORT:
+         self->tname = safe_strdup ("short");
+         self->browser_type = BROWSER_SHORT;
+         self->nbytes = sizeof(short);
+         break;
+
+      case DB_INT:
+         self->tname = safe_strdup ("int");
+         self->browser_type = BROWSER_INT;
+         self->nbytes = sizeof(int);
+         break;
+
+      case DB_LONG:
+         self->tname = safe_strdup ("long");
+         self->browser_type = BROWSER_LONG;
+         self->nbytes = sizeof(long);
+         break;
+
+      case DB_LONG_LONG:
+         self->tname = safe_strdup ("long_long");
+         self->browser_type = BROWSER_LONG_LONG;
+         self->nbytes = sizeof(long long);
+         break;
+
+      case DB_FLOAT:
+         self->tname = safe_strdup ("float");
+         self->browser_type = BROWSER_FLOAT;
+         self->nbytes = sizeof(float);
+         break;
+
+      case DB_DOUBLE:
+         self->tname = safe_strdup ("double");
+         self->browser_type = BROWSER_DOUBLE;
+         self->nbytes = sizeof(double);
+         break;
+
+      default:
+         out_errorn ("prim_bind: cannot resolve %s to a silo type",
+                     self->name);
+         return NIL;
+      }
+   }
+   return _self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_diff
+ *
+ * Purpose:     Computes the difference between two primitive types.
+ *
+ * Return:      Success:        0:      same
+ *                              2:      different
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+prim_diff (obj_t _a, obj_t _b) {
+
+   obj_prim_t   *a = MYCLASS(_a);
+   obj_prim_t   *b = MYCLASS(_b);
+
+   assert (a->tname);
+   assert (b->tname);
+
+   return (!strcmp(a->tname, b->tname) && a->assoc==b->assoc) ? 0 : 2;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_set_io_assoc
+ *
+ * Purpose:     Sets the I/O association table for a primitive type.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+prim_set_io_assoc (obj_t _self, prim_assoc_t *assoc) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+
+   if (!self || C_PRIM!=self->pub.cls) return NIL;
+   self->assoc = assoc;
+   return _self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    prim_silotype
+ *
+ * Purpose:     Returns the silo data type constant which corresponds to
+ *              the primitive type.
+ *
+ * Return:      Success:        One of the DB_* type constants from silo.h
+ *
+ *              Failure:        DB_NOTYPE
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Apr  2 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      The browser type `string' is no longer translated to DB_CHAR.
+ *      Instead, `int8' is translated to DB_CHAR.
+ *
+ *      Mark C. Miller, Wed Sep 23 11:53:21 PDT 2009
+ *      Added support for long long.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:38:07 PST 2009
+ *      Changed name of "long long" type to "longlong" as PDB is sensitive
+ * 
+ *      Mark C. Miller, Tue Nov 17 22:30:30 PST 2009
+ *      Changed name of long long datatype to match PDB proper.
+ *-------------------------------------------------------------------------
+ */
+DBdatatype
+prim_silotype (obj_t _self) {
+
+   obj_prim_t   *self = MYCLASS(_self);
+
+   if (!self) return DB_NOTYPE;
+   if (self->tname) {
+      switch (self->browser_type) {
+      case BROWSER_STR:
+         return DB_NOTYPE;
+      case BROWSER_INT8:
+         return DB_CHAR;
+      case BROWSER_SHORT:
+         return DB_SHORT;
+      case BROWSER_INT:
+         return DB_INT;
+      case BROWSER_LONG:
+         return DB_LONG;
+      case BROWSER_LONG_LONG:
+         return DB_LONG_LONG;
+      case BROWSER_FLOAT:
+         return DB_FLOAT;
+      case BROWSER_DOUBLE:
+         return DB_DOUBLE;
+      default:
+         return DB_NOTYPE;
+      }
+   } else if (!strcmp (self->name, "string")) {
+      return DB_NOTYPE;
+
+   } else if (!strcmp (self->name, "int8")) {
+      return DB_CHAR;
+
+   } else if (!strcmp (self->name, "short")) {
+      return DB_SHORT;
+
+   } else if (!strcmp (self->name, "int")) {
+      return DB_INT;
+
+   } else if (!strcmp (self->name, "long_long")) {
+      return DB_LONG_LONG;
+
+   } else if (!strcmp (self->name, "long")) {
+      return DB_LONG;
+
+   } else if (!strcmp (self->name, "float")) {
+      return DB_FLOAT;
+
+   } else if (!strcmp (self->name, "double")) {
+      return DB_DOUBLE;
+
+   }
+   return DB_NOTYPE;
+}
diff --git a/tools/browser/ptr.c b/tools/browser/ptr.c
new file mode 100644
index 0000000..e64c28d
--- /dev/null
+++ b/tools/browser/ptr.c
@@ -0,0 +1,500 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             ptr.c
+ *                      Dec  9, 1996
+ *                      Robb Matzke <robb at callisto.nuance.mdn.com>
+ *
+ * Purpose:             The pointer type class.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#define MYCLASS(X)      ((obj_ptr_t*)(X))
+
+typedef struct obj_ptr_t {
+   obj_pub_t    pub;
+   obj_t        sub ;                   /*pointed to type               */
+} obj_ptr_t;
+
+class_t         C_PTR;
+static obj_t    ptr_new (va_list);
+static obj_t    ptr_copy (obj_t, int);
+static obj_t    ptr_dest (obj_t);
+static obj_t    ptr_apply (obj_t, obj_t);
+static void     ptr_walk1 (obj_t, void*, int, walk_t*);
+static int      ptr_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+static void     ptr_print (obj_t, out_t*);
+static int      ptr_sizeof (obj_t);
+static obj_t    ptr_deref (obj_t, int, obj_t*);
+static obj_t    ptr_bind (obj_t, void*);
+static int      ptr_diff (obj_t, obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_class
+ *
+ * Purpose:     Initializes the ARRAY class.
+ *
+ * Return:      Success:        Ptr to the class
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+ptr_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("POINTER");
+   cls->new = ptr_new;
+   cls->copy = ptr_copy;
+   cls->dest = ptr_dest;
+   cls->apply = ptr_apply;
+   cls->print = ptr_print;
+   cls->walk1 = ptr_walk1;
+   cls->walk2 = ptr_walk2;
+   cls->deref = ptr_deref;
+   cls->size_of = ptr_sizeof;
+   cls->bind = ptr_bind;
+   cls->diff = ptr_diff;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_new
+ *
+ * Purpose:     Creates a new pointer object with the specified subtype.
+ *
+ * Return:      Success:        Ptr to a new POINTER object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ptr_new (va_list ap) {
+
+   obj_ptr_t    *self = calloc (1, sizeof(obj_ptr_t));
+   
+   assert (self);
+   self->sub = va_arg (ap, obj_t);
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_copy
+ *
+ * Purpose:     Copies a pointer type.
+ *
+ * Return:      Success:        Copy of SELF
+ *
+ *              Failure:        abort()
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 22 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ptr_copy (obj_t _self, int flag) {
+
+   obj_ptr_t    *self = MYCLASS(_self);
+   obj_ptr_t    *retval = NULL;
+   obj_t        x;
+
+   if (SHALLOW==flag) {
+      x = obj_copy (self->sub, SHALLOW);
+      assert (x==self->sub);
+      retval = self;
+
+   } else {
+      retval = calloc (1, sizeof(obj_ptr_t));
+      retval->sub = obj_copy (self->sub, DEEP);
+   }
+
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_dest
+ *
+ * Purpose:     Destroys a pointer type object.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ptr_dest (obj_t _self) {
+
+   obj_ptr_t    *self = MYCLASS(_self);
+
+   obj_dest (self->sub);
+   if (0==self->pub.ref) memset (self, 0, sizeof(obj_ptr_t));
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_apply
+ *
+ * Purpose:     Applying a pointer type to an argument list consisting of
+ *              a single SILO database object (SDO) causes the object to
+ *              be cast to that type.
+ *
+ * Return:      Success:        Ptr to a new SDO object with the appropriate
+ *                              type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ptr_apply (obj_t _self, obj_t args) {
+
+   obj_t        sdo=NIL, retval=NIL;
+
+   if (1!=F_length(args)) {
+      out_errorn ("typecast: wrong number of arguments");
+      return NIL;
+   }
+
+   sdo = obj_eval (cons_head (args));
+   retval = sdo_cast (sdo, _self);
+   obj_dest (sdo);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_print
+ *
+ * Purpose:     Prints a pointer type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+ptr_print (obj_t _self, out_t *f) {
+
+   obj_ptr_t    *self = MYCLASS(_self);
+
+   out_puts (f, "*");
+   obj_print (self->sub, f);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_walk1
+ *
+ * Purpose:     Print memory cast as a pointer type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *   Mark C. Miller, Tue Sep  8 15:40:51 PDT 2009
+ *   Added RETRIEVE op case.
+ *-------------------------------------------------------------------------
+ */
+static void
+ptr_walk1 (obj_t _self, void *mem, int operation, walk_t *wdata) {
+
+   obj_ptr_t    *self = MYCLASS(_self);
+   void         *ptr;
+   out_t        *f;
+
+   ptr = *((void**)mem);
+   switch (operation) {
+   case WALK_PRINT:
+      f = (wdata && wdata->f) ? wdata->f : OUT_STDOUT;
+      if (!ptr) {
+         out_printf (f, "NULL");
+      } else {
+         obj_walk1 (self->sub, ptr, operation, wdata);
+      }
+      break;
+
+   case WALK_RETRIEVE:
+      if (!ptr) return;
+      obj_walk1 (self->sub, ptr, operation, wdata);
+      break;
+
+   default:
+      abort();
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_walk2
+ *
+ * Purpose:     Determines if a_mem and b_mem are the same or different.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical.
+ *                 1: A and B are partially different.  We have already
+ *                    printed the summary.
+ *                 2: A and B are totally different.  The caller should
+ *                    print the summary.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+ptr_walk2 (obj_t _a, void *a_mem, obj_t _b, void *b_mem, walk_t *wdata) {
+
+   obj_ptr_t    *a = MYCLASS(_a);
+   obj_ptr_t    *b = MYCLASS(_b);
+   void         *a_ptr, *b_ptr;
+
+   a_ptr = a_mem ? *((void**)a_mem) : NULL;
+   b_ptr = b_mem ? *((void**)b_mem) : NULL;;
+
+   return obj_walk2 (a->sub, a_ptr, b->sub, b_ptr, wdata);
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_deref
+ *
+ * Purpose:     Given a pointer type, return the type of object pointed
+ *              to.
+ *
+ * Return:      Success:        Returns a copy of the pointed-to type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The prototype changed but the functionality remains the same.
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static obj_t
+ptr_deref (obj_t _self, int argc, obj_t *argv) {
+
+   if (0!=argc) {
+      out_errorn ("ptr_deref: wrong number of arguments");
+      return NIL;
+   }
+   return obj_copy (MYCLASS(_self)->sub, SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_sizeof
+ *
+ * Purpose:     Returns the size of a pointer.
+ *
+ * Return:      Success:        sizeof(void*)
+ *
+ *              Failure:        never fails
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+ptr_sizeof (obj_t _self) {
+
+   return sizeof (void*);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_bind
+ *
+ * Purpose:     Binds array dimensions to numeric values.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+ptr_bind (obj_t _self, void *mem) {
+
+   obj_ptr_t    *self = MYCLASS(_self);
+   obj_t        name=NIL, val=NIL, x=NIL;
+   int          i;
+
+   if (C_STR==self->sub->pub.cls) {
+      name = obj_new (C_SYM, obj_name(self->sub));
+      x = sym_vboundp (name);
+      name = obj_dest (name);
+      val = obj_copy (x, DEEP); /*so we can modify it*/
+      x = obj_dest (x);
+
+      /*
+       * We're being tricky here.  By assigning a new value to the `sub'
+       * field we're modifying all the expressions that share this cell.
+       * We must insure that the correct reference count is imparted
+       * to the new subtype.
+       */
+      for (i=1; i<self->pub.ref; i++) {
+         x = obj_copy (val, SHALLOW);
+         assert (x==val);
+      }
+      
+      if (val) self->sub = val;
+   }
+
+   return obj_bind (self->sub, mem ? *((void**)mem) : NULL);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    ptr_diff
+ *
+ * Purpose:     Computes differences between A and B.
+ *
+ * Return:      Success:        0: same
+ *                              2: different
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+ptr_diff (obj_t _a, obj_t _b) {
+
+   obj_ptr_t    *a = MYCLASS(_a);
+   obj_ptr_t    *b = MYCLASS(_b);
+
+   return obj_diff (a->sub, b->sub);
+}
diff --git a/tools/browser/range.c b/tools/browser/range.c
new file mode 100644
index 0000000..6416e64
--- /dev/null
+++ b/tools/browser/range.c
@@ -0,0 +1,253 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             range.c
+ *                      Jan  3 1997
+ *                      Robb Matzke <robb at maya.nuance.mdn.com>
+ *
+ * Purpose:             Integer ranges
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+
+#define MYCLASS(X)      ((obj_range_t*)(X))
+
+typedef struct obj_range_t {
+   obj_pub_t    pub;
+   int          lo, hi ;                /*inclusive                     */
+} obj_range_t;
+
+class_t         C_RANGE;
+static obj_t    range_new (va_list);
+static void     range_print (obj_t, out_t*);
+static int      range_diff (obj_t, obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    range_class
+ *
+ * Purpose:     Initializes the range class.
+ *
+ * Return:      Success:        Ptr to the range class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+range_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("RANGE");
+   cls->new = range_new;
+   cls->print = range_print;
+   cls->diff = range_diff;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    range_new
+ *
+ * Purpose:     Creates a new integer range.  The two arguments are the
+ *              low and high ends of the range (inclusive).
+ *
+ * Return:      Success:        Ptr to a new range object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+range_new (va_list ap) {
+
+   obj_range_t  *self = calloc (1, sizeof(obj_range_t));
+   int          tmp;
+
+   self->lo = va_arg (ap, int);
+   self->hi = va_arg (ap, int);
+
+   if (self->lo > self->hi) {
+      tmp = self->lo;
+      self->lo = self->hi;
+      self->hi = tmp;
+   }
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    range_print
+ *
+ * Purpose:     Prints an integer range.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  3 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+range_print (obj_t _self, out_t *f) {
+
+   obj_range_t  *self = MYCLASS(_self);
+
+   out_printf (f, "%d:%d", self->lo, self->hi);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    range_diff
+ *
+ * Purpose:     Compares two ranges and reports differences.
+ *
+ * Return:      Success:        0:      same
+ *                              2:      different
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-28
+ *              Honors the DiffOpt settings.
+ *
+ *  Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *  Added suppot for alternate relative diff option epsilon param.
+ *-------------------------------------------------------------------------
+ */
+static int
+range_diff (obj_t _a, obj_t _b)
+{
+    out_t       *f = OUT_STDOUT;
+
+    obj_range_t *a = MYCLASS(_a);
+    obj_range_t *b = MYCLASS(_b);
+
+    if (different(a->lo, b->lo, DiffOpt.i_abs, DiffOpt.i_rel, DiffOpt.i_eps) ||
+        different(a->hi, b->hi, DiffOpt.i_abs, DiffOpt.i_rel, DiffOpt.i_eps)) {
+        switch (DiffOpt.report) {
+        case DIFF_REP_ALL:
+            if (DiffOpt.two_column) {
+                obj_print(_a, f);
+                out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                obj_print(_b, f);
+                out_nl(f);
+                return 1;
+            }
+            return 2;
+        case DIFF_REP_BRIEF:
+        case DIFF_REP_SUMMARY:
+            return 2;
+        }
+    }
+    return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    range_range
+ *
+ * Purpose:     Returns the endpoints of the range through LO and HI.
+ *
+ * Return:      Success:        0 if SELF is a range.
+ *
+ *              Failure:        -1 if SELF is not a range. LO and HI are
+ *                              not modified.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan  6 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+range_range (obj_t _self, int *lo, int *hi) {
+
+   obj_range_t  *self = MYCLASS(_self);
+
+   if (!self || C_RANGE!=self->pub.cls) return -1;
+   if (lo) *lo = self->lo;
+   if (hi) *hi = self->hi;
+   return 0;
+}
diff --git a/tools/browser/sample.init b/tools/browser/sample.init
new file mode 100644
index 0000000..d9345ca
--- /dev/null
+++ b/tools/browser/sample.init
@@ -0,0 +1,444 @@
+## Initialization file for the browser.                      -*-shell-script-*-
+noprint $browser_version = 4.501
+##
+## The browser searches for a startup file named $HOME/.browser_rc,
+## and if that is not found then $prefix/include/browser_rc, where
+## $prefix is set by the --prefix=PREFIX switch of configure, which
+## defaults to /usr/local.  The browser doesn't search if a startup
+## file is specified with the --file browser switch.
+
+## Modifications
+##
+##      Robb Matzke, 29 Jul 1997
+##      Added the `html_browsers' and `trap_sigfpe' variables.
+##
+##      Robb Matzke, 2 Sep 1997
+##      Added variables for the `int8' datatype.
+##
+##      Sean Ahern, Tue Feb  1 13:44:00 PST 2000
+##      Changed how the version number works.
+##
+##      Eric Brugger, Fri May 26 14:39:05 PDT 2000
+##      I removed the setting of html_browsers.
+
+##
+## The browser will treat everything as the SILO DBobject type if
+## $lowlevel is set to a non-zero value.  The default is to treat
+## database objects as higher-level SILO types like DBquadvar.
+##
+#noprint $lowlevel = 0
+
+##
+## Output formats for primitive types.  The format strings are passed
+## directly the the printf(3C) function, so see that man page for
+## details.
+##
+#noprint $fmt_string = "\"%s\""
+#noprint $fmt_null = "(null)"
+#noprint $fmt_int8 = "(int8)%d"
+#noprint $fmt_short = "(short)%d"
+#noprint $fmt_int = "%d"
+#noprint $fmt_long = "(long)%d"
+#noprint $fmt_float = "%1.5g"
+#noprint $fmt_double = "%1.10g"
+
+##
+## Unless this variable is set to 16, 8, or 2 the output of primitive
+## data will use the formats defined above. Otherwise data will be
+## displayed in base-16, base-8, or base-2 using built-in formats.
+##
+#noprint $obase = 16            # Default is unset (decimal)
+
+
+##
+## Large arrays can be truncated when they're displayed so the output
+## isn't so long.  Setting $truncate to an integer value N causes at
+## most N values in each dimension to be displayed.  Setting
+## $trailing to M causes M of the N values to be taken from the end
+## of the array.
+##
+#noprint $truncate = 10000      # Default is unset
+#noprint $trailing = 50         # This many come from the end of the array
+
+##
+## During differencing, the browser allows a certain tolerance to be
+## specified.  Values which are closer than this tolerance are
+## considered equal.  Tolerances are absolute (a difference) or
+## relative (the ratio of difference to mean value).  The --absolute
+## (-A) and --relative (-R) command-line options set all the absolute
+## or relative tolerances to the value given on the browser command line.
+##
+#noprint $diff_int8_abs   = 0
+#noprint $diff_int8_rel   = 0
+#noprint $diff_short_abs  = 0
+#noprint $diff_short_rel  = 0
+#noprint $diff_int_abs    = 0
+#noprint $diff_int_rel    = 0
+#noprint $diff_long_abs   = 0
+#noprint $diff_long_rel   = 0
+#noprint $diff_float_abs  = 0
+#noprint $diff_float_rel  = 0
+#noprint $diff_double_abs = 0
+#noprint $diff_double_rel = 0
+
+##
+## The diff output is controlled by this variable, which should be a
+## string containing comma- and/or space-separated words. The accepted 
+## words are: detail, brief, summary, ignore_additions, ignore_deletions, 
+## and two_column.
+##
+#noprint $diff = "detail,two_column"
+
+##
+## The following constants come from silo.h and can be used when assigning
+## values to silo objects.
+##
+
+# Definitions for MAJOR_ORDER
+noprint DB_ROWMAJOR     = 0
+noprint DB_COLMAJOR     = 1
+
+# Definitions for COORD_TYPE
+noprint DB_COLLINEAR    = 130
+noprint DB_NONCOLLINEAR = 131
+noprint DB_QUAD_RECT    = DB_COLLINEAR
+noprint DB_QUAD_CURV    = DB_NONCOLLINEAR
+
+# Definitions for CENTERING
+noprint DB_NOTCENT      = 0
+noprint DB_NODECENT     = 110
+noprint DB_ZONECENT     = 111
+noprint DB_FACECENT     = 112
+
+# Definitions for COORD_SYSTEM
+noprint DB_CARTESIAN    = 120
+noprint DB_CYLINDRICAL  = 121
+noprint DB_SPHERICAL    = 122
+noprint DB_NUMERICAL    = 123
+noprint DB_OTHER        = 124
+
+# Definitions for ZONE FACE_TYPE
+noprint DB_RECTILINEAR  = 100
+noprint DB_CURVILINEAR  = 101
+
+# Definitions for PLANAR
+noprint DB_AREA         = 140
+noprint DB_VOLUMNE      = 141
+
+# Definitions for flag values
+noprint DB_ON           = 1000
+noprint DB_OFF          = -1000
+
+noprint DB_ZONETYPE_BEAM        = 10
+noprint DB_ZONETYPE_POLYGON     = 20
+noprint DB_ZONETYPE_TRIANGLE    = 23
+noprint DB_ZONETYPE_QUAD        = 24
+noprint DB_ZONETYPE_POLYHEDRON  = 30
+noprint DB_ZONETYPE_TET         = 34
+noprint DB_ZONETYPE_PYRAMID     = 35
+noprint DB_ZONETYPE_PRISM       = 36
+noprint DB_ZONETYPE_HEX         = 38
+
+## Changes since previous version.
+help delta "\
+New since browser 4.102\n\
+=======================\n\
+\n\
+Output of primitive data (integer, floating-point, character, and string) \
+can use a hexadecimal, octal, or binary format. See help on `$obase' or \
+`--obase' for details.\n\
+\n\
+New in browser 4.004\n\
+====================\n\
+\n\
+Two-column diff output.\n\
+The $diff variable understands the word `two_column', which causes diff to \
+produce output with two columns similar to pdbdiff. The first column \
+contains the value from the first operand while the second column contains \
+the corresponding different value from the second operand. This is the \
+default now; if you want the old behavior then set `$diff=detail'.\n\
+\n\
+Diff on file families.\n\
+The diff command can now take any even number of arguments. The argument \
+list is split in half and each argument from the first half of the list is \
+differenced against the corresponding argument from the second half of the \
+list. If called with no arguments then the SILO files from the browser \
+command-line are used.\n\
+\n\
+$diff variable is a word list.\n\
+The $diff variable should have a value which is a list of words instead of \
+a string. If you used to say `$diff=\"brief,ignore_additions\"' you should \
+now say `$diff={brief, ignore_additions}'. The --diff command-line switch \
+has not been changed.\n\
+\n\
+Diff exclusion list.\n\
+The diff function can be prevented from recursively comparing certain objects \
+based on name and/or datatype. See `help $exclude' for details.\n\
+\n\
+Diff single-argument form.\n\
+If the diff function is invoked with just one argument and that argument is \
+an object in the silo file represented by $1, then that object will be \
+compared with an object of the same name in the file represented by $2. This \
+makes a typical diff command for two objects a little easier to type. \
+Example: Instead of saying `diff cycle $2.cycle' you can now say just \
+`diff cycle'.\n\
+\n\
+Multi-file functions and operators.\n\
+Certain functions and operators were extended to operate concurrently on \
+a list of files. For example, `cd domain_0 $*' will change directories in \
+all files which were opened on the browser command-line.  Affected are the \
+`cd', `pwd', and `ls' functions which take `$*' as an argument; the `.' \
+operator which takes `$*' as the left operand.\n\
+\n\
+More output precision.\n\
+The $fmt_float and $fmt_double output formats are now based on FLT_DIG and \
+DBL_DIG from <math.h> or <limits.h>. Therefore floating-point values will \
+be displayed with their full precision, whatever that may be.\n\
+\n\
+Pager cancellation.\n\
+The built-in pager may be canceled for a command's output by pressing \
+control-d at any pager prompt. The remainder of the command's output \
+will scroll without being paged.\n\
+\n\
+\n\
+New in browser 4.003\n\
+====================\n\
+\n\
+Improved `diff' operator.\n\
+The diff operator can perform a brief output and a summary output; it can \
+ignore changes that simply add or delete data; various bugs have been fixed; \
+performance has been improved. Say `help diff' and `help $diff' for details.\n\
+\n\
+Long-format command-line switches.\n\
+These look like GNU-style switches. Invoke the browser with `--help' for a \
+complete list along with documentation or say `help run'.\n\
+\n\
+Better terminal size querying.\n\
+The browser output height and width is monitored using SIGWINCH and various \
+ioctl calls.  See help topics listed by `help \"height\"' and `help \
+\"width\"' for details.\n\
+\n\
+Improved `help' command.\n\
+The old command which displayed web pages was too prone to configuration \
+details (missing/broken web browsers, inaccessible web pages, etc). The \
+command was replaced with a built-in help command which prints documentation \
+associated with various symbols.  Many of these documentation strings are \
+assigned in the browser startup file.\n\
+\n\
+Internal variable names changed.\n\
+All browser special-purpose variables begin with a dollar sign (`$') to \
+reduce the liklihood that the name conflicts with a SILO object. In addition \
+a few new names were added ($diff, $height, $width, etc) and a few were \
+renamed (e.g., `low_level' became `$lowlevel').\n\
+\n\
+Less obtrusive handling of floating-point exceptions.\n\
+The browser prints a warning about floating point exceptions only after one \
+occurs.  In verbose mode the browser will indicate how many exceptions \
+were trapped for each command which produced output.\n\
+\n\
+Lots of minor bugfixes and changes.\n\
+See the ClearCase logs for details."
+
+# Frequently asked questions
+help faq "\
+Q: How do I prevent browser from pausing at each page?\n\
+A: The browser only pages output going to a terminal or psuedoterminal and \
+does not page output going to a file or shell command (this is true for \
+output redirection at the shell level or within the browser).  So the most \
+convenient way to turn off paging for a single browser command is to redirect \
+the command's output through the Unix `cat' command. To turn off paging \
+permanently you can set the $height variable to zero, which can be done \
+in a startup file ($height=0) or from the command-line (--height=0). However, \
+if the browser receives a SIGWINCH signal it will make ioctl() calls to \
+determine the size of the terminal and reset $height to that value.\n\
+\n\
+Q: I don't like the browser's pager. Can I use less or more?\n\
+A: The browser's pager is indeed simple. Output from almost any browser \
+command can be redirected to any shell command, including your favorite \
+pager. Redirection to a shell command happens when the browser command is \
+followed by the pipe symbol (`|'). For example: `print d |less'\n\
+\n\
+Q: I can't seem to print my SILO variable named `1a'\n\
+A: The browser interprets `1a' as an integer `1' followed by the symbol `a' \
+instead of the name of some SILO object. If a SILO object contains special \
+characters that would cause it to be interpretted as something other than a \
+name, then the name can be enclosed in quotes. The dot operator must be used \
+to inform the browser that the string is really an object name.  For \
+instance, if the first file opened on the browser command line contains an \
+object named `1a', then it can be printed by saying `$1.\"1a\"'.\n\
+\n\
+Q: My SILO file contains an object named `$width' but the browser insists \
+on printing `80' as its value.\n\
+A: If a SILO file contains an object with the same name as some browser \
+variable then the browser uses the value stored within the browser instead \
+of the value in the file.  To force interpretation to be the SILO object \
+use the dot operator. For example: `$1.$width'.\n\
+\n\
+Q: When I diff two directories within a file it takes twice as long as when \
+I diff two directories in different files.\n\
+A: This is a limitation of SILO. When two files are used the browser can \
+optimize searches by using the current working directory feature of the \
+SILO file handles. When differencing within a file the browser cannot \
+make this optimization, which results in the SILO API making lots of calls \
+to the underlying PDB/HDF5/etc library to maintain directory state. One \
+possible workaround may be to open the same file twice and perform the \
+difference operation on two separate file handles.\n\
+\n\
+Q: How can I prevent diff from recursively entering directories?\n\
+A: By adding the string \"type:dir\" to the $exclude list. For example: \
+`$exclude={\"type:dir\"}' or on the command-line with `--exclude=type:dir'.\n\
+\n\
+Q: Diff reports that two numbers differ but in the output they look \
+identical. What's happening?\n\
+A: The difference calculation may be using more precision than what is being \
+displayed by the output routines.  There are various ways you could see \
+more digits in the output: you could set one of the $fmt_* variables, or \
+you could tell the browser to output (in hexadecimal, octal, or binary) the \
+bit pattern of the values being compared by setting the $obase variable.\n\
+\n\
+Q: Why doesn't `cd _2.domain_0' work?\n\
+A: The argument to the `cd' function is an implied string and is not \
+interpreted by the browser. You must say `cd domain_0 _2' instead.\n\
+\n\
+Q: The browser truncates my string when I try to assign it to a string \
+variable in a SILO file.\n\
+A: Due to limitations in SILO the browser is unable to assign a longer \
+string value to an existing string variable. The browser will truncate \
+the new value to be the same length as the old value.\
+\n\
+Q: Where does this FAQ come from?\n\
+A: The `help faq' command gets its text from the browser initialization \
+file. You can see the name of this file if you invoke the browser with the \
+--verbose switch."
+
+# Browser syntax
+help syntax "\
+The browser syntax is quite simple, consisting of function calls, \
+operators, atoms, and lists. Comments begin with a hash mark and \
+continue to the end of the line (except in strings). White space \
+is generally ignored except as a token separator. Statements can be \
+continued across multiple lines, but a backslash must escape the linefeed \
+if the partial statement looks syntactically complete.\n\
+\n\
+A function call is a parenthetical expression where the first element \
+is the name of the function and the subsequent elements are the \
+arguments to that function. Most functions evaluate all their arguments \
+but others evaluate only some (or none). For example, the `Assign' \
+function doesn't evaluate its first argument, but rather assignes the \
+evaluated second argument to the l-value specified by the first argument. \
+The parentheses can be omitted from around the top-level function call. \
+Say `help functions' (or `(help functions)') for a list of all functions.\n\
+\n\
+Most browser operators are infix, binary operators. They take two operands, \
+one on each side of the operator, and call some function which is bound to \
+the operator. For example the expression `foo=1' is equivalent to `(Assign \
+foo 1)'. The `{}' operator takes any number of arguments which appear between \
+the open and close curly braces. Say `help operators' for a list of all \
+operators.\n\
+\n\
+The browser has three types of atoms: strings, numbers, and symbols. \
+A string is a sequence of characters enclosed in single or double quotes. \
+The normal C escaping mechanism can be used for special characters within \
+the string. A single quote has no special significance in a double-quoted \
+string and vice versa.  Numbers are positive or negative sequences of \
+decimal digits with an optional embedded decimal point and trailing \
+exponent. An exponent consists of the letter `e' or `E' followed by \
+an optional sign and one or more decimal digits.  A symbol is any sequence \
+of alphanumeric characters and may also include dollar signs, hyphens, \
+underscores, and various other characters (although their use is \
+discouraged).\n\
+\n\
+A list consists of zero or more atoms or lists enclosed in parentheses. \
+Evaluation of the list results in the browser looking up the functional \
+value of the first member of the list and calling that function with the \
+subsequent list members as arguments. Evaluation of the list can be \
+suppressed by using curly braces instead of parentheses (e.g., `{1 3 5}' \
+is equivalent to `(Quote 1 3 5)')."
+
+# Browser output formats
+help formats "\
+The browser uses C printf() format strings to display various types of data. \
+These strings are stored in internal variables that have names like `$fmt_X' \
+where `X' is one of `string', `null', `int8', `short', `int', `long', \
+`float', or `double'.  These formats are not used when hexadecimal, octal, \
+or binary output formats are being used (see $obase)."
+
+# Browser output paging
+help paging "\
+The browser keeps track of how many lines of output have been \
+displayed for the currently executing command and temporarily pauses \
+that command whenever output is about to scroll off the top of the \
+screen. The height and width of the screen can be set by the internal \
+variables $height and $width, which are initialized when the browser \
+starts and when it receives a window size change signal (SIGWINCH). If \
+the required ioctl() calls are not available to the browser then the \
+terminal size can be set with the LINES and COLUMNS environment variables.\n\
+\n\
+When the browser pauses the output, the message `more? ('q' to \
+quit)' is displayed.  If the user presses the `q' key (no return is \
+necessary) or types the interrupt character (usually control-c) then the \
+command is canceled. Pressing Control-d cancels the paging for the \
+remainder of the command (output will simply scroll off the screen). \
+Pressing `n' when viewing output from the `diff' command will cause \
+output to continue with the next difference. Otherwise output continues \
+with the next page's worth.\n\
+\n\
+Output redirected to a file or command is not paged.  If the user is \
+not satisfied with the limited paging ability of the browser, the output \
+from a command can be redirected to the pager of the user's choice using \
+output redirection (see `help redirection')"
+
+
+# Browser output redirection
+help redirection "\
+Output from any browser command can be redirected to a file or shell \
+command by appending a redirection character and file name or shell \
+command to the end of the command.\n\
+\n\
+To save the output of a command in a file, destroying the previous \
+contents of the file if any, append a `>' and the name of the file. \
+Unless the file name looks like a browser symbol it must be enclosed in \
+quotes.  For instance, `quadvar3d > saved' saves the value of Silo \
+database variable `quadvar' in a text file named `saved'.\n\
+\n\
+To append the output of a command to a file, append a `>>' and the \
+file name to the end of the command.  Unless the file name looks like a \
+browser symbol it must be enclosed in quotes.  For example, `typeof \
+quadvar3d >> saved' appends type information to the `saved' file.\n\
+\n\
+To send the output of a browser command to the standard input of a \
+shell command, follow the browser command with a `|' followed by the \
+shell command in quotes.  The quotes are not necessary if the shell \
+command is a single symbol.  Since paging is disabled when output is to \
+a shell command, one way to display a result without paging is to pipe \
+the output through the `cat' command like `d | cat'."
+
+# Interrupting long-running commands
+help interrupts "\
+Since some commands may require a long time to execute or may produce a \
+huge amount of output, the user may want to abort the command before it \
+finishes. If the output is paged interactively to the screen then pressing \
+`q' at the `more?' prompt accomplishes this. Otherwise the user can press \
+the interrupt character (usually control-c) and the browser command will \
+immediately terminate, allowing the browser to prompt for the next command. \
+If the interrupt character arrives during command input then the browser \
+itself will terminate.\n\
+\n\
+If output from a browser command is being piped into a shell command and \
+the shell command exits (or closes its standard input) before the \
+browser command is finished, the browser command gets a SIGPIPE signal \
+and terminates without terminating the browser."
+
+# Traps for the unwary
+help traps "\
+Please report bugs to the MeshTV team (MeshTV at llnl.gov).\n\
+\n\
+A local browser initialization file completely overrides the system \
+initialization file. Users should probably copy-then-modify the system \
+file when creating their own personal init file since the system file \
+contains some of the documentation strings for the `help' command."
+
+
+##
+## End of initialization.
+##
diff --git a/tools/browser/sdo.c b/tools/browser/sdo.c
new file mode 100644
index 0000000..e724bf4
--- /dev/null
+++ b/tools/browser/sdo.c
@@ -0,0 +1,911 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             sdo.c
+ *                      Dec  5 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             SILO data object class.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#define MYCLASS(X)      ((obj_sdo_t*)(X))
+
+/*
+ * Each silo data object currently in memory has an entry in
+ * this table.  Since the table entry references the silo file
+ * through the FILE field, the silo file is guaranteed to remain
+ * open until all objects associated with the file are destroyed.
+ *
+ * Anonymous silo objects have no name or file.  Care should be
+ * taken when using them so that the real object is not destroyed
+ * before the anonymous one.
+ */
+typedef struct sdo_t {
+   int          ref;                    /*object reference count        */
+   int          dirty;                  /*object has been modified      */
+   char         *name;                  /*full name of object or NULL   */
+   void         *mem;                   /*memory for the silo obj       */
+   obj_t        file;                   /*ptr to the silo file object   */
+   void         (*freefunc)(void*,obj_t);/*function to free memory      */
+   int          (*savefunc)(obj_t,char*,void*,obj_t);/*saves obj in file*/
+} sdo_t;
+
+/*
+ * A silo data object can be a component of a larger object.  The original
+ * object from which this object is derived is stored as `r_mem', a pointer
+ * to the silo object table.  The current object is pointed to by `c_mem'
+ * which is somehow a part of r_mem (For instance, c_mem might point
+ * to the `datatype' field of a `DBquadvar' where `r_mem' points to
+ * the `DBquadvar' itself.
+ */
+typedef struct obj_sdo_t {
+   obj_pub_t    pub;
+   sdo_t        *sdo;
+   obj_t        r_type;
+   void         *c_mem;
+   obj_t        c_type;
+   obj_t        (*deref)(obj_t,int,obj_t[]);
+} obj_sdo_t;
+
+class_t         C_SDO;
+static int      NSdos;                  /*number of silo data objects   */
+static sdo_t    *Sdo;                   /*table of silo data objects    */
+
+static obj_t    sdo_new (va_list);
+static obj_t    sdo_dest (obj_t);
+static obj_t    sdo_copy (obj_t, int);
+static void     sdo_print (obj_t, out_t*);
+static obj_t    sdo_deref (obj_t, int, obj_t*);
+static int      sdo_diff (obj_t, obj_t);
+static void     sdo_walk1 (obj_t, void*, int, walk_t*);
+static int      sdo_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+static char     *sdo_name (obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_class
+ *
+ * Purpose:     Initializes the silo data object class.
+ *
+ * Return:      Success:        Ptr to the SDO class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+sdo_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("SDO");
+   cls->new = sdo_new;
+   cls->dest = sdo_dest;
+   cls->copy = sdo_copy;
+   cls->print = sdo_print;
+   cls->deref = sdo_deref;
+   cls->diff = sdo_diff;
+   cls->walk1 = sdo_walk1;
+   cls->walk2 = sdo_walk2;
+   cls->objname = sdo_name;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_new
+ *
+ * Purpose:     Creates a new silo data object.
+ *
+ * Arguments:   A pointer to the file from where this silo object
+ *              was read.  The file expression is copied.
+ *
+ *              The full name of the object within the file.
+ *              
+ *              A pointer to the root of the object (which is added
+ *              to the SDO table unless there already).
+ *
+ *              A pointer to the type to use for the root object. The
+ *              type expression is copied.
+ *
+ *              A pointer to the memory for the current sub-object.
+ *              
+ *              A pointer to a type object for the current memory.  The
+ *              type expression is copied.
+ *
+ *              A pointer to the C function that will free the memory.
+ *
+ *              A pointer to the C function that saves the object in
+ *              the file.
+ *
+ *              A pointer to the C function to use when dereferencing the
+ *              object.
+ *
+ * Return:      Success:        Ptr to a new SDO object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *        Robb Matzke, 11 Dec 1996
+ *    The FILE and FULLNAME values can be NULL for anonymous objects.
+ *
+ *    Robb Matzke, 19 Feb 1997
+ *    Added the SAVEFUNC argument.
+ *
+ *        Robb Matzke, 25 Aug 1997
+ *    Added the DEREF argument.
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sdo_new (va_list ap) {
+
+   obj_sdo_t    *self;
+   int          i, unused;
+   void         *r_mem=NULL, *c_mem=NULL;
+   obj_t        r_type=NIL, c_type=NIL, file=NIL;
+   sdo_t        *sdo=NULL;
+   char         *fullname;
+   void         (*freefunc)(void*, obj_t)=NULL;
+   int          (*savefunc)(obj_t, char*, void*, obj_t)=NULL;
+   obj_t        (*deref)(obj_t, int, obj_t[])=NULL;
+
+   typedef void freefunc_t(void*, obj_t);
+   typedef int savefunc_t(obj_t,char*,void*,obj_t);
+   typedef obj_t deref_t(obj_t,int,obj_t[]);
+
+   file = va_arg (ap, obj_t);
+   fullname = va_arg (ap, char*);
+   r_mem = va_arg (ap, void*);
+   r_type = va_arg (ap, obj_t);
+   c_mem = va_arg (ap, void*);
+   c_type = va_arg (ap, obj_t);
+   freefunc = va_arg (ap, freefunc_t*);
+   savefunc = va_arg (ap, savefunc_t*);
+   deref = va_arg (ap, deref_t*);
+
+   /*
+    * Look for an object in the table that is in the same file
+    * and has the same name or has the same memory.
+    */
+   for (i=0,unused=(-1); i<NSdos; i++) {
+      if (NULL==Sdo[i].mem) {
+         if (unused<0) unused = i;
+      } else if (!file || !fullname) {
+         /*void*/
+      } else if (Sdo[i].name && !strcmp(Sdo[i].name, fullname) &&
+                 !strcmp(obj_name(Sdo[i].file), obj_name(file))) {
+         sdo = Sdo+i;
+         break;
+      } else if (Sdo[i].mem==r_mem) {
+         sdo = Sdo+i;
+         break;
+      }
+   }
+   
+   if (!sdo && unused<0) {
+      /*
+       * Grow the table
+       */
+      if (!Sdo) {
+         NSdos = 1024;
+         Sdo = calloc (NSdos, sizeof(sdo_t));
+         unused = 0;
+      } else {
+         Sdo = realloc (Sdo, (NSdos+1024) * sizeof(sdo_t));
+         memset (Sdo+NSdos, 0, 1024*sizeof(sdo_t));
+         unused = NSdos;
+         NSdos += 1024;
+      }
+   }
+
+   if (!sdo) {
+      /*
+       * This is the first object by this name.
+       */
+      sdo = Sdo + unused;
+      sdo->ref = 1;
+      sdo->dirty = false;
+      sdo->name = fullname ? safe_strdup (fullname) : NULL;
+      sdo->mem = r_mem;
+      sdo->file = obj_copy(file, SHALLOW);
+      sdo->freefunc = freefunc;
+      sdo->savefunc = savefunc;
+   } else {
+      /*
+       * This is an additional object by this name.  Free the root
+       * memory we just allocated and use the existing memory instead.
+       */
+      sdo->ref += 1;
+      assert (sdo->freefunc==freefunc);
+      if (r_mem != sdo->mem) {
+         assert (sdo->freefunc);
+         assert (r_mem==c_mem);
+         (sdo->freefunc)(r_mem, r_type);
+         r_mem = c_mem = sdo->mem;
+      }
+   }
+
+   self = calloc (1, sizeof(obj_sdo_t));
+   self->sdo = sdo;
+   self->r_type = obj_copy(r_type, SHALLOW);
+   self->c_mem = c_mem;
+   self->c_type = obj_copy(c_type, SHALLOW);
+   self->deref = deref;
+   
+   return (obj_t)self;
+}
+
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_dest
+ *
+ * Purpose:     Destroys an SDO object by decrementing the reference count.
+ *              If the reference count becomes zero then the object is
+ *              freed.  The reference count on the underlying sdo_t
+ *              table entry is also decremented.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sdo_dest (obj_t _self) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+   char         *fname=NULL, *objname=NULL;
+   int          status;
+
+   self->sdo->ref -= 1;
+
+   if (0==self->sdo->ref) {
+      assert (0==self->pub.ref);
+      /*
+       * Save and free silo object
+       */
+      fname = obj_name (self->sdo->file);
+      objname = self->sdo->name;
+
+      if (self->sdo->dirty) {
+         if (fname && objname) {
+            if (self->sdo->savefunc) {
+               status = (self->sdo->savefunc)(self->sdo->file,
+                                              self->sdo->name,
+                                              self->sdo->mem,
+                                              self->r_type);
+               if (status<0) {
+                  out_errorn ("save %s:%s failed with status %d",
+                              fname, objname, status);
+               }
+            } else {
+               out_errorn ("cannot save %s:%s (no save method)",
+                           fname, objname);
+            }
+         } else {
+            out_errorn ("save anonymous object not implemented");
+         }
+      }
+      if (fname && objname) {
+         if (self->sdo->freefunc) {
+            if (Verbosity>=2) out_info ("freeing %s:%s", fname, objname);
+            (self->sdo->freefunc)(self->sdo->mem, self->r_type);
+         } else {
+            out_errorn ("no freefunc for %s:%s", fname, objname);
+         }
+      } else {
+         /*
+          * Do nothing.  Anonymous objects always share memory with
+          * some non-anonymous object, so we should never free the
+          * memory for an anonymous object.  Also, the real object
+          * must never be freed before all anonymous objects which point
+          * to it are destroyed, but we have no way to automate that.
+          */
+      }
+
+      obj_dest (self->sdo->file);
+      if (self->sdo->name) free (self->sdo->name);
+      memset (self->sdo, 0, sizeof(sdo_t));
+   }
+
+   /*
+    * Destroy the root and current type for the object.
+    */
+   obj_dest (self->r_type);
+   obj_dest (self->c_type);
+   if (0==self->pub.ref) memset (self, 0, sizeof(obj_sdo_t));
+
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_copy
+ *
+ * Purpose:     Copying an SDO object increments the reference count for
+ *              the table entry that it references.  The objects referenced
+ *              by the table entry are not copied.
+ *
+ * Return:      Success:        Ptr to copy of SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sdo_copy (obj_t _self, int flag) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+   obj_sdo_t    *retval=NULL;
+   obj_t        tmp=NIL;
+
+   if (SHALLOW==flag) {
+      self->sdo->ref += 1;
+      tmp = obj_copy (self->r_type, SHALLOW);
+      assert (tmp==self->r_type);
+      tmp = obj_copy (self->c_type, SHALLOW);
+      assert (tmp==self->c_type);
+      retval = self;
+      
+   } else {
+      abort();
+   }
+
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_name
+ *
+ * Purpose:     Returns the full name of an object.
+ *
+ * Return:      Success:        Ptr to the name.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+sdo_name (obj_t _self)
+{
+   obj_sdo_t    *self = MYCLASS (_self);
+
+   return self->sdo->name;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_print
+ *
+ * Purpose:     Prints an SILO database object to the specified stream.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+sdo_print (obj_t _self, out_t *f) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+   walk_t       wdata;
+
+   if (NULL==self->c_type) {
+      out_printf (f, "(void *)0x%lx", (long)(self->c_mem));
+   } else {
+      wdata.f = f;
+      obj_walk1 (_self, NULL, WALK_PRINT, &wdata);
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_diff
+ *
+ * Purpose:     Determines if two SILO data objects are the same or different.
+ *
+ * Return:      Success:        0 if same, positive if different.
+ *
+ *              Failure:        negative.
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+sdo_diff (obj_t _a, obj_t _b)
+{
+   walk_t       wdata;
+   obj_sdo_t    *a = MYCLASS(_a);
+   obj_sdo_t    *b = MYCLASS(_b);
+
+   wdata.f = OUT_STDOUT;
+   wdata.a_sdo = _a;
+   wdata.b_sdo = _b;
+   
+   return obj_walk2 (_a, a->c_mem, _b, b->c_mem, &wdata);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_deref
+ *
+ * Purpose:     Given a silo data object SELF and the name of a component
+ *              COMP of that object, return the specified component of
+ *              the silo data object by dereferencing pointers and the
+ *              first structure.
+ *
+ * Return:      Success:        Ptr to a silo data sub-object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      Fixed the arguments for the obj_deref() call.  Changed the
+ *      arguments to this function.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sdo_deref (obj_t _self, int argc, obj_t argv[]) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+   obj_t        retval=NIL, type=NIL, tmp=NIL, cur=NIL;
+   void         *c_mem;
+   int          offset=0, total_processed;
+
+   assert (self && C_SDO==self->pub.cls);
+   if (!self->c_type) {
+      out_errorn ("sdo_deref: cannot dereference a void type");
+      goto error;
+   }
+   if (!self->c_mem) {
+      out_errorn ("sdo_deref: cannot dereference a NULL type");
+      goto error;
+   }
+
+   c_mem = self->c_mem;
+   type = obj_copy (self->c_type, SHALLOW);
+   
+   /*
+    * Dereference pointers.
+    */
+   while (c_mem && C_PTR==type->pub.cls) {
+      tmp = obj_deref (type, 0, NULL);
+      obj_dest (type);
+      type = tmp;
+      tmp = NIL;
+      if (!type) goto error;
+      c_mem = *((void**)c_mem);
+   }
+
+   if (!c_mem) {
+      out_errorn ("sdo_deref: cannot dereference a NULL type");
+      goto error;
+   }
+
+   if (self->deref) {
+      type = obj_dest (type);
+      retval = (self->deref)(_self, argc, argv);
+
+   } else if (C_STC==type->pub.cls) {
+      /*
+       * Dereference the structure.
+       */
+      tmp = obj_deref (type, argc, argv);
+      if (!tmp) goto error;
+      offset = stc_offset (type, argv[0]);
+      if (offset<0) goto error;
+      obj_dest (type);
+      type = tmp;
+      tmp = NIL;
+      c_mem = (char*)c_mem + offset;
+
+      retval = obj_new (C_SDO, self->sdo->file, self->sdo->name,
+                        self->sdo->mem, self->r_type,
+                        c_mem, type, self->sdo->freefunc,
+                        self->sdo->savefunc, NULL);
+      type = obj_dest (type);
+
+   } else if (C_ARY==type->pub.cls) {
+      /*
+       * Dereference arrays.
+       */
+      tmp = obj_deref (type, argc, argv);
+      obj_dest(type); type=tmp; tmp=NIL;
+      if (!type) goto error;
+      total_processed = AryNProcessed;
+
+      if (total_processed<argc) {
+         tmp = obj_copy (type, DEEP);   /*we are about to modify it*/
+         obj_dest (type); type=tmp; tmp=NIL;
+         cur = type; /*a pointer into type*/
+
+         while (total_processed<argc) {
+            /*
+             * Traverse through pointers until we hit another array.
+             */
+            cur = ary_typeof (cur);
+            while (C_PTR==cur->pub.cls) {
+               cur = obj_deref (cur, 0, NULL);
+               obj_dest (cur); /*cur is only a pointer, not a copy*/
+            }
+            if (C_ARY!=cur->pub.cls) {
+               out_errorn ("sdo_deref: too many array subscripts "
+                           "(processed just %d)", total_processed);
+               type = obj_dest (type);
+               return NIL;
+            }
+            tmp = ary_deref_nocopy (cur, argc-total_processed,
+                                    argv+total_processed);
+            if (!tmp) {
+               type = obj_dest (type);
+               return NIL;
+            }
+            total_processed += AryNProcessed;
+         }
+
+         cur=NIL; /*don't destroy, it was only a pointer*/
+      }
+
+      
+      retval = obj_new (C_SDO, self->sdo->file, self->sdo->name,
+                        self->sdo->mem, self->r_type, c_mem, type,
+                        self->sdo->freefunc, self->sdo->savefunc, NULL);
+      type = obj_dest (type);
+
+   } else {
+
+      out_errorn ("sdo_deref: cannot dereference a non-structured type");
+      goto error;
+   }
+   
+   return retval;
+
+error:
+   type = obj_dest(type);
+   return NIL;
+   
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_walk1
+ *
+ * Purpose:     Walks the object with the specified type.  If MEM is not
+ *              specified then it comes from the SDO object.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 11 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+sdo_walk1 (obj_t _self, void *mem, int operation, walk_t *wdata) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+   obj_t        type=NIL;
+   
+   if (!mem) mem = self->c_mem;
+   type = self->c_type;
+
+   if (!mem) {
+      out_errorn ("sdo_walk1: cannot walk an object with no storage");
+      return;
+   }
+   if (!type) {
+      out_errorn ("sdo_walk1: cannot walk an object with no type");
+      return;
+   }
+
+   obj_walk1 (type, mem, operation, wdata);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_walk2
+ *
+ * Purpose:     Walks the objects with the specified type and attempts
+ *              to determine if they are the same or different.
+ *
+ * Return:      Success:        0 if same; positive if different
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+sdo_walk2 (obj_t _a, void *a_mem, obj_t _b, void *b_mem, walk_t *wdata) {
+
+   obj_sdo_t    *a = MYCLASS(_a);
+   obj_sdo_t    *b = MYCLASS(_b);
+   obj_t        a_type=NIL, b_type=NIL;
+
+   if (!a_mem) a_mem = a->c_mem;
+   if (!b_mem) b_mem = b->c_mem;
+   a_type = a->c_type;
+   b_type = b->c_type;
+
+   if (!a_mem || !b_mem) {
+      out_errorn ("sdo_walk2: cannot walk an object with no storage");
+      return -1;
+   }
+   if (!a_type || !b_type) {
+      out_errorn ("sdo_walk2: cannot walk an object with no type");
+      return -1;
+   }
+   return obj_walk2 (a_type, a_mem, b_type, b_mem, wdata);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_cast
+ *
+ * Purpose:     Return a new silo datatype object which has the same memory
+ *              as the specified object but a new type.  The type is copied.
+ *
+ * Return:      Success:        Ptr to new sdo object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sdo_cast (obj_t _self, obj_t type) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+
+   if (!self || C_SDO!=self->pub.cls) {
+      out_error ("typecast: inappropriate object: ", _self);
+      return NIL;
+   }
+
+
+   return obj_new (C_SDO, self->sdo->file, self->sdo->name, self->sdo->mem,
+                   self->r_type, self->c_mem, obj_copy (type, SHALLOW),
+                   self->sdo->freefunc, self->sdo->savefunc, NULL);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_typeof
+ *
+ * Purpose:     Returns the type of the object without copying it.
+ *
+ * Return:      Success:        Ptr to the object's type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sdo_typeof (obj_t _self) {
+
+   assert (_self);
+   assert (C_SDO==_self->pub.cls);
+
+   return MYCLASS(_self)->c_type;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_mem
+ *
+ * Purpose:     Returns a pointer to the memory associated with the object.
+ *
+ * Return:      Success:        Ptr to current memory.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+sdo_mem (obj_t _self) {
+
+   assert (_self);
+   assert (C_SDO==_self->pub.cls);
+
+   return MYCLASS(_self)->c_mem;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_assign
+ *
+ * Purpose:     Assigns a value to an silo data object.
+ *
+ * Return:      Success:        A shallow copy of VAL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 19 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sdo_assign (obj_t _self, obj_t val) {
+
+   obj_sdo_t    *self = MYCLASS(_self);
+
+   if (file_rdonly(self->sdo->file)) {
+      out_errorn ("file `%s' is read-only", obj_name(self->sdo->file));
+      return NIL;
+   }
+
+   if (NULL==self->sdo->savefunc) {
+      out_errorn ("sdo_assign: cannot assign to this object since it has "
+                  "no save method");
+      return NIL;
+   }
+   if (obj_walk3 (self->c_mem, self->c_type, val)<0) return NIL;
+   self->sdo->dirty += 1;
+   return obj_copy (val, SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sdo_file
+ *
+ * Purpose:     Returns the file to which this SDO belongs.
+ *
+ * Return:      Success:        A shallow copy of the file.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sdo_file (obj_t _self)
+{
+   obj_sdo_t    *self = MYCLASS(_self);
+
+   return obj_copy (self->sdo->file, SHALLOW);
+}
diff --git a/tools/browser/silodiff b/tools/browser/silodiff
new file mode 100755
index 0000000..1ee6ab2
--- /dev/null
+++ b/tools/browser/silodiff
@@ -0,0 +1,222 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+# ----------------------------------------------------------------------------
+# Purpose: Difference two silo files and/or directories containing silo files 
+#
+# Programmer: Mark C. Miller
+# Creation:   January 21, 2009
+#
+# Modifications:
+#   Mark C. Miller, Wed Mar 11 10:03:10 PDT 2009
+#   Added browserOptsDef and set lowlevel to 0. That is important when
+#   diff'ing HDF5 files.
+#
+#   Mark C. Miller, Wed Dec  2 11:47:31 PST 2009
+#   Added logic to use path to browser that is 'next to' silodiff or fall
+#   back what a browser in path, but issue a warning if they are somehow
+#   different.
+#
+#   Mark C. Miller, Fri Dec  4 09:58:17 PST 2009
+#   Made it possible to override browser path warning
+# ----------------------------------------------------------------------------
+#
+
+#
+# Handle Command Line Arguments
+#
+tmpDir=$TMPDIR
+if test -z "$tmpDir"; then
+    if test -d /usr/tmp; then
+       tmpDir=/usr/tmp
+    elif test -d /tmp; then
+       tmpDir=/tmp
+    else
+       tmpDir=`(cd ~; pwd -P)`
+    fi
+fi
+optError=0
+browserOptsDef="-l 0 -r"
+browserOpts=""
+arg1=
+arg2=
+recurse=0
+verbose=0
+override=0
+for options
+do
+   case $1 in
+      "")
+         # handle empty argument
+         ;;
+      help|-help|--help)
+         optError=1
+         shift
+         ;;
+      -recurse|--recurse)
+         recurse=1
+         shift
+         ;;
+      -verbose|--verbose)
+         verbose=1
+         shift
+         ;;
+      -override-browser-warning|--override-browser-warning)
+         override=1
+         shift
+         ;;
+      *)
+         if test -e $1; then
+             if test -z "$arg1"; then
+                 arg1=$1
+             else
+                 arg2=$1
+             fi
+         else
+             browserOpts="$browserOpts $1"
+         fi
+         shift
+         ;;
+   esac
+done
+
+#
+# Check path to browser and issue error/warning if necessary
+#
+brexe=browser
+sddir=$(dirname $0)
+if test -x ${sddir}/browser; then
+    brexe=${sddir}/browser
+else
+    brdir=$(dirname $(which browser))
+    if test $brdir != $sddir; then
+        leader="*WARNING*"
+        if test $override -eq 0; then
+            leader="*ERROR*"
+        fi
+        echo "$leader"
+        echo "$leader Using browser at \"$brdir\"."
+        echo "$leader and silodiff at \"$sddir\"."
+        echo "$leader"
+        if test $override -eq 0; then
+            echo "$leader Override with \"--override-browser-warning\" option."
+            exit 1
+        fi
+    fi
+fi
+
+if test $optError = 1 -o -z "$arg1" -o -z "$arg2"; then
+    echo "Usage:  $0 <file|dir> <file|dir> <options>"
+    echo ""
+    echo "Options:"
+    echo "    -help:            print this help message"
+    echo "    -recurse:         recurse on directories"
+    echo "    -verbose:         report names of file(s) as they are processed."
+    echo ""
+    echo "If both arguments are files, $0 will attempt to diff the files."
+    echo ""
+    echo "If one argument is a file and the other a directory, then $0 will attempt"
+    echo "to diff the given file with a file by the same name in the given directory."
+    echo ""
+    echo "If both arguments are directories, $0 will descend into each directory"
+    echo "(and will do so recursively if '-recurse' is specified)  finding files"
+    echo "whose names differ ONLY in the first component of their paths and attempt"
+    echo "to diff them."
+    echo ""
+    echo "$0 uses Silo's browser tool to do its work. In turn, browser supports a"
+    echo "number of additional options. Thus, any arguments to $0 which are neither"
+    echo "files nor directories are treated as arguments to browser itself. For some"
+    echo "options to browser like the '-f FILE' option, use the '--file=<FILE>'"
+    echo "variant instead. By default, $0 will invoke browser with args"
+    echo "'$browserOptsDef'. The available options to browser are..."
+    echo ""
+    $brexe --help 2>&1 | grep -v SWITCHES
+    exit 1
+fi
+
+if test -d $arg1 -a -d $arg2; then # both are dirs
+    for f in $arg1/*; do
+        if test -d $f; then
+            df=`echo $f | rev | cut -d'/' -f1 | rev`
+            if test $recurse = 1; then
+                if test -d $arg2/$df; then
+                    if test $verbose = 1; then
+                        echo "Processing directory \"$df\"..."
+                        $0 -recurse -verbose $browserOpts $f $arg2/$df
+                    else
+                        $0 -recurse $browserOpts $f $arg2/$df
+                    fi
+                else
+                    test $verbose = 1 && echo "Directory \"$df\" does not exist in \"$arg2\", skipping it."
+                fi
+            else
+                test $verbose = 1 && echo "\"$df\" is a directory, skipping it. Use -recurse to process directories."
+            fi
+        else
+            bf=`basename $f`
+            if test -e $arg2/$bf; then
+                test $verbose = 1 && echo "Processing file \"$bf\"..."
+                $brexe $browserOptsDef $browserOpts -e diff $f $arg2/$bf
+            else
+                test $verbose = 1 && echo "File \"$bf\" does not exist in \"$arg2\", skipping it."
+            fi
+        fi
+    done
+elif test -d $arg1 -o -d $arg2; then # one is dir
+    if test -d $arg1; then
+        $brexe $browserOptsDef $browserOpts -e diff $arg1/$arg2 $arg2
+    else
+        $brexe $browserOptsDef $browserOpts -e diff $arg1 $arg2/$arg1
+    fi
+else # neither are dirs
+    $brexe $browserOptsDef $browserOpts -e diff $arg1 $arg2
+fi
diff --git a/tools/browser/silodiff.init b/tools/browser/silodiff.init
new file mode 100644
index 0000000..f5e405c
--- /dev/null
+++ b/tools/browser/silodiff.init
@@ -0,0 +1,130 @@
+#!/bin/sh
+######################################################################
+#
+# Browser startup script.
+#
+######################################################################
+
+#
+# Determine the location of the browser directory.
+#
+arg0=$0
+mydir=`expr \
+  ${arg0-.}'/' : '\(/\)[^/]*/$' \
+  \| ${arg0-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
+  \| .`
+
+cdir=`pwd`
+case $mydir in
+/*)
+    thisdir=$mydir
+    ;;
+.)
+    thisdir=$cdir
+    ;;
+*)
+    thisdir=$cdir/$mydir
+    ;;
+esac
+browserdir=`expr \
+  ${thisdir-.}'/' : '\(/\)[^/]*/$' \
+  \| ${thisdir-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
+  \| .`
+
+TRAP_FPE=
+export TRAP_FPE
+
+#
+# Determine the location of the binaries for the machine.
+#
+browserbindir=unsupported
+[ -f /bin/uname ] && {
+   os=`/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
+   case $os in
+   irix)
+      mach=`/bin/uname -m`
+      machver=mips2
+      case $mach in
+      IP4|IP5|IP6|IP12)
+         machver=mips;;
+      IP17|IP19|IP20|IP22)
+         machver=mips2;;
+      IP25|IP26|IP27|IP28|IP29|IP30|IP31|IP32)
+         machver=mips2;;
+#         Temporary until a mips4 version is created.
+#         machver=mips4;;
+      esac
+      version=`/bin/uname -r`
+      osver=irix`expr $version : '\([456]\).*'`
+      case $osver in
+      irix4)
+         browserbindir=$browserdir/bin/sgi-irix4-mips;;
+      irix5)
+         browserbindir=$browserdir/bin/sgi-irix5-mips;;
+      irix6)
+         browserbindir=$browserdir/bin/sgi-irix6-mips2;;
+      esac
+      ;;
+   sunos)
+      mach=`/bin/uname -m`
+      machver=`expr $mach : '\(sun4\).*'`
+      version=`/bin/uname -r`
+      osver=sunos`expr $version : '\([45]\).*`
+      case $mach in
+      dino1)
+         browserbindir=$browserdir/bin/sun4-sunos5-sparc
+      esac
+      case $machver in
+      sun4|sun4u)
+         browserbindir=$browserdir/bin/sun4-$osver-sparc
+      esac
+      ;;
+   hp-ux)
+      mach=`/bin/uname -m`
+      machver=`expr $mach : '\(9000/[78]\).*'`
+      case $machver in
+      9000/7|9000/8)
+         browserbindir=$browserdir/bin/hp-hpux-pa
+      esac
+      ;;
+   aix)
+      browserbindir=$browserdir/bin/ibm-aix-pwr
+      ;;
+   osf)
+      browserbindir=$browserdir/bin/dec-osf1-alpha
+      ;;
+   linux)
+      browserbindir=$browserdir/bin/linux
+      ;;
+   luke|leia|jedi|sn)
+      browserbindir=$browserdir/bin/unicos
+      ;;
+   esac
+}
+
+if [ $browserbindir = unsupported ]
+then
+   echo "This hardware platform is not supported by browser."
+   exit 1
+fi
+
+[ ! -d $browserbindir ] && {
+   echo "The executables for this hardware platform have not"
+   echo "been installed."
+   exit 1
+}
+
+#
+# Set the names of the browser executable.
+#
+browser_patt='browser4.*'        # Name of GUI executable
+
+#
+# Find the latest (by last modification time) browser executable.
+#
+browser=`/bin/ls -rt $browserbindir/$browser_patt | tail -1`
+
+#
+# Start it up like pdbdiff
+#
+$browser --file=$browserdir/include/browser_rc --eval=diff --diff=two_column --lowlevel=3 --rdonly "$@"
diff --git a/tools/browser/silofile b/tools/browser/silofile
new file mode 100755
index 0000000..7425cfe
--- /dev/null
+++ b/tools/browser/silofile
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+# States Government  nor Lawrence  Livermore National Security,  LLC nor
+# any of  their employees,  makes any warranty,  express or  implied, or
+# assumes   any   liability   or   responsibility  for   the   accuracy,
+# completeness, or usefulness of any information, apparatus, product, or
+# process  disclosed, or  represents  that its  use  would not  infringe
+# privately-owned   rights.  Any  reference   herein  to   any  specific
+# commercial products,  process, or  services by trade  name, trademark,
+# manufacturer or otherwise does not necessarily constitute or imply its
+# endorsement,  recommendation,   or  favoring  by   the  United  States
+# Government or Lawrence Livermore National Security, LLC. The views and
+# opinions  of authors  expressed  herein do  not  necessarily state  or
+# reflect those  of the United  States Government or  Lawrence Livermore
+# National  Security, LLC,  and shall  not  be used  for advertising  or
+# product endorsement purposes.
+
+#
+# Modifications:
+#   
+#   Mark C. Miller, Wed Jul 14 21:04:10 PDT 2010
+#   Completely re-wrote to use od instead of file command as that
+#   has proven more reliable.
+#
+
+#
+# Use octal dump (od) command to examine first few bytes of file.
+# If do not find expected bytes of any of the formats we'd like
+# to identify here, fall back to using the good ole' file command.
+#
+unknownFiles=
+for f in $*; do
+    headerBytes=$(od -c -N 10 $f)
+    if test -n "$(echo $headerBytes | tr -d ' ' | grep '<<PDB:')"; then
+        echo "$f: Portable Database (PDB) data"
+    elif test -n "$(echo $headerBytes | tr -d ' \\' | grep 'HDFrn032')"; then
+        echo "$f: Hierarchical Data Format version 5 (HDF5) data"
+    else
+        headerBytes=$(od -t x1 -N 4 $f)
+        if test -n "$(echo $headerBytes | grep '0000000 0e 03 13 01')"; then
+            echo "$f: Hierarchical Data Format version 4 (HDF4) data"
+        else
+	    unknownFiles="$unknownFiles $f"
+        fi
+    fi
+done
+
+#
+# If we have any unknown files, use the ordinary file command on them.
+#
+if test -n "$unknownFiles"; then
+    file $unknownFiles
+fi
diff --git a/tools/browser/stc.c b/tools/browser/stc.c
new file mode 100644
index 0000000..36d10c9
--- /dev/null
+++ b/tools/browser/stc.c
@@ -0,0 +1,2421 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             stc.c
+ *                      Dec  6 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             The structure type class.
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#define MYCLASS(X)      ((obj_stc_t*)(X))
+
+typedef struct obj_stc_t {
+   obj_pub_t    pub;
+   char         *name;                  /*name of structure or ""       */
+   int          ncomps;                 /*number of components used     */
+   int          acomps;                 /*number of components allocated*/
+   int          *offset;                /*offset for each component     */
+   obj_t        *sub;                   /*type of each component        */
+   char         **compname;             /*name of each component        */
+   void         (*walk1)(obj_t,void*,int,walk_t*); /*walk1 override     */
+   int          (*walk2)(obj_t,void*,obj_t,void*,walk_t*);/*walk2 override*/
+} obj_stc_t;
+
+class_t         C_STC;
+static obj_t    stc_new (va_list);
+static obj_t    stc_copy (obj_t, int);
+static obj_t    stc_dest (obj_t);
+static obj_t    stc_feval (obj_t);
+static obj_t    stc_apply (obj_t, obj_t);
+static void     stc_walk1 (obj_t, void*, int, walk_t*);
+static int      stc_walk2 (obj_t, void*, obj_t, void*, walk_t*);
+static void     stc_print (obj_t, out_t*);
+static obj_t    stc_deref (obj_t, int, obj_t*);
+static char *   stc_name (obj_t);
+static obj_t    stc_bind (obj_t, void*);
+
+#define STRUCT(ST)      STRUCT2(ST,#ST)
+
+#define STRUCT2(ST_R,ST_F) {                                                  \
+   ST_R _tmp ;                                                                \
+   lex_t *_li=NULL ;                                                          \
+   obj_t _in=NIL, _out=NIL ;                                                  \
+   char *_tname = ST_F ;                                                      \
+   obj_t _t = obj_new (C_STC, ST_F, NULL);                                    \
+   obj_stc_t *_tt = (obj_stc_t*)_t;
+   
+#define COMP(FIELD,TYPE)        COMP2(FIELD,#FIELD,TYPE)
+
+#define COMP2(FIELD_R,FIELD_F,TYPE)                                           \
+   _li = lex_string (TYPE);                                                   \
+   _in = parse_stmt (_li, false);                                             \
+   _li = lex_close (_li);                                                     \
+   _out = obj_eval (_in);                                                     \
+   _in = obj_dest (_in);                                                      \
+   assert (_out);                                                             \
+   COMP3 (FIELD_R, FIELD_F, _out);
+
+#define COMP3(FIELD_R,FIELD_F,TYPE)                                           \
+   stc_add (_t, TYPE, ((char*)(&(_tmp.FIELD_R))-(char*)(&_tmp)), FIELD_F);    \
+   prim_set_io_assoc(_tt->sub[_tt->ncomps-1], NULL); /*for cc warning*/
+
+#define IOASSOC(ASSOC)                                                        \
+   assert (_tt->ncomps-1>=0);                                                 \
+   assert (_tt->sub[_tt->ncomps-1]);                                          \
+   _in = prim_set_io_assoc (_tt->sub[_tt->ncomps-1], ASSOC);                  \
+   assert (_in) ;                                                             \
+   _in = NIL;
+
+#define WALK1(FUNC)                                                           \
+   assert (_tt);                                                              \
+   _tt->walk1 = FUNC
+
+#define WALK2(FUNC)                                                           \
+   assert (_tt);                                                              \
+   _tt->walk2 = FUNC
+
+#define ESTRUCT                                                               \
+  _in = obj_new (C_SYM, _tname);                                              \
+  sym_vbind (_in, _t);                                                        \
+  obj_dest (_in) ;                                                            \
+  _tt=NULL; /*to prevent compiler warning*/                                   \
+}
+
+   
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_class
+ *
+ * Purpose:     Initializes the STRUCT class.
+ *
+ * Return:      Success:        Ptr to the class
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+stc_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("STRUCT");
+   cls->new = stc_new;
+   cls->copy = stc_copy;
+   cls->dest = stc_dest;
+   cls->feval = stc_feval;
+   cls->apply = stc_apply;
+   cls->print = stc_print;
+   cls->walk1 = stc_walk1;
+   cls->walk2 = stc_walk2;
+   cls->deref = stc_deref;
+   cls->objname = stc_name;
+   cls->bind = stc_bind;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_new
+ *
+ * Purpose:     Creates a new struct object with the specified components.
+ *              Each following structure component consists of three values:
+ *              the type of the component, a byte offset from the beginning
+ *              of the structure, and the name of the component.  All are
+ *              required.  The argument list must be terminated with a
+ *              NULL pointer.
+ *
+ *              The first argument is an optional structure name.
+ *
+ * Return:      Success:        Ptr to a new STRUCT object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_new (va_list ap) {
+
+   obj_stc_t    *self = calloc (1, sizeof(obj_stc_t));
+   obj_t        _self = (obj_t)self;
+   obj_t        sub;
+   int          offset;
+   char         *name;
+
+   name = va_arg (ap, char*);
+   self->name = safe_strdup (name?name:"");
+
+   for (;;) {
+      sub = va_arg (ap, obj_t);
+      if (!sub) break;
+      offset = va_arg (ap, int);
+      name = va_arg (ap, char*);
+
+      stc_add (_self, sub, offset, name);
+   }
+
+   return _self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_add
+ *
+ * Purpose:     Destructively adds another field to a structure.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 31 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+stc_add (obj_t _self, obj_t sub, int offset, const char *name) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+
+   /*
+    * Does the field already exist?  If yes, replace it with the new
+    * definition.
+    */
+   for (i=0; i<self->ncomps; i++) {
+      if (!strcmp(self->compname[i], name)) {
+         obj_dest (self->sub[i]);
+         self->sub[i] = sub;
+         self->offset[i] = offset;
+         return _self;
+      }
+   }
+
+   /*
+    * (Re)allocate space for the new component (possibly with malloc
+    * for those non-posix systems.
+    */
+   if (self->ncomps>=self->acomps) {
+      self->acomps = MAX (2*self->acomps, 30);
+      if (self->sub) {
+         self->offset = realloc (self->offset, self->acomps*sizeof(int));
+         self->compname = realloc (self->compname, self->acomps*sizeof(char*));
+         self->sub = realloc (self->sub, self->acomps*sizeof(obj_t));
+      } else {
+         self->offset = malloc (self->acomps*sizeof(int));
+         self->compname = malloc (self->acomps*sizeof(char*));
+         self->sub = malloc (self->acomps*sizeof(obj_t));
+      }
+      assert (self->offset);
+      assert (self->compname);
+      assert (self->sub);
+   }
+         
+
+   /*
+    * Create the new component
+    */
+   i = self->ncomps;
+   self->ncomps += 1;
+
+   self->offset[i] = offset;
+   self->sub[i] = sub;
+   self->compname[i] = safe_strdup (name);
+   
+   return _self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_copy
+ *
+ * Purpose:     Copies a structure.
+ *
+ * Return:      Success:        Ptr to a copy of the structure.
+ *
+ *              Failure:        abort()
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 22 1997
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_copy (obj_t _self, int flag) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   obj_stc_t    *retval = NULL;
+   obj_t        x;
+   int          i;
+
+   if (SHALLOW==flag) {
+      for (i=0; i<self->ncomps; i++) {
+         x = obj_copy (self->sub[i], SHALLOW);
+         assert (x==self->sub[i]);
+      }
+      retval = self;
+
+   } else {
+      retval = calloc (1, sizeof(obj_stc_t));
+      retval->walk1 = self->walk1;
+      retval->walk2 = self->walk2;
+      retval->name = safe_strdup (self->name);
+      retval->acomps = self->ncomps;    /*save some memory*/
+      retval->sub = malloc (retval->acomps * sizeof(obj_t));
+      retval->offset = malloc (retval->acomps * sizeof(int));
+      retval->compname = malloc (retval->acomps * sizeof(char*));
+      retval->ncomps = self->ncomps;
+      
+      for (i=0; i<self->ncomps; i++) {
+         retval->sub[i] = obj_copy (self->sub[i], DEEP);
+         retval->offset[i] = self->offset[i];
+         retval->compname[i] = safe_strdup (self->compname[i]);
+      }
+   }
+
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_dest
+ *
+ * Purpose:     Destroys a structure type object.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 5 Feb 1997
+ *      Frees memory associated with the structure.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_dest (obj_t _self) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+
+   for (i=0; i<self->ncomps; i++) {
+      obj_dest (self->sub[i]);
+      if (0==self->pub.ref) {
+         if (self->compname[i]) free (self->compname[i]);
+      }
+   }
+   
+   if (0==self->pub.ref) {
+      free (self->name);
+      free (self->sub);
+      free (self->offset);
+      free (self->compname);
+      memset (self, 0, sizeof(obj_stc_t));
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_feval
+ *
+ * Purpose:     The functional value of a type is the type.
+ *
+ * Return:      Success:        Copy of SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_feval (obj_t _self) {
+
+   return obj_copy (_self, SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_apply
+ *
+ * Purpose:     Applying a structure type to an argument list consisting of
+ *              a single SILO database object (SDO) causes the object to
+ *              be cast to that type.
+ *
+ * Return:      Success:        Ptr to a new SDO object with the appropriate
+ *                              type.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_apply (obj_t _self, obj_t args) {
+
+   obj_t        sdo=NIL, retval=NIL;
+
+   if (1!=F_length(args)) {
+      out_errorn ("typecast: wrong number of arguments");
+      return NIL;
+   }
+
+   sdo = obj_eval (cons_head (args));
+   retval = sdo_cast (sdo, _self);
+   obj_dest (sdo);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_print
+ *
+ * Purpose:     Prints a structure type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+stc_print (obj_t _self, out_t *f) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+
+   if (self->name[0]) {
+      out_printf (f, "struct %s {\n", self->name);
+   } else {
+      out_printf (f, "struct {\n");
+   }
+
+   out_indent (f);
+   if (self->walk1) out_printf (f, "__OVERRIDE_PRINT_FUNCTION__\n");
+   if (self->walk2) out_printf (f, "__OVERRIDE_DIFF_FUNCTION__\n");
+   for (i=0; i<self->ncomps && !out_brokenpipe(f); i++) {
+      out_push (f, self->compname[i]);
+      out_printf (f, "+%d ", self->offset[i]);
+      obj_print (self->sub[i], f);
+      out_nl (f);
+      out_pop (f);
+   }
+   out_undent (f);
+   out_puts (f, "}");
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_walk1_DBdirectory
+ *
+ * Purpose:     Walks a directory to print the results in a nice format.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static void
+stc_walk1_DBdirectory (obj_t _self, void *mem, int operation, walk_t *wdata)
+{
+   DBdirectory  *dir = (DBdirectory *)mem;
+   int          width=0, i, old_type=-1, nprint;
+   char         buf[64];
+
+   assert (WALK_PRINT==operation);
+
+   for (i=0; i<dir->nsyms; i++) {
+      width = MAX (width, strlen(dir->toc[i].name));
+   }
+   if (0==width) {
+      out_errorn ("empty directory");
+      return;
+   }
+
+   for (i=nprint=0; i<dir->nsyms && !out_brokenpipe(OUT_STDOUT); i++) {
+      if (dir->toc[i].type!=old_type) {
+         if (nprint) {
+            out_nl (OUT_STDOUT);
+            out_nl (OUT_STDOUT);
+         }
+         sprintf (buf, "%s(s)", ObjTypeName[dir->toc[i].type]);
+         out_push (OUT_STDOUT, buf);
+      }
+      out_printf (OUT_STDOUT, " %-*s", width, dir->toc[i].name);
+      if (dir->toc[i].type!=old_type) {
+         out_pop (OUT_STDOUT);
+         old_type = dir->toc[i].type;
+      }
+      nprint++;
+   }
+   out_nl (OUT_STDOUT);
+   return;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_walk1
+ *
+ * Purpose:     Print memory cast as a structure type.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  6 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-05-23
+ *              Removed an extraneous out_pop() call.
+ *-------------------------------------------------------------------------
+ */
+static void
+stc_walk1 (obj_t _self, void *mem, int operation, walk_t *wdata) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+   out_t        *f;
+
+   switch (operation) {
+   case WALK_PRINT:
+      f = wdata->f;
+
+      /*
+       * Walk each of the structure members.
+       */
+      if (self->walk1) {
+         (self->walk1)(_self, mem, operation, wdata);
+      } else {
+         if (self->name && self->name[0]) out_printf (f, "%s: ", self->name);
+         out_printf (f, "struct");
+         out_indent (f);
+         for (i=0; i<self->ncomps && !out_brokenpipe(f); i++) {
+            out_push (f, self->compname[i]);
+            out_nl (f);
+            obj_walk1 (self->sub[i], (char*)mem+self->offset[i], operation,
+                       wdata);
+            out_pop (f);
+         }
+         out_undent (wdata->f);
+      }
+      break;
+
+   default:
+      abort();
+   }
+}
+
+static void
+stc_walk1_outmrgtree(DBmrgtnode *tnode, int walk_order, void *data)
+{
+    walk_t *wdata = (walk_t*) data;
+    out_t *f = wdata->f;
+    int j, level = -1;
+    DBmrgtnode *tmp = tnode;
+
+    /* walk to top to determine level of indentation */
+    while (tmp != 0)
+    {
+        tmp = tmp->parent;
+        level++;
+    }
+    for (j = 0; j < level; j++)
+        out_indent(f);
+
+    /* print this node using special '*' field width specifier */
+    out_printf(f, "name = \"%s\" {", tnode->name);
+    out_nl(f);
+    out_printf(f, "....walk_order = %d", tnode->walk_order);
+    out_nl(f);
+    out_printf(f, "........parent = \"%s\"", tnode->parent?tnode->parent->name:"");
+    out_nl(f);
+    out_printf(f, "........narray = %d", tnode->narray);
+    out_nl(f);
+    if (tnode->narray > 0)
+    {
+        if (strchr(tnode->names[0], '%') == 0)
+        {
+            out_printf(f, ".........names = ...", "");
+            out_nl(f);
+            for (j = 0; j < tnode->narray; j++)
+            {
+                out_printf(f, "....................\"%s\"", tnode->names[j]);
+                out_nl(f);
+            }
+        }
+        else
+        {
+            out_printf(f, "....namescheme = \"%s\"", tnode->names[0]);
+            out_nl(f);
+        }
+    }
+    out_printf(f, "type_info_bits = %d", tnode->type_info_bits);
+    out_nl(f);
+    out_printf(f, "..max_children = %d", tnode->max_children);
+    out_nl(f);
+    out_printf(f, ".....maps_name = \"%s\"", tnode->maps_name?tnode->maps_name:"");
+    out_nl(f);
+    out_printf(f, ".........nsegs = %d", tnode->nsegs);
+    out_nl(f);
+    if (tnode->nsegs > 0)
+    {
+        out_printf(f, "......segments =     ids   |   lens   |   types", "");
+        out_nl(f);
+        for (j = 0; j < tnode->nsegs*(tnode->narray?tnode->narray:1); j++)
+        {
+            out_printf(f, ".................%.10d|%.10d|%.10d", 
+                tnode->seg_ids[j], tnode->seg_lens[j], tnode->seg_types[j]);
+            out_nl(f);
+        }
+    }
+    out_printf(f, "..num_children = %d", tnode->num_children);
+    out_nl(f);
+    if (tnode->num_children > 0)
+    {
+        for (j = 0; j < tnode->num_children && tnode->children[j] != 0; j++)
+        {
+            out_printf(f, ".................\"%s\"", tnode->children[j]->name);
+            out_nl(f);
+        }
+    }
+    out_printf(f, "} \"%s\"", tnode->name);
+    out_nl(f);
+
+    for (j = 0; j < level; j++)
+        out_undent(f);
+}
+
+/*ARGSUSED*/
+static void
+stc_walk1_DBmrgtree(obj_t _self, void *mem, int operation, walk_t *wdata)
+{
+   DBmrgtree   *tree = (DBmrgtree*)mem;
+   out_t *f = wdata->f;
+   char **p;
+
+
+   assert (WALK_PRINT==operation);
+
+   out_printf (f, "mrgtree: \"%s\"", tree->name);
+   out_nl(f);
+   out_printf (f, "src_mesh_name: \"%s\"", tree->src_mesh_name);
+   out_nl(f);
+   out_printf (f, "type_info_bits: %8X", tree->type_info_bits);
+   out_nl(f);
+   out_printf (f, "num_nodes: %d", tree->num_nodes);
+   out_nl(f);
+   p = tree->mrgvar_onames;
+   out_printf (f, "mrgvar_onames: \"%s\"", p ? "" : "none");
+   out_nl(f);
+   while (p && *p)
+   {
+       out_printf (f, "....\"%s\"", *p);
+       out_nl(f);
+       p++;
+   }
+   p = tree->mrgvar_rnames;
+   out_printf (f, "mrgvar_rnames: \"%s\"", p ? "" : "none");
+   out_nl(f);
+   while (p && *p)
+   {
+       out_printf (f, "....\"%s\"", *p);
+       out_nl(f);
+       p++;
+   }
+
+   DBWalkMrgtree(tree, stc_walk1_outmrgtree, wdata, DB_PREORDER);
+   return;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_walk2_DBdirectory
+ *
+ * Purpose:     Diff's two directories.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical, nothing has been printed.
+ *                 1: A and B are paritally the same, a summary of the
+ *                    differences has been printed.
+ *                 2: A and B are totally different, nothing has been
+ *                    printed yet.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jul 25 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-05-25
+ *              If file A and file B are two different files then change
+ *              current working directories in each and call file_diff(),
+ *              which is probably faster.
+ *-------------------------------------------------------------------------
+ */
+/*ARGSUSED*/
+static int
+stc_walk2_DBdirectory (obj_t _a, void *a_mem, obj_t _b, void *b_mem,
+                       walk_t *wdata)
+{
+    obj_t       a_file = sdo_file (wdata->a_sdo);
+    obj_t       b_file = sdo_file (wdata->b_sdo);
+    DBdirectory *a_dir = (DBdirectory *)a_mem;
+    DBdirectory *b_dir = (DBdirectory *)b_mem;
+    toc_t       *a_toc = a_dir->toc;
+    toc_t       *b_toc = b_dir->toc;
+    obj_t       a_subdir=NIL;
+    obj_t       b_subdir=NIL;
+    obj_t       aobj=NIL, bobj=NIL;
+    int         an = a_dir->nsyms;
+    int         bn = b_dir->nsyms;
+    char        cwd[1024], buf[1024];
+    obj_t       sym=NIL;
+   
+    int         i, j, ndiff=0;
+    int         status, nonlya=0, nonlyb=0;
+    out_t       *f = OUT_STDOUT;
+
+    while (file_file(a_file)!=file_file(b_file)) {
+        /* The file_diff() function is probably faster because it uses the
+         * current working directory (significantly faster for the
+         * Silo/PDB driver).  However, we can only use it if we're
+         * differencing in two different files (because it needs to keep
+         * track of two different cwds). */
+        char a_cwd[1024], b_cwd[1024];
+        int retval;
+
+        /* Save current directories */
+        if (DBGetDir(file_file(a_file), a_cwd)<0) break;
+        if (DBGetDir(file_file(b_file), b_cwd)<0) break;
+
+        /* Set cwds */
+        if (DBSetDir(file_file(a_file), obj_name(wdata->a_sdo))<0) break;
+        if (DBSetDir(file_file(b_file), obj_name(wdata->b_sdo))<0) {
+            status = DBSetDir(file_file(a_file), a_cwd);
+            assert(status>=0);
+            break;
+        }
+
+        /* Diff the files */
+        retval = obj_diff(a_file, b_file);
+
+        DBFreeCompressionResources(file_file(a_file),0);
+        DBFreeCompressionResources(file_file(b_file),0);
+
+        /* Reset cwds */
+        status = DBSetDir(file_file(a_file), a_cwd);
+        assert(status>=0);
+        status = DBSetDir(file_file(b_file), b_cwd);
+        assert(status>=0);
+
+        /* Free resources */
+        obj_dest(a_file);
+        obj_dest(b_file);
+
+        return retval;
+    }
+    
+
+    if (Verbosity>=1) {
+        out_info ("Differencing directories %s%s and %s%s",
+                  obj_name (a_file), obj_name(wdata->a_sdo),
+                  obj_name (b_file), obj_name(wdata->b_sdo));
+    }
+
+    /* Get the table of contents for each file. */
+    assert (a_file && b_file);
+    assert ((0==an || a_toc) && (0==bn || b_toc));
+
+    for (i=j=ndiff=0; i<an || j<bn; i++,j++) {
+        out_section(f);
+        if (out_brokenpipe(f)) break;
+
+        /* List the names of objects that appear only in A. */        
+        nonlya = 0;
+        if (!DiffOpt.ignore_dels) {
+            while (i<an && (j>=bn || strcmp(a_toc[i].name, b_toc[j].name)<0)) {
+                out_section(f);
+                switch (DiffOpt.report) {
+                case DIFF_REP_ALL:
+                case DIFF_REP_BRIEF:
+                    out_push (f, a_toc[i].name);
+                    out_puts (f, "appears only in file A");
+                    out_nl (f);
+                    out_pop (f);
+                    break;
+                case DIFF_REP_SUMMARY:
+                    return 2;
+                }
+                nonlya++;
+                ndiff++;
+                i++;
+            }
+        }
+
+        /* List the names of objects that appear only in B. */        
+        nonlyb = 0;
+        if (!DiffOpt.ignore_adds) {
+            while (j<bn && (i>=an || strcmp(b_toc[j].name, a_toc[i].name)<0)) {
+                out_section(f);
+                switch (DiffOpt.report) {
+                case DIFF_REP_ALL:
+                case DIFF_REP_BRIEF:
+                    out_push (f, b_toc[j].name);
+                    out_puts (f, "appears only in file B");
+                    out_nl (f);
+                    out_pop (f);
+                    break;
+                case DIFF_REP_SUMMARY:
+                    return 2;
+                }
+                nonlyb++;
+                ndiff++;
+                j++;
+            }
+        }
+
+        if (i<an && BROWSER_DB_DIR==a_toc[i].type &&
+            j<bn && BROWSER_DB_DIR==b_toc[j].type) {
+            /* Diff two subdirectories. */
+            out_section(f);
+            assert (0==strcmp (a_toc[i].name, b_toc[j].name));
+
+            sprintf (buf, "%s/%s", obj_name(wdata->a_sdo), a_toc[i].name);
+            sym = obj_new (C_SYM, buf);
+            a_subdir = obj_deref (a_file, 1, &sym);
+            sym = obj_dest (sym);
+
+            sprintf (buf, "%s/%s", obj_name(wdata->b_sdo), b_toc[j].name);
+            sym = obj_new (C_SYM, buf);
+            b_subdir = obj_deref (b_file, 1, &sym);
+            sym = obj_dest (sym);
+
+            out_push (f, a_toc[i].name);
+            obj_diff (a_subdir, b_subdir);
+            out_pop(f);
+            a_subdir = obj_dest (a_subdir);
+            b_subdir = obj_dest (b_subdir);
+
+        } else if (i<an && j<bn) {
+            /* Diff two objects. */
+            out_section(f);
+            if (Verbosity>=1) {
+                assert (0==strcmp (a_toc[i].name, b_toc[j].name));
+                strcpy (cwd, "Differencing: ");
+                DBGetDir (file_file(a_file), cwd+14);
+                if (strcmp(cwd+14,"/")) strcat (cwd, "/");
+                strcat (cwd, a_toc[i].name);
+                out_progress (cwd);
+            }
+
+            sprintf (buf, "%s/%s", obj_name(wdata->a_sdo), a_toc[i].name);
+            sym = obj_new (C_SYM, buf);
+            aobj = obj_deref (a_file, 1, &sym);
+            sym = obj_dest (sym);
+
+            sprintf (buf, "%s/%s", obj_name(wdata->b_sdo), b_toc[j].name);
+            sym = obj_new (C_SYM, buf);
+            bobj = obj_deref (b_file, 1, &sym);
+            sym = obj_dest (sym);
+         
+            assert(aobj && bobj);
+            out_push (f, a_toc[i].name);
+            status = obj_diff (aobj, bobj);
+            if (status) ndiff++;
+
+            switch (DiffOpt.report) {
+            case DIFF_REP_ALL:
+                if (2==status) {
+                    out_line (f, "***************");
+                    obj_print (aobj, f);
+                    out_line (f, "---------------");
+                    obj_print (bobj, f);
+                    out_line (f, "***************");
+                }
+                break;
+            case DIFF_REP_BRIEF:
+                if (2==status) {
+                    out_puts(f, "different value(s)");
+                    out_nl(f);
+                }
+                break;
+            case DIFF_REP_SUMMARY:
+                if (status) {
+                    out_pop(f);
+                    aobj = obj_dest(aobj);
+                    bobj = obj_dest(bobj);
+                    out_progress(NULL);
+                    obj_dest(a_file);
+                    obj_dest(b_file);
+                    return 2;
+                }
+            }
+            out_pop (f);
+            aobj = obj_dest (aobj);
+            bobj = obj_dest (bobj);
+        }
+    }
+
+    out_progress (NULL);
+    obj_dest (a_file);
+    obj_dest (b_file);
+    return ndiff ? 1 : 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_walk2
+ *
+ * Purpose:     Determines if two structured objects are the same.
+ *
+ * Return:      Success:
+ *                 0: A and B are identical, nothing has been printed.
+ *                 1: A and B are partially the same, a summary of the
+ *                    differences has been printed.
+ *                 2: A and B are totally different, nothing has been
+ *                    printed yet.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 21 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-05-23
+ *              The output depends on the DiffOpt global variable. In fact,
+ *              with certain settings we can even short-circuit some of
+ *              the work.
+ *-------------------------------------------------------------------------
+ */
+static int
+stc_walk2 (obj_t _a, void *a_mem, obj_t _b, void *b_mem, walk_t *wdata) {
+
+   obj_stc_t    *a = MYCLASS(_a);
+   obj_stc_t    *b = MYCLASS(_b);
+   int          i, j, status, na, nb;
+   out_t        *f = wdata->f;
+   int          *a_diff, *b_diff;
+   int          nsame=0, ndiffer=0, nonlya=0, nonlyb=0;
+
+   /*
+    * Clear the difference indicators by setting them each to -999.
+    * When A differs from B, a_diff will contain the index of B and
+    * b_diff will contain the index of A.
+    */
+   a_diff = calloc (a->ncomps, sizeof(int));
+   for (i=0; i<a->ncomps; i++) a_diff[i] = -999;
+   b_diff = calloc (b->ncomps, sizeof(int));
+   for (i=0; i<b->ncomps; i++) b_diff[i] = -999;
+
+   /*
+    * If both types have localized their walk2 functions, then call that
+    * function instead.
+    */
+   if (a->walk2 && a->walk2==b->walk2) {
+      return (a->walk2)(_a, a_mem, _b, b_mem, wdata);
+   }
+
+   /*
+    * Figure out which fields appear only in A (a_diff[i]==b->ncomps),
+    * which appear only in B (b_diff[i]==a->ncomps), which appear in both
+    * but differ (a_diff[i]=j, b_diff[j]=i, i>=0, j>=0), and which are
+    * the same in both.
+    */
+   for (i=0; i<a->ncomps; i++) {
+      if (out_brokenpipe(f)) return -1;
+      for (j=0; j<b->ncomps; j++) {
+         if (!strcmp(a->compname[i], b->compname[j])) {
+
+            out_push (f, a->compname[i]);
+            status = obj_walk2 (a->sub[i], (char*)a_mem+a->offset[i],
+                                b->sub[j], (char*)b_mem+b->offset[j], wdata);
+            out_pop (f);
+
+            switch (DiffOpt.report) {
+            case DIFF_REP_ALL:
+            case DIFF_REP_BRIEF:
+                if (status<0 || 1==status) {
+                    ndiffer++;
+                } else if (0==status) {
+                    nsame++;
+                } else {
+                    ndiffer++;
+                    a_diff[i] = j;
+                    b_diff[j] = i;
+                }
+                break;
+            case DIFF_REP_SUMMARY:
+                return 1;
+            }
+            break;
+         }
+      }
+      if (j>=b->ncomps) {
+          switch (DiffOpt.report) {
+          case DIFF_REP_ALL:
+          case DIFF_REP_BRIEF:
+              if (!DiffOpt.ignore_dels) {
+                  ndiffer++;
+                  nonlya++;
+                  a_diff[i] = b->ncomps;
+              } else {
+                  nsame++;
+              }
+              break;
+          case DIFF_REP_SUMMARY:
+              if (!DiffOpt.ignore_dels) return 2;
+              nsame++;
+              break;
+          }
+      }
+   }
+   for (j=0; j<b->ncomps; j++) {
+      for (i=0; i<a->ncomps; i++) {
+         if (!strcmp(a->compname[i], b->compname[j])) break;
+      }
+      if (i>=a->ncomps) {
+          switch (DiffOpt.report) {
+          case DIFF_REP_ALL:
+          case DIFF_REP_BRIEF:
+              if (!DiffOpt.ignore_adds) {
+                  ndiffer++;
+                  nonlyb++;
+                  b_diff[j] = a->ncomps;
+              } else {
+                  nsame++;
+              }
+              break;
+          case DIFF_REP_SUMMARY:
+              if (!DiffOpt.ignore_adds) return 2;
+              nsame++;
+              break;
+          }
+      }
+   }
+
+   /* Print the A side of things */
+   for (i=na=0; i<a->ncomps; i++) {
+       if (out_brokenpipe(f)) return -1;
+       if (a_diff[i]==b->ncomps && !DiffOpt.ignore_dels) {
+           switch (DiffOpt.report) {
+           case DIFF_REP_ALL:
+               out_push(f, a->compname[i]);
+               if (DiffOpt.two_column) {
+                   obj_walk1(a->sub[i], (char*)a_mem+a->offset[i],
+                             WALK_PRINT, wdata);
+                   out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                   out_puts(f, DIFF_NOTAPP);
+               } else {
+                   if (0==na) out_line(f, "***************");
+                   obj_walk1(a->sub[i], (char*)a_mem+a->offset[i],
+                             WALK_PRINT, wdata);
+               }
+               out_pop(f);
+               out_nl(f);
+               break;
+           case DIFF_REP_BRIEF:
+               out_push(f, a->compname[i]);
+               out_puts(f, "appears only in file A");
+               out_nl(f);
+               out_pop(f);
+               break;
+           case DIFF_REP_SUMMARY:
+               return 2;
+           }
+           na++;
+       } else if (a_diff[i]>=0 && a_diff[i]<b->ncomps) {
+           switch (DiffOpt.report) {
+           case DIFF_REP_ALL:
+               out_push(f, a->compname[i]);
+               if (DiffOpt.two_column) {
+                   obj_walk1(a->sub[i], (char*)a_mem+a->offset[i],
+                             WALK_PRINT, wdata);
+                   out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                   obj_walk1(b->sub[a_diff[i]],
+                             (char*)b_mem+b->offset[a_diff[i]],
+                             WALK_PRINT, wdata);
+               } else {
+                   if (0==na) out_line(f, "***************");
+                   obj_walk1(a->sub[i], (char*)a_mem+a->offset[i],
+                             WALK_PRINT, wdata);
+               }
+               out_nl(f);
+               out_pop(f);
+               break;
+           case DIFF_REP_BRIEF:
+               out_push(f, a->compname[i]);
+               out_puts(f, "different value(s)");
+               out_nl(f);
+               out_pop(f);
+               break;
+           case DIFF_REP_SUMMARY:
+               return 2;
+           }
+           na++;
+       }
+   }
+
+   /* Print the B side of things */
+   for (i=nb=0; i<b->ncomps; i++) {
+       if (out_brokenpipe(f)) return -1;
+       if (b_diff[i]==a->ncomps && !DiffOpt.ignore_adds) {
+           switch (DiffOpt.report) {
+           case DIFF_REP_ALL:
+               out_push(f, b->compname[i]);
+               if (DiffOpt.two_column) {
+                   out_puts(f, DIFF_NOTAPP);
+                   out_column(f, OUT_COL2, DIFF_SEPARATOR);
+                   obj_walk1(b->sub[i], (char*)b_mem+b->offset[i],
+                             WALK_PRINT, wdata);
+               } else {
+                   if (0==nb) {
+                       if (0==na) out_line(f, "***************");
+                       out_line(f, "---------------");
+                   }
+                   obj_walk1(b->sub[i], (char*)b_mem+b->offset[i],
+                             WALK_PRINT, wdata);
+               }
+               out_nl(f);
+               out_pop(f);
+               break;
+           case DIFF_REP_BRIEF:
+               out_push(f, b->compname[i]);
+               out_puts(f, "appears only in file B");
+               out_nl(f);
+               out_pop(f);
+               break;
+           case DIFF_REP_SUMMARY:
+               return 2;
+           }
+           nb++;
+       } else if (b_diff[i]>=0 && b_diff[i]<a->ncomps) {
+           switch (DiffOpt.report) {
+           case DIFF_REP_ALL:
+               if (DiffOpt.two_column) {
+                   /* already printed */
+               } else {
+                   if (0==nb) {
+                       if (0==na) out_line(f, "***************");
+                       out_line(f, "---------------");
+                   }
+                   out_push (f, a->compname[i]);
+                   obj_walk1(b->sub[i], (char*)b_mem+b->offset[i],
+                             WALK_PRINT, wdata);
+                   out_nl(f);
+                   out_pop (f);
+               }
+               break;
+           case DIFF_REP_BRIEF:
+               break; /*already printed*/
+           case DIFF_REP_SUMMARY:
+               return 2;
+           }
+           nb++;
+       }
+   }
+   if ((na || nb) && DIFF_REP_ALL==DiffOpt.report && !DiffOpt.two_column) {
+       out_line (f, "***************");
+   }
+
+   /* Return */
+   if (ndiffer) {
+       if (DiffOpt.two_column) return 1;
+       if (na || nb) return 1;
+       return 2;
+   }
+   return 0;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_deref
+ *
+ * Purpose:     Given a structure type, return the subtype of the component
+ *              with name COMP.  Call stc_offset with SELF and COMP to get
+ *              the byte offset for the specified component from the
+ *              beginning of the structure.
+ *
+ * Return:      Success:        Ptr to a copy of the subtype.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 4 Feb 1997
+ *      The prototype changed but the functionality remains the same.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_deref (obj_t _self, int argc, obj_t argv[]) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+   char         *compname;
+
+   if (1!=argc) {
+      out_errorn ("stc_deref: wrong number of arguments");
+      return NIL;
+   }
+   if (argv[0] && C_NUM==argv[0]->pub.cls) {
+      out_errorn ("stc_deref: an array index cannot be applied to a "
+                  "structure");
+      return NIL;
+   }
+
+   compname = obj_name (argv[0]);
+   assert (self && compname);
+
+   for (i=0; i<self->ncomps; i++) {
+      if (!strcmp(self->compname[i], compname)) {
+         return obj_copy (self->sub[i], SHALLOW);
+      }
+   }
+
+   out_errorn ("stc_deref: structure component doesn't exist: %s",
+               compname);
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_name
+ *
+ * Purpose:     Returns a pointer to the structure name.
+ *
+ * Return:      Success:        Ptr to structure name
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 17 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+stc_name (obj_t _self) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+
+   if (self->name && self->name[0]) return self->name;
+   return NULL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_bind
+ *
+ * Purpose:     Binds array dimensions to numeric values.
+ *
+ * Return:      Success:        SELF
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+stc_bind (obj_t _self, void *mem) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i, nerrors=0;
+   obj_t        saved=NIL, sdo=NIL;
+
+   if (!mem) return _self;
+
+   /*
+    * Save current value of variable `self' and set `self' to point
+    * to an SDO with the MEM and type SELF.
+    */
+   sdo = obj_new (C_SDO, NIL, NULL, mem, self, mem, self, NULL, NULL, NULL);
+   saved = sym_self_set (sdo);
+   sdo=NIL;
+   
+   /*
+    * Bind each of the component types.
+    */
+   for (i=0; i<self->ncomps; i++) {
+      if (NIL==obj_bind(self->sub[i], (char*)mem+self->offset[i])) {
+         nerrors++;
+      }
+   }
+
+   /*
+    * Restore the previous value of variable `self'.
+    */
+   obj_dest (sym_self_set (saved));
+   saved = NIL;
+
+   return nerrors ? NIL : _self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_sort
+ *
+ * Purpose:     Destructively sorts the fields of a structure.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  5 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+stc_sort (obj_t _self, int start_at) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i, j, mini, tmp_off;
+   char         *tmp_str=NULL;
+   obj_t        tmp_sub=NIL;
+
+   for (i=start_at; i<self->ncomps-1; i++) {
+      mini = i;
+      for (j=i+1; j<self->ncomps; j++) {
+         if (strcmp (self->compname[j], self->compname[mini])<0) {
+            mini = j;
+         }
+      }
+      if (mini!=i) {
+         tmp_str = self->compname[i];
+         self->compname[i] = self->compname[mini];
+         self->compname[mini] = tmp_str;
+
+         tmp_sub = self->sub[i];
+         self->sub[i] = self->sub[mini];
+         self->sub[mini] = tmp_sub;
+
+         tmp_off = self->offset[i];
+         self->offset[i] = self->offset[mini];
+         self->offset[mini] = tmp_off;
+      }
+   }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_offset
+ *
+ * Purpose:     Given a structure and a component name, return the byte
+ *              offset of the subtype from the beginning of the structure.
+ *
+ * Return:      Success:        Byte offset to specified structure member.
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Dec 10 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+stc_offset (obj_t _self, obj_t comp) {
+
+   obj_stc_t    *self = MYCLASS(_self);
+   int          i;
+   char         *compname = obj_name (comp);
+
+   for (i=0; i<self->ncomps; i++) {
+      if (!strcmp(self->compname[i], compname)) {
+         return self->offset[i];
+      }
+   }
+
+   out_errorn ("stc_offset: no such structure component: %s", compname);
+   return -1;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    stc_silo_types
+ *
+ * Purpose:     Initializes the silo data types.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *  Robb Matzke, 18 Feb 1997
+ *  Added limits to arrays based on `ndims'.
+ *
+ *  Robb Matzke, 25 Mar 1997
+ *  Changed the `min_extents', `max_extents', and `align' fields to use
+ *  the value stored in the datatype field.  See related comments in the
+ *  silo.h file.
+ *
+ *  Robb Matzke, 29 Jul 1997
+ *  Array special handling flag `SH1' now takes an optional argument
+ *  which, if it evaluates to anything other than DB_COLLINEAR, the
+ *  special handling is ignored.  If it isn't ignored, then the specified
+ *  array is really a 1-d array where the array size is one of the numbers
+ *  specified depending on the current index of the enclosing array.
+ *
+ *  Robb Matzke, 2 Sep 1997
+ *  The `min_extents', `max_extents', and `align' fields are always
+ *  DB_FLOAT.
+ *
+ *  Sean Ahern, Tue Mar 31 17:43:03 PST 1998
+ *  Changed the `min_extents', and `max_extents' fields in UCD meshes to use
+ *  the value stored in the datatype field.
+ *
+ *  Jeremy Meredith, Sept 21 1998
+ *  Added multimatspecies object.
+ *
+ *  Sean Ahern, Tue Oct 20 14:35:13 PDT 1998
+ *  Changed the `min_extents' and `max_extents' fields in Quadmeshes to use 
+ *  the value stored in the datatype field.
+ *
+ *  Jeremy Meredith, Wed Jul  7 12:15:31 PDT 1999
+ *  I removed the origin from the species object.
+ *
+ *  Robb Matzke, Thu Jul 15 12:40:37 EDT 1999
+ *  Added `group_no' to DBpointmesh, DBquadmesh, and DBucdmesh.
+ *  
+ *  Robb Matzke, Thu Jul 15 12:40:37 EDT 1999
+ *  Added `ngroups', `blockorigin', and `grouporigin' to DBmultimesh,
+ *  DBmultivar, DBmultimat, and DBmultimatspecies.
+ *  
+ *  Robb Matzke, Thu Jul 15 12:40:37 EDT 1999
+ *  Added `min_index', `max_index', `zoneno', and `gzoneno' to the DBzonelist
+ *  type.
+ *  
+ *  Robb Matzke, Thu Jul 15 12:40:37 EDT 1999
+ *  Added `base_index[]' to the DBquadmesh type.
+ *  
+ *  Robb Matzke, Thu Jul 15 12:40:37 EDT 1999
+ *  Added `gnodeno' and `nodeno' properties to the DBucdmesh type.
+ *  
+ *  Thomas R. Treadway, Fri Jul  7 12:44:38 PDT 2006
+ *  Added support for DBOPT_REFERENCE in Curves
+ *  
+ *  Mark C. Miller, Wed Sep  2 16:48:37 PDT 2009
+ *  Added mixvals to ucdvar struct.
+ *
+ *  Mark C. Miller, Thu Nov  5 16:32:45 PST 2009
+ *  Re-organized these structs so that problems-sized arrays are always at
+ *  the bottom. That way, browser will display them last and one doesn't
+ *  have to page through the problem-sized data to see tiny bits of
+ *  metadata at the end. Also added conserved/extensive properties to
+ *  all var objects and centering to quadvar.
+ *
+ *  Mark C. Miller, Fri Nov 13 15:33:42 PST 2009
+ *  Added support for long long global node/zone numbers.
+ *
+ *  Mark C. Miller, Sat Nov 14 20:28:34 PST 2009
+ *  Changed how long long global node/zone numbers are supported
+ *  from a int (bool), "llong_gnode|zoneno" to an int holding
+ *  the actual datatype. The type is assumed int if it its
+ *  value is zero or it does not exist. Otherwise, the type is
+ *  is whatever is stored in gnznodtype member. This makes it quite
+ *  easy for browser to handle variations in type of this data.
+ *
+ *  Mark C. Miller, Mon Nov 23 11:18:25 PST 2009
+ *  Added missing 'topo_dim' member to multimesh object.
+ *
+ *  Mark C. Miller, Wed Feb 24 16:39:21 PST 2010
+ *  Fixed a problem with display of extents in point meshes.
+ *
+ *  Mark C. Miller, Wed Jul 14 21:06:27 PDT 2010
+ *  Added support for namescheme/emtpy_list options on multi-block objs.
+ *-------------------------------------------------------------------------
+ */
+void
+stc_silo_types (void) {
+
+   obj_t        tmp=NIL;
+
+   STRUCT (DBobject) {
+      COMP (name,               "primitive 'string'");
+      COMP (type,               "primitive 'string'");
+      COMP (ncomponents,        "primitive 'int'");
+      COMP (maxcomponents,      "primitive 'int'");
+      COMP (comp_names,
+            "pointer (array 'self.ncomponents' (primitive 'string'))");
+      COMP (pdb_names,
+            "pointer (array 'self.ncomponents' (primitive 'string'))");
+   } ESTRUCT;
+
+   STRUCT (DBcurve) {
+      COMP (id,                 "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (origin,             "primitive 'int'");
+      COMP (title,              "primitive 'string'");
+      COMP (xvarname,           "primitive 'string'");
+      COMP (yvarname,           "primitive 'string'");
+      COMP (xlabel,             "primitive 'string'");
+      COMP (ylabel,             "primitive 'string'");
+      COMP (xunits,             "primitive 'string'");
+      COMP (yunits,             "primitive 'string'");
+      COMP (npts,               "primitive 'int'");
+      COMP (reference,          "primitive 'string'");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (x,
+            "pointer (array 'self.npts' (primitive 'self.datatype'))");
+      COMP (y,
+            "pointer (array 'self.npts' (primitive 'self.datatype'))");
+   } ESTRUCT;
+
+   STRUCT (DBdefvars) {
+      COMP (ndefs,              "primitive 'int'");
+      COMP (names,
+            "pointer (array 'self.ndefs' (primitive 'string'))");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_DEFVARTYPE);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.ndefs", tmp));
+      COMP3 (types, "types", tmp);
+
+      COMP (defns,
+            "pointer (array 'self.ndefs' (primitive 'string'))");
+      COMP (guihides,
+            "pointer (array 'self.ndefs' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBmultimesh) {
+      COMP (id,                 "primitive 'int'");
+      COMP (nblocks,            "primitive 'int'");
+      COMP (ngroups,            "primitive 'int'");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (blockorigin,        "primitive 'int'");
+      COMP (grouporigin,        "primitive 'int'");
+      COMP (extentssize,        "primitive 'int'");
+      COMP (mrgtree_name,       "primitive 'string'");
+      COMP (tv_connectivity,    "primitive 'int'");
+      COMP (disjoint_mode,      "primitive 'int'");
+      COMP (topo_dim,           "primitive 'int'");
+      IOASSOC (PA_TOPODIM);
+      COMP (file_ns,            "primitive 'string'");
+      COMP (block_ns,           "primitive 'string'");
+      COMP (block_type,         "primitive 'int'");
+      COMP (empty_cnt,          "primitive 'int'");
+      COMP (empty_list,
+            "pointer (array 'self.empty_cnt' (primitive 'int'))");
+      COMP (meshids,
+            "pointer (array 'self.nblocks' (primitive 'int'))");
+      COMP (meshnames,
+            "pointer (array 'self.nblocks' (primitive 'string'))");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_OBJTYPE);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.nblocks", tmp));
+      COMP3 (meshtypes, "meshtypes", tmp);
+
+      COMP (dirids,
+            "pointer (array 'self.nblocks' (primitive 'int'))");
+      COMP (extents,
+            "pointer (array 'self.nblocks,self.extentssize' (primitive 'double'))");
+      COMP (zonecounts,
+            "pointer (array 'self.nblocks' (primitive 'int'))");
+      COMP (has_external_zones,
+            "pointer (array 'self.nblocks' (primitive 'int'))");
+      COMP (lgroupings,        "primitive 'int'");
+      COMP (groupings,
+            "pointer (array 'self.lgroupings' (primitive 'int'))");
+      COMP (groupnames,
+            "pointer (array 'self.lgroupings' (primitive 'string'))");
+   } ESTRUCT;
+
+   STRUCT (DBmultimeshadj) {
+      COMP (nblocks,            "primitive 'int'");
+      COMP (blockorigin,        "primitive 'int'");
+      COMP (lneighbors,         "primitive 'int'");
+      COMP (totlnodelists,      "primitive 'int'");
+      COMP (totlzonelists,      "primitive 'int'");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_OBJTYPE);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.nblocks", tmp));
+      COMP3 (meshtypes, "meshtypes", tmp);
+
+      COMP (nneighbors,
+            "pointer (array 'self.nblocks' (primitive 'int'))");
+      COMP (neighbors,
+            "pointer (array 'self.lneighbors' (primitive 'int'))");
+      COMP (back,
+            "pointer (array 'self.lneighbors' (primitive 'int'))");
+      COMP (lnodelists,
+            "pointer (array 'self.lneighbors' (primitive 'int'))");
+      COMP (lzonelists,
+            "pointer (array 'self.lneighbors' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBmultivar) {
+      COMP (id,                 "primitive 'int'");
+      COMP (nvars,              "primitive 'int'");
+      COMP (ngroups,            "primitive 'int'");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (extentssize,        "primitive 'int'");
+      COMP (blockorigin,        "primitive 'int'");
+      COMP (grouporigin,        "primitive 'int'");
+      COMP (tensor_rank,        "primitive 'int'");
+      IOASSOC (PA_DEFVARTYPE);
+      COMP (mmesh_name,         "primitive 'string'");
+      COMP (conserved,          "primitive 'int'");
+      COMP (extensive,          "primitive 'int'");
+      COMP (file_ns,            "primitive 'string'");
+      COMP (block_ns,           "primitive 'string'");
+      COMP (block_type,         "primitive 'int'");
+      COMP (empty_cnt,          "primitive 'int'");
+      COMP (empty_list,
+            "pointer (array 'self.empty_cnt' (primitive 'int'))");
+      COMP (varnames,
+            "pointer (array 'self.nvars' (primitive 'string'))");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_OBJTYPE);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.nvars", tmp));
+      COMP3 (vartypes, "vartypes", tmp);
+      tmp = NIL;
+
+      COMP (extents,
+            "pointer (array 'self.nvars,self.extentssize' (primitive 'double'))");
+   } ESTRUCT;
+
+
+   STRUCT (DBmultimat) {
+      COMP (id,                 "primitive 'int'");
+      COMP (nmats,              "primitive 'int'");
+      COMP (ngroups,            "primitive 'int'");
+      COMP (allowmat0,          "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (blockorigin,        "primitive 'int'");
+      COMP (grouporigin,        "primitive 'int'");
+      COMP (mmesh_name,         "primitive 'string'");
+      COMP (file_ns,            "primitive 'string'");
+      COMP (block_ns,           "primitive 'string'");
+      COMP (empty_cnt,          "primitive 'int'");
+      COMP (empty_list,
+            "pointer (array 'self.empty_cnt' (primitive 'int'))");
+      COMP (matnames,
+            "pointer (array 'self.nmats' (primitive 'string'))");
+      COMP (mixlens,
+            "pointer (array 'self.nmats' (primitive 'int'))");
+      COMP (matcounts,
+            "pointer (array 'self.nmats' (primitive 'int'))");
+      COMP (matlists,
+            "pointer (array 'self.nmats' (primitive 'int'))");
+      COMP (nmatnos,            "primitive 'int'");
+      COMP (matnos,
+            "pointer (array 'self.nmatnos' (primitive 'int'))");
+      COMP (material_names,
+            "pointer (array 'self.nmatnos' (primitive 'string'))");
+      COMP (matcolors,
+            "pointer (array 'self.nmatnos' (primitive 'string'))");
+   } ESTRUCT;
+
+   STRUCT (DBmultimatspecies) {
+      COMP (id,                 "primitive 'int'");
+      COMP (nspec,              "primitive 'int'");
+      COMP (ngroups,            "primitive 'int'");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (blockorigin,        "primitive 'int'");
+      COMP (grouporigin,        "primitive 'int'");
+      COMP (nmat,               "primitive 'int'");
+      COMP (file_ns,            "primitive 'string'");
+      COMP (block_ns,           "primitive 'string'");
+      COMP (empty_cnt,          "primitive 'int'");
+      COMP (empty_list,
+            "pointer (array 'self.empty_cnt' (primitive 'int'))");
+      COMP (specnames,
+            "pointer (array 'self.nspec' (primitive 'string'))");
+      COMP (nmatspec,
+            "pointer (array 'self.nmat' (primitive 'int'))");
+      COMP (species_names,
+            "pointer (array 'SH4, self.nmatspec' (primitive 'string'))");
+      COMP (speccolors,
+            "pointer (array 'SH4, self.nmatspec' (primitive 'string'))");
+   } ESTRUCT;
+
+   STRUCT (DBquadmesh) {
+      COMP (id,                 "primitive 'int'");
+      COMP (block_no,           "primitive 'int'");
+      COMP (group_no,           "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (coord_sys,          "primitive 'int'");
+      IOASSOC (PA_COORDSYS);
+      COMP (major_order,        "primitive 'int'");
+      IOASSOC (PA_ORDER);
+      COMP (stride,             "array 3 (primitive 'int')");
+      COMP (coordtype,          "primitive 'int'");
+      IOASSOC (PA_COORDTYPE);
+      COMP (facetype,           "primitive 'int'");
+      IOASSOC (PA_FACETYPE);
+      COMP (planar,             "primitive 'int'");
+      IOASSOC (PA_PLANAR);
+      COMP (ndims,              "primitive 'int'");
+      COMP (nspace,             "primitive 'int'");
+      COMP (nnodes,             "primitive 'int'");
+      COMP (dims,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (min_index,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (max_index,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (origin,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (min_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (max_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (labels,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (units,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (base_index,         "array 3 (primitive 'int')");
+      COMP (mrgtree_name,       "primitive 'string'");
+      COMP (coords,
+            "array 'SH3 3, self.ndims' "
+            "(pointer (array 'SH1 self.coordtype, self.dims' "
+            "(primitive 'self.datatype')))");
+   } ESTRUCT;
+
+   STRUCT (DBquadvar) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (meshname,           "primitive 'string'");
+      COMP (units,              "primitive 'string'");
+      COMP (label,              "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (meshid,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (centering,          "primitive 'int'");
+      IOASSOC (PA_CENTERING);
+      COMP (nels,               "primitive 'int'");
+      COMP (nvals,              "primitive 'int'");
+      COMP (ndims,              "primitive 'int'");
+      COMP (dims,               "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (major_order,        "primitive 'int'");
+      IOASSOC (PA_ORDER);
+      COMP (stride,             "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (min_index,          "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (max_index,          "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (origin,             "primitive 'int'");
+      COMP (align,
+            "array 'SH3 3, self.ndims' (primitive 'float')");
+      COMP (mixlen,             "primitive 'int'");
+      COMP (use_specmf,         "primitive 'int'");
+      IOASSOC (PA_ONOFF);
+      COMP (ascii_labels,       "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (conserved,          "primitive 'int'");
+      COMP (extensive,          "primitive 'int'");
+      COMP (mixvals,
+            "pointer (array 'self.nvals' (pointer (array 'self.mixlen' "
+            "(primitive 'self.datatype'))))");
+      COMP (vals,
+            "pointer (array 'self.nvals' (pointer (array 'self.nels' "
+            "(primitive 'self.datatype'))))");
+   } ESTRUCT;
+
+   STRUCT (DBzonelist) {
+      COMP (ndims,              "primitive 'int'");
+      COMP (nzones,             "primitive 'int'");
+      COMP (nshapes,            "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (min_index,          "primitive 'int'");
+      COMP (max_index,          "primitive 'int'");
+      COMP (gnznodtype,         "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (lnodelist,          "primitive 'int'");
+      COMP (shapecnt,
+            "pointer (array 'self.nshapes' (primitive 'int'))");
+      COMP (shapesize,
+            "pointer (array 'self.nshapes' (primitive 'int'))");
+      COMP (shapetype,
+            "pointer (array 'self.nshapes' (primitive 'int'))");
+      COMP (nodelist,
+            "pointer (array 'self.lnodelist' (primitive 'int'))");
+      COMP (zoneno,
+            "pointer (array 'self.nzones' (primitive 'int'))");
+      COMP (gzoneno,
+            "pointer (array 'self.nzones' (primitive 'self.gnznodtype'))");
+   } ESTRUCT;
+
+   STRUCT (DBphzonelist) {
+      COMP (nzones,             "primitive 'int'");
+      COMP (nfaces,             "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (lo_offset,          "primitive 'int'");
+      COMP (hi_offset,          "primitive 'int'");
+      COMP (lnodelist,          "primitive 'int'");
+      COMP (lfacelist,          "primitive 'int'");
+      COMP (gnznodtype,         "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (nodecnt,
+            "pointer (array 'self.nfaces' (primitive 'int'))");
+      COMP (nodelist,
+            "pointer (array 'self.lnodelist' (primitive 'int'))");
+      COMP (extface,
+            "pointer (array 'self.nfaces' (primitive 'int8'))");
+      COMP (facecnt,
+            "pointer (array 'self.nzones' (primitive 'int'))");
+      COMP (facelist,
+            "pointer (array 'self.lfacelist' (primitive 'int'))");
+      COMP (zoneno,
+            "pointer (array 'self.nzones' (primitive 'int'))");
+      COMP (gzoneno,
+            "pointer (array 'self.nzones' (primitive 'self.gnznodtype'))");
+   } ESTRUCT;
+
+   STRUCT (DBcsgzonelist) {
+      COMP (nregs,             "primitive 'int'");
+      COMP (nzones,            "primitive 'int'");
+      COMP (origin,            "primitive 'int'");
+      COMP (lxform,            "primitive 'int'");
+      COMP (datatype,          "primitive 'int'");
+      COMP (min_index,         "primitive 'int'");
+      COMP (max_index,         "primitive 'int'");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_REGIONOP);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.nregs", tmp));
+      COMP3 (typeflags, "typeflags", tmp);
+
+      COMP (leftids,
+            "pointer (array 'self.nregs' (primitive 'int'))");
+      COMP (rightids,
+            "pointer (array 'self.nregs' (primitive 'int'))");
+      COMP (xform,
+            "pointer (array 'self.lxform' (primitive 'self.datatype'))");
+      COMP (zonelist,
+            "pointer (array 'self.nzones' (primitive 'int'))");
+      COMP (regnames,
+            "pointer (array 'self.nregs' (primitive 'string'))");
+      COMP (zonenames,
+            "pointer (array 'self.nzones' (primitive 'string'))");
+   } ESTRUCT;
+
+   STRUCT (DBfacelist) {
+      COMP (ndims,              "primitive 'int'");
+      COMP (nfaces,             "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (lnodelist,          "primitive 'int'");
+      COMP (nshapes,            "primitive 'int'");
+      COMP (ntypes,             "primitive 'int'");
+      COMP (nodelist,
+            "pointer (array 'self.lnodelist' (primitive 'int'))");
+      COMP (shapecnt,
+            "pointer (array 'self.nshapes' (primitive 'int'))");
+      COMP (shapesize,
+            "pointer (array 'self.nshapes' (primitive 'int'))");
+      COMP (typelist,
+            "pointer (array 'self.ntypes' (primitive 'int'))");
+      COMP (types,
+            "pointer (array 'self.nfaces' (primitive 'int'))");
+      COMP (nodeno,
+            "pointer (array 'self.lnodelist' (primitive 'int'))");
+      COMP (zoneno,
+            "pointer (array 'self.nfaces' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBedgelist) {
+      COMP (ndims,              "primitive 'int'");
+      COMP (nedges,             "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (edge_beg,
+            "pointer (array 'self.nedges' (primitive 'int'))");
+      COMP (edge_end,
+            "pointer (array 'self.nedges' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBcsgmesh) {
+      COMP (block_no,           "primitive 'int'");
+      COMP (group_no,           "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (ndims,              "primitive 'int'");
+      COMP (units,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (labels,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (nbounds,            "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (min_extents,
+            "array 'SH3 3, self.ndims' (primitive 'double')");
+      COMP (max_extents,
+            "array 'SH3 3, self.ndims' (primitive 'double')");
+      COMP (origin,             "primitive 'int'");
+      COMP (mrgtree_name,       "primitive 'string'");
+      COMP (tv_connectivity,    "primitive 'int'");
+      COMP (disjoint_mode,      "primitive 'int'");
+      COMP (lcoeffs,            "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_BOUNDARYTYPE);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.nbounds", tmp));
+      COMP3 (typeflags, "typeflags", tmp);
+
+      COMP (bndids,
+            "pointer (array 'self.nbounds' (primitive 'int'))");
+      COMP (coeffs,
+            "pointer (array 'self.lcoeffs' (primitive 'self.datatype'))");
+      COMP (bndnames,
+            "pointer (array 'self.nbounds' (primitive 'string'))");
+      COMP (zones,              "pointer 'DBcsgzonelist'");
+   } ESTRUCT;
+
+   STRUCT (DBcsgvar) {
+      COMP (name,               "primitive 'string'");
+      COMP (meshname,           "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (units,              "primitive 'string'");
+      COMP (label,              "primitive 'string'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (nels,               "primitive 'int'");
+      COMP (nvals,              "primitive 'int'");
+      COMP (centering,          "primitive 'int'");
+      IOASSOC (PA_CENTERING);
+      COMP (use_specmf,         "primitive 'int'");
+      IOASSOC (PA_ONOFF);
+      COMP (ascii_labels,       "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (conserved,          "primitive 'int'");
+      COMP (extensive,          "primitive 'int'");
+      COMP (vals,
+            "pointer (array 'self.nvals' (pointer "
+            "(array 'self.nels' (primitive 'self.datatype'))))");
+   } ESTRUCT;
+
+   STRUCT (DBucdmesh) {
+      COMP (id,                 "primitive 'int'");
+      COMP (block_no,           "primitive 'int'");
+      COMP (group_no,           "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (coord_sys,          "primitive 'int'");
+      IOASSOC (PA_COORDSYS);
+      COMP (topo_dim,           "primitive 'int'");
+      IOASSOC (PA_TOPODIM);
+      COMP (ndims,              "primitive 'int'");
+      COMP (nnodes,             "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (units,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (labels,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (mrgtree_name,      "primitive 'string'");
+      COMP (tv_connectivity,   "primitive 'int'");
+      COMP (disjoint_mode,     "primitive 'int'");
+      COMP (gnznodtype,        "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (min_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (max_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (coords,
+            "array 'SH3 3, self.ndims' (pointer (array 'self.nnodes' "
+            "(primitive 'self.datatype')))");
+      COMP (gnodeno,
+            "pointer (array 'self.nnodes' (primitive 'self.gnznodtype'))");
+      COMP (nodeno,
+            "pointer (array 'self.nnodes' (primitive 'int'))");
+      COMP (faces,              "pointer 'DBfacelist'");
+      COMP (zones,              "pointer 'DBzonelist'");
+      COMP (edges,              "pointer 'DBedgelist'");
+      COMP (phzones,            "pointer 'DBphzonelist'");
+   } ESTRUCT;
+
+   STRUCT (DBucdvar) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (meshname,           "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (units,              "primitive 'string'");
+      COMP (label,              "primitive 'string'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (meshid,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (nels,               "primitive 'int'");
+      COMP (nvals,              "primitive 'int'");
+      COMP (ndims,              "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (centering,          "primitive 'int'");
+      IOASSOC (PA_CENTERING);
+      COMP (mixlen,             "primitive 'int'");
+      COMP (use_specmf,         "primitive 'int'");
+      IOASSOC (PA_ONOFF);
+      COMP (ascii_labels,       "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (conserved,          "primitive 'int'");
+      COMP (extensive,          "primitive 'int'");
+      COMP (vals,
+            "pointer (array 'self.nvals' (pointer "
+            "(array 'self.nels' (primitive 'self.datatype'))))");
+      COMP (mixvals,
+            "pointer (array 'self.nvals' (pointer (array 'self.mixlen' "
+            "(primitive 'self.datatype'))))");
+   } ESTRUCT;
+
+   STRUCT (DBpointmesh) {
+      COMP (id,                 "primitive 'int'");
+      COMP (block_no,           "primitive 'int'");
+      COMP (group_no,           "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (title,              "primitive 'string'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (ndims,              "primitive 'int'");
+      COMP (nels,               "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (units,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (labels,
+            "array 'SH3 3, self.ndims' (primitive 'string')");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (mrgtree_name,       "primitive 'string'");
+      COMP (gnznodtype,         "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (min_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (max_extents,
+            "array 'SH3 3, self.ndims' (primitive 'self.datatype')");
+      COMP (coords,
+            "array 'self.ndims' (pointer (array 'self.nels' "
+            "(primitive 'self.datatype')))");
+      COMP (gnodeno,
+            "pointer (array 'self.nels' (primitive 'self.gnznodtype'))");
+   } ESTRUCT;
+
+   STRUCT (DBmeshvar) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (meshname,           "primitive 'string'");
+      COMP (units,              "primitive 'string'");
+      COMP (label,              "primitive 'string'");
+      COMP (cycle,              "primitive 'int'");
+      COMP (time,               "primitive 'float'");
+      COMP (dtime,              "primitive 'double'");
+      COMP (meshid,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (nels,               "primitive 'int'");
+      COMP (nvals,              "primitive 'int'");
+      COMP (nspace,             "primitive 'int'");
+      COMP (ndims,              "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (centering,          "primitive 'int'");
+      IOASSOC (PA_CENTERING);
+      COMP (align,
+            "array 'SH3 3, self.ndims' (primitive 'float')");
+      COMP (dims,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (major_order,        "primitive 'int'");
+      IOASSOC (PA_ORDER);
+      COMP (stride,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (min_index,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (max_index,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (ascii_labels,       "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (conserved,          "primitive 'int'");
+      COMP (extensive,          "primitive 'int'");
+      COMP (vals,
+            "pointer (array 'self.nvals' (pointer "
+            "(array 'self.nels' (primitive 'self.datatype'))))");
+   } ESTRUCT;
+
+   STRUCT (DBmaterial) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (meshname,           "primitive 'string'");
+      COMP (ndims,              "primitive 'int'");
+      COMP (origin,             "primitive 'int'");
+      COMP (dims,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (major_order,        "primitive 'int'");
+      IOASSOC (PA_ORDER);
+      COMP (stride,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (nmat,               "primitive 'int'");
+      COMP (matnos,
+            "pointer (array 'self.nmat' (primitive 'int'))");
+      COMP (matnames,
+            "pointer (array 'self.nmat' (primitive 'string'))");
+      COMP (matcolors,
+            "pointer (array 'self.nmat' (primitive 'string'))");
+      COMP (allowmat0,          "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (mixlen,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (matlist,
+            "pointer (array 'SH2, self.dims' (primitive 'int'))");
+      COMP (mix_vf,
+            "pointer (array 'self.mixlen' (primitive 'self.datatype'))");
+      COMP (mix_next,
+            "pointer (array 'self.mixlen' (primitive 'int'))");
+      COMP (mix_mat,
+            "pointer (array 'self.mixlen' (primitive 'int'))");
+      COMP (mix_zone,
+            "pointer (array 'self.mixlen' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBmatspecies) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (matname,            "primitive 'string'");
+      COMP (nmat,               "primitive 'int'");
+      COMP (nmatspec,
+            "pointer (array 'self.nmat' (primitive 'int'))");
+      COMP (ndims,              "primitive 'int'");
+      COMP (dims,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (major_order,        "primitive 'int'");
+      IOASSOC (PA_ORDER);
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (stride,
+            "array 'SH3 3, self.ndims' (primitive 'int')");
+      COMP (nspecies_mf,        "primitive 'int'");
+      COMP (guihide,            "primitive 'int'");
+      IOASSOC (PA_BOOLEAN);
+      COMP (mixlen,             "primitive 'int'");
+      COMP (speclist,
+            "pointer (array 'self.dims' (primitive 'int'))");
+      COMP (specnames,
+            "pointer (array 'SH4, self.nmatspec' (primitive 'string'))");
+      COMP (speccolors,
+            "pointer (array 'SH4, self.nmatspec' (primitive 'string'))");
+      COMP (species_mf,
+            "pointer (array 'self.nspecies_mf' (primitive 'self.datatype'))");
+      COMP (mix_speclist,
+            "pointer (array 'self.mixlen' (primitive 'int'))");
+   } ESTRUCT;
+
+   STRUCT (DBcompoundarray) {
+      COMP (id,                 "primitive 'int'");
+      COMP (name,               "primitive 'string'");
+      COMP (nelems,             "primitive 'int'");
+      COMP (nvalues,            "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (elemnames,
+            "pointer (array 'self.nelems' (primitive 'string'))");
+      COMP (elemlengths,
+            "pointer (array 'self.nelems' (primitive 'int'))");
+      COMP (values,
+            "pointer (array 'self.nvalues' (primitive 'self.datatype'))");
+   } ESTRUCT;
+
+   STRUCT (DBmrgtree) {
+      WALK1 (stc_walk1_DBmrgtree);
+      COMP (name,               "primitive 'string'");
+      COMP (src_mesh_name,      "primitive 'string'");
+      COMP (src_mesh_type,      "primitive 'int'");
+      COMP (type_info_bits,     "primitive 'int'");
+      COMP (num_nodes,          "primitive 'int'");
+   } ESTRUCT;
+
+   STRUCT(DBgroupelmap) {
+      COMP (name,               "primitive 'string'");
+      COMP (num_segments,       "primitive 'int'");
+      COMP (fracs_data_type,    "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (segment_lengths,
+            "pointer (array 'self.num_segments' (primitive 'int'))");
+      COMP (groupel_types,
+            "pointer (array 'self.num_segments' (primitive 'int'))");
+      tmp = obj_new (C_PRIM, "int");
+      prim_set_io_assoc (tmp, PA_CENTERING);
+      tmp = obj_new (C_PTR, obj_new (C_ARY, "self.num_segments", tmp));
+      COMP3 (groupel_types, "groupel_types", tmp);
+      COMP (segment_ids,
+            "pointer (array 'self.num_segments' (primitive 'int'))");
+      COMP (segment_data,
+            "pointer (array 'SH3 1000, self.num_segments' "
+            "(pointer (array 'SH1 DB_COLLINEAR, self.segment_lengths' "
+            "(primitive 'int'))))");
+      COMP (segment_fracs,
+            "pointer (array 'SH3 1000, self.num_segments' "
+            "(pointer (array 'SH1 DB_COLLINEAR, self.segment_lengths' "
+            "(primitive 'self.fracs_data_type'))))");
+   } ESTRUCT;
+
+   STRUCT (DBmrgvar) {
+      COMP (name,               "primitive 'string'");
+      COMP (mrgt_name,          "primitive 'string'");
+      COMP (ncomps,             "primitive 'int'");
+      COMP (nregns,             "primitive 'int'");
+      COMP (datatype,           "primitive 'int'");
+      IOASSOC (PA_DATATYPE);
+      COMP (compnames,
+            "pointer (array 'self.ncomps' (primitive 'string'))");
+      COMP (reg_pnames,
+            "pointer (array '1' (primitive 'string'))");
+      COMP (data,
+            "pointer (array 'self.ncomps' (pointer "
+            "(array 'self.nregns' (primitive 'self.datatype'))))");
+   } ESTRUCT;
+
+   STRUCT (toc_t) {
+      COMP (type,               "primitive 'int'");
+      IOASSOC (PA_BR_OBJTYPE);
+      COMP (name,               "primitive 'string'");
+   } ESTRUCT;
+
+   STRUCT (DBdirectory) {
+      WALK1 (stc_walk1_DBdirectory);
+      WALK2 (stc_walk2_DBdirectory);
+      COMP (nsyms,              "primitive 'int'");
+      COMP (entry_ptr,
+            "pointer (array 'self.nsyms' (pointer 'toc_t'))");
+   } ESTRUCT;
+
+   STRUCT (DBtoc) {
+      COMP (ncurve,             "primitive 'int'");
+      COMP (curve_names,
+            "pointer (array 'self.ncurve' (primitive 'string'))");
+      COMP (ndefvars,           "primitive 'int'");
+      COMP (defvars_names,
+            "pointer (array 'self.ndefvars' (primitive 'string'))");
+      COMP (nmultimesh,         "primitive 'int'");
+      COMP (multimesh_names,
+            "pointer (array 'self.nmultimesh' (primitive 'string'))");
+      COMP (nmultimeshadj,       "primitive 'int'");
+      COMP (multimeshadj_names,
+            "pointer (array 'self.nmultimeshadj' (primitive 'string'))");
+      COMP (nmultimat,          "primitive 'int'");
+      COMP (multimat_names,
+            "pointer (array 'self.nmultimat' (primitive 'string'))");
+      COMP (nmultimatspecies,   "primitive 'int'");
+      COMP (multimatspecies_names,
+            "pointer (array 'self.nmultimatspecies' (primitive 'string'))");
+      COMP (ncsgmesh,             "primitive 'int'");
+      COMP (csgmesh_names,
+            "pointer (array 'self.ncsgmesh' (primitive 'string'))");
+      COMP (ncsgvar,              "primitive 'int'");
+      COMP (csgvar_names,
+            "pointer (array 'self.ncsgvar' (primitive 'string'))");
+      COMP (nqmesh,             "primitive 'int'");
+      COMP (qmesh_names,
+            "pointer (array 'self.nqmesh' (primitive 'string'))");
+      COMP (nqvar,              "primitive 'int'");
+      COMP (qvar_names,
+            "pointer (array 'self.nqvar' (primitive 'string'))");
+      COMP (nucdmesh,           "primitive 'int'");
+      COMP (ucdmesh_names,
+            "pointer (array 'self.nucdmesh' (primitive 'string'))");
+      COMP (nucdvar,            "primitive 'int'");
+      COMP (ucdvar_names,
+            "pointer (array 'self.nucdvar' (primitive 'string'))");
+      COMP (nptmesh,            "primitive 'int'");
+      COMP (ptmesh_names,
+            "pointer (array 'self.nptmesh' (primitive 'string'))");
+      COMP (nptvar,             "primitive 'int'");
+      COMP (ptvar_names,
+            "pointer (array 'self.nptmesh' (primitive 'string'))");
+      COMP (nmat,               "primitive 'int'");
+      COMP (mat_names,
+            "pointer (array 'self.nmat' (primitive 'string'))");
+      COMP (nmatspecies,        "primitive 'int'");
+      COMP (matspecies_names,
+            "pointer (array 'self.nmatspecies' (primitive 'string'))");
+      COMP (nvar,               "primitive 'int'");
+      COMP (var_names,
+            "pointer (array 'self.nvar' (primitive 'string'))");
+      COMP (nobj,               "primitive 'int'");
+      COMP (obj_names,
+            "pointer (array 'self.nobj' (primitive 'string'))");
+      COMP (ndir,               "primitive 'int'");
+      COMP (dir_names,
+            "pointer (array 'self.ndir' (primitive 'string'))");
+      COMP (narrays,            "primitive 'int'");
+      COMP (array_names,
+            "pointer (array 'self.narrays' (primitive 'string'))");
+      COMP (nmrgtrees,            "primitive 'int'");
+      COMP (mrgtree_names,
+            "pointer (array 'self.nmrgtrees' (primitive 'string'))");
+      COMP (ngroupelmaps,            "primitive 'int'");
+      COMP (groupelmap_names,
+            "pointer (array 'self.ngroupelmaps' (primitive 'string'))");
+      COMP (nmrgvars,               "primitive 'int'");
+      COMP (mrgvar_names,
+            "pointer (array 'self.nmrgvars' (primitive 'string'))");
+   } ESTRUCT;
+}
diff --git a/tools/browser/str.c b/tools/browser/str.c
new file mode 100644
index 0000000..bf085d6
--- /dev/null
+++ b/tools/browser/str.c
@@ -0,0 +1,439 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             str.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             The string class
+ *
+ * Modifications:       
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#define MYCLASS(X)      ((obj_str_t*)(X))
+
+typedef struct obj_str_t {
+   obj_pub_t    pub;
+   char         *s;
+} obj_str_t;
+
+class_t         C_STR;
+static obj_t    str_new (va_list);
+static obj_t    str_copy (obj_t, int);
+static obj_t    str_dest (obj_t);
+static void     str_print (obj_t, out_t*);
+static char *   str_name (obj_t);
+static int      str_diff (obj_t, obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_class
+ *
+ * Purpose:     Initializes the STR class.
+ *
+ * Return:      Success:        Ptr to the str class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+str_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = strdup ("STR");
+   cls->new = str_new;
+   cls->copy = str_copy;
+   cls->dest = str_dest;
+   cls->print = str_print;
+   cls->objname = str_name;
+   cls->diff = str_diff;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_new
+ *
+ * Purpose:     Creates a new STR object having the specified string value.
+ *
+ * Return:      Success:        Ptr to the new str object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+str_new (va_list ap) {
+
+   char         *s;
+   obj_str_t    *self = calloc (1, sizeof(obj_str_t));
+
+   assert (self);
+   s = va_arg (ap, char*);
+   self->s = strdup (s);
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_copy
+ *
+ * Purpose:     Copies a string.
+ *
+ * Return:      Success:        Ptr to a copy of SELF.
+ *
+ *              Failure:        abort()
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Jan 23 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+str_copy (obj_t _self, int flag) {
+
+   obj_str_t    *self = MYCLASS(_self);
+   obj_str_t    *retval = NULL;
+
+   if (SHALLOW==flag) {
+      retval = self;
+
+   } else {
+      retval = calloc (1, sizeof(obj_str_t));
+      retval->s = strdup (self->s);
+   }
+   return (obj_t)retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_dest
+ *
+ * Purpose:     Destroys a string object when the reference count becomes
+ *              zero.
+ *
+ * Return:      Success:        NIL
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+str_dest (obj_t _self) {
+
+   obj_str_t    *self = MYCLASS(_self);
+
+   if (0==self->pub.ref) {
+      free (self->s);
+      self->s = NULL;
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_doprnt
+ *
+ * Purpose:     Prints a string with non-printable characters.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 31 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-10-19
+ *              Understands formats of `b16', `b8', and `b2'.
+ *
+ *              Mark C. Miller, 03Jun08
+ *              Made it properly handle strings longer than size of buf.
+ *              Made it properly use truncate variable to control behavior.
+ *
+ *    Mark C. Miller, Wed Jan 14 10:13:50 PST 2009
+ *    Eliminated extraneous blank line being output from browser as well
+ *    as line breaking occuring on arrays of strings by removing out_nl
+ *    call and using out_puts for string output and out_printf otherwise.
+ *-------------------------------------------------------------------------
+ */
+void
+str_doprnt (out_t *f, char *fmt, char *s)
+{
+    char        buf[1024], c;
+    int         at, i, j, n, maxn;
+    unsigned    mask;
+
+    if (!s) {
+        out_puts(f, "(null)");
+        return;
+    }
+
+    i = 0;
+    n = strlen(s);
+    maxn = sym_bi_true("truncate");
+    if (maxn <= 1) maxn = n;
+    while (i < n && i < maxn)
+    {
+       buf[0] = '\0';
+       for (at=0; i < n && i < maxn && s[i]; i++) {
+           if (at+2>=sizeof(buf)) {
+               buf[at] = '\0';
+               break;
+           }
+
+           switch ((c=s[i])) {
+           case '\\':
+               buf[at++] = c;
+               buf[at++] = c;
+               break;
+
+           case '\b':
+               /* `b' is a valid hexadecimal digit */
+               if (!strcmp(fmt, "b16")) {
+                   sprintf(buf+at, "\\%02x", (unsigned char)c);
+                   at += strlen(buf+at);
+               } else {
+                   buf[at++] = '\\';
+                   buf[at++] = 'b';
+               }
+               break;
+
+           case '\n':
+               buf[at++] = '\\';
+               buf[at++] = 'n';
+               break;
+
+           case '\r':
+               buf[at++] = '\\';
+               buf[at++] = 'r';
+               break;
+
+           case '\t':
+               buf[at++] = '\\';
+               buf[at++] = 't';
+               break;
+
+           case '"':
+               buf[at++] = '\\';
+               buf[at++] = '"';
+               break;
+            
+           default:
+               if (c>=' ' && c<='~') {
+                   buf[at++] = c;
+               } else if (!strcmp(fmt, "b16")) {
+                   sprintf(buf+at, "\\%02x", (unsigned char)c);
+                   at += strlen(buf+at);
+               } else if (!strcmp(fmt, "b2")) {
+                   buf[at++] = '\\';
+                   for (j=0, mask=0x80; j<8; j++, mask>>=1) {
+                       buf[at++] = (unsigned)c & mask ? '1':'0';
+                   }
+               } else {
+                   /*default is octal*/
+                   sprintf(buf+at, "\\%03o", (unsigned char)c);
+                   at += strlen(buf+at);
+               }
+               break;
+           }
+       }
+
+       buf[at] = '\0';
+       if (!strcmp(fmt, "b16") || !strcmp(fmt, "b8") || !strcmp(fmt, "b2"))
+           out_puts(f, buf);
+       else
+           out_printf(f, fmt, buf);
+    }
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    str_print
+ *
+ * Purpose:     Prints a string to the specified file.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-02
+ *              Uses the $fmt_string format.
+ *
+ *              Robb Matzke, 2000-10-23
+ *              Looks at $obase
+ *-------------------------------------------------------------------------
+ */
+static void
+str_print(obj_t _self, out_t *f)
+{
+    obj_str_t   *self = MYCLASS(_self);
+    char         *fmt;
+    int         obase = sym_bi_true("obase");
+
+    if (16==obase) {
+        fmt = safe_strdup("b16");
+    } else if (8==obase) {
+        fmt = safe_strdup("b8");
+    } else if (2==obase) {
+        fmt = safe_strdup("b2");
+    } else {
+        fmt =  sym_bi_gets("fmt_string");
+    }
+   
+    if (fmt && *fmt) {
+        str_doprnt (f, fmt, self->s);
+        free(fmt);
+    } else {
+        out_putw(f, self->s);
+    }
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_name
+ *
+ * Purpose:     Returns a pointer to the string value.
+ *
+ * Return:      Success:        Ptr to string.
+ *
+ *              Failure:        Never fails.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+str_name (obj_t _self) {
+
+   return MYCLASS(_self)->s;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    str_diff
+ *
+ * Purpose:     Compares two strings and reports differences.
+ *
+ * Return:      Success:        0:      same
+ *                              2:      different
+ *
+ *              Failure:        -1
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb 18 1997
+ *
+ * Modifications:
+ *              Robb Matzke, 2000-06-27
+ *              Supports 2-column diff output style.
+ *-------------------------------------------------------------------------
+ */
+static int
+str_diff (obj_t _a, obj_t _b)
+{
+    obj_str_t   *a = MYCLASS(_a);
+    obj_str_t   *b = MYCLASS(_b);
+    out_t       *f = OUT_STDOUT;
+    int         status = strcmp(a->s, b->s) ? 2 : 0;
+
+    switch (DiffOpt.report) {
+    case DIFF_REP_ALL:
+        if (DiffOpt.two_column) {
+            obj_print(_a, f);
+            out_column(f, OUT_COL2, DIFF_SEPARATOR);
+            obj_print(_b, f);
+            out_nl(f);
+            status = 1;
+        }
+        break;
+    case DIFF_REP_BRIEF:
+    case DIFF_REP_SUMMARY:
+        break;
+    }
+    return status;
+}
diff --git a/tools/browser/switch.c b/tools/browser/switch.c
new file mode 100644
index 0000000..2cc1afe
--- /dev/null
+++ b/tools/browser/switch.c
@@ -0,0 +1,657 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             switch.c
+ *                      2000-05-31
+ *                      Robb Matzke <matzke at llnl.gov>
+ *
+ * Purpose:             Parse browser command-line switches.
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+#include <browser.h>
+
+static switch_t *switch_latest;
+static char *switch_synopsis(switch_t *sw, char *buffer);
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Create a new empty switch list.
+ *
+ * Return:      Pointer to new switch list object.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+switches_t *
+switch_new(void)
+{
+    return calloc(1, sizeof(switches_t));
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Add a new switch to the switch list or modify an existing
+ *              switch.
+ *
+ * Return:      The switch added or modified.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+switch_t *
+switch_add(switches_t *switches, const char *short_name, const char *long_name,
+           const char *arg_spec, switch_handler_t handler)
+{
+    switch_t    *found = switch_find(switches, short_name);
+
+    if (!found) found = switch_find(switches, long_name);
+    if (found) {
+        if (found->short_name) free(found->short_name);
+        if (found->long_name) free(found->long_name);
+        if (found->arg_spec) free(found->arg_spec);
+        if (found->doc_string) free(found->doc_string);
+    } else {
+        if (switches->nused+1>=switches->nalloc) {
+            switches->nalloc = MAX(100, 2*switches->nalloc);
+            switches->sw = realloc(switches->sw,
+                                   switches->nalloc*sizeof(switch_t));
+        }
+        found = switches->sw + switches->nused++;
+    }
+    
+    memset(found, 0, sizeof(switch_t));
+    found->all = switches;
+    found->short_name = safe_strdup(short_name);
+    found->long_name = safe_strdup(long_name);
+    found->arg_spec = safe_strdup(arg_spec);
+    found->handler = handler;
+    switch_latest = found;
+    return found;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Registers a caller-defined pointer with the switch.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+switch_info(switch_t *sw, void *info)
+{
+    if (!sw) sw = switch_latest;
+    sw->info = info;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Register a documentation string with the switch.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+switch_doc(switch_t *sw, const char *doc_string)
+{
+    char        *fulldoc = malloc(8192);
+
+    /* Set switch info */
+    if (!sw) sw = switch_latest;
+    if (sw->doc_string) free(sw->doc_string);
+    sw->doc_string = safe_strdup(doc_string);
+
+    /* Build browser documentation string */
+    switch_synopsis(sw, fulldoc);
+    strcat(fulldoc, "\n");
+    strcat(fulldoc, doc_string);
+
+    /* Assign browser documentation string to symbols */
+    if (sw->short_name) {
+        obj_t symbol = obj_new(C_SYM, sw->short_name);
+        obj_t docstr = obj_new(C_STR, fulldoc);
+        sym_dbind(symbol, docstr);
+        obj_dest(symbol);
+    }
+    if (sw->long_name) {
+        obj_t symbol = obj_new(C_SYM, sw->long_name);
+        obj_t docstr = obj_new(C_STR, fulldoc);
+        sym_dbind(symbol, docstr);
+        obj_dest(symbol);
+    }
+    free(fulldoc);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Find a switch in a switch list. The name should include the
+ *              leading hyphens.
+ *
+ * Return:      The switch found, or NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+switch_t *
+switch_find(switches_t *switches, const char *name)
+{
+    int         i;
+
+    if (name && '-'==name[0] && '-'==name[1]) {
+        for (i=0; i<switches->nused; i++) {
+            if (switches->sw[i].long_name &&
+                !strcmp(switches->sw[i].long_name, name)) {
+                return switches->sw+i;
+            }
+        }
+    } else if (name && '-'==name[0]) {
+        for (i=0; i<switches->nused; i++) {
+            if (switches->sw[i].short_name &&
+                !strcmp(switches->sw[i].short_name, name)) {
+                return switches->sw+i;
+            }
+        }
+    } else {
+        for (i=0; i<switches->nused; i++) {
+            if (!switches->sw[i].short_name &&
+                !switches->sw[i].long_name) {
+                return switches->sw+i;
+            }
+        }
+    }
+    return NULL;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Render into a string a one-line description of a switch.
+ *
+ * Return:      The result buffer.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June  6, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static char *
+switch_synopsis(switch_t *sw, char *buffer)
+{
+    int         type, required;
+    char        name[32];
+    
+    switch_arg(sw, &type, sizeof name, name, &required, NULL);
+    buffer[0] = '\0';
+        
+    /* Short */
+    if (sw->short_name) {
+        strcat(buffer, sw->short_name);
+        if (type) {
+            strcat(buffer, " ");
+            if (!required) strcat(buffer, "[");
+            strcat(buffer, name);
+            if (!required) strcat(buffer, "]");
+        }
+    }
+
+    /* Long */
+    if (sw->long_name) {
+        if (buffer[0]) strcat(buffer, ", ");
+        strcat(buffer, sw->long_name);
+        if (type) {
+            if (!required) strcat(buffer, "[");
+            strcat(buffer, "=");
+            strcat(buffer, name);
+            if (!required) strcat(buffer, "]");
+        }
+    }
+    return buffer;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Prints a usage message to the standard error stream.  If
+ *              SNAME is non-null then print only usage information for
+ *              that particular switch, otherwise print full usage
+ *              information.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+switch_usage(switches_t *switches, const char *arg0, const char *sname)
+{
+    int         i;
+    char        synopsis[256];
+
+    /* Base name of executable */
+    const char  *base = strrchr(arg0, '/');
+    base = base ? base+1 : arg0;
+
+    if (!sname) {
+        sprintf(synopsis, "usage: %s [SWITCHES] [--] [FILES]", base);
+        out_line(OUT_STDERR, synopsis);
+        out_line(OUT_STDERR, "  Where SWITCHES are:");
+    }
+
+    for (i=0; i<switches->nused; i++) {
+        switch_t *sw = switches->sw+i;
+        if (sname &&
+            (!sw->short_name || strcmp(sw->short_name, sname)) &&
+            (!sw->long_name || strcmp(sw->long_name, sname))) {
+            continue;
+        }
+        out_line(OUT_STDERR, switch_synopsis(sw, synopsis));
+        out_putw(OUT_STDERR, sw->doc_string);
+        out_nl(OUT_STDERR);
+    }
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Return information about the argument of a switch. The
+ *              TYPE is a single character (g=floating point, s=string,
+ *              d=integer, u=unsigned integer, b=boolean). The NAME will
+ *              be initialized with the first NAME_SIZE characters of the
+ *              name of the argument (one is created if none specified).
+ *              The NAME will be the empty string if no argument is
+ *              allowed for the switch. REQUIRED will be set to zero if
+ *              the argument is optional and non-zero otherwise. The DFLT
+ *              will be set to point to the default argument value if the
+ *              argument is optional.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June  1, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+switch_arg(switch_t *sw, int *type, size_t name_size, char *name,
+           int *required, const char **dflt)
+{
+    const char  *s = sw->arg_spec, *eq;
+    char        local_type;
+    size_t      len;
+
+    /* Initialize return values */
+    if (type) *type = '\0';
+    if (name_size && name) name[0] = '\0';
+    if (required) *required = 0;
+    if (dflt) *dflt = NULL;
+
+    /* Return immediately if no argument is allowed. */
+    if (!s || !*s) return;
+
+    /* The type letter is always first */
+    if (type) *type = *s;
+    local_type = *s++;
+
+    /* The name is always preceeded by a colon. If the colon is missing
+     * then generate some generic name */
+    if (':'==*s) {
+        s++;
+        if ((eq=strchr(s, '='))) {
+            len = eq-s;
+        } else {
+            len = strlen(s);
+        }
+        if (name_size && name) {
+            strncpy(name, s, MIN(name_size, len));
+            name[MIN(name_size-1,len)] = '\0';
+        }
+        s += len;
+    } else if (name_size && name) {
+        switch (local_type) {
+        case 'g':
+            strncpy(name, "NUMBER", name_size);
+            break;
+        case 'd':
+        case 'u':
+            strncpy(name, "INTEGER", name_size);
+            break;
+        case 's':
+            strncpy(name, "STRING", name_size);
+            break;
+        case 'b':
+            strncpy(name, "BOOLEAN", name_size);
+            break;
+        default:
+            name[0] = local_type;
+            break;
+        }
+        name[name_size-1] = '\0';
+    }
+
+    /* If an equal sign is next then the argument is optional and might
+     * have some default value. */
+    if ('='==*s) {
+        s++;
+        if (dflt) *dflt = s;
+    } else {
+        *required = true;
+    }
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Default error printing function
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+static void
+switch_error(const char *fmt, ...)
+{
+    va_list     ap;
+    va_start(ap, fmt);
+    vfprintf(stderr, fmt, ap);
+    fprintf(stderr, "\n");
+    va_end(ap);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     This function gets called to parse the switch value based
+ *              on the switch's arg spec. If RELAX is non-zero then an
+ *              error is treated as if the argument is not present.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June  1, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+int
+switch_parse_arg(switch_t *sw, const char *argv, const char *value,
+                 int relax, void(*error)(const char*, ...))
+{
+    int         i, type, required, d, retval=0;
+    char        *rest;
+    const char  *tmp;
+    double      g;
+    const char  *sw_name = sw->long_name?sw->long_name:sw->short_name;
+    const char  *dflt=NULL;
+    
+    switch_arg(sw, &type, 0, NULL, &required, &dflt);
+    if (required && !value) {
+        (error)("switch `%s' requires an argument", sw_name);
+        return -1;
+    }
+
+    switch (type) {
+    case 0:
+         /* no argument possible */
+        return 0;
+        
+    case 'g':
+        /* floating-point argument */
+        for (i=0; i<2; i++) {
+            if (NULL==(tmp=i?dflt:value) || !*tmp) continue;
+            g = strtod(tmp, &rest);
+            if (rest && *rest) {
+                if (!relax) {
+                    (error)("switch `%s' should have a floating-point "
+                            "argument", sw_name);
+                    return -1;
+                }
+            } else {
+                sw->lexeme = tmp;
+                sw->value.g = g;
+                retval = i?0:1;
+                break;
+            }
+        }
+        break;
+        
+    case 'd':
+        /* integer argument */
+        for (i=0; i<2; i++) {
+            if (NULL==(tmp=i?dflt:value) || !*tmp) continue;
+            d = strtol(tmp, &rest, 0);
+            if (rest && *rest) {
+                if (!relax) {
+                    (error)("switch `%s' should have an integer argument",
+                            sw_name);
+                    return -1;
+                }
+            } else {
+                sw->lexeme = tmp;
+                sw->value.d = d;
+                retval = i?0:1;
+                break;
+            }
+        }
+        break;
+
+    case 'u':
+        /* unsigned integer argument */
+        for (i=0; i<2; i++) {
+            if (NULL==(tmp=i?dflt:value) || !*tmp) continue;
+            d = strtol(tmp, &rest, 0);
+            if ((rest && *rest) || d<0) {
+                if (!relax) {
+                    (error)("switch `%s' should have a non-negative integer "
+                            "argument", sw_name);
+                    return -1;
+                }
+            } else {
+                sw->lexeme = tmp;
+                sw->value.d = d;
+                retval = i?0:1;
+                break;
+            }
+        }
+        break;
+
+    case 's':
+        /* string argument */
+        for (i=0; i<2; i++) {
+            if (NULL==(tmp=i?dflt:value)) continue; /*empty string okay*/
+            sw->lexeme = tmp;
+            sw->value.s = tmp;
+            retval = i?0:1;
+            break;
+        }
+        break;
+
+    case 'b':
+        /* boolean */
+        for (i=0; i<2; i++) {
+            if (NULL==(tmp=i?dflt:value)) continue; /*empty string okay*/
+            if (!tmp[0] ||
+                !strcmp(tmp, "f") ||
+                !strcmp(tmp, "false") ||
+                !strcmp(tmp, "n") ||
+                !strcmp(tmp, "no")) {
+                sw->lexeme = tmp;
+                sw->value.d = 0;
+                retval = i?0:1;
+                break;
+            } else if (!strcmp(tmp, "t") ||
+                       !strcmp(tmp, "true") ||
+                       !strcmp(tmp, "y") ||
+                       !strcmp(tmp, "yes")) {
+                sw->lexeme = tmp;
+                sw->value.d = 1;
+                retval = i?0:1;
+                break;
+            } else {
+                d = strtol(tmp, &rest, 0);
+                if (!rest || !*rest) {
+                    sw->lexeme = tmp;
+                    sw->value.d = d;
+                    retval = i?0:1;
+                    break;
+                } else if (!relax) {
+                    (error)("switch `%s' should have a Boolean argument",
+                            sw_name);
+                    return -1;
+                }
+            }
+        }
+        break;
+
+    default:
+        abort();
+    }
+    return retval;
+}
+
+/*---------------------------------------------------------------------------
+ * Audience:    Public
+ * Purpose:     Parse command-line switches
+ *
+ * Return:      Number of arguments parsed or negative on error.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, May 31, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+int
+switch_parse(switches_t *switches, int argc, char *argv[],
+             void(*error)(const char*, ...))
+{
+    int         i, status;
+    switch_t    *dflt = switch_find(switches, NULL);
+
+    /* Error handling */
+    if (!error) error = switch_error;
+
+    /* Parse switches */
+    for (i=1; i<argc; i++) {
+        switch_t        *found  = NULL;
+        const char      *option = NULL;
+
+        if (!strcmp(argv[i], "--")) {
+            return i+1; /*last argument*/
+            
+        } else if ('-'==argv[i][0] && '-'==argv[i][1]) {
+            /* Long arguments */
+            const char  *eq = strchr(argv[i], '=');
+            size_t      namelen = eq ? eq-argv[i] : strlen(argv[i]);
+            char        name[1024];
+
+            strncpy(name, argv[i], namelen);
+            name[namelen] = '\0';
+            option = eq ? eq+1 : NULL;
+            found = switch_find(switches, name);
+            if (!found) found = dflt;
+            if (!found) {
+                (error)("unknown switch `%s'", argv[i]);
+                return -1;
+            }
+            status = switch_parse_arg(found, argv[i], option, false, error);
+            if (status<0) return -1;
+            if (found->handler) {
+                (found->handler)(found, argv[i], option);
+            }
+            found->seen++;
+            
+        } else if ('-'==argv[i][0] && argv[i][1]) {
+            /* Single-letter switches */
+            const char  *s;
+
+            for (s=argv[i]+1; *s; s++) {
+                char tmp[3];
+                sprintf(tmp, "-%c", *s);
+                found = switch_find(switches, tmp);
+                if (!found) found = dflt;
+                if (!found) {
+                    (error)("unknown switch `%s'", tmp);
+                    return -1;
+                }
+                option = s[1] ? s+1 : (i+1<argc ? argv[i+1] : NULL);
+                status = switch_parse_arg(found, tmp, option, true, error);
+                if (status<0) return -1;
+                if (found->handler) {
+                    (found->handler)(found, tmp, option);
+                }
+                found->seen++;
+                if (status) {
+                    if (s[1]) while (s[1]) s++;
+                    else i++;
+                    break;
+                }
+            }
+            
+        } else {
+            /* Default */
+            found = dflt;
+            if (!found) return i; /*not a switch*/
+            status = switch_parse_arg(found, argv[i], NULL, false, error);
+            if (status<0) return -1;
+            if (found->handler) {
+                (found->handler)(found, argv[i], NULL);
+            }
+            found->seen++;
+        }
+    }
+    return argc;
+}
diff --git a/tools/browser/sym.c b/tools/browser/sym.c
new file mode 100644
index 0000000..8e74baf
--- /dev/null
+++ b/tools/browser/sym.c
@@ -0,0 +1,1098 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Created:             sym.c
+ *                      Dec  4 1996
+ *                      Robb Matzke <matzke at viper.llnl.gov>
+ *
+ * Purpose:             Symbol table functions.
+ *
+ * Modifications:       
+ *
+ *   Hank Childs, Thu Nov  1 08:49:23 PST 2001
+ *   Include float.h for linux systems that don't have DBL_DIG in math.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#include <assert.h>
+#include <browser.h>
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+
+#define NSYMS           1024
+#define MYCLASS(X)      ((obj_sym_t*)(X))
+
+
+typedef struct sym_t {
+    char        *name;                  /*symbol name                   */
+    obj_t       doc;                    /*documentation string          */
+    obj_t       var;                    /*value as a variable           */
+    obj_t       func;                   /*functional value              */
+} sym_t;                                /*symbol table entry            */
+
+typedef struct obj_sym_t {
+   obj_pub_t    pub;
+   sym_t        *sym;
+} obj_sym_t;
+
+
+class_t         C_SYM;
+static int      NSymbols;               /*symbol slots allocated        */
+static sym_t    *Symbol;                /*symbol table                  */
+
+static obj_t    sym_new (va_list);
+static void     sym_print (obj_t, out_t*);
+static obj_t    sym_eval (obj_t);
+static obj_t    sym_feval (obj_t);
+static char *   sym_name (obj_t);
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_class
+ *
+ * Purpose:     Initializes the SYM class.
+ *
+ * Return:      Success:        Ptr to the SYM class.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+class_t
+sym_class (void) {
+
+   class_t      cls = calloc (1, sizeof(*cls));
+
+   cls->name = safe_strdup ("SYM");
+   cls->new = sym_new;
+   cls->dest = NULL;
+   cls->copy = NULL;
+   cls->print = sym_print;
+   cls->eval = sym_eval;
+   cls->feval = sym_feval;
+   cls->objname = sym_name;
+   return cls;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_new
+ *
+ * Purpose:     Creates a new symbol object with the specified name.
+ *
+ * Return:      Success:        Ptr to the new object.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *    Lisa J. Roberts, Mon Nov 22 17:27:53 PST 1999
+ *    I changed strdup to safe_strdup.
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sym_new (va_list ap) {
+
+   obj_sym_t    *self;
+   int          i, unused;
+   char         *name;
+   sym_t        *sym=NULL;
+
+   name = va_arg (ap, char*);
+   assert (name);
+
+   for (i=0,unused=(-1); i<NSymbols; i++) {
+      if (NULL==Symbol[i].name) {
+         if (unused<0) unused = i;
+      } else if (!strcmp(Symbol[i].name, name)) {
+         sym = Symbol+i;
+         break;
+      }
+   }
+
+   if (!sym && unused<0) {
+      if (!Symbol) {
+         NSymbols = 1024;
+         Symbol = calloc (NSymbols, sizeof(sym_t));
+         unused = 0;
+      } else {
+         Symbol = realloc (Symbol, (NSymbols+1024) * sizeof(sym_t));
+         memset (Symbol+NSymbols, 0, 1024*sizeof(sym_t));
+         unused = NSymbols;
+         NSymbols += 1024;
+      }
+   }
+
+   if (!sym) {
+      sym = Symbol + unused;
+      sym->name = safe_strdup (name);
+   }
+
+   self = calloc (1, sizeof(obj_sym_t));
+   self->sym = sym;
+   return (obj_t)self;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_print
+ *
+ * Purpose:     Prints a symbol to the specified file.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+sym_print (obj_t _self, out_t *f) {
+
+   out_puts (f, MYCLASS(_self)->sym->name);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_eval
+ *
+ * Purpose:     Returns the variable value of a symbol if it has one.
+ *
+ * Return:      Success:        Ptr to a copy of the variable value.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *      Robb Matzke, 4 Feb 1997
+ *      Fixed the arguments for the obj_deref() call.
+ *
+ *      Robb Matzke, 2000-07-03
+ *      The symbol `$*' evaluates to a list of all $N files for
+ *      consecutive N beginning at 1.
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sym_eval (obj_t _self)
+{
+    obj_t       name_1=NIL, file_1=NIL, retval=NIL;
+    obj_sym_t   *self = MYCLASS(_self);
+
+    /* If the symbol has a variable value then return it. */    
+    if (MYCLASS(_self)->sym->var) {
+        return obj_copy (MYCLASS(_self)->sym->var, SHALLOW);
+    }
+
+    /* The symbol `$*' evaluates to a list of the first consecutive files
+     * bound to the $N symbols. */
+    if (!strcmp(self->sym->name, "$*")) {
+        obj_t   opands[1024], retval;
+        int     nopands, i;
+        
+        for (nopands=0; nopands<NELMTS(opands); nopands++) {
+            obj_t symbol;
+            char tmp[32];
+            sprintf(tmp, "$%d", nopands+1);
+            symbol = obj_new(C_SYM, tmp);
+            opands[nopands] = sym_vboundp(symbol);
+            obj_dest(symbol);
+            if (!opands[nopands] || C_FILE!=opands[nopands]->pub.cls) {
+                /* We reached the last file or something isn't a file */
+                obj_dest(opands[nopands]);
+                break;
+            }
+        }
+        retval = V_make_list(nopands, opands);
+        for (i=0; i<nopands; i++) {
+            obj_dest(opands[i]);
+        }
+        return retval;
+    }
+
+    /* If the symbol exists in the first data file, then return
+     * that SDO. */
+    name_1 = obj_new (C_SYM, "$1");
+    file_1 = MYCLASS(name_1)->sym->var;
+    name_1 = obj_dest (name_1);
+
+    if (file_1 && C_FILE==file_1->pub.cls) {
+        retval = obj_deref (file_1, 1, &_self);
+        return retval;
+    }
+
+    /* Symbol has no value. */    
+    out_errorn ("eval: variable `%s' has no value", obj_name(_self));
+    return NIL;
+}
+   
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_feval
+ *
+ * Purpose:     Evaluates a symbol to obtain a function of some sort.
+ *
+ * Return:      Success:        Ptr to a copy of the function associated
+ *                              with the specified symbol.
+ *
+ *              Failure:        
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static obj_t
+sym_feval (obj_t _self) {
+
+   return obj_copy (MYCLASS(_self)->sym->func, SHALLOW);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_name
+ *
+ * Purpose:     Returns a pointer to the symbol name.
+ *
+ * Return:      Success:        Ptr to sym name.
+ *
+ *              Failure:        NULL
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static char *
+sym_name (obj_t _self) {
+
+   obj_sym_t    *self = MYCLASS(_self);
+
+   if (!self || C_SYM!=self->pub.cls) return NULL;
+   return self->sym->name;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_fbind
+ *
+ * Purpose:     Binds a function to a symbol.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+sym_fbind (obj_t _self, obj_t func) {
+
+   obj_sym_t    *self = MYCLASS(_self);
+
+   if (self->sym->func) obj_dest (self->sym->func);
+   self->sym->func = func;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_fboundp
+ *
+ * Purpose:     Determines if the specified object is a symbol with a
+ *              functional value.
+ *
+ * Return:      Success:        Ptr to a copy of the functional value.
+ *
+ *              Failure:        NIL if the SELF is not a symbol or is a
+ *                              symbol with no functional value.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sym_fboundp (obj_t _self) {
+
+   obj_sym_t    *self = MYCLASS(_self);
+
+   if (self && C_SYM==self->pub.cls && self->sym->func) {
+      return obj_copy (self->sym->func, SHALLOW);
+   }
+   return NIL;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_vbind
+ *
+ * Purpose:     Binds a value to a symbol w/o copying the value.  Any
+ *              previous value is destroyed.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  4 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+sym_vbind (obj_t _self, obj_t value) {
+
+   obj_sym_t    *self = MYCLASS(_self);
+
+   if (self->sym->var) obj_dest (self->sym->var);
+   self->sym->var = value;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_vboundp
+ *
+ * Purpose:     Determines if the specified object is a symbol with a
+ *              variable value.
+ *
+ * Return:      Success:        A copy of the symbol's value as a variable.
+ *
+ *              Failure:        NIL if the SELF is not a symbol or is a
+ *                              symbol without a value as a variable.
+ *
+ * Programmer:  Robb Matzke
+ *              matzke at viper.llnl.gov
+ *              Dec  5 1996
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sym_vboundp(obj_t _self)
+{
+    obj_sym_t   *self = MYCLASS(_self);
+
+    if (!self || C_SYM!=self->pub.cls) return NIL;
+    return obj_copy (self->sym->var, SHALLOW);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Binds a documentation value to a symbol w/o copying the
+ *              value. Any previous documentation is destroyed.
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, June  2, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+sym_dbind(obj_t _self, obj_t value)
+{
+    obj_sym_t   *self = MYCLASS(_self);
+    assert(C_SYM==self->pub.cls);
+    if (self->sym->doc) obj_dest(self->sym->doc);
+    self->sym->doc = value;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Determines if the specified symbol has a documentation value.
+ *
+ * Return:      A copy of the symbol's documentation value, or NIL if the
+ *              symbol is not documented.
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, June  2, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+obj_t
+sym_dboundp(obj_t _self)
+{
+    obj_sym_t   *self = MYCLASS(_self);
+    if (self && C_SYM==self->pub.cls) return obj_copy(self->sym->doc, SHALLOW);
+    return NIL;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Convenience function for setting the documentation string
+ *              of some symbol.
+ *
+ * Programmer:  Robb Matzke
+ *              Tuesday, June  6, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+sym_doc(const char *symname, const char *docstr)
+{
+    obj_t       sym = obj_new(C_SYM, symname);
+
+    if (docstr) {
+        obj_t doc = obj_new(C_STR, docstr);
+        sym_dbind(sym, doc);
+    } else {
+        sym_dbind(sym, NIL);
+    }
+    obj_dest(sym);
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_self_set
+ *
+ * Purpose:     Gives symbol `self' a new variable value and returns the
+ *              previous value.  The new value is not copied.
+ *
+ * Return:      Success:        Previous value of variable `self'.
+ *
+ *              Failure:        NIL
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 13 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+obj_t
+sym_self_set (obj_t newval) {
+
+   obj_t        oldval=NIL, selfvar=NIL;
+
+   selfvar = obj_new (C_SYM, "self");
+   oldval = sym_vboundp (selfvar);
+   sym_vbind (selfvar, newval);
+   return oldval;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Set a builtin symbol to the specified value. If VALUE
+ *              looks like a number then it is treated as such, otherwise
+ *              the symbol is assigned a string value.
+ *
+ *              If NAME does not begin with the standard prefix used for
+ *              builtin variables then it will be automatically added.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June  1, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+void
+sym_bi_set(const char *name, const char *value, const char *desc,
+           const char *doc)
+{
+    char        fullname[1024], *rest;
+    obj_t       symbol;
+
+    /* Add built-in prefix */
+    if (*name!='$') {
+        fullname[0] = '$';
+        strcpy(fullname+1, name);
+        name = fullname;
+    }
+    symbol = obj_new(C_SYM, name);
+
+    /* Does value look like a number or a string? */
+    if (!value || !*value) {
+        sym_vbind(symbol, NIL);
+    } else {
+        strtod(value, &rest);
+        if (rest && *rest) {
+            sym_vbind(symbol, obj_new(C_STR, value));
+        } else {
+            sym_vbind(symbol, obj_new(C_NUM, value));
+        }
+    }
+
+    /* Description for var table of contents */
+    if (desc) {
+        HelpVarToc[NHelpVarToc].name = safe_strdup(name);
+        HelpVarToc[NHelpVarToc].desc = safe_strdup(desc);
+        NHelpVarToc++;
+    }
+    
+    /* The documentation string */
+    if (doc) sym_dbind(symbol, obj_new(C_STR, doc));
+    obj_dest(symbol);
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Return the string value of a builtin symbol.
+ *
+ * Return:      Copy of the string value or NULL
+ *
+ * Programmer:  Robb Matzke
+ *              Friday, June  2, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+char *
+sym_bi_gets(const char *name)
+{
+    char        fullname[1024], *retval;
+    obj_t       var, val;
+
+    /* Add built-in prefix */
+    if (*name!='$') {
+        fullname[0] = '$';
+        strcpy(fullname+1, name);
+        name = fullname;
+    }
+
+    var = obj_new(C_SYM, name);
+    val = sym_vboundp(var);
+    var = obj_dest(var);
+
+    retval = safe_strdup(obj_name(val));
+    obj_dest(val);
+    return retval;
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Returns the integer value of a built-in symbol. If the
+ *              symbol is set to something not an integer then return 1.
+ *
+ * Programmer:  Robb Matzke
+ *              Thursday, June  1, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+int
+sym_bi_true(const char *name)
+{
+    char        fullname[1024];
+    int         retval;
+    obj_t       var_name, val;
+
+    /* Add built-in prefix */
+    if (*name!='$') {
+        fullname[0] = '$';
+        strcpy(fullname+1, name);
+        name = fullname;
+    }
+
+    /* Get value */
+    var_name = obj_new(C_SYM, name);
+    val = sym_vboundp(var_name);
+    var_name = obj_dest(var_name);
+    if (num_isint(val)) retval = num_int(val);
+    else retval = val ? 1 : 0;
+    val = obj_dest (val);
+    return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_truth
+ *
+ * Purpose:     Returns true if the symbol has a variable value which
+ *              is true.
+ *
+ * Return:      Success:        true
+ *
+ *              Failure:        false
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Feb  7 1997
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+sym_truth (char *name) {
+
+   obj_sym_t    *self=NULL;
+   int          retval;
+
+   if (!name || !*name) return false;
+   self = (obj_sym_t *)obj_new (C_SYM, name);
+   retval = obj_truth (self->sym->var);
+   obj_dest ((obj_t)self);
+   return retval;
+}
+
+

+/*-------------------------------------------------------------------------
+ * Function:    sym_init
+ *
+ * Purpose:     Initializes browser variables.
+ *
+ * Return:      void
+ *
+ * Programmer:  Robb Matzke
+ *              robb at maya.nuance.mdn.com
+ *              Jan 20 1997
+ *
+ * Modifications:
+ *
+ *      Robb Matzke, 3 Feb 1997
+ *      Removed the C_print_DBobject symbol.
+ *
+ *      Robb Matzke, 2 Apr 1997
+ *      Added the `$rdonly' variable.
+ *
+ *      Robb Matzke, 11 Jun 1997
+ *      Added the `doc_url' variable.
+ *
+ *      Robb Matzke, 29 Jul 1997
+ *      Added the `html_browsers' and `$trapfpe' symbols.
+ *
+ *      Robb Matzke, 2 Sep 1997
+ *      Added symbols for the new `int8' datatype.
+ *
+ *      Robb Matzke, 2000-06-01
+ *      Calls sym_bi_set() for numbers and strings. Added documentation.
+ *
+ *      Robb Matzke, 2000-06-02
+ *      Removed initialization of $truncate; added $height and $width.
+ *
+ *      Robb Matzke, 2000-06-27
+ *      The $fmt_float and $fmt_double formats are based on FLT_DIG and
+ *      DBL_DIG, which according to POSIX are `the number of decimal
+ *      digits in the fraction'.
+ *
+ *      Robb Matzke, 2000-06-27
+ *      Added the `$exclude' variable.
+ *
+ *      Robb Matzke, 2000-10-19
+ *      Added the `$obase' variable.
+ *
+ *      Mark C. Miller, Wed Sep 23 11:53:59 PDT 2009
+ *      Added $fmt_llong for long long data.
+ *
+ *      Mark C. Miller, Wed Nov 11 22:18:17 PST 2009
+ *      Added suppot for alternate relative diff option using epsilon.
+ *
+ *      Mark C. Miller, Fri Nov 13 15:38:07 PST 2009
+ *      Changed name of "long long" type to "longlong" as PDB is sensitive
+ *
+ *      Mark C. Miller, Tue Nov 17 22:30:30 PST 2009
+ *      Changed name of long long datatype to match PDB proper.
+ *
+ *      Mark C. Miller, Tue Dec 15 10:14:32 PST 2009
+ *      Fixed problem with default format for long type being '%d'. It
+ *      should really be '%ld'
+ *
+ *      Mark C. Miller, Mon Jan 11 16:14:51 PST 2010
+ *      Fixed default formats for int8, short and long long. Added
+ *      initialization of diffing parameters for long long.
+ *
+ *      Mark C. Miller, Fri Feb 12 08:41:39 PST 2010
+ *      Added $splitvfdexts variable.
+ *
+ *      Mark C. Miller, Fri Mar 12 01:23:15 PST 2010
+ *      Replaced splitvfdexts with $hdf5_vfd_opts
+ *-------------------------------------------------------------------------
+ */
+void
+sym_init (void)
+{
+   obj_t        name=NIL;
+   char         tmp[64];
+   obj_t        list[2], symbol, value;
+   
+   const char *diff_abs = "This variable controls how the `diff' function "
+                          "determines whether two numeric values are the same "
+                          "or different. The `diff' function considers two "
+                          "values, A and B, to be different if |A-B|>N where "
+                          "N is the value of this variable.  If this variable "
+                          "does not have a positive value then this test is "
+                          "not performed (if the relative difference test is "
+                          "also not performed then the browser will use an "
+                          "exact match instead). This variable, which "
+                          "defaults to zero, is set by the -A and "
+                          "--absolute command-line switches.";
+   const char *diff_rel = "This variable controls how the `diff' function "
+                          "determines whether two numeric values are the same "
+                          "or different. The `diff' function considers two "
+                          "values, A and B, to be different if "
+                          "|A-B|/|A+B|>N/2 where N is the value of this "
+                          "variable. If this variable does not have a "
+                          "positive value then this test is not performed (if "
+                          "the absolute difference test is also not performed "
+                          "then the browser will use an exact match instead.) "
+                          "This variable, which defaults to zero, is set by "
+                          "the -R and --relative command-line switches.";
+   const char *diff_eps = "When non-negative, this variable triggers an "
+                          "alternative relative `diff' algorithm where two "
+                          "values, A and B, are different if "
+                          "|A-B|/(|A|+|B|+EPS)>N where EPS is the value of "
+                          "this variable and N is the value of the associated "
+                          "relative difference tolerance variable. This "
+                          "variable, which defaults to -1, is set by the "
+                          "-x and --epsilon command-line switches.";
+
+   /* Command-line options */
+   sym_bi_set("lowlevel",       "0",
+              "Act more like pdbdiff.",
+              "If this variable has any true value (nil, zero, and the empty "
+              "string are considered false) then the browser reads objects as "
+              "type DBobject even if that object has some other datatype such "
+              "as DBquadvar. This variable is set by the --lowlevel and -l "
+              "command-line switches.\n"
+              "\n"
+              "If the value is two or higher then the SILO definition of "
+              "`DBobject is used and the values of the `comp_names' and "
+              "`pdb_names' arrays become part of the object.\n"
+              "\n"
+              "If the value is one or two then the browser translates the "
+              "SILO DBobject structure into a structure which is more "
+              "user friendly by adding additional members to the object "
+              "datatype. Each new member has a name from the `comp_names' "
+              "array and a value based on the corresponding member of the "
+              "`pdb_names' array. Changes should not be made to the "
+              "`comp_names' or `pdb_names' arrays since the SILO DBobject "
+              "is regenerated from the user-friendly fields before being "
+              "saved back to the file.");
+   sym_bi_set("rdonly",         "0",
+              "Open files for read-only access.",
+              "If this variable has any true value (nil, zero, and the empty "
+              "string are considered false) then the browser opens files in "
+              "read-only mode regardless of the file permissions. Editing "
+              "objects in a read-only file is not allowed.");
+   sym_bi_set("diff",           NULL,
+              "Influence behavior of `diff' function.",
+              "This variable controls the details of the `diff' function. It "
+              "should be a list of words from the set: detail, brief, "
+              "summary, ignore_additions, ignore_deletions, and two_column.  "
+              "The word `detail' indicates that all details of the "
+              "differences are to be shown (the default), while `brief' "
+              "means one line of output per difference and `summary' means "
+              "one line of output total. No output is generated if the "
+              "objects do not differ. The words `ignore_additions' and "
+              "`ignore_deletions' mean to consider things which appear in "
+              "object B but not A (or vice versa) as being not-different. "
+              "For detailed output, the word `two_column' causes the diff "
+              "function to display the differences side by side (like "
+              "pdbdiff) instead of one above the other (like Unix diff).");
+   sym_bi_set("exclude",        NULL,
+              "Exclude certain objects from recursive diff.",
+              "The value of this variable should be a list of object names "
+              "which will be excluded from a recursive diff operation. Each "
+              "name should be a string which may contain file name wildcards "
+              "similar to the Bourne Shell. If an exclude name begins with a "
+              "slash then the name is matched against the full name of the "
+              "object, otherwise the matching function only looks at the "
+              "basename of the object.  If the name is of the form `type:X' "
+              "where `X' is one of the headings printed by the `ls' function "
+              "(such as `dir' or `ucdmesh') then all objects of the specified "
+              "type will be excluded. When $verbosity>=2 the excluded "
+              "object names are displayed.");
+   sym_bi_set("checksums",       "0",
+              "Do checksum checks on read when database has checksums.",
+              "If this variable has any true value (nil, zero, and the empty "
+              "string are considered false) then the browser will enable "
+              "checksum checks during subsequent read operations. "
+              "This variable is set by the --checksums and -c "
+              "command-line switches.\n");
+   sym_bi_set("h5vfdopts",       NULL,
+              "Specify hdf5 (vfd) options sets when attempting to open files.",
+              "The value of this variable should be a list of OPTION=VALUE "
+              "strings. The keyword '_NEWSET_' can be used to separate one "
+              "group of OPTION=VALUE strings from another, each group forming "
+              "one set of options to be used to open files. Browser will try "
+              "Them in order when attempting to open a file.\n"); 
+
+   /* Name of public init file */
+   sym_bi_set("pubinit", PUBLIC_INIT_FILE,
+              "Name of public initialization file.",
+              "The name of the public initialization file is stored in this "
+              "variable regardless of whether that file has actually been "
+              "read. Its primary purpose is to be used as the argument to "
+              "the `include' function in a user-local startup file.");
+   
+   /* Set $diff to something reasonable */
+   list[0] = obj_new(C_SYM, "detail");
+   list[1] = obj_new(C_SYM, "two_column");
+   value = V_make_list(2, list);
+   obj_dest(list[0]);
+   obj_dest(list[1]);
+   symbol = obj_new(C_SYM, "$diff");
+   sym_vbind(symbol, value);
+   value = NIL;
+   symbol = obj_dest(symbol);
+
+   sprintf(tmp, "%d", OUT_NROWS);
+   sym_bi_set("height",         tmp,
+              "Lines per page of output.",
+              "The height of the output terminal in lines. If set to a "
+              "positive value then the browser will pause after each "
+              "screenful of interactive output (redirected output is "
+              "unaffected by this setting). This variable is set by the "
+              "--height command-line switch and is reset whenever the "
+              "browser receives a window size change signal (SIGWINCH).");
+   sprintf(tmp, "%d", OUT_NCOLS);
+   sym_bi_set("width",          tmp,
+              "Characters per line of output.",
+              "The width of the output terminal in characters. The browser "
+              "will try not to print data which would wrap from one line to "
+              "the next. This variable is set by the --width command-line "
+              "switch and is reset whenever the browser receives a window "
+              "size change signal (SIGWINCH).");
+   sym_bi_set("verbosity",      "1",
+              "How much chatter is produced by the browser.",
+              "This variable is set by the --quiet and --verbose switches. "
+              "The --quiet sets it to zero while --verbose sets it to two "
+              "(the default is one). Changing its value at runtime changes "
+              "the amount of chatter produced by the browser.");
+
+   /* Documentation category defaults */
+   sym_doc("delta",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("faq",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("syntax",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("formats",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("paging",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("redirection",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("traps",
+           "Documentation is initialized in the browser system startup file.");
+   sym_doc("run", NULL); /*do not document this -- it's special in V_help()*/
+
+   /* Variables for formatting output */
+   sym_bi_set("truncate",       NULL,           "Max elmts to print",
+              "If this is set to a positive integer N then at most N "
+              "elements of each array are displayed. Depending on the "
+              "value of $trailing, some of those elements will come from "
+              "the beginning of the array and others will come from the "
+              "end. The browser prints `...(2000 values omitted)...' at "
+              "the point where the values are omitted. Truncation is "
+              "disabled (all values are printed) by setting this variable "
+              "to nil (its default).");
+   sym_bi_set("trailing",       "0",            "Trailing elmts to print",
+              "If array output truncation is turned on (see $truncate) and "
+              "this variable has a positive integer value N, then up to N of "
+              "the displayed values will be taken from the end of the array "
+              "instead of the beginning. If $trailing is smaller than "
+              "$truncate then the difference is the number of elements "
+              "displayed at the beginning of the array; otherwise all "
+              "elements displayed are from the end of the array.");
+   sym_bi_set("fmt_string",     "\"%s\"",       "String format",
+              "This is a C printf() format string used to render string "
+              "values in the browser output.");
+   sym_bi_set("fmt_null",       "(null)",       "Null format",
+              "This is a C printf() format string used to render null "
+              "pointers in the browser output.");
+   sym_bi_set("fmt_int8",       "(int8)%hhd",   "Byte format",
+              "This is a C printf() format string used to render byte "
+              "values in the browser output.");
+   sym_bi_set("fmt_short",      "(short)%hd",   "Short format",
+              "This is a C printf() format string used to render short "
+              "integer values in the browser output.");
+   sym_bi_set("fmt_int",        "%d",           "Integer format",
+              "This is a C printf() format string used to render integer "
+              "values in the browser output.");
+   sym_bi_set("fmt_long",       "(long)%ld",    "Long format",
+              "This is a C printf() format string used to render long "
+              "integer values in the browser output.");
+   sym_bi_set("fmt_long_long",   "(long long)%lld",         "Long long format",
+              "This is a C printf() format string used to render long "
+              "long integer values in the browser output.");
+
+   sprintf(tmp, "%%1.%dg", FLT_DIG);
+   sym_bi_set("fmt_float",      tmp,            "Float format",
+              "This is a C printf() format string used to render `float' "
+              "values in the browser output.");
+   
+   sprintf(tmp, "%%1.%dg", DBL_DIG);
+   sym_bi_set("fmt_double",     tmp,            "Double format",
+              "This is a C printf() format string used to render `double' "
+              "values in the browser output.");
+
+   sym_bi_set("obase", NULL,                    "Output style",
+              "Output of primitive data (integer, character, string, and "
+              "floating-point) uses the $fmt_* variables by default. "
+              "However, it is also possible to display data in hexadecimal, "
+              "octal, or binary format as well by setting this variable "
+              "to 16, 8, or 2 (default is anything else).");
+
+   /* Difference tolerances are all set to zero, eps to -1. */
+   sym_bi_set("diff_int8_abs",  "0", "Absolute diff tolerance for byte", diff_abs);
+   sym_bi_set("diff_int8_rel",  "0", "Relative diff tolerance for byte", diff_rel);
+   sym_bi_set("diff_int8_eps",  "-1", "Epsilon for alternate relative diff for byte", diff_eps);
+   sym_bi_set("diff_short_abs", "0", "Absolute diff tolerance for short", diff_abs);
+   sym_bi_set("diff_short_rel", "0", "Relative diff tolerance for short", diff_rel);
+   sym_bi_set("diff_short_eps", "-1", "Epsilon for alternate relative diff for short", diff_eps);
+   sym_bi_set("diff_int_abs",   "0", "Absolute diff tolerance for int", diff_abs);
+   sym_bi_set("diff_int_rel",   "0", "Relative diff tolerance for int", diff_rel);
+   sym_bi_set("diff_int_eps",   "-1", "Epsilon for alternate relative diff for int", diff_eps);
+   sym_bi_set("diff_long_abs",  "0", "Absolute diff tolerance for long", diff_abs);
+   sym_bi_set("diff_long_rel",  "0", "Relative diff tolerance for long", diff_rel);
+   sym_bi_set("diff_long_eps",  "-1", "Epsilon for alternate relative diff for long", diff_eps);
+   sym_bi_set("diff_float_abs", "0", "Absolute diff tolerance for float", diff_abs);
+   sym_bi_set("diff_float_rel", "0", "Relative diff tolerance for float", diff_rel);
+   sym_bi_set("diff_float_eps", "-1", "Epsilon for alternate relative diff for float", diff_eps);
+   sym_bi_set("diff_double_abs","0", "Absolute diff tolerance for double", diff_abs);
+   sym_bi_set("diff_double_rel","0", "Relative diff tolerance for double", diff_rel);
+   sym_bi_set("diff_double_eps","-1", "Epsilon for alternate relative diff for double", diff_eps);
+   sym_bi_set("diff_llong_abs",  "0", "Absolute diff tolerance for long long", diff_abs);
+   sym_bi_set("diff_llong_rel",  "0", "Relative diff tolerance for long long", diff_rel);
+   sym_bi_set("diff_llong_eps",  "-1", "Epsilon for alternate relative diff for long long", diff_eps);
+   
+   /*
+    * Primitive types.
+    */
+   name = obj_new (C_SYM, "string");
+   sym_vbind (name, obj_new (C_PRIM, "string"));
+   name = obj_dest (name);
+
+   name = obj_new (C_SYM, "int8");
+   sym_vbind (name, obj_new (C_PRIM, "int8"));
+   name = obj_dest (name);
+   
+   name = obj_new (C_SYM, "short");
+   sym_vbind (name, obj_new (C_PRIM, "short"));
+   name = obj_dest (name);
+
+   name = obj_new (C_SYM, "int");
+   sym_vbind (name, obj_new (C_PRIM, "int"));
+   name = obj_dest (name);
+
+   name = obj_new (C_SYM, "long");
+   sym_vbind (name, obj_new (C_PRIM, "long"));
+   name = obj_dest (name);
+
+   name = obj_new (C_SYM, "float");
+   sym_vbind (name, obj_new (C_PRIM, "float"));
+   name = obj_dest (name);
+
+   name = obj_new (C_SYM, "double");
+   sym_vbind (name, obj_new (C_PRIM, "double"));
+   name = obj_dest (name);
+
+   /* File symbols */
+   sym_doc("_1", "Symbols of the form _N are deprecated. Use $N instead.");
+   sym_doc("$1", "Browser variables of the form $N where N is an integer "
+           "are reserved for SILO files that are opened by the browser. "
+           "The files listed on the browser command-line are opened and "
+           "assigned to browser variables $1, $2, etc. Most browser commands "
+           "that operate on files use the file bound to $1 by default. "
+           "You can obtain the name and current working directory of the "
+           "file bound to a symbol by printing the symbol.");
+   sym_doc("$*", "This special variable always evaluates to a list of files "
+           "opened on the browser command-line. Or more specifically, to the "
+           "list of files represented by the first consecutive $N symbols.");
+}
+
+/*---------------------------------------------------------------------------
+ * Purpose:     Invokes function FUNC on each defined symbol.
+ *
+ * Programmer:  Robb Matzke
+ *              Wednesday, June  7, 2000
+ *
+ * Modifications:
+ *---------------------------------------------------------------------------
+ */
+int
+sym_map(int(*func)(obj_t, void*), void *cdata)
+{
+    int         i, retval=0;
+
+    for (i=0; i<NSymbols; i++) {
+        if (Symbol[i].name) {
+            obj_t sym = obj_new(C_SYM, Symbol[i].name);
+            retval += (func)(sym, cdata);
+            obj_dest(sym);
+        }
+    }
+    return retval;
+}
diff --git a/tools/python/Makefile.am b/tools/python/Makefile.am
new file mode 100644
index 0000000..5348b6e
--- /dev/null
+++ b/tools/python/Makefile.am
@@ -0,0 +1,78 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+lib_LTLIBRARIES = Silo.la
+Silo_la_SOURCES = $(FILES)
+Silo_la_LDFLAGS = -module -avoid-version
+if HDF5_DRV_NEEDED
+  Silo_la_LIBADD = ../../src/libsiloh5.la
+else
+  Silo_la_LIBADD = ../../src/libsilo.la
+endif
+
+AM_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(top_builddir)/src/silo -I$(includedir)
+
+noinst_HEADERS = \
+ pydbfile.h \
+ pydbtoc.h \
+ pysilo.h 
+
+FILES = \
+ pydbfile.cpp \
+ pydbtoc.cpp \
+ pysilo.cpp \
+ pydbfile.h \
+ pydbtoc.h \
+ pysilo.h 
diff --git a/tools/python/Makefile.in b/tools/python/Makefile.in
new file mode 100644
index 0000000..d1788e1
--- /dev/null
+++ b/tools/python/Makefile.in
@@ -0,0 +1,605 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tools/python
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+ at HDF5_DRV_NEEDED_FALSE@Silo_la_DEPENDENCIES = ../../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@Silo_la_DEPENDENCIES = ../../src/libsiloh5.la
+am__objects_1 = pydbfile.lo pydbtoc.lo pysilo.lo
+am_Silo_la_OBJECTS = $(am__objects_1)
+Silo_la_OBJECTS = $(am_Silo_la_OBJECTS)
+Silo_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+	$(Silo_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(Silo_la_SOURCES)
+DIST_SOURCES = $(Silo_la_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+lib_LTLIBRARIES = Silo.la
+Silo_la_SOURCES = $(FILES)
+Silo_la_LDFLAGS = -module -avoid-version
+ at HDF5_DRV_NEEDED_FALSE@Silo_la_LIBADD = ../../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@Silo_la_LIBADD = ../../src/libsiloh5.la
+AM_CPPFLAGS = $(PYTHON_CPPFLAGS) -I$(top_builddir)/src/silo -I$(includedir)
+noinst_HEADERS = \
+ pydbfile.h \
+ pydbtoc.h \
+ pysilo.h 
+
+FILES = \
+ pydbfile.cpp \
+ pydbtoc.cpp \
+ pysilo.cpp \
+ pydbfile.h \
+ pydbtoc.h \
+ pysilo.h 
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/python/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/python/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+Silo.la: $(Silo_la_OBJECTS) $(Silo_la_DEPENDENCIES) 
+	$(Silo_la_LINK) -rpath $(libdir) $(Silo_la_OBJECTS) $(Silo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pydbfile.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pydbtoc.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pysilo.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-libLTLIBRARIES
+
+# 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/tools/python/pydbfile.cpp b/tools/python/pydbfile.cpp
new file mode 100644
index 0000000..53d81ce
--- /dev/null
+++ b/tools/python/pydbfile.cpp
@@ -0,0 +1,705 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#include "pydbfile.h"
+#include "pydbtoc.h"
+#include "pysilo.h"
+
+// ****************************************************************************
+//  Method:  DBfile_DBGetToc
+//
+//  Purpose:
+//    Encapsulates DBGetToc
+//
+//  Python Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_DBGetToc(PyObject *self, PyObject *args)
+{
+    DBfileObject *obj = (DBfileObject*)self;
+
+    if (!obj->db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    DBtoc *toc = DBGetToc(obj->db);
+
+    DBtocObject *retval = PyObject_NEW(DBtocObject, &DBtocType);
+    if (retval)
+    {
+        retval->toc = toc;
+    }
+    return (PyObject*)retval;
+}
+
+// ****************************************************************************
+//  Method:  DBfile_DBGetVar
+//
+//  Purpose:
+//    Encapsulates DBGetVar
+//
+//  Python Arguments:
+//    form 1: varname
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+//  Modifications:
+//
+//    Mark C. Miller, Tue Aug  5 11:04:14 PDT 2008
+//    I modifed case where we're returning a string valued variable to strip
+//    off the trailing null character. The PyString_FromStringAndSize method
+//    was being given a length argument that included the trailing null and
+//    the result was a bit if an odd string in python.
+//
+// ****************************************************************************
+static PyObject *DBfile_DBGetVar(PyObject *self, PyObject *args)
+{
+    DBfile *db = ((DBfileObject*)self)->db;
+
+    if (!db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    char *str;
+    if(!PyArg_ParseTuple(args, "s", &str))
+        return NULL;
+
+    int vartype = DBInqVarType(db, str);
+    if (vartype != DB_VARIABLE)
+    {
+        SiloErrorFunc("Only flat variables are supported.");
+        return NULL;
+    }
+
+    int len = DBGetVarLength(db,str);
+    int type = DBGetVarType(db,str);
+    void *var = DBGetVar(db,str);
+    if (len == 1 || type == DB_CHAR)
+    {
+        switch (type)
+        {
+          case DB_INT:
+            return PyInt_FromLong(*((int*)var));
+          case DB_SHORT:
+            return PyInt_FromLong(*((short*)var));
+          case DB_LONG:
+            return PyInt_FromLong(*((long*)var));
+          case DB_FLOAT:
+            return PyFloat_FromDouble(*((float*)var));
+          case DB_DOUBLE:
+            return PyFloat_FromDouble(*((double*)var));
+          case DB_CHAR:
+            if (len == 1)
+                return PyInt_FromLong(*((char*)var));
+            else
+            {
+                // strip trailing null if one exists
+                char *p = (char *) var;
+                if (p[len-1] == '\0') len--;
+                return PyString_FromStringAndSize((char*)var, len);
+            }
+          default:
+            SiloErrorFunc("Unknown variable type.");
+            return NULL;
+        }
+    }
+    else
+    {
+        PyObject *retval = PyTuple_New(len);
+        for (int i=0; i<len; i++)
+        {    
+            PyObject *tmp;
+            switch (type)
+            {
+              case DB_INT:
+                tmp = PyInt_FromLong(((int*)var)[i]);
+                break;
+              case DB_SHORT:
+                tmp = PyInt_FromLong(((short*)var)[i]);
+                break;
+              case DB_LONG:
+                tmp = PyInt_FromLong(((long*)var)[i]);
+                break;
+              case DB_FLOAT:
+                tmp = PyFloat_FromDouble(((float*)var)[i]);
+                break;
+              case DB_DOUBLE:
+                tmp = PyFloat_FromDouble(((double*)var)[i]);
+                break;
+              case DB_CHAR:
+                tmp = PyInt_FromLong(((char*)var)[i]);
+                break;
+              default:
+                SiloErrorFunc("Unknown variable type.");
+                return NULL;
+            }
+            PyTuple_SET_ITEM(retval, i, tmp);
+        }
+        return retval;
+    }
+}
+
+// ****************************************************************************
+//  Method:  DBfile_DBGetVar
+//
+//  Purpose:
+//    Encapsulates DBGetVar
+//
+//  Python Arguments:
+//    form 1: varname, integer
+//    form 2: varname, real
+//    form 3: varname, string
+//    form 4: varname, tuple
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_DBWrite(PyObject *self, PyObject *args)
+{
+    DBfile *db = ((DBfileObject*)self)->db;
+
+    if (!db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    int dims;
+    int err;
+    char *str;
+
+    int ivar;
+    double dvar;
+    char *svar;
+    PyObject *tuple;
+    if (PyArg_ParseTuple(args, "si", &str, &ivar) &&
+        PyArg_ParseTuple(args, "sd", &str, &dvar))
+    {
+        dims = 1;
+        if (ivar == dvar)
+        {
+            err = DBWrite(db, str, &ivar, &dims,1, DB_INT);
+        }
+        else
+        {
+            err = DBWrite(db, str, &dvar, &dims,1, DB_DOUBLE);
+        }
+    }
+    else if (PyArg_ParseTuple(args, "si", &str, &ivar))
+    {
+        dims = 1;
+        err = DBWrite(db, str, &ivar, &dims,1, DB_INT);
+    }
+    else if (PyArg_ParseTuple(args, "sd", &str, &dvar))
+    {
+        dims = 1;
+        err = DBWrite(db, str, &dvar, &dims,1, DB_DOUBLE);
+    }
+    else if (PyArg_ParseTuple(args, "ss", &str, &svar))
+    {
+        dims = strlen(svar);
+        err = DBWrite(db, str, svar, &dims,1, DB_CHAR);
+    }
+    else if (PyArg_ParseTuple(args, "sO", &str, &tuple))
+    {
+        if(!PyTuple_Check(tuple))
+            return NULL;
+
+        int len = PyTuple_Size(tuple);
+        if (len < 1)
+        {
+            PyErr_SetString(PyExc_TypeError, "Tuple must be of size > 0");
+            return NULL;
+        }
+
+        PyObject *item = PyTuple_GET_ITEM(tuple, 0);
+        if (PyInt_Check(item))
+        {
+            int *values = new int[len];
+            for (int i=0; i<len; i++)
+            {
+                item = PyTuple_GET_ITEM(tuple, i);
+                if (PyInt_Check(item))
+                    values[i] = int(PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, i)));
+                else if (PyFloat_Check(item))
+                    values[i] = int(PyFloat_AS_DOUBLE(PyTuple_GET_ITEM(tuple, i)));
+                else
+                {
+                    PyErr_SetString(PyExc_TypeError,
+                                    "Only int or float tuples are supported");
+                    return NULL;
+                }
+            }
+
+            dims = len;
+            err = DBWrite(db, str, values, &len,1, DB_INT);
+        }
+        else if (PyFloat_Check(item))
+        {
+            double *values = new double[len];
+            for (int i=0; i<len; i++)
+            {
+                item = PyTuple_GET_ITEM(tuple, i);
+                if (PyInt_Check(item))
+                    values[i] = double(PyInt_AS_LONG(PyTuple_GET_ITEM(tuple, i)));
+                else if (PyFloat_Check(item))
+                    values[i] = double(PyFloat_AS_DOUBLE(PyTuple_GET_ITEM(tuple, i)));
+                else
+                {
+                    PyErr_SetString(PyExc_TypeError,
+                                    "Only int or float tuples are supported");
+                    return NULL;
+                }
+            }
+
+            dims = len;
+            err = DBWrite(db, str, values, &len,1, DB_DOUBLE);
+        }
+        else
+        {
+            PyErr_SetString(PyExc_TypeError,
+                            "Only int or float tuples are supported");
+            return NULL;
+        }
+    }
+    else
+    {
+        PyErr_SetString(PyExc_TypeError, "Function takes 2 arguments");
+        return NULL;
+    }
+
+    if (err != 0)
+    {
+        PyErr_SetString(PyExc_TypeError, "DBWrite failed");
+        return NULL;
+    }
+    
+    PyErr_Clear();
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+// ****************************************************************************
+//  Method:  DBfile_DBMkDir
+//
+//  Purpose:
+//    Encapsulates DBMkDir
+//
+//  Python Arguments:
+//    form 1: dirname
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_DBMkDir(PyObject *self, PyObject *args)
+{
+    DBfile *db = ((DBfileObject*)self)->db;
+
+    if (!db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    char *str;
+    if(!PyArg_ParseTuple(args, "s", &str))
+        return NULL;
+
+    if (DBMkDir(db, str))
+    {
+        SiloErrorFunc("Could not make the directory.");
+        return NULL;
+    }
+    else
+    {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+// ****************************************************************************
+//  Method:  DBfile_DBSetDir
+//
+//  Purpose:
+//    Encapsulates DBSetDir
+//
+//  Python Arguments:
+//    form 1: dirname
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_DBSetDir(PyObject *self, PyObject *args)
+{
+    DBfile *db = ((DBfileObject*)self)->db;
+
+    if (!db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    char *str;
+    if(!PyArg_ParseTuple(args, "s", &str))
+        return NULL;
+
+    if (DBSetDir(db, str))
+    {
+        SiloErrorFunc("Could not change directories.");
+        return NULL;
+    }
+    else
+    {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+// ****************************************************************************
+//  Method:  DBfile_DBClose
+//
+//  Purpose:
+//    Encapsulates DBClose
+//
+//  Python Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_DBClose(PyObject *self, PyObject *args)
+{
+    DBfile *db = ((DBfileObject*)self)->db;
+
+    if (!db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    if(!PyArg_ParseTuple(args, ""))
+        return NULL;
+
+    if (DBClose(db))
+    {
+        SiloErrorFunc("Could not close the file.");
+        return NULL;
+    }
+    else
+    {
+        ((DBfileObject*)self)->db = NULL;
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+// ****************************************************************************
+//  DBfile method definitions  
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static struct PyMethodDef DBfile_methods[] = {
+    {"GetToc", DBfile_DBGetToc, METH_VARARGS},
+    {"GetVar", DBfile_DBGetVar, METH_VARARGS},
+    {"Write", DBfile_DBWrite, METH_VARARGS},
+    {"MkDir", DBfile_DBMkDir, METH_VARARGS},
+    {"SetDir", DBfile_DBSetDir, METH_VARARGS},
+    {"Close", DBfile_DBClose, METH_VARARGS},
+    {NULL, NULL}
+};
+
+// ****************************************************************************
+//  Method:  DBfile_dealloc
+//
+//  Purpose:
+//    Deallocate the object.
+//
+//  Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static void DBfile_dealloc(PyObject *self)
+{
+    PyObject_Del(self);
+}
+
+// ****************************************************************************
+//  Method:  DBfile_as_string
+//
+//  Purpose:
+//    Convert the DBfileObject to a string representation.
+//
+//  Arguments:
+//    s          the target string, with space already allocated
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static void DBfile_as_string(PyObject *self, char *s)
+{
+    DBfileObject *obj = (DBfileObject*)self;
+    if (obj->db)
+        sprintf(s, "<DBfile object, filename='%s'>", obj->db->pub.name);
+    else
+        sprintf(s, "<closed DBfile object>");
+}
+
+// ****************************************************************************
+//  Method:  DBfile_str
+//
+//  Purpose:
+//    Convert the DBfileObject to a PyString
+//
+//  Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_str(PyObject *self)
+{
+    char str[1000];
+    DBfile_as_string(self, str);
+    return PyString_FromString(str);
+}
+
+// ****************************************************************************
+//  Method:  DBfile_print
+//
+//  Purpose:
+//    Print the DBfileObject into a file as text
+//
+//  Arguments:
+//    fp         the file pointer
+//    flags      (unused)
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static int DBfile_print(PyObject *self, FILE *fp, int flags)
+{
+    char str[1000];
+    DBfile_as_string(self, str);
+    fprintf(fp, str);
+    return 0;
+}
+
+// ****************************************************************************
+//  Method: DBfile_getattr 
+//
+//  Purpose:
+//    Return an attribute by name.  There is only one attribute of a
+//    DBfile, which is its filename.
+//
+//  Arguments:
+//    name       the name of the attribute to return
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBfile_getattr(PyObject *self, char *name)
+{
+    DBfileObject *obj = (DBfileObject*)self;
+
+    if (!obj->db)
+    {
+        SiloErrorFunc("This file has been closed.");
+        return NULL;
+    }
+
+    if (!strcmp(name, "filename"))
+    {
+        if (obj->db)
+        {
+            return PyString_FromString(obj->db->pub.name);
+        }
+        else
+        {
+            return PyString_FromString("<closed file>");
+        }
+    }
+
+    return Py_FindMethod(DBfile_methods, self, name);
+}
+
+// ****************************************************************************
+//  Method:  DBfile_compare
+//
+//  Purpose:
+//    Compare two DBfileObjects.
+//
+//  Arguments:
+//    u, v       the objects to compare
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static int DBfile_compare(PyObject *v, PyObject *w)
+{
+    DBfile *a = ((DBfileObject *)v)->db;
+    DBfile *b = ((DBfileObject *)w)->db;
+    return (a<b) ? -1 : ((a==b) ? 0 : +1);
+}
+
+
+// ****************************************************************************
+//  DBfile Python Type Object
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static char *DBfile_Purpose = "This class wraps a Silo DBfile object.";
+PyTypeObject DBfileType =
+{
+    //
+    // Type header
+    //
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,                                   // ob_size
+    "DBfile",                    // tp_name
+    sizeof(DBfileObject),        // tp_basicsize
+    0,                                   // tp_itemsize
+    //
+    // Standard methods
+    //
+    (destructor)DBfile_dealloc,  // tp_dealloc
+    (printfunc)DBfile_print,     // tp_print
+    (getattrfunc)DBfile_getattr, // tp_getattr
+    0,//(setattrfunc)DBfile_setattr, // tp_setattr -- this object is read-only
+    (cmpfunc)DBfile_compare,     // tp_compare
+    (reprfunc)0,                         // tp_repr
+    //
+    // Type categories
+    //
+    0,                                   // tp_as_number
+    0,                                   // tp_as_sequence
+    0,                                   // tp_as_mapping
+    //
+    // More methods
+    //
+    0,                                   // tp_hash
+    0,                                   // tp_call
+    (reprfunc)DBfile_str,        // tp_str
+    0,                                   // tp_getattro
+    0,                                   // tp_setattro
+    0,                                   // tp_as_buffer
+    Py_TPFLAGS_CHECKTYPES,               // tp_flags
+    DBfile_Purpose,              // tp_doc
+    0,                                   // tp_traverse
+    0,                                   // tp_clear
+    0,                                   // tp_richcompare
+    0                                    // tp_weaklistoffset
+};
+
+// ****************************************************************************
+//  Method:  DBfile_NEW
+//
+//  Purpose:
+//    Allocate and initialize a DBfileObject.
+//
+//  Arguments:
+//    init       the initial value
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *DBfile_NEW(DBfile *init)
+{
+    DBfileObject *obj = PyObject_NEW(DBfileObject, &DBfileType);
+    if (obj)
+    {
+        obj->db = init;
+    }
+    return (PyObject*)obj;
+}
+
+// ****************************************************************************
+//  Method:  DBfile_NEW
+//
+//  Purpose:
+//    Allocate and initialize a DBfileObject with default values.
+//
+//  Python Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *DBfile_new(PyObject *self, PyObject *args)
+{
+    return DBfile_NEW(NULL);
+}
+
diff --git a/tools/python/pydbfile.h b/tools/python/pydbfile.h
new file mode 100644
index 0000000..1c7f4cf
--- /dev/null
+++ b/tools/python/pydbfile.h
@@ -0,0 +1,78 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#ifndef PY_DBFILE_H
+#define PY_DBFILE_H
+
+#include <Python.h>
+#include <silo.h>
+
+// ****************************************************************************
+//  Struct:  DBfileObject
+//
+//  Purpose:
+//    Encapsulates a DBfile object.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+struct DBfileObject
+{
+    PyObject_HEAD
+    DBfile *db;
+};
+
+extern PyTypeObject DBfileType;
+
+PyObject *DBfile_NEW(DBfile *init);
+
+
+#endif
diff --git a/tools/python/pydbtoc.cpp b/tools/python/pydbtoc.cpp
new file mode 100644
index 0000000..0216070
--- /dev/null
+++ b/tools/python/pydbtoc.cpp
@@ -0,0 +1,394 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#include "pydbtoc.h"
+
+// ****************************************************************************
+//  Method:  DBtoc_dealloc
+//
+//  Purpose:
+//    Convert the DBtocObject to a string representation.
+//
+//  Arguments:
+//    s          the target string, with space already allocated
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static void DBtoc_dealloc(PyObject *self)
+{
+    PyObject_Del(self);
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_as_string
+//
+//  Purpose:
+//    Convert the DBtocObject to a string representation.
+//
+//  Arguments:
+//    s          the target string, with space already allocated
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static int DBtoc_as_string(PyObject *self, char *s)
+{
+    DBtocObject *obj = (DBtocObject*)self;
+    DBtoc *toc = obj->toc;
+    const char *sep = ", ";
+    const char *term = ")\n";
+    char tmp[1000];
+    int len = 0;
+
+    if (s) strcpy(s, "");
+
+    sprintf(tmp, "nvar = %d\n", toc->nvar);
+    len += strlen(tmp);
+    if (s) strcat(s, tmp);
+
+    sprintf(tmp, "var_names = (");
+    len += strlen(tmp);
+    if (s) strcat(s, tmp);
+    for (int i=0; i<toc->nvar; i++)
+    {
+        len += strlen(toc->var_names[i]);
+        if (s) strcat(s, toc->var_names[i]);
+        if (i < toc->nvar-1)
+        {
+            len += strlen(sep);
+            if (s) strcat(s, sep);
+        }
+    }
+    len += strlen(term);
+    if (s) strcat(s, term);
+
+    sprintf(tmp, "ndir = %d\n", toc->ndir);
+    len += strlen(tmp);
+    if (s) strcat(s, tmp);
+
+    sprintf(tmp, "dir_names = (");
+    len += strlen(tmp);
+    if (s) strcat(s, tmp);
+    for (int i=0; i<toc->ndir; i++)
+    {
+        len += strlen(toc->dir_names[i]);
+        if (s) strcat(s, toc->dir_names[i]);
+        if (i < toc->ndir-1)
+        {
+            len += strlen(sep);
+            if (s) strcat(s, sep);
+        }
+    }
+    len += strlen(term);
+    if (s) strcat(s, term);
+    return len;
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_str
+//
+//  Purpose:
+//    Convert the DBtocObject to a PyString
+//
+//  Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_str(PyObject *self)
+{
+    PyObject *retval;
+    int len = DBtoc_as_string(self, 0);
+    char *str = new char[len]; 
+    DBtoc_as_string(self, str);
+    retval = PyString_FromString(str);
+    delete [] str;
+    return retval; 
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_print
+//
+//  Purpose:
+//    Print the DBtocObject into a file as text
+//
+//  Arguments:
+//    fp         the file pointer
+//    flags      (unused)
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static int DBtoc_print(PyObject *self, FILE *fp, int flags)
+{
+    DBtocObject *obj = (DBtocObject*)self;
+    int len = DBtoc_as_string(self, 0);
+    char *str = new char[len]; 
+    DBtoc_as_string(self, str);
+    fprintf(fp, str);
+    delete [] str;
+    return 0;
+}
+
+
+// ****************************************************************************
+//  Method:  DBtoc_GetNVar
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_GetNVar(PyObject *self, PyObject *args)
+{
+    DBtoc *toc = ((DBtocObject*)self)->toc;
+    PyObject *retval = PyInt_FromLong(toc->nvar);
+    return retval;
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_GetVarNames
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_GetVarNames(PyObject *self, PyObject *args)
+{
+    DBtoc *toc = ((DBtocObject*)self)->toc;
+    PyObject *retval = PyTuple_New(toc->nvar);
+    for (int i=0; i<toc->nvar; i++)
+    {
+        PyTuple_SET_ITEM(retval, i, PyString_FromString(toc->var_names[i]));
+    }
+    return retval;
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_GetNDir
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_GetNDir(PyObject *self, PyObject *args)
+{
+    DBtoc *toc = ((DBtocObject*)self)->toc;
+    PyObject *retval = PyInt_FromLong(toc->ndir);
+    return retval;
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_GetDirNames
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_GetDirNames(PyObject *self, PyObject *args)
+{
+    DBtoc *toc = ((DBtocObject*)self)->toc;
+    PyObject *retval = PyTuple_New(toc->ndir);
+    for (int i=0; i<toc->ndir; i++)
+    {
+        PyTuple_SET_ITEM(retval, i, PyString_FromString(toc->dir_names[i]));
+    }
+    return retval;
+}
+
+// ****************************************************************************
+//  Method: DBtoc_getattr 
+//
+//  Purpose:
+//    Return an attribute by name.
+//
+//  Arguments:
+//    name       the name of the attribute to return
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static PyObject *DBtoc_getattr(PyObject *self, char *name)
+{
+    if (strcmp(name, "nvar") == 0)
+        return DBtoc_GetNVar(self, NULL);
+    if (strcmp(name, "var_names") == 0)
+        return DBtoc_GetVarNames(self, NULL);
+    if (strcmp(name, "ndir") == 0)
+        return DBtoc_GetNDir(self, NULL);
+    if (strcmp(name, "dir_names") == 0)
+        return DBtoc_GetDirNames(self, NULL);
+    return 0;
+}
+
+// ****************************************************************************
+//  Method:  DBtoc_compare
+//
+//  Purpose:
+//    Compare two DBtocObjects.
+//
+//  Arguments:
+//    u, v       the objects to compare
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static int DBtoc_compare(PyObject *v, PyObject *w)
+{
+    DBtoc *a = ((DBtocObject *)v)->toc;
+    DBtoc *b = ((DBtocObject *)w)->toc;
+    return (a<b) ? -1 : ((a==b) ? 0 : +1);
+}
+
+
+// ****************************************************************************
+//  DBtoc Python Type Object
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+static char *DBtoc_Purpose = "This class wraps a Silo DBtoc object.";
+PyTypeObject DBtocType =
+{
+    //
+    // Type header
+    //
+    PyObject_HEAD_INIT(&PyType_Type)
+    0,                                   // ob_size
+    "DBtoc",                    // tp_name
+    sizeof(DBtocObject),        // tp_basicsize
+    0,                                   // tp_itemsize
+    //
+    // Standard methods
+    //
+    (destructor)DBtoc_dealloc,  // tp_dealloc
+    (printfunc)DBtoc_print,     // tp_print
+    (getattrfunc)DBtoc_getattr, // tp_getattr
+    0,//(setattrfunc)DBtoc_setattr, // tp_setattr -- this object is read-only
+    (cmpfunc)DBtoc_compare,     // tp_compare
+    (reprfunc)0,                         // tp_repr
+    //
+    // Type categories
+    //
+    0,                                   // tp_as_number
+    0,                                   // tp_as_sequence
+    0,                                   // tp_as_mapping
+    //
+    // More methods
+    //
+    0,                                   // tp_hash
+    0,                                   // tp_call
+    (reprfunc)DBtoc_str,        // tp_str
+    0,                                   // tp_getattro
+    0,                                   // tp_setattro
+    0,                                   // tp_as_buffer
+    Py_TPFLAGS_CHECKTYPES,               // tp_flags
+    DBtoc_Purpose,              // tp_doc
+    0,                                   // tp_traverse
+    0,                                   // tp_clear
+    0,                                   // tp_richcompare
+    0                                    // tp_weaklistoffset
+    // PYTHON 2.2 FROM HERE
+    ,
+    0,
+    0,
+    0,
+
+};
+
+// ****************************************************************************
+//  Method:  DBtoc_NEW
+//
+//  Purpose:
+//    Allocate and initialize a DBtocObject.
+//
+//  Arguments:
+//    init       the initial value
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *DBtoc_NEW(DBtoc *init)
+{
+    DBtocObject *obj = PyObject_NEW(DBtocObject, &DBtocType);
+    if (obj)
+    {
+        obj->toc = init;
+    }
+    return (PyObject*)obj;
+}
+
+
+// ****************************************************************************
+//  Method:  DBtoc_NEW
+//
+//  Purpose:
+//    Allocate and initialize a DBtocObject with default values.
+//
+//  Python Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *DBtoc_new(PyObject *self, PyObject *args)
+{
+    return DBtoc_NEW(NULL);
+}
diff --git a/tools/python/pydbtoc.h b/tools/python/pydbtoc.h
new file mode 100644
index 0000000..4ea6f32
--- /dev/null
+++ b/tools/python/pydbtoc.h
@@ -0,0 +1,78 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#ifndef PY_DBTOC_H
+#define PY_DBTOC_H
+
+#include <Python.h>
+#include <silo.h>
+
+// ****************************************************************************
+//  Struct:  DBtocObject
+//
+//  Purpose:
+//    Encapsulates a DBtoc object.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+struct DBtocObject
+{
+    PyObject_HEAD
+    DBtoc *toc;
+};
+
+PyObject *DBtoc_NEW(DBtoc *init);
+
+extern PyTypeObject DBtocType;
+
+
+#endif
diff --git a/tools/python/pysilo.cpp b/tools/python/pysilo.cpp
new file mode 100644
index 0000000..7c2fcf7
--- /dev/null
+++ b/tools/python/pysilo.cpp
@@ -0,0 +1,250 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#include <Python.h>
+#include <silo.h>
+#include "pydbfile.h"
+
+#include <vector>
+#include <string>
+#include <iostream>
+using namespace std;
+
+static PyObject             *SiloError;
+static PyObject             *siloModule = 0;
+
+//
+// Method table
+//
+
+std::vector<PyMethodDef> SiloMethods;
+
+
+// ****************************************************************************
+// Function: SiloErrorFunc
+//
+// Purpose: 
+//   This function sets the Python error string if we're allowing Python
+//   exceptions to be thrown from the Silo module.
+//
+// Arguments:
+//   errString : The error string that is "thrown".
+//
+// Programmer: Brad Whitlock
+// Creation:   Mon Sep 17 11:44:43 PDT 2001
+//
+// Modifications:
+//   
+// ****************************************************************************
+
+void
+SiloErrorFunc(const char *errString)
+{
+    PyErr_SetString(SiloError, errString);
+}
+
+// ****************************************************************************
+// Function: AddMethod
+//
+// Purpose:
+//   This function adds a method to the Silo module's Python method table.
+//
+// Arguments:
+//   methodName : The name of the method.
+//   cb         : The Python callback function.
+//   doc        : The documentation string for the method.
+//
+// Programmer: Brad Whitlock
+// Creation:   Tue Sep 4 15:36:47 PST 2001
+//
+// Modifications:
+//   
+// ****************************************************************************
+static void
+AddMethod(const char *methodName, PyObject *(cb)(PyObject *, PyObject *),
+          const char *doc = NULL)
+{
+    PyMethodDef newMethod;
+    newMethod.ml_name = (char *)methodName;
+    newMethod.ml_meth = cb;
+    newMethod.ml_flags = METH_VARARGS;
+    newMethod.ml_doc = (char *)doc;
+    SiloMethods.push_back(newMethod);
+}
+
+
+// ****************************************************************************
+//  Method:  silo_Open
+//
+//  Purpose:
+//    Encapsulate DBOpen
+//
+//  Python Arguments:
+//    form 1: filename, mode
+//    form 2: filename
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *silo_Open(PyObject *self, PyObject *args)
+{
+    char *filename;
+    int mode;
+    if (! PyArg_ParseTuple(args, "si", &filename, &mode))
+    {
+        mode = DB_READ;
+        if (! PyArg_ParseTuple(args, "s", &filename))
+        {
+            PyErr_SetString(PyExc_TypeError,
+                            "Open takes either 1 or 2 arguments");
+            return NULL;
+        }
+    }
+
+    PyErr_Clear();
+    DBfile *db = DBOpen(filename, DB_UNKNOWN, mode);
+    if (!db)
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "File could not be opened");
+        return NULL;
+    }
+    return DBfile_NEW(db);
+}
+
+// ****************************************************************************
+//  Method:  silo_Create
+//
+//  Purpose:
+//    Encapsulate DBCreate
+//
+//  Python Arguments:
+//    form 1: filename, fileinfo, driver, mode
+//    form 2: filename, fileinfo, driver
+//    form 3: filename, fileinfo
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+PyObject *silo_Create(PyObject *self, PyObject *args)
+{
+    char *filename;
+    char *info;
+    int driver;
+    int mode;
+    if (!PyArg_ParseTuple(args, "ssii", &filename, &info, &driver, &mode))
+    {
+        mode = DB_CLOBBER;
+        if (!PyArg_ParseTuple(args, "ssi", &filename, &info, &driver))
+        {
+            driver = DB_PDB;
+            if (!PyArg_ParseTuple(args, "ss", &filename, &info))
+            {
+                PyErr_SetString(PyExc_TypeError,
+                                "Create takes 2, 3, or 4 arguments");
+                return NULL;
+            }
+        }
+    }
+
+    PyErr_Clear();
+    DBfile *db = DBCreate(filename, mode, DB_LOCAL, info, driver);
+    if (!db)
+    {
+        PyErr_SetString(PyExc_TypeError,
+                        "File creation failed");
+        return NULL;
+    }
+    return DBfile_NEW(db);
+}
+
+// ****************************************************************************
+//  Method:  initSilo
+//
+//  Purpose:
+//    Called by python to initialize the Silo module.
+//
+//  Arguments:
+//    none
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+extern "C" void initSilo()
+{
+    AddMethod("Open", silo_Open,
+              "Usage: Open(filename [, DB_READ|DB_APPEND]])");
+    AddMethod("Create", silo_Create,
+              "Usage: Create(filename , info [, DB_PDB|DB_HDF5 [, DB_CLOBBER|DB_NOCLOBBER]])");
+    AddMethod(NULL, NULL);
+
+
+    siloModule = Py_InitModule("Silo", &SiloMethods[0]);
+
+    PyObject *d;
+    d = PyModule_GetDict(siloModule);
+    SiloError = PyErr_NewException("Silo.SiloException", NULL, NULL);
+    PyDict_SetItemString(d, "SiloException", SiloError);
+
+    // Drivers
+    PyDict_SetItemString(d, "DB_PDB", PyInt_FromLong(DB_PDB));
+    PyDict_SetItemString(d, "DB_HDF5", PyInt_FromLong(DB_HDF5));
+
+    // Clobber
+    PyDict_SetItemString(d, "DB_CLOBBER", PyInt_FromLong(DB_CLOBBER));
+    PyDict_SetItemString(d, "DB_NOCLOBBER", PyInt_FromLong(DB_NOCLOBBER));
+    
+    // Read/Append
+    PyDict_SetItemString(d, "DB_READ", PyInt_FromLong(DB_READ));
+    PyDict_SetItemString(d, "DB_APPEND", PyInt_FromLong(DB_APPEND));
+}
diff --git a/tools/python/pysilo.h b/tools/python/pysilo.h
new file mode 100644
index 0000000..694e138
--- /dev/null
+++ b/tools/python/pysilo.h
@@ -0,0 +1,66 @@
+// Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+// LLNL-CODE-425250.
+// All rights reserved.
+// 
+// This file is part of Silo. For details, see silo.llnl.gov.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 
+//    * Redistributions of source code must retain the above copyright
+//      notice, this list of conditions and the disclaimer below.
+//    * Redistributions in binary form must reproduce the above copyright
+//      notice, this list of conditions and the disclaimer (as noted
+//      below) in the documentation and/or other materials provided with
+//      the distribution.
+//    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+// LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+// 
+// This work was produced at Lawrence Livermore National Laboratory under
+// Contract  No.   DE-AC52-07NA27344 with  the  DOE.  Neither the  United
+// States Government  nor Lawrence  Livermore National Security,  LLC nor
+// any of  their employees,  makes any warranty,  express or  implied, or
+// assumes   any   liability   or   responsibility  for   the   accuracy,
+// completeness, or usefulness of any information, apparatus, product, or
+// process  disclosed, or  represents  that its  use  would not  infringe
+// privately-owned   rights.  Any  reference   herein  to   any  specific
+// commercial products,  process, or  services by trade  name, trademark,
+// manufacturer or otherwise does not necessarily constitute or imply its
+// endorsement,  recommendation,   or  favoring  by   the  United  States
+// Government or Lawrence Livermore National Security, LLC. The views and
+// opinions  of authors  expressed  herein do  not  necessarily state  or
+// reflect those  of the United  States Government or  Lawrence Livermore
+// National  Security, LLC,  and shall  not  be used  for advertising  or
+// product endorsement purposes.
+
+#ifndef PY_SILO_H
+#define PY_SILO_H
+
+// ****************************************************************************
+//  Purpose:
+//    Header file for all things in the Silo Python wrapper.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    July 12, 2005
+//
+// ****************************************************************************
+
+
+void SiloErrorFunc(const char *errString);
+
+#endif
diff --git a/tools/silex/Explorer.cpp b/tools/silex/Explorer.cpp
new file mode 100644
index 0000000..95454eb
--- /dev/null
+++ b/tools/silex/Explorer.cpp
@@ -0,0 +1,142 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "Explorer.h"
+#include <SiloView.h>
+
+#include <QMenuBar>
+#include <QFileDialog>
+#include <QApplication>
+
+// ****************************************************************************
+//  Constructor: Explorer::Explorer
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Made it deal with failure to construct SiloView
+//  
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+Explorer::Explorer(const QString &file, QWidget *p)
+    : QMainWindow(p)
+{
+    view = new SiloView(file, this);
+    if (!view->HasSiloFile())
+    {
+        delete view;
+        view = 0;
+    }
+    else
+    {
+        setCentralWidget(view);
+        setWindowTitle("Explorer: "+file);
+
+        QMenu *filemenu = menuBar()->addMenu("&File");
+        filemenu->addAction( "&Open",  this, SLOT(open()),  tr("Ctrl+O") );
+        filemenu->addSeparator();
+        filemenu->addAction( "E&xit", this, SLOT(close()),  tr("Ctrl+X") );
+    }
+}
+
+// ****************************************************************************
+//  Destructor:  Explorer::~Explorer
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    May 17, 2004
+//
+//  Modifications:
+//    Mark C. Miller,Thu Jul 20 15:45:55 PDT 2006
+//    Added deletion of view
+// ****************************************************************************
+Explorer::~Explorer()
+{
+    if (view) delete view;
+    view = 0;
+}
+
+// ****************************************************************************
+//  Method:  Explorer::open
+//
+//  Purpose:
+//    Open a new file.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Mon May 17 11:50:08 PDT 2004
+//    Change the window caption when opening a new file.
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+Explorer::open()
+{
+    QString file = 
+        QFileDialog::getOpenFileName(this,"Open file...","",
+                                     "Silo files (*.silo *.root *.pdb);;"
+                                     "All files (*)");
+    if (file.isNull())
+        return;
+
+    setWindowTitle("Explorer: "+file);
+    view->Set(file);
+}
diff --git a/tools/silex/Explorer.h b/tools/silex/Explorer.h
new file mode 100644
index 0000000..c7d8f63
--- /dev/null
+++ b/tools/silex/Explorer.h
@@ -0,0 +1,92 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef EXPLORER_H
+#define EXPLORER_H
+
+#include <QMainWindow>
+
+class SiloView;
+
+// ****************************************************************************
+//  Class:  Explorer
+//
+//  Purpose:
+//    Main window for the Silo Explorer.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Added HasSiloView()
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class Explorer : public QMainWindow
+{
+    Q_OBJECT
+  public:
+    Explorer(const QString &file, QWidget *p);
+    virtual ~Explorer();
+    bool HasSiloView() const { return view != 0; };
+  public slots:
+    void open();
+  private:
+    SiloView *view;
+};
+
+#endif
diff --git a/tools/silex/Makefile.am b/tools/silex/Makefile.am
new file mode 100644
index 0000000..863a9c8
--- /dev/null
+++ b/tools/silex/Makefile.am
@@ -0,0 +1,147 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+bin_PROGRAMS = silex
+silex_SOURCES = $(FILES)
+nodist_silex_SOURCES = $(FILES_MOC)
+if HDF5_DRV_NEEDED
+  silex_LDADD = ../../src/libsiloh5.la $(QT_LDFLAGS) $(QT_LIBS)
+else
+  silex_LDADD = ../../src/libsilo.la $(QT_LDFLAGS) $(QT_LIBS)
+endif
+
+EXTRA_DIST = \
+ array.xpm \
+ curve.xpm \
+ folder.xpm \
+ mat.xpm \
+ mesh.xpm \
+ object.xpm \
+ silovar.xpm \
+ species.xpm \
+ var.xpm
+
+AM_CXXFLAGS=$(QT_CXXFLAGS)
+AM_CPPFLAGS = \
+ -I$(top_builddir)/src/silo \
+ -I$(includedir)
+
+noinst_HEADERS = \
+ Explorer.h \
+ SiloView.h \
+ SiloDirView.h \
+ SiloDirTreeView.h \
+ SiloArrayView.h \
+ SiloValueView.h \
+ SiloObjectView.h \
+ SiloFile.h 
+
+FILES = \
+ Explorer.cpp \
+ SiloView.cpp \
+ SiloDirView.cpp \
+ SiloDirTreeView.cpp \
+ SiloArrayView.cpp \
+ SiloValueView.cpp \
+ SiloObjectView.cpp \
+ SiloFile.cpp \
+ main.cpp 
+
+FILES_MOC = \
+ Explorer_moc.cpp \
+ SiloView_moc.cpp \
+ SiloDirView_moc.cpp \
+ SiloDirTreeView_moc.cpp \
+ SiloArrayView_moc.cpp \
+ SiloValueView_moc.cpp \
+ SiloObjectView_moc.cpp
+ 
+%_moc.cpp: %.h
+	$(QT_MOC) -o $@ $<
+
+BUILT_SOURCES = $(FILES_MOC)
+
+CLEANFILES = $(FILES_MOC)
+
+install-exec-hook: $(BUNDLE_TARGET)
+
+silex.app:
+	@if test -e $@; then \
+	  rm -f $@/Contents/{bin,lib}; \
+	  rm -rf $@; \
+	fi; \
+	mkdir $@; \
+	mkdir $@/Contents; \
+	mkdir $@/Contents/MacOS; \
+	mkdir $@/Contents/Resources; \
+	{
+	  echo '<?xml version="1.0" encoding="UTF-8"?>'; \
+	  echo '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'; \
+	  echo '<plist version="1.0">'; \
+	  echo '<dict>'; \
+	  echo '        <key>CFBundleName</key>'; \
+	  echo '        <string>@PACKAGE_TARNAME@</string>'; \
+	  echo '        <key>CFBundlePackageType</key>'; \
+	  echo '        <string>APPL</string>'; \
+	  echo '        <key>CFBundleGetInfoString</key>'; \
+	  echo '        <string>Created by @CONFIG_USER@ on @CONFIG_DATE@</string>'; \
+	  echo '        <key>CFBundleSignature</key>'; \
+	  echo '        <string>SILX</string>'; \
+	  echo '</dict>'; \
+	  echo '</plist>'; \
+	} > $@/Contents/Info.plist
+	echo 'APPLSILX' > $@/Contents/PkgInfo
+
+.PHONY: silex.app
diff --git a/tools/silex/Makefile.in b/tools/silex/Makefile.in
new file mode 100644
index 0000000..8c26ba0
--- /dev/null
+++ b/tools/silex/Makefile.in
@@ -0,0 +1,689 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = silex$(EXEEXT)
+subdir = tools/silex
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = Explorer.$(OBJEXT) SiloView.$(OBJEXT) \
+	SiloDirView.$(OBJEXT) SiloDirTreeView.$(OBJEXT) \
+	SiloArrayView.$(OBJEXT) SiloValueView.$(OBJEXT) \
+	SiloObjectView.$(OBJEXT) SiloFile.$(OBJEXT) main.$(OBJEXT)
+am_silex_OBJECTS = $(am__objects_1)
+am__objects_2 = Explorer_moc.$(OBJEXT) SiloView_moc.$(OBJEXT) \
+	SiloDirView_moc.$(OBJEXT) SiloDirTreeView_moc.$(OBJEXT) \
+	SiloArrayView_moc.$(OBJEXT) SiloValueView_moc.$(OBJEXT) \
+	SiloObjectView_moc.$(OBJEXT)
+nodist_silex_OBJECTS = $(am__objects_2)
+silex_OBJECTS = $(am_silex_OBJECTS) $(nodist_silex_OBJECTS)
+am__DEPENDENCIES_1 =
+ at HDF5_DRV_NEEDED_FALSE@silex_DEPENDENCIES = ../../src/libsilo.la \
+ at HDF5_DRV_NEEDED_FALSE@	$(am__DEPENDENCIES_1) \
+ at HDF5_DRV_NEEDED_FALSE@	$(am__DEPENDENCIES_1)
+ at HDF5_DRV_NEEDED_TRUE@silex_DEPENDENCIES = ../../src/libsiloh5.la \
+ at HDF5_DRV_NEEDED_TRUE@	$(am__DEPENDENCIES_1) \
+ at HDF5_DRV_NEEDED_TRUE@	$(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(silex_SOURCES) $(nodist_silex_SOURCES)
+DIST_SOURCES = $(silex_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+silex_SOURCES = $(FILES)
+nodist_silex_SOURCES = $(FILES_MOC)
+ at HDF5_DRV_NEEDED_FALSE@silex_LDADD = ../../src/libsilo.la $(QT_LDFLAGS) $(QT_LIBS)
+ at HDF5_DRV_NEEDED_TRUE@silex_LDADD = ../../src/libsiloh5.la $(QT_LDFLAGS) $(QT_LIBS)
+EXTRA_DIST = \
+ array.xpm \
+ curve.xpm \
+ folder.xpm \
+ mat.xpm \
+ mesh.xpm \
+ object.xpm \
+ silovar.xpm \
+ species.xpm \
+ var.xpm
+
+AM_CXXFLAGS = $(QT_CXXFLAGS)
+AM_CPPFLAGS = \
+ -I$(top_builddir)/src/silo \
+ -I$(includedir)
+
+noinst_HEADERS = \
+ Explorer.h \
+ SiloView.h \
+ SiloDirView.h \
+ SiloDirTreeView.h \
+ SiloArrayView.h \
+ SiloValueView.h \
+ SiloObjectView.h \
+ SiloFile.h 
+
+FILES = \
+ Explorer.cpp \
+ SiloView.cpp \
+ SiloDirView.cpp \
+ SiloDirTreeView.cpp \
+ SiloArrayView.cpp \
+ SiloValueView.cpp \
+ SiloObjectView.cpp \
+ SiloFile.cpp \
+ main.cpp 
+
+FILES_MOC = \
+ Explorer_moc.cpp \
+ SiloView_moc.cpp \
+ SiloDirView_moc.cpp \
+ SiloDirTreeView_moc.cpp \
+ SiloArrayView_moc.cpp \
+ SiloValueView_moc.cpp \
+ SiloObjectView_moc.cpp
+
+BUILT_SOURCES = $(FILES_MOC)
+CLEANFILES = $(FILES_MOC)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/silex/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/silex/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+silex$(EXEEXT): $(silex_OBJECTS) $(silex_DEPENDENCIES) 
+	@rm -f silex$(EXEEXT)
+	$(CXXLINK) $(silex_OBJECTS) $(silex_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Explorer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Explorer_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloArrayView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloArrayView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloDirTreeView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloDirTreeView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloDirView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloDirView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloFile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloObjectView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloObjectView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloValueView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloValueView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloView.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SiloView_moc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-exec-hook \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
+
+
+%_moc.cpp: %.h
+	$(QT_MOC) -o $@ $<
+
+install-exec-hook: $(BUNDLE_TARGET)
+
+silex.app:
+	@if test -e $@; then \
+	  rm -f $@/Contents/{bin,lib}; \
+	  rm -rf $@; \
+	fi; \
+	mkdir $@; \
+	mkdir $@/Contents; \
+	mkdir $@/Contents/MacOS; \
+	mkdir $@/Contents/Resources; \
+	{
+	  echo '<?xml version="1.0" encoding="UTF-8"?>'; \
+	  echo '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'; \
+	  echo '<plist version="1.0">'; \
+	  echo '<dict>'; \
+	  echo '        <key>CFBundleName</key>'; \
+	  echo '        <string>@PACKAGE_TARNAME@</string>'; \
+	  echo '        <key>CFBundlePackageType</key>'; \
+	  echo '        <string>APPL</string>'; \
+	  echo '        <key>CFBundleGetInfoString</key>'; \
+	  echo '        <string>Created by @CONFIG_USER@ on @CONFIG_DATE@</string>'; \
+	  echo '        <key>CFBundleSignature</key>'; \
+	  echo '        <string>SILX</string>'; \
+	  echo '</dict>'; \
+	  echo '</plist>'; \
+	} > $@/Contents/Info.plist
+	echo 'APPLSILX' > $@/Contents/PkgInfo
+
+.PHONY: silex.app
+# 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/tools/silex/SiloArrayView.cpp b/tools/silex/SiloArrayView.cpp
new file mode 100644
index 0000000..bce7426
--- /dev/null
+++ b/tools/silex/SiloArrayView.cpp
@@ -0,0 +1,248 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloArrayView.h"
+#include <SiloFile.h>
+#include <QListWidget>
+#include <iostream>
+#include <cstdlib>
+using std::cerr;
+
+// ----------------------------------------------------------------------------
+//                            Array View
+// ----------------------------------------------------------------------------
+
+// ****************************************************************************
+//  Constructor: SiloArrayViewWindow::SiloArrayViewWindow
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark Miller, Tue 23 Mar 11:19:13 PDT 2004
+//    Fixed problem with character arrays longer than 1024 chars
+//    Added missing call to free memory allocated by GetVar call
+//
+//    Jeremy Meredith, Mon May 17 11:56:24 PDT 2004
+//    Rewrote character array code to fix garbage/missing character output
+//    and prevent it splitting at 1024 bytes.
+//
+//    Jeremy Meredith, Wed Oct 13 20:32:56 PDT 2004
+//    Split on spaces, semicolons, or by length depending on a heuristic
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+//    Mark C. Miller, Fri Dec  4 15:19:47 PST 2009
+//    Adding support for long long type
+//
+//    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+//    Conditionally compile long long support only when its
+//    different from long.
+//
+//    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+//    Made long long support UNconditionally compiled.
+// ****************************************************************************
+SiloArrayViewWindow::SiloArrayViewWindow(SiloFile *s, const QString &n,
+                                         QWidget *p)
+    : QMainWindow(p), silo(s), name(n)
+{
+    setWindowTitle(QString("Array: ")+name);
+
+    lb = new QListWidget(this);
+    setCentralWidget(lb);
+
+    void *var = silo->GetVar(name);
+    if (!var)
+    {
+        cerr << "SiloArrayViewWindow::SiloArrayViewWindow -- not an array var\n";
+        throw;
+    }
+
+    int type = silo->GetVarType(name);
+    int len  = silo->GetVarLength(name);
+
+    if (type != DB_CHAR)
+    {
+        // Just a bunch of numbers: one per line
+        for (int i=0; i<len; i++)
+        {
+            char str[256];
+            switch (type)
+            {
+              case DB_INT:
+                sprintf(str, "%-4d: %d", i, ((int*)var)[i]);
+                break;
+              case DB_SHORT:
+                sprintf(str, "%-4d: %d", i, ((short*)var)[i]);
+                break;
+              case DB_LONG:
+                sprintf(str, "%-4d: %ld", i, ((long*)var)[i]);
+                break;
+              case DB_LONG_LONG:
+                sprintf(str, "%-4d: %lld", i, ((long long*)var)[i]);
+                break;
+              case DB_FLOAT:
+                sprintf(str, "%-4d: %g", i, ((float*)var)[i]);
+                break;
+              case DB_DOUBLE:
+                sprintf(str, "%-4d: %g", i, ((double*)var)[i]);
+                break;
+              case DB_CHAR:
+                sprintf(str, "%-4d: %c", i, ((char*)var)[i]);
+                break;
+              case DB_NOTYPE:
+                sprintf(str, "%-4d: NOTYPE", i);
+                break;
+              default:
+                sprintf(str, "%-4d: type ???", i);
+                break;
+            }
+            lb->addItem(str);
+        }
+    }
+    else
+    {
+        // Guess how to split the string based on a heuristic:
+        //  - If the length is short, just stick it in
+        //  - If there are an appropriate number of semicolons or spaces, 
+        //                                      split on them
+        //  - Otherwise, split by a constant length
+        int numSemi = 0;
+        int numSpace = 0;
+        int numIdeal = (len/100) + 1;
+        int numMax   = (len/400) + 1;
+        for (int j=0; j<len; j++)
+        {
+            if (((char*)var)[j] == ' ')
+                numSpace++;
+            if (((char*)var)[j] == ';')
+                numSemi++;
+        }
+
+        if (numSpace < numMax && numSemi < numMax)
+        {
+            // Copy the character array into a temporary buffer,
+            // splitting by length
+            char *str = new char[len+1];
+            char *p = str;
+            int tmplen = 0;
+            for (int i=0; i<len; i++)
+            {
+                *p = ((char*)var)[i];
+                if (tmplen == 400)
+                {
+                    p++;
+                    *p = '\0';
+                    lb->addItem(str);
+                    p = str;
+                    tmplen = 0;
+                }
+                else
+                {
+                    p++;
+                    tmplen++;
+                }
+            }
+            if (p != str)
+            {
+                *p = '\0';
+                lb->addItem(str);
+            }
+            delete[] str;
+        }
+        else
+        {
+            // Copy the character array into a temporary buffer,
+            // splitting at the separator, and putting the result in a list box
+            char splitChar;
+            if (numSpace==0)
+                splitChar = ';';
+            else if (numSemi==0)
+                splitChar = ' ';
+            else if (abs(numSpace-numIdeal) > abs(numSemi-numIdeal))
+                splitChar = ';';
+            else
+                splitChar = ' ';
+            
+            char *str = new char[len+1];
+            char *p = str;
+            for (int i=0; i<len; i++)
+            {
+                *p = ((char*)var)[i];
+                if (*p == splitChar)
+                {
+                    if (p != str)
+                    {
+                        *p = '\0';
+                        lb->addItem(str);
+                    }
+                    p = str;
+                }
+                else
+                {
+                    p++;
+                }
+            }
+            if (p != str)
+            {
+                *p = '\0';
+                lb->addItem(str);
+            }
+            delete[] str;
+        }
+    }
+
+    free(var);
+}
diff --git a/tools/silex/SiloArrayView.h b/tools/silex/SiloArrayView.h
new file mode 100644
index 0000000..452ede3
--- /dev/null
+++ b/tools/silex/SiloArrayView.h
@@ -0,0 +1,87 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILOARRAYVIEW_H
+#define SILOARRAYVIEW_H
+
+#include <QMainWindow>
+class SiloFile;
+class QListWidget;
+
+// ****************************************************************************
+//  Class:  SiloArrayViewWindow
+//
+//  Purpose:
+//    Window which views an array.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloArrayViewWindow : public QMainWindow
+{
+    Q_OBJECT
+  public:
+    SiloArrayViewWindow(SiloFile *s, const QString &n, QWidget *p);
+  private:
+    QListWidget *lb;
+    SiloFile *silo;
+    QString   name;
+};
+
+#endif
diff --git a/tools/silex/SiloDirTreeView.cpp b/tools/silex/SiloDirTreeView.cpp
new file mode 100644
index 0000000..c389e56
--- /dev/null
+++ b/tools/silex/SiloDirTreeView.cpp
@@ -0,0 +1,184 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloDirTreeView.h"
+#include <SiloFile.h>
+#include <QPixmap>
+
+#include "folder.xpm"
+
+// ****************************************************************************
+//  Constructor:  SiloDirTreeView::SiloDirTreeView
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloDirTreeView::SiloDirTreeView(SiloFile *s, QWidget *p)
+    : QTreeWidget(p), silo(s)
+{
+    folder_pixmap = new QPixmap(folder_xpm);
+ 
+    setColumnCount(1);
+    headerItem()->setText(0,"Contents");
+
+    total_items = 0;
+    QTreeWidgetItem *root = AddDir(silo->root, NULL);
+    root->setExpanded(true);
+}
+
+// ****************************************************************************
+//  Method:  SiloDirTreeView::AddDir
+//
+//  Purpose:
+//    Add a new directory to the DirTree.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+QTreeWidgetItem *
+SiloDirTreeView::AddDir(SiloDir *d, QTreeWidgetItem *parent)
+{
+    total_items++;
+
+    QTreeWidgetItem *item;
+    if (!parent)
+        item = new SiloDirTreeViewItem(d, this, d->name);
+    else
+        item = new SiloDirTreeViewItem(d, parent, d->name);
+
+    item->setIcon(0,*folder_pixmap);
+    for (unsigned int i=0; i<d->subdir.size(); i++)
+        AddDir(d->subdir[i], item);
+
+    return item;
+}
+
+// ****************************************************************************
+//  Method:  SiloDirTreeView::Set
+//
+//  Purpose:
+//    Reset the view to a new file.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Tue Oct 12 20:52:16 PDT 2004
+//    Set the internal silo file to the new file.
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirTreeView::Set(SiloFile *s)
+{
+    silo = s;
+    clear();
+    total_items = 0;
+    QTreeWidgetItem *root = AddDir(silo->root, NULL);
+    root->setExpanded(true);
+}
+
+// ****************************************************************************
+//  Method:  SiloDirTreeView::OpenRootDir
+//
+//  Purpose:
+//    Select the root directory of the tree.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirTreeView::OpenRootDir()
+{
+    setCurrentItem(topLevelItem(0));
+}
+
+// ****************************************************************************
+//  Method:  SiloDirTreeView::resizeEvent
+//
+//  Purpose:
+//    Make the column header fill the width of the listview.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirTreeView::resizeEvent(QResizeEvent *re)
+{
+    QTreeWidget::resizeEvent(re);
+    setColumnWidth(0, width() - 4);
+}
+
diff --git a/tools/silex/SiloDirTreeView.h b/tools/silex/SiloDirTreeView.h
new file mode 100644
index 0000000..ffea1ab
--- /dev/null
+++ b/tools/silex/SiloDirTreeView.h
@@ -0,0 +1,120 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILODIRTREEVIEW_H
+#define SILODIRTREEVIEW_H
+
+#include <QTreeWidget>
+class SiloFile;
+class SiloDir;
+
+// ****************************************************************************
+//  Class:  SiloDirTreeViewItem
+//
+//  Purpose:
+//    An item for a SiloDirTreeView.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloDirTreeViewItem : public QTreeWidgetItem
+{
+  public:
+    SiloDir *dir;
+
+    SiloDirTreeViewItem(SiloDir *d, QTreeWidget *lv, const QString &n)
+        : QTreeWidgetItem(lv,QStringList(n)), dir(d) { };
+    SiloDirTreeViewItem(SiloDir *d, QTreeWidgetItem *li, const QString &n) 
+        : QTreeWidgetItem(li,QStringList(n)), dir(d) { };
+};
+
+// ****************************************************************************
+//  Class:  SiloDirTreeView
+//
+//  Purpose:
+//    ListView-style container for viewing a Silo directory tree.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloDirTreeView : public QTreeWidget
+{
+    Q_OBJECT
+  public:
+    SiloDirTreeView(SiloFile *s, QWidget *p);
+    void Set(SiloFile *s);
+    void OpenRootDir();
+
+  protected:
+    virtual void resizeEvent(QResizeEvent *re);
+
+  private:
+    int total_items;
+    SiloFile *silo;
+    QPixmap *folder_pixmap;
+
+    QTreeWidgetItem *AddDir(SiloDir *d, QTreeWidgetItem *parent);
+};
+
+#endif
diff --git a/tools/silex/SiloDirView.cpp b/tools/silex/SiloDirView.cpp
new file mode 100644
index 0000000..4b14574
--- /dev/null
+++ b/tools/silex/SiloDirView.cpp
@@ -0,0 +1,383 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloDirView.h"
+#include <SiloDirTreeView.h>
+#include <SiloFile.h>
+
+#include <QPixmap>
+#include <QTreeWidgetItem>
+
+#include "mesh.xpm"
+#include "mat.xpm"
+#include "var.xpm"
+#include "object.xpm"
+#include "species.xpm"
+#include "curve.xpm"
+#include "array.xpm"
+#include "silovar.xpm"
+
+
+// ****************************************************************************
+//  Constructor:  SiloDirView::SiloDirView
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloDirView::SiloDirView(QWidget *p)
+    : QTreeWidget(p)
+{
+    total_items = 0;
+
+    mesh_pixmap   = new QPixmap(mesh_xpm);
+    mat_pixmap    = new QPixmap(mat_xpm);
+    var_pixmap    = new QPixmap(var_xpm);
+    obj_pixmap    = new QPixmap(object_xpm);
+    spec_pixmap   = new QPixmap(species_xpm);
+    curve_pixmap  = new QPixmap(curve_xpm);
+    array_pixmap  = new QPixmap(array_xpm);
+    silovar_pixmap= new QPixmap(silovar_xpm);
+
+    setColumnCount(1);
+    headerItem()->setText(0,"Objects");
+    setRootIsDecorated(true);
+}
+
+// ****************************************************************************
+//  Method:  SiloDirView::Set
+//
+//  Purpose:
+//    View the TOC of a new directory.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Fri Jul 12 16:57:37 PDT 2002
+//    Split the total_items calculation into multiple lines.  g++-2.96
+//    was choking on it for some odd reason.
+//
+//    Mark C. Miller, Tue Sep 13 20:09:49 PDT 2005
+//    Added support for new silo objects; defvars, csgmesh/vars
+//
+//    Mark C. Miller, Thu Nov  3 16:59:41 PST 2005
+//    Added multimesh-adjacency object support 
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirView::Set(SiloDir *d)
+{
+    clear();
+
+    total_items  = d->array.size()           + (d->array.size()           ? 1:0);
+    total_items += d->obj.size()             + (d->obj.size()             ? 1:0);
+    total_items += d->var.size()             + (d->var.size()             ? 1:0);
+    total_items += d->defvars.size()         + (d->defvars.size()         ? 1:0);
+    total_items += d->matspecies.size()      + (d->matspecies.size()      ? 1:0);
+    total_items += d->mat.size()             + (d->mat.size()             ? 1:0);
+    total_items += d->ptvar.size()           + (d->ptvar.size()           ? 1:0);
+    total_items += d->ptmesh.size()          + (d->ptmesh.size()          ? 1:0);
+    total_items += d->ucdvar.size()          + (d->ucdvar.size()          ? 1:0);
+    total_items += d->ucdmesh.size()         + (d->ucdmesh.size()         ? 1:0);
+    total_items += d->qvar.size()            + (d->qvar.size()            ? 1:0);
+    total_items += d->qmesh.size()           + (d->qmesh.size()           ? 1:0);
+    total_items += d->multimatspecies.size() + (d->multimatspecies.size() ? 1:0);
+    total_items += d->multimat.size()        + (d->multimat.size()        ? 1:0);
+    total_items += d->multivar.size()        + (d->multivar.size()        ? 1:0);
+    total_items += d->multimesh.size()       + (d->multimesh.size()       ? 1:0);
+    total_items += d->multimeshadj.size()    + (d->multimeshadj.size()    ? 1:0);
+    total_items += d->curve.size()           + (d->curve.size()           ? 1:0);
+    total_items += d->csgvar.size()          + (d->csgvar.size()          ? 1:0);
+    total_items += d->csgmesh.size()         + (d->csgmesh.size()         ? 1:0);
+
+    bool expandVars = true;
+    if (d->curve.size())
+    {
+        SiloDirViewItem *curve = new SiloDirViewItem(NULL,this, "Curves");
+        curve->setIcon(0, *curve_pixmap);
+        for (unsigned int i=0; i<d->curve.size(); i++)
+            new SiloDirViewItem(d,curve, d->curve[i]);
+        curve->setExpanded(true);
+    }
+
+    if (d->multimesh.size())
+    {
+        SiloDirViewItem *multimesh = new SiloDirViewItem(NULL,this, "MultiMeshes");
+        multimesh->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->multimesh.size(); i++)
+            new SiloDirViewItem(d,multimesh, d->multimesh[i]);
+        multimesh->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->multivar.size())
+    {
+        SiloDirViewItem *multivar = new SiloDirViewItem(NULL,this, "MultiVars");
+        multivar->setIcon(0, *var_pixmap);
+        for (unsigned int i=0; i<d->multivar.size(); i++)
+            new SiloDirViewItem(d,multivar, d->multivar[i]);
+        multivar->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->multimeshadj.size())
+    {
+        SiloDirViewItem *multimeshadj = new SiloDirViewItem(NULL,this, "MultiMesheadjs");
+        multimeshadj->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->multimeshadj.size(); i++)
+            new SiloDirViewItem(d,multimeshadj, d->multimeshadj[i]);
+        multimeshadj->setExpanded(true);
+        expandVars = false;
+    }
+
+
+    if (d->multimat.size())
+    {
+        SiloDirViewItem *multimat = new SiloDirViewItem(NULL,this, "MultiMats");
+        multimat->setIcon(0, *mat_pixmap);
+        for (unsigned int i=0; i<d->multimat.size(); i++)
+            new SiloDirViewItem(d,multimat, d->multimat[i]);
+        multimat->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->multimatspecies.size())
+    {
+        SiloDirViewItem *multimatspecies = new SiloDirViewItem(NULL,this, "MultiSpecies");
+        multimatspecies->setIcon(0, *spec_pixmap);
+        for (unsigned int i=0; i<d->multimatspecies.size(); i++)
+            new SiloDirViewItem(d,multimatspecies, d->multimatspecies[i]);
+        multimatspecies->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->qmesh.size())
+    {
+        SiloDirViewItem *qmesh = new SiloDirViewItem(NULL,this, "QuadMeshes");
+        qmesh->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->qmesh.size(); i++)
+            new SiloDirViewItem(d,qmesh, d->qmesh[i]);
+        qmesh->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->qvar.size())
+    {
+        SiloDirViewItem *qvar = new SiloDirViewItem(NULL,this, "QuadVars");
+        qvar->setIcon(0, *var_pixmap);
+        for (unsigned int i=0; i<d->qvar.size(); i++)
+            new SiloDirViewItem(d,qvar, d->qvar[i]);
+        qvar->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->ucdmesh.size())
+    {
+        SiloDirViewItem *ucdmesh = new SiloDirViewItem(NULL,this, "UCDMeshes");
+        ucdmesh->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->ucdmesh.size(); i++)
+            new SiloDirViewItem(d,ucdmesh, d->ucdmesh[i]);
+        ucdmesh->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->ucdvar.size())
+    {
+        SiloDirViewItem *ucdvar = new SiloDirViewItem(NULL,this, "UCDVars");
+        ucdvar->setIcon(0, *var_pixmap);
+        for (unsigned int i=0; i<d->ucdvar.size(); i++)
+            new SiloDirViewItem(d,ucdvar, d->ucdvar[i]);
+        ucdvar->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->ptmesh.size())
+    {
+        SiloDirViewItem *ptmesh = new SiloDirViewItem(NULL,this, "PointMeshes");
+        ptmesh->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->ptmesh.size(); i++)
+            new SiloDirViewItem(d,ptmesh, d->ptmesh[i]);
+        ptmesh->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->ptvar.size())
+    {
+        SiloDirViewItem *ptvar = new SiloDirViewItem(NULL,this, "PointVars");
+        ptvar->setIcon(0, *var_pixmap);
+        for (unsigned int i=0; i<d->ptvar.size(); i++)
+            new SiloDirViewItem(d,ptvar, d->ptvar[i]);
+        ptvar->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->csgmesh.size())
+    {
+        SiloDirViewItem *csgmesh = new SiloDirViewItem(NULL,this, "CSGMeshes");
+        csgmesh->setIcon(0, *mesh_pixmap);
+        for (unsigned int i=0; i<d->csgmesh.size(); i++)
+            new SiloDirViewItem(d,csgmesh, d->csgmesh[i]);
+        csgmesh->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->csgvar.size())
+    {
+        SiloDirViewItem *csgvar = new SiloDirViewItem(NULL,this, "CSGVars");
+        csgvar->setIcon(0, *var_pixmap);
+        for (unsigned int i=0; i<d->csgvar.size(); i++)
+            new SiloDirViewItem(d,csgvar, d->csgvar[i]);
+        csgvar->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->mat.size())
+    {
+        SiloDirViewItem *mat = new SiloDirViewItem(NULL,this, "Materials");
+        mat->setIcon(0, *mat_pixmap);
+        for (unsigned int i=0; i<d->mat.size(); i++)
+            new SiloDirViewItem(d,mat, d->mat[i]);
+        mat->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->matspecies.size())
+    {
+        SiloDirViewItem *matspecies = new SiloDirViewItem(NULL,this, "Species");
+        matspecies->setIcon(0, *spec_pixmap);
+        for (unsigned int i=0; i<d->matspecies.size(); i++)
+            new SiloDirViewItem(d,matspecies, d->matspecies[i]);
+        matspecies->setExpanded(true);
+        expandVars = false;
+    }
+
+    if (d->obj.size())
+    {
+        SiloDirViewItem *obj = new SiloDirViewItem(NULL,this, "Objects");
+        obj->setIcon(0, *obj_pixmap);
+        for (unsigned int i=0; i<d->obj.size(); i++)
+            new SiloDirViewItem(d,obj, d->obj[i]);
+        obj->setExpanded(true);
+    }
+
+    if (d->array.size())
+    {
+        SiloDirViewItem *array = new SiloDirViewItem(NULL,this, "Arrays");
+        array->setIcon(0, *array_pixmap);
+        for (unsigned int i=0; i<d->array.size(); i++)
+            new SiloDirViewItem(d,array, d->array[i]);
+        array->setExpanded(true);
+    }
+
+    if (d->var.size())
+    {
+        SiloDirViewItem *var = new SiloDirViewItem(NULL,this, "Vars");
+        var->setIcon(0, *silovar_pixmap);
+        for (unsigned int i=0; i<d->var.size(); i++)
+            new SiloDirViewItem(d,var, d->var[i]);
+        if (expandVars)
+            var->setExpanded(true);
+    }
+}
+
+// ****************************************************************************
+//  Method:  SiloDirView::ChangeDir
+//
+//  Purpose:
+//    Wrapper for "Set" which is suitable for a QTreeWidgetItem callback.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirView::ChangeDir(QTreeWidgetItem *i)
+{
+    SiloDirTreeViewItem *item = (SiloDirTreeViewItem*)i;
+    headerItem()->setText(0, QString("Contents of ") + item->dir->path);
+    Set(item->dir);
+}
+
+// ****************************************************************************
+//  Method:  SiloDirView::resizeEvent
+//
+//  Purpose:
+//    Make the column header fill the width of the listview.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloDirView::resizeEvent(QResizeEvent *re)
+{
+    QTreeWidget::resizeEvent(re);
+    setColumnWidth(0, width() - 4);
+}
diff --git a/tools/silex/SiloDirView.h b/tools/silex/SiloDirView.h
new file mode 100644
index 0000000..0382a63
--- /dev/null
+++ b/tools/silex/SiloDirView.h
@@ -0,0 +1,127 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILODIRVIEW_H
+#define SILODIRVIEW_H
+
+#include <QTreeWidget>
+class SiloDir;
+
+// ****************************************************************************
+//  Class:  SiloDirViewItem
+//
+//  Purpose:
+//    An item for a SiloDirView.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloDirViewItem : public QTreeWidgetItem
+{
+  public:
+    SiloDir *dir;
+    QString  name;
+
+    SiloDirViewItem(SiloDir *d, QTreeWidget *lv, const QString &n)
+        : QTreeWidgetItem(lv,QStringList(n)), dir(d), name(n) { };
+    SiloDirViewItem(SiloDir *d, QTreeWidgetItem *li, const QString &n) 
+        : QTreeWidgetItem(li,QStringList(n)), dir(d), name(n) { };
+};
+
+// ****************************************************************************
+//  Class:  SiloDirView
+//
+//  Purpose:
+//    ListView-style container for viewing the TOC of a Silo directory.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloDirView : public QTreeWidget
+{
+    Q_OBJECT
+  public:
+    SiloDirView(QWidget *p);
+
+    void Set(SiloDir *d);
+
+  public slots:
+    void ChangeDir(QTreeWidgetItem *i);
+
+  protected:
+    virtual void resizeEvent(QResizeEvent *re);
+
+  private:
+    int total_items;
+    QPixmap *mesh_pixmap;
+    QPixmap *mat_pixmap;
+    QPixmap *var_pixmap;
+    QPixmap *obj_pixmap;
+    QPixmap *spec_pixmap;
+    QPixmap *curve_pixmap;
+    QPixmap *array_pixmap;
+    QPixmap *silovar_pixmap;
+};
+
+#endif
diff --git a/tools/silex/SiloFile.cpp b/tools/silex/SiloFile.cpp
new file mode 100644
index 0000000..5d9206e
--- /dev/null
+++ b/tools/silex/SiloFile.cpp
@@ -0,0 +1,287 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloFile.h"
+
+#include <silo.h>
+
+// ----------------------------------------------------------------------------
+//                             Silo Dir
+// ----------------------------------------------------------------------------
+
+
+// ****************************************************************************
+//  Constructor:  SiloDir::SiloDir
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Brad Whitlock, Mon Nov 18 12:02:13 PDT 2002
+//    Ported to Windows.
+//
+//    Mark C. Miller, Tue Sep 13 20:09:49 PDT 2005
+//    Added support for new silo objects; defvars, csgmesh/vars
+//
+//    Mark C. Miller, Thu Nov  3 16:59:41 PST 2005
+//    Made it able to compile with different versions of Silo
+//
+//    Mark C. Miller, Tue Oct  7 21:22:04 PDT 2008
+//    Quieted frequent warnings of DBFreeCompression not being implemented.
+//    This can be a common situation.
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloDir::SiloDir(DBfile *db, const QString &name_, const QString &path_)
+{
+    name = name_;
+    path = path_;
+    static bool canCallFreeCompression[20] = {true, true, true, true, true,
+                                              true, true, true, true, true,
+                                              true, true, true, true, true,
+                                              true, true, true, true, true};
+
+    int drt = DBGetDriverType(db);
+    if (canCallFreeCompression[drt] && DBFreeCompressionResources(db,0) == -1)
+        canCallFreeCompression[drt] = false;
+    DBSetDir(db, (const char*)path.toAscii());
+    DBtoc *toc = DBGetToc(db);
+
+    int i;
+    for (i=0; i<toc->ncurve; i++)
+        curve.push_back(toc->curve_names[i]);
+#ifdef DBCSG_QUADRIC_G
+    for (i=0; i<toc->ncsgmesh; i++)
+        csgmesh.push_back(toc->csgmesh_names[i]);
+    for (i=0; i<toc->ncsgvar; i++)
+        csgvar.push_back(toc->csgvar_names[i]);
+#endif
+#ifdef DB_VARTYPE_SCALAR
+    for (i=0; i<toc->ndefvars; i++)
+        defvars.push_back(toc->defvars_names[i]);
+#endif
+    for (i=0; i<toc->nmultimesh; i++)
+        multimesh.push_back(toc->multimesh_names[i]);
+    for (i=0; i<toc->nmultivar; i++)
+        multivar.push_back(toc->multivar_names[i]);
+#ifdef DBCSG_QUADRIC_G // mmadj came into Silo same time as CSG stuff
+    for (i=0; i<toc->nmultimeshadj; i++)
+        multimeshadj.push_back(toc->multimeshadj_names[i]);
+#endif
+    for (i=0; i<toc->nmultimat; i++)
+        multimat.push_back(toc->multimat_names[i]);
+    for (i=0; i<toc->nmultimatspecies; i++)
+        multimatspecies.push_back(toc->multimatspecies_names[i]);
+    for (i=0; i<toc->nqmesh; i++)
+        qmesh.push_back(toc->qmesh_names[i]);
+    for (i=0; i<toc->nqvar; i++)
+        qvar.push_back(toc->qvar_names[i]);
+    for (i=0; i<toc->nucdmesh; i++)
+        ucdmesh.push_back(toc->ucdmesh_names[i]);
+    for (i=0; i<toc->nucdvar; i++)
+        ucdvar.push_back(toc->ucdvar_names[i]);
+    for (i=0; i<toc->nptmesh; i++)
+        ptmesh.push_back(toc->ptmesh_names[i]);
+    for (i=0; i<toc->nptvar; i++)
+        ptvar.push_back(toc->ptvar_names[i]);
+    for (i=0; i<toc->nmat; i++)
+        mat.push_back(toc->mat_names[i]);
+    for (i=0; i<toc->nmatspecies; i++)
+        matspecies.push_back(toc->matspecies_names[i]);
+    for (i=0; i<toc->nvar; i++)
+        var.push_back(toc->var_names[i]);
+    for (i=0; i<toc->nobj; i++)
+        obj.push_back(toc->obj_names[i]);
+    for (i=0; i<toc->narrays; i++)
+        array.push_back(toc->array_names[i]);
+    for (i=0; i<toc->ndir; i++)
+        dir.push_back(toc->dir_names[i]);
+
+    for (unsigned int i=0; i<dir.size(); i++)
+    {
+        if (name == "/")
+            subdir.push_back(new SiloDir(db, dir[i], path + dir[i]));
+        else
+            subdir.push_back(new SiloDir(db, dir[i], path + "/" + dir[i]));
+    }
+}
+
+// ****************************************************************************
+//  Destructor:  SiloDir::~SiloDir
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+// ****************************************************************************
+SiloDir::~SiloDir()
+{
+    for (unsigned int i=0; i<subdir.size(); i++)
+    {
+        delete subdir[i];
+    }
+}
+
+
+
+
+// ----------------------------------------------------------------------------
+//                              Silo File
+// ----------------------------------------------------------------------------
+
+
+// ****************************************************************************
+//  Constructor:  SiloFile::SiloFile
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Made it more graceful on failure to open
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloFile::SiloFile(const QString &name)
+{
+    db = DBOpen((const char*)name.toAscii(), DB_UNKNOWN, DB_READ);
+    if (db)
+        root = new SiloDir(db, "/", "/");
+    else
+        root = 0;
+}
+
+
+// ****************************************************************************
+//  Destructor:  SiloFile::~SiloFile
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Added some missing delete calls
+//
+// ****************************************************************************
+SiloFile::~SiloFile()
+{
+    if (root) delete root;
+    root = 0;
+    if (db) DBClose(db);
+    db = 0;
+}
+
+
+// ****************************************************************************
+//  Methods:     Silo API Functions
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+
+void*
+SiloFile::GetVar(const QString &name)
+{
+    return DBGetVar(db, (const char*)name.toAscii());
+}
+
+int
+SiloFile::GetVarType(const QString &name)
+{
+    return DBGetVarType(db, (const char*)name.toAscii());
+}
+
+int
+SiloFile::GetVarLength(const QString &name)
+{
+    return DBGetVarLength(db, (const char*)name.toAscii());
+}
+
+DBobject*
+SiloFile::GetObject(const QString &name)
+{
+    return DBGetObject(db, (const char*)name.toAscii());
+}
+
+void*
+SiloFile::GetComponent(const QString &oname, const QString &cname)
+{
+    return DBGetComponent(db, (const char*)oname.toAscii(), (const char*)cname.toAscii());
+}
+
+int
+SiloFile::GetComponentType(const QString &oname, const QString &cname)
+{
+    return DBGetComponentType(db, (const char*)oname.toAscii(), (const char*)cname.toAscii());
+}
+
+DBObjectType
+SiloFile::InqVarType(const QString &name)
+{
+    return DBInqVarType(db, (const char*)name.toAscii());
+}
+
+bool
+SiloFile::InqVarExists(const QString &name)
+{
+    return DBInqVarExists(db, (const char*)name.toAscii());
+}
diff --git a/tools/silex/SiloFile.h b/tools/silex/SiloFile.h
new file mode 100644
index 0000000..e97fac9
--- /dev/null
+++ b/tools/silex/SiloFile.h
@@ -0,0 +1,160 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILOFILE_H
+#define SILOFILE_H
+
+#include <silo.h>
+#include <config.h>
+#include <QString>
+#include <vector>
+using std::vector;
+
+// ****************************************************************************
+//  Class:  SiloDir
+//
+//  Purpose:
+//    Encapsulation of a silo directory (TOC).
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//
+//    Mark C. Miller, Tue Sep 13 20:09:49 PDT 2005
+//    Added support for new silo objects; defvars, csgmesh/vars
+//
+//    Mark C. Miller, Thu Nov  3 16:59:41 PST 2005
+//    Added support for multimesh adjacency object
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloDir
+{
+  public:
+    QString          name;
+    QString          path;
+    vector<SiloDir*> subdir;
+
+    vector<QString>  curve;
+    vector<QString>  csgmesh;
+    vector<QString>  csgvar;
+    vector<QString>  defvars;
+    vector<QString>  multimesh;
+    vector<QString>  multimeshadj;
+    vector<QString>  multivar;
+    vector<QString>  multimat;
+    vector<QString>  multimatspecies;
+    vector<QString>  qmesh;
+    vector<QString>  qvar;
+    vector<QString>  ucdmesh;
+    vector<QString>  ucdvar;
+    vector<QString>  ptmesh;
+    vector<QString>  ptvar;
+    vector<QString>  mat;
+    vector<QString>  matspecies;
+    vector<QString>  var;
+    vector<QString>  obj;
+    vector<QString>  array;
+    vector<QString>  dir;
+  public:
+    SiloDir(DBfile *db, const QString &name, const QString &path);
+    ~SiloDir();
+};
+
+// ****************************************************************************
+//  Class:  SiloFile
+//
+//  Purpose:
+//    Encapsulation of a Silo file.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Added IsOpen()
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+//    Mark C. Miller, Wed May 26 18:19:11 PDT 2010
+//    Added InqVarExists.
+// ****************************************************************************
+class SiloFile
+{
+  public:
+    SiloDir *root;
+
+  public:
+    SiloFile(const QString &name);
+    ~SiloFile();
+
+    bool          IsOpen() const { return db != 0; };
+    void         *GetVar(const QString &name);
+    int           GetVarType(const QString &name);
+    int           GetVarLength(const QString &name);
+    DBobject     *GetObject(const QString &name);
+    void         *GetComponent(const QString &oname, const QString &cname);
+    int           GetComponentType(const QString &oname, const QString &cname);
+    DBObjectType  InqVarType(const QString &name);
+    bool          InqVarExists(const QString &name);
+
+  private:
+    DBfile *db;
+};
+
+#endif
diff --git a/tools/silex/SiloObjectView.cpp b/tools/silex/SiloObjectView.cpp
new file mode 100644
index 0000000..065c5b6
--- /dev/null
+++ b/tools/silex/SiloObjectView.cpp
@@ -0,0 +1,305 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloObjectView.h"
+#include <SiloFile.h>
+#include <QMessageBox>
+#include <iostream>
+#include <string>
+#include <cstdlib>
+
+// ----------------------------------------------------------------------------
+//                            Object View Window
+// ----------------------------------------------------------------------------
+
+// ****************************************************************************
+//  Constructor:  SiloObjectViewWindow::SiloObjectViewWindow
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloObjectViewWindow::SiloObjectViewWindow(SiloFile *s, const QString &n, QWidget *p)
+    : QMainWindow(p), silo(s), name(n)
+{
+    setWindowTitle(QString("Object: ")+name);
+
+    SiloObjectView *ov = new SiloObjectView(silo,name,this);
+    setCentralWidget(ov);
+    connect(ov,   SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
+            this, SLOT(ShowItem(QTreeWidgetItem*,int)));
+}
+
+// ****************************************************************************
+//  Method:  SiloObjectViewWindow::ShowItem
+//
+//  Purpose:
+//    A slot used to signal a "show var" event.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+//    Mark C. Miller, Wed May 26 18:19:30 PDT 2010
+//    Added logic to first test for existence of var before attempting to
+//    dereference it. This prevents silex from coring when reading poorly
+//    constructed silo files.
+// ****************************************************************************
+void
+SiloObjectViewWindow::ShowItem(QTreeWidgetItem *i, int)
+{
+    if (i->text(1) == "var")
+    {
+        if (silo->InqVarExists(i->text(2)))
+            emit showRequested(i->text(2));
+    }
+}
+
+// ----------------------------------------------------------------------------
+//                               Object View
+// ----------------------------------------------------------------------------
+
+// ****************************************************************************
+//  Constructor: SiloObjectView::SiloObjectView
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Mon May 17 12:37:32 PDT 2004
+//    Added a couple calls to free memory and prevent really big leaks.
+//
+//    Mark C. Miller, Wed Apr 20 17:08:36 PDT 2005
+//    Added code to deal with hdf5 formatted strings in pdbname
+//
+//    Jeremy Meredith, Wed May 11 12:42:12 PDT 2005
+//    Show an error message if we get an invalid object.
+//
+//    Mark C. Miller, Tue Nov  6 16:08:19 PST 2007
+//    Fixed compiler warning.
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+//    Mark C. Miller, Fri Dec  4 15:19:47 PST 2009
+//    Adding support for long long type
+//
+//    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+//    Conditionally compile long long support only when its
+//    different from long.
+//
+//    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+//    Made long long support UNconditionally compiled.
+//
+//    Mark C. Miller, Wed Feb  3 08:59:43 PST 2010
+//    Added other centering strings.
+// ****************************************************************************
+SiloObjectView::SiloObjectView(SiloFile *s, const QString &n, QWidget *p)
+    : QTreeWidget(p), silo(s), name(n)
+{
+    //setSorting(-1);
+    setAllColumnsShowFocus(true);
+    setColumnCount(3);
+    headerItem()->setText(0,"Component");
+    headerItem()->setText(1,"Type");
+    headerItem()->setText(2,"Value");
+
+    DBobject *object = silo->GetObject(name);
+    if (!object)
+    {
+        QMessageBox::warning(this, "silex", "Could not read this object.\n"
+           "The file may have been written using an incomplete driver.", "OK");
+        return;
+    }
+
+    for (int i=0; i<object->ncomponents; i++)
+    {
+        QString compname = object->comp_names[i];
+        QString pdbname  = object->pdb_names[i];
+        void *comp = silo->GetComponent(name, compname);
+        if (!comp)
+        {
+            const char *asciiname = name.toAscii();
+            const char *asciicomp = compname.toAscii();
+            std::cerr << "ERROR: DBGetComponent failed for object '"
+                      << asciiname
+                      <<"', component '"
+                      << asciicomp
+                      <<std::endl;
+            continue;
+        }
+        int   type = silo->GetComponentType(name, compname);
+        QString typestr = "";
+        char  value[256] = "";
+        int ival = -1;
+        switch (type)
+        {
+          case DB_INT:
+            typestr = "int";
+            sprintf(value, "%d", *((int*)comp));
+            ival = *((int*)comp);
+            break;
+          case DB_SHORT:
+            typestr = "short";
+            sprintf(value, "%d", *((short*)comp));
+            ival = *((short*)comp);
+            break;
+          case DB_LONG:
+            typestr = "long";
+            sprintf(value, "%ld", *((long*)comp));
+            ival = (int) *((long*)comp);
+            break;
+          case DB_LONG_LONG:
+            typestr = "long long";
+            sprintf(value, "%lld", *((long long*)comp));
+            ival = (int) *((long long*)comp);
+            break;
+          case DB_FLOAT:
+            typestr = "float";
+            sprintf(value, "%g", *((float*)comp));
+            break;
+          case DB_DOUBLE:
+            typestr = "double";
+            sprintf(value, "%g", *((double*)comp));
+            break;
+          case DB_CHAR:
+            typestr = "char";
+            sprintf(value, "%s", ((char*)comp));
+            break;
+          case DB_NOTYPE:
+            typestr = "notype";
+            sprintf(value, "NOTYPE");
+            break;
+          default:
+            typestr = "var";
+            std::string valStr = std::string(pdbname.toAscii());
+            if (pdbname.indexOf("'<s>") == 0)
+            {
+                int len = pdbname.length();
+                valStr = std::string((const char*)(pdbname.toAscii()),4,len-5);
+            }
+            sprintf(value, "%s", valStr.c_str());
+            break;
+        }
+
+        // No such call as "DBFreeComponent".  Maybe there should be one!
+        free(comp);
+        comp = NULL;
+
+        if (type==DB_INT || type==DB_SHORT || type==DB_LONG)
+        {
+            if (compname == "coordtype")
+            {
+                if (ival == DB_COLLINEAR)    strcat(value, " (DB_COLLINEAR)");
+                if (ival == DB_NONCOLLINEAR) strcat(value, " (DB_NONCOLLINEAR)");
+            }
+            if (compname == "centering")
+            {
+                if (ival == DB_NOTCENT)      strcat(value, " (DB_NOTCENT)");
+                if (ival == DB_NODECENT)     strcat(value, " (DB_NODECENT)");
+                if (ival == DB_ZONECENT)     strcat(value, " (DB_ZONECENT)");
+                if (ival == DB_FACECENT)     strcat(value, " (DB_FACECENT)");
+                if (ival == DB_BNDCENT)      strcat(value, " (DB_BNDCENT)");
+                if (ival == DB_EDGECENT)     strcat(value, " (DB_EDGECENT)");
+                if (ival == DB_BLOCKCENT)    strcat(value, " (DB_BLOCKCENT)");
+            }
+            if (compname == "major_order")
+            {
+                if (ival == DB_ROWMAJOR)     strcat(value, " (DB_ROWMAJOR)");
+                if (ival == DB_COLMAJOR)     strcat(value, " (DB_COLMAJOR)");
+            }
+            if (compname == "coord_sys")
+            {
+                if (ival == DB_CARTESIAN)    strcat(value, " (DB_CARTESIAN)");
+                if (ival == DB_CYLINDRICAL)  strcat(value, " (DB_CYLINDRICAL)");
+                if (ival == DB_SPHERICAL)    strcat(value, " (DB_SPHERICAL)");
+                if (ival == DB_NUMERICAL)    strcat(value, " (DB_NUMERICAL)");
+                if (ival == DB_OTHER)        strcat(value, " (DB_OTHER)");
+            }
+            if (compname == "planar")
+            {
+                if (ival == DB_AREA)         strcat(value, " (DB_AREA)");
+                if (ival == DB_VOLUME)       strcat(value, " (DB_VOLUME)");
+            }
+            if (compname == "facetype")
+            {
+                if (ival == DB_RECTILINEAR)  strcat(value, " (DB_RECTILINEAR)");
+                if (ival == DB_CURVILINEAR)  strcat(value, " (DB_CURVILINEAR)");
+            }
+            if (compname == "datatype")
+            {
+                if (ival == DB_INT)          strcat(value, " (DB_INT)");
+                if (ival == DB_SHORT)        strcat(value, " (DB_SHORT)");
+                if (ival == DB_LONG)         strcat(value, " (DB_LONG)");
+                if (ival == DB_FLOAT)        strcat(value, " (DB_FLOAT)");
+                if (ival == DB_DOUBLE)       strcat(value, " (DB_DOUBLE)");
+                if (ival == DB_CHAR)         strcat(value, " (DB_CHAR)");
+                if (ival == DB_NOTYPE)       strcat(value, " (DB_NOTYPE)");
+            }
+        }
+        QStringList sl;
+        sl << object->comp_names[i] << typestr << value;
+        new QTreeWidgetItem(this, sl);
+    }
+
+    total_items = object->ncomponents;
+    DBFreeObject(object);
+}
diff --git a/tools/silex/SiloObjectView.h b/tools/silex/SiloObjectView.h
new file mode 100644
index 0000000..270c509
--- /dev/null
+++ b/tools/silex/SiloObjectView.h
@@ -0,0 +1,115 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILOOBJECTVIEW_H
+#define SILOOBJECTVIEW_H
+
+#include <QTreeWidget>
+#include <QMainWindow>
+class SiloFile;
+
+// ****************************************************************************
+//  Class:  SiloObjectViewWindow
+//
+//  Purpose:
+//    Window which views an object.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloObjectViewWindow : public QMainWindow
+{
+    Q_OBJECT
+  public:
+    SiloObjectViewWindow(SiloFile *s, const QString &n, QWidget *p);
+  signals:
+    void showRequested(const QString&);
+  public slots:
+  void ShowItem(QTreeWidgetItem *i, int);
+  private:
+    SiloFile *silo;
+    QString   name;
+};
+
+// ****************************************************************************
+//  Class:  SiloObjectView
+//
+//  Purpose:
+//    ListView-style container for viewing an object.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloObjectView : public QTreeWidget
+{
+    Q_OBJECT
+  public:
+    SiloObjectView(SiloFile *s, const QString &n, QWidget *p);
+  private:
+    int total_items;
+    SiloFile *silo;
+    QString   name;
+};
+
+#endif
diff --git a/tools/silex/SiloValueView.cpp b/tools/silex/SiloValueView.cpp
new file mode 100644
index 0000000..27e572d
--- /dev/null
+++ b/tools/silex/SiloValueView.cpp
@@ -0,0 +1,145 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloValueView.h"
+#include <SiloFile.h>
+#include <QLabel>
+#include <iostream>
+#include <cstdlib>
+using std::cerr;
+
+// ----------------------------------------------------------------------------
+//                            Value View
+// ----------------------------------------------------------------------------
+
+// ****************************************************************************
+//  Constructor:  SiloValueViewWindow::SiloValueViewWindow
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark Miller, Tue 23 Mar 11:19:13 PDT 2004
+//    Added call to free memory from the Silo DBGetVar call.
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+//    Mark C. Miller, Fri Dec  4 15:19:47 PST 2009
+//    Adding support for long long type
+//
+//    Mark C. Miller, Mon Dec  7 09:50:19 PST 2009
+//    Conditionally compile long long support only when its
+//    different from long.
+//
+//    Mark C. Miller, Mon Jan 11 16:02:16 PST 2010
+//    Made long long support UNconditionally compiled.
+// ****************************************************************************
+SiloValueViewWindow::SiloValueViewWindow(SiloFile *s, const QString &n, QWidget *p)
+    : QMainWindow(p), silo(s), name(n)
+{
+    setWindowTitle(QString("Value: ")+name);
+
+    QLabel *l = new QLabel(this);
+    setCentralWidget(l);
+
+    void *var = silo->GetVar(name);
+    if (!var)
+    {
+        cerr << "SiloValueViewWindow::SiloValueViewWindow -- not an array var\n";
+        throw;
+    }
+
+    int type = silo->GetVarType(name);
+    int len  = silo->GetVarLength(name);
+    char str[4096];
+    switch (type)
+    {
+      case DB_INT:
+        sprintf(str, "int: %d", *((int*)var));
+        
+        break;
+      case DB_SHORT:
+        sprintf(str, "short: %d", *((short*)var));
+        break;
+      case DB_LONG:
+        sprintf(str, "long: %ld", *((long*)var));
+        break;
+      case DB_LONG_LONG:
+        sprintf(str, "long long: %lld", *((long long*)var));
+        break;
+      case DB_FLOAT:
+        sprintf(str, "float: %g", *((float*)var));
+        break;
+      case DB_DOUBLE:
+        sprintf(str, "double: %g", *((double*)var));
+        break;
+      case DB_CHAR:
+        if (len == 1)
+            sprintf(str, "char: %c", *((char*)var));
+        else
+            sprintf(str, "string: %s", ((char*)var));
+        break;
+      case DB_NOTYPE:
+        sprintf(str, "NOTYPE: ???");
+        break;
+      default:
+        sprintf(str, "???: ???");
+        break;
+    }
+    l->setText(str);
+
+    free(var);
+}
+
diff --git a/tools/silex/SiloValueView.h b/tools/silex/SiloValueView.h
new file mode 100644
index 0000000..5e360e9
--- /dev/null
+++ b/tools/silex/SiloValueView.h
@@ -0,0 +1,86 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILOVALUEVIEW_H
+#define SILOVALUEVIEW_H
+
+#include <QMainWindow>
+class SiloFile;
+
+// ****************************************************************************
+//  Class:  SiloValueViewWindow
+//
+//  Purpose:
+//    Window which views a single value.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloValueViewWindow : public QMainWindow
+{
+    Q_OBJECT
+  public:
+    SiloValueViewWindow(SiloFile *s, const QString &n, QWidget *p);
+  private:
+    SiloFile *silo;
+    QString   name;
+};
+
+
+#endif
diff --git a/tools/silex/SiloView.cpp b/tools/silex/SiloView.cpp
new file mode 100644
index 0000000..07a62ac
--- /dev/null
+++ b/tools/silex/SiloView.cpp
@@ -0,0 +1,305 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "SiloView.h"
+#include <SiloFile.h>
+#include <SiloDirTreeView.h>
+#include <SiloDirView.h>
+#include <SiloValueView.h>
+#include <SiloArrayView.h>
+#include <SiloObjectView.h>
+#include <QHeaderView>
+#include <QMessageBox>
+#include <iostream>
+
+// ----------------------------------------------------------------------------
+//                            Silo View
+// ----------------------------------------------------------------------------
+
+// ****************************************************************************
+//  Constructor: SiloView::SiloView
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Wed Sep 24 11:19:27 PDT 2003
+//    I added a call to set the root directory in the directory-contents
+//    panel.  This was unnecessary in Qt versions before 3.x.
+//
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Made it more graceful on failure to open silo
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+SiloView::SiloView(const QString &file, QWidget *p)
+    : QSplitter(p)
+{
+    silo        = new SiloFile(file);
+    if (!silo->IsOpen())
+    {
+        delete silo;
+        silo = 0;
+        dirTreeView = 0;
+        dirView = 0;
+    }
+    else
+    {
+        dirTreeView = new SiloDirTreeView(silo, this);
+        dirView     = new SiloDirView(this);
+
+        connect(dirTreeView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
+                this,        SLOT(SetDir(QTreeWidgetItem*,QTreeWidgetItem*)));
+        connect(dirView,     SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
+                this,        SLOT(ShowItem(QTreeWidgetItem*,int)));
+
+        dirTreeView->OpenRootDir();
+        dirView->Set(silo->root);
+
+        dirTreeView->header()->setResizeMode(QHeaderView::Interactive);
+        dirView->header()->setResizeMode(QHeaderView::Interactive);
+    }
+}
+
+// ****************************************************************************
+//  Destructor:  SiloView::~SiloView
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    May 17, 2004
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Added some missing delete calls
+//
+// ****************************************************************************
+SiloView::~SiloView()
+{
+    if (silo) delete silo;
+    if (dirTreeView) delete dirTreeView;
+    if (dirView) delete dirView;
+}
+
+// ****************************************************************************
+//  Method:  SiloView::Set
+//
+//  Purpose:
+//    Replace with a new file.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Tue Oct 12 20:53:28 PDT 2004
+//    Explicitly set the dirView directory.  Newer Qt versions don't seem to 
+//    do it automatically by setting the first child (root dir) as selcted
+//    inside SiloDirTreeView.
+//
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Made it more graceful if Silo failed to open
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloView::Set(const QString &file)
+{
+    delete silo;
+    silo = new SiloFile(file);
+    if (!silo->IsOpen())
+    {
+        dirTreeView = 0;
+        dirView = 0;
+    }
+    else
+    {
+        dirTreeView->Set(silo);
+        dirTreeView->OpenRootDir();
+        dirView->ChangeDir(dirTreeView->topLevelItem(0));
+    }
+}
+
+// ****************************************************************************
+//  Method:  SiloView::SetDir
+//
+//  Purpose:
+//    Tell the current SiloDirView directories.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloView::SetDir(QTreeWidgetItem *i, QTreeWidgetItem*)
+{
+    if (i)
+        dirView->ChangeDir(i);
+}
+
+// ****************************************************************************
+//  Method:  SiloView::ShowVariable
+//
+//  Purpose:
+//    Pop up a new window to show a variable or simple array.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+// ****************************************************************************
+void
+SiloView::ShowVariable(const QString &name)
+{
+    int len = silo->GetVarLength(name);
+    if (len == 1)
+    {
+        SiloValueViewWindow *vv = new SiloValueViewWindow(silo, name, this);
+        vv->show();
+    }
+    else
+    {
+        SiloArrayViewWindow *av = new SiloArrayViewWindow(silo, name, this);
+        av->show();
+        av->resize(av->sizeHint());
+    }
+}
+
+// ****************************************************************************
+//  Method:  SiloView::ShowObject
+//
+//  Purpose:
+//    Pop up a new window to show a compound object.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+// ****************************************************************************
+void
+SiloView::ShowObject(const QString &name)
+{
+    SiloObjectViewWindow *ov = new SiloObjectViewWindow(silo, name, this);
+    connect(ov,   SIGNAL(showRequested(const QString&)),
+            this, SLOT(ShowUnknown(const QString&)));
+    ov->show();
+}
+
+// ****************************************************************************
+//  Method:  SiloView::ShowUnknown
+//
+//  Purpose:
+//    Pop up a new window to show an item based on its type.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Wed May 11 12:42:12 PDT 2005
+//    Show an error message if we get an invalid object.
+//
+// ****************************************************************************
+void
+SiloView::ShowUnknown(const QString &name)
+{
+    DBObjectType type = silo->InqVarType(name);
+
+    if (type == DB_INVALID_OBJECT)
+    {
+        QMessageBox::warning(this, "silex",
+           "Could not determine the type of this object.\n"
+           "The file may have been written using an incomplete driver.", "OK");
+        return;
+    }
+
+
+    bool isObject = (type != DB_VARIABLE);
+
+    if (isObject)
+        ShowObject(name);
+    else
+        ShowVariable(name);
+}
+
+// ****************************************************************************
+//  Method:  SiloView::ShowItem
+//
+//  Purpose:
+//    Wrapper for ShowUnknown appropriate for a QTreeWidgetItem callback.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+void
+SiloView::ShowItem(QTreeWidgetItem *i, int)
+{
+    SiloDirViewItem *item = (SiloDirViewItem*)i;
+    if (!item->dir)
+        return;
+
+    QString name = item->dir->path;
+    if (name != "/")
+        name += "/";
+    name += item->name;
+
+    ShowUnknown(name);
+}
diff --git a/tools/silex/SiloView.h b/tools/silex/SiloView.h
new file mode 100644
index 0000000..f4391df
--- /dev/null
+++ b/tools/silex/SiloView.h
@@ -0,0 +1,105 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#ifndef SILOVIEW_H
+#define SILOVIEW_H
+
+#include <QSplitter>
+#include <QTreeWidget>
+class SiloFile;
+
+class SiloDirTreeView;
+class SiloDirView;
+
+// ****************************************************************************
+//  Class:  SiloView
+//
+//  Purpose:
+//    A combination of a directory tree and a TOC viewer, which can also
+//    launch windows to view objects, arrays, and variables.
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    November 12, 2001
+//
+//  Modifications:
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Added HasSiloFile
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+class SiloView : public QSplitter
+{
+    Q_OBJECT
+  public:
+    SiloView(const QString &file, QWidget *p);
+    virtual ~SiloView();
+    void Set(const QString &file);
+    bool HasSiloFile() const { return silo != 0; };
+
+  public slots:
+   void ShowObject(const QString &name);
+   void ShowVariable(const QString &name);
+   void ShowUnknown(const QString &name);
+   void ShowItem(QTreeWidgetItem *i, int);
+   void SetDir(QTreeWidgetItem *i, QTreeWidgetItem*);
+
+  private:
+    SiloFile *silo;
+    SiloDirTreeView *dirTreeView;
+    SiloDirView     *dirView;
+};
+
+#endif
diff --git a/tools/silex/array.xpm b/tools/silex/array.xpm
new file mode 100644
index 0000000..35d448e
--- /dev/null
+++ b/tools/silex/array.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *array_xpm[] = {
+"16 16 3 1",
+" 	c None",
+".	c #000000",
+"+	c #909BFC",
+"   .........    ",
+"   .+++++++.    ",
+"   .+++++++.    ",
+"   .........    ",
+"   .+++++++.    ",
+"   .+++++++.    ",
+"   .........    ",
+"   .+++++++.    ",
+"   .+++++++.    ",
+"   .........    ",
+"   .+++++++.    ",
+"   .+++++++.    ",
+"   .........    ",
+"   .+++++++.    ",
+"   .+++++++.    ",
+"   .........    "};
diff --git a/tools/silex/curve.xpm b/tools/silex/curve.xpm
new file mode 100644
index 0000000..484d6d7
--- /dev/null
+++ b/tools/silex/curve.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char *curve_xpm[] = {
+"16 16 4 1",
+" 	c None",
+".	c #000000",
+"+	c #FFFFFF",
+"@	c #FF0000",
+"                ",
+"............... ",
+"  .+++++++@@++. ",
+"  .++++++@@@@+. ",
+"  .++++++ at ++@@. ",
+"....++++@@+++ at . ",
+"  .++++@@+++++. ",
+"  .++@@@++++++. ",
+"  .+@@++++++++. ",
+".... at +++++++++. ",
+"  . at ++++++++++. ",
+"  .+++++++++++. ",
+"  .+++++++++++. ",
+"............... ",
+"  .  .  .  .  . ",
+"                "
+};
diff --git a/tools/silex/folder.xpm b/tools/silex/folder.xpm
new file mode 100644
index 0000000..2f3d68f
--- /dev/null
+++ b/tools/silex/folder.xpm
@@ -0,0 +1,25 @@
+/* XPM */
+static const char *folder_xpm[] = {
+"16 16 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa",
+"a...aaaaaaaaaaaa",
+".bcb.........aaa",
+".cbcbcbcbcbcb.aa",
+".bc...........aa",
+".c.##########.aa",
+".c.##########.aa",
+".b.##########.aa",
+".c.##########.aa",
+".b.##########.aa",
+"..###########.aa",
+"..............aa",
+"aaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaa"
+};
diff --git a/tools/silex/main.cpp b/tools/silex/main.cpp
new file mode 100644
index 0000000..2a2a1f6
--- /dev/null
+++ b/tools/silex/main.cpp
@@ -0,0 +1,122 @@
+/*****************************************************************************
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*****************************************************************************/
+
+#include "qapplication.h"
+#include "Explorer.h"
+
+#include <cstdlib>
+
+#ifndef Q_WS_MACX
+#include "qwindowsstyle.h"
+#endif
+#include "qfiledialog.h"
+#include "qstring.h"
+#include <iostream>
+
+// ****************************************************************************
+//  Main Function: main()  
+//
+//  Purpose:
+//    initialize and start the main window
+//
+//  Programmer:  Jeremy Meredith
+//  Creation:    April 10, 2001
+//
+//  Modifications:
+//    Brad Whitlock, Wed Oct 1 16:55:08 PST 2003
+//    I prevented the application from getting the Windows style when we're
+//    on MacOS X.
+//
+//    Mark C. Miller, Thu Jul 20 15:45:55 PDT 2006
+//    Made it more graceful on failure to open file
+//
+//    Jeremy Meredith, Thu Nov 20 17:28:45 EST 2008
+//    Ported to Qt4.
+//
+// ****************************************************************************
+
+int main( int argc, char **argv )
+{
+    QApplication::setColorSpec(QApplication::ManyColor);
+    QApplication a(argc, argv);
+#ifndef Q_WS_MACX
+    a.setStyle(new QWindowsStyle);
+#endif
+    Explorer *w = 0;
+    if (argc > 1)
+    {
+        w = new Explorer(argv[1], NULL);
+        if (!w->HasSiloView())
+        {
+            delete w;
+            w = 0;
+            std::cerr << "Unable to open file \"" << argv[1] << "\"" << std::endl;
+        }
+    }
+
+    if (!w)
+    {
+        QString file =
+            QFileDialog::getOpenFileName(NULL, "Open file....", "",
+                                         "Silo files (*.silo *.root *.pdb);;"
+                                         "All files (*)");
+        if (file.isNull())
+            return 0;
+        w = new Explorer(file, NULL);
+    }
+
+    w->show();
+
+    return a.exec();
+}
diff --git a/tools/silex/mat.xpm b/tools/silex/mat.xpm
new file mode 100644
index 0000000..1e063ed
--- /dev/null
+++ b/tools/silex/mat.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char *mat_xpm[] = {
+"16 16 5 1",
+" 	c None",
+".	c #000000",
+"+	c #0000FF",
+"@	c #FF0000",
+"#	c #00FF00",
+"                ",
+"                ",
+" .............  ",
+" .+++++++++++.  ",
+" .+++++++++++.  ",
+" .+++++++++++.  ",
+" .+++++++++++.  ",
+" .+++++++++++.  ",
+" .............  ",
+" .@@@@@.#####.  ",
+" .@@@@@.#####.  ",
+" .@@@@@.#####.  ",
+" .@@@@@.#####.  ",
+" .@@@@@.#####.  ",
+" .............  ",
+"                "};
diff --git a/tools/silex/mesh.xpm b/tools/silex/mesh.xpm
new file mode 100644
index 0000000..5b617b5
--- /dev/null
+++ b/tools/silex/mesh.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *mesh_xpm[] = {
+"16 16 3 1",
+" 	c None",
+".	c #000000",
+"+	c #FFFFFF",
+"                ",
+"                ",
+" .............  ",
+" .++.++.++.++.  ",
+" .++.++.++.++.  ",
+" .............  ",
+" .++.++.++.++.  ",
+" .++.++.++.++.  ",
+" .............  ",
+" .++.++.++.++.  ",
+" .++.++.++.++.  ",
+" .............  ",
+" .++.++.++.++.  ",
+" .++.++.++.++.  ",
+" .............  ",
+"                "};
diff --git a/tools/silex/object.xpm b/tools/silex/object.xpm
new file mode 100644
index 0000000..e971609
--- /dev/null
+++ b/tools/silex/object.xpm
@@ -0,0 +1,23 @@
+/* XPM */
+static const char *object_xpm[] = {
+"16 16 4 1",
+" 	c None",
+".	c #040404",
+"+	c #C4C403",
+"@	c #918F0D",
+"                ",
+"    ........    ",
+" .  .++++++.  . ",
+"... .++++++. ...",
+".++..........++.",
+".++..@@@@@@..++.",
+"....@@@@@@@@....",
+"  ............  ",
+"   .++++++++.   ",
+"   .++++++++.   ",
+"   .++++++++.   ",
+"   .++++++++.   ",
+"   ..........   ",
+"                ",
+"                ",
+"                "};
diff --git a/tools/silex/silovar.xpm b/tools/silex/silovar.xpm
new file mode 100644
index 0000000..dd3fa73
--- /dev/null
+++ b/tools/silex/silovar.xpm
@@ -0,0 +1,21 @@
+/* XPM */
+static const char *silovar_xpm[] = {
+"16 16 2 1",
+" 	c None",
+".	c #87FF7C",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"   ..  .  ..  . ",
+"  ... ......  ..",
+" . ...   . .. ..",
+"    ..     .. . ",
+"    ..     .. . ",
+" . ... .    ..  ",
+" .. ...     .   ",
+"            .   ",
+"        .. .    ",
+"         ..     ",
+"                "};
diff --git a/tools/silex/species.xpm b/tools/silex/species.xpm
new file mode 100644
index 0000000..cd264bd
--- /dev/null
+++ b/tools/silex/species.xpm
@@ -0,0 +1,26 @@
+/* XPM */
+static const char *species_xpm[] = {
+"16 16 6 1",
+" 	c None",
+".	c #000000",
+"+	c #FF0000",
+"@	c #0000FF",
+"#	c #FFFF00",
+"$	c #00FF00",
+"                ",
+"                ",
+" .............  ",
+" .+++@@@@@##@.  ",
+" .++@@$$$@@@@.  ",
+" .+@@$$$@@++ at .  ",
+" .@@$$$@@@++ at .  ",
+" .@@@@@@@@@##.  ",
+" .###@@@@@@##.  ",
+" . at ++@$$$@@##.  ",
+" . at ++@$$$@@@@.  ",
+" .@@@@$$$++++.  ",
+" .@$$@@@@@@@@.  ",
+" .@$$@@@@@@@@.  ",
+" .............  ",
+"                "
+};
diff --git a/tools/silex/var.xpm b/tools/silex/var.xpm
new file mode 100644
index 0000000..aefefe8
--- /dev/null
+++ b/tools/silex/var.xpm
@@ -0,0 +1,32 @@
+/* XPM */
+static const char *var_xpm[] = {
+"16 16 13 1",
+" 	c None",
+".	c #000000",
+"+	c #FF42D6",
+"@	c #FF3838",
+"#	c #FF9514",
+"$	c #E5CA00",
+"%	c #CAE500",
+"&	c #72E500",
+"*	c #00E554",
+"=	c #00C98D",
+"-	c #00A8E5",
+";	c #2B80FF",
+">	c #2B40FF",
+"                ",
+"                ",
+" .............  ",
+" .+++++++++++.  ",
+" .@@@@@@@@@@@.  ",
+" .###########.  ",
+" .$$$$$$$$$$$.  ",
+" .%%%%%%%%%%%.  ",
+" .&&&&&&&&&&&.  ",
+" .***********.  ",
+" .===========.  ",
+" .-----------.  ",
+" .;;;;;;;;;;;.  ",
+" .>>>>>>>>>>>.  ",
+" .............  ",
+"                "};
diff --git a/tools/silock/Makefile.am b/tools/silock/Makefile.am
new file mode 100644
index 0000000..6ff64cc
--- /dev/null
+++ b/tools/silock/Makefile.am
@@ -0,0 +1,71 @@
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+## Procss this file with automake to create Makefile.in
+
+
+bin_PROGRAMS = silock
+silock_SOURCES = silock.c
+if HDF5_DRV_NEEDED
+if HZIP_NEEDED
+  # Dummy C++ source to cause C++ linking.
+  nodist_EXTRA_silock_SOURCES = dummy.cxx
+endif
+if FPZIP_NEEDED
+  # Dummy C++ source to cause C++ linking.
+  nodist_EXTRA_silock_SOURCES = dummy.cxx
+endif
+  silock_LDADD = ../../src/libsiloh5.la
+else
+  silock_LDADD = ../../src/libsilo.la
+endif
+AM_CPPFLAGS = -I$(top_builddir)/src/silo -I$(includedir)
diff --git a/tools/silock/Makefile.in b/tools/silock/Makefile.in
new file mode 100644
index 0000000..9bf5d88
--- /dev/null
+++ b/tools/silock/Makefile.in
@@ -0,0 +1,603 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+# LLNL-CODE-425250.
+# All rights reserved.
+# 
+# This file is part of Silo. For details, see silo.llnl.gov.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 
+#    * Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the disclaimer below.
+#    * Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the disclaimer (as noted
+#      below) in the documentation and/or other materials provided with
+#      the distribution.
+#    * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+# LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+# 
+# This work was produced at Lawrence Livermore National Laboratory under
+# Contract No.  DE-AC52-07NA27344 with the DOE.
+# 
+# Neither the  United States Government nor  Lawrence Livermore National
+# Security, LLC nor any of  their employees, makes any warranty, express
+# or  implied,  or  assumes  any  liability or  responsibility  for  the
+# accuracy, completeness,  or usefulness of  any information, apparatus,
+# product, or  process disclosed, or  represents that its use  would not
+# infringe privately-owned rights.
+# 
+# Any reference herein to  any specific commercial products, process, or
+# services by trade name,  trademark, manufacturer or otherwise does not
+# necessarily  constitute or imply  its endorsement,  recommendation, or
+# favoring  by  the  United  States  Government  or  Lawrence  Livermore
+# National Security,  LLC. The views  and opinions of  authors expressed
+# herein do not necessarily state  or reflect those of the United States
+# Government or Lawrence Livermore National Security, LLC, and shall not
+# be used for advertising or product endorsement purposes.
+#
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = silock$(EXEEXT)
+subdir = tools/silock
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_silock_OBJECTS = silock.$(OBJEXT)
+silock_OBJECTS = $(am_silock_OBJECTS)
+ at HDF5_DRV_NEEDED_FALSE@silock_DEPENDENCIES = ../../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@silock_DEPENDENCIES = ../../src/libsiloh5.la
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(silock_SOURCES) $(nodist_EXTRA_silock_SOURCES)
+DIST_SOURCES = $(silock_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BROWSER = @BROWSER@
+BUNDLE_TARGET = @BUNDLE_TARGET@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_FULLPATH = @CC_FULLPATH@
+CFLAGS = @CFLAGS@
+CONFIG_CMD = @CONFIG_CMD@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_FULLPATH = @CXX_FULLPATH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCLIBS = @FCLIBS@
+FC_FULLPATH = @FC_FULLPATH@
+FFLAGS = @FFLAGS@
+FORTRAN = @FORTRAN@
+FPZIP = @FPZIP@
+GREP = @GREP@
+HDF5_DRV = @HDF5_DRV@
+HZIP = @HZIP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NETCDF = @NETCDF@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDBP_DRV = @PDBP_DRV@
+PDB_DRV = @PDB_DRV@
+PRTDIAG = @PRTDIAG@
+PYTHON = @PYTHON@
+PYTHONMODULE = @PYTHONMODULE@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QT_BIN = @QT_BIN@
+QT_CORE = @QT_CORE@
+QT_CORE_LIB = @QT_CORE_LIB@
+QT_CXXFLAGS = @QT_CXXFLAGS@
+QT_GUI = @QT_GUI@
+QT_GUI_LIB = @QT_GUI_LIB@
+QT_INCLUDE = @QT_INCLUDE@
+QT_LDFLAGS = @QT_LDFLAGS@
+QT_LIB = @QT_LIB@
+QT_LIBS = @QT_LIBS@
+QT_MOC = @QT_MOC@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SILEX = @SILEX@
+SILO_DTYPPTR = @SILO_DTYPPTR@
+SILO_DTYPPTR1 = @SILO_DTYPPTR1@
+SILO_DTYPPTR2 = @SILO_DTYPPTR2@
+SILO_VERS_MAJ = @SILO_VERS_MAJ@
+SILO_VERS_MIN = @SILO_VERS_MIN@
+SILO_VERS_PAT = @SILO_VERS_PAT@
+SILO_VERS_PRE = @SILO_VERS_PRE@
+SILO_VERS_TAG = @SILO_VERS_TAG@
+STRIP = @STRIP@
+TAURUS = @TAURUS@
+VERSION = @VERSION@
+ZLIB = @ZLIB@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+silock_SOURCES = silock.c
+ at FPZIP_NEEDED_TRUE@@HDF5_DRV_NEEDED_TRUE at nodist_EXTRA_silock_SOURCES = dummy.cxx
+ at HDF5_DRV_NEEDED_TRUE@@HZIP_NEEDED_TRUE at nodist_EXTRA_silock_SOURCES = dummy.cxx
+ at HDF5_DRV_NEEDED_FALSE@silock_LDADD = ../../src/libsilo.la
+ at HDF5_DRV_NEEDED_TRUE@silock_LDADD = ../../src/libsiloh5.la
+AM_CPPFLAGS = -I$(top_builddir)/src/silo -I$(includedir)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cxx .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  tools/silock/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  tools/silock/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	     || test -f $$p1 \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  echo " rm -f $$p $$f"; \
+	  rm -f $$p $$f ; \
+	done
+silock$(EXEEXT): $(silock_OBJECTS) $(silock_DEPENDENCIES) 
+	@rm -f silock$(EXEEXT)
+	$(CXXLINK) $(silock_OBJECTS) $(silock_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dummy.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/silock.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+ at HDF5_DRV_NEEDED_TRUE@@HZIP_NEEDED_TRUE@  # Dummy C++ source to cause C++ linking.
+ at FPZIP_NEEDED_TRUE@@HDF5_DRV_NEEDED_TRUE@  # Dummy C++ source to cause C++ linking.
+# 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/tools/silock/silock.c b/tools/silock/silock.c
new file mode 100644
index 0000000..5924b0f
--- /dev/null
+++ b/tools/silock/silock.c
@@ -0,0 +1,456 @@
+/*
+Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC.
+LLNL-CODE-425250.
+All rights reserved.
+
+This file is part of Silo. For details, see silo.llnl.gov.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   * Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the disclaimer below.
+   * Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the disclaimer (as noted
+     below) in the documentation and/or other materials provided with
+     the distribution.
+   * Neither the name of the LLNS/LLNL 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 COPYRIGHT HOLDERS  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  LAWRENCE
+LIVERMORE  NATIONAL SECURITY, LLC,  THE U.S.  DEPARTMENT OF  ENERGY 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.
+
+This work was produced at Lawrence Livermore National Laboratory under
+Contract No.  DE-AC52-07NA27344 with the DOE.
+
+Neither the  United States Government nor  Lawrence Livermore National
+Security, LLC nor any of  their employees, makes any warranty, express
+or  implied,  or  assumes  any  liability or  responsibility  for  the
+accuracy, completeness,  or usefulness of  any information, apparatus,
+product, or  process disclosed, or  represents that its use  would not
+infringe privately-owned rights.
+
+Any reference herein to  any specific commercial products, process, or
+services by trade name,  trademark, manufacturer or otherwise does not
+necessarily  constitute or imply  its endorsement,  recommendation, or
+favoring  by  the  United  States  Government  or  Lawrence  Livermore
+National Security,  LLC. The views  and opinions of  authors expressed
+herein do not necessarily state  or reflect those of the United States
+Government or Lawrence Livermore National Security, LLC, and shall not
+be used for advertising or product endorsement purposes.
+*/
+/*-------------------------------------------------------------------------
+ *
+ * Modifications:
+ *
+ *      Mark C. Miller, Thu Oct 18 09:23:10 PDT 2001
+ *        Initial Implementation
+ *
+ *      Mark C. Miller, Thu Nov  5 10:49:43 PST 2009
+ *      Added logic to handle an HDF5 file without friendly names.
+ *      Added isinf to test for valid float/double.
+ *-------------------------------------------------------------------------
+ */
+#include <config.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <silo.h>
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
+
+#define True                    1
+#define False                   0
+#define UPDATE_INTERVAL         5      /* seconds */
+#define INITIAL_CHECK_RATE      500000 /* tests per second */
+
+
+/* if isnan is not available, this tool cannot operate. So, we define
+   bogus tests for these macros and then add code in main to print a
+   useful error message and then exit */
+#ifdef HAVE_ISNAN
+#define IS_VALID_FLOAT(val)        (!isnan((double)(val))&&!isinf((double)(val)))
+#define IS_VALID_DOUBLE(val)        (!isnan(val)&&!isinf(val))
+#else
+#define IS_VALID_FLOAT(val)        ((val)!=0.0)  /* bogus test */
+#define IS_VALID_DOUBLE(val)        ((val)!=0.0)  /* bogus test */
+#endif
+
+int disableProgress;
+int disableVerbose;
+int totalBytes;
+char fileName[1024];
+
+int fBufSize;
+int dBufSize;
+float  *fBuf;
+double *dBuf;
+
+
+/* this function is only called if a NaN issue has been discovered */
+static void
+handleInvalidValue(char *theDir, char *varName, int index, double value)
+{
+   static char lastDir[1024], lastVar[1024];
+   char errMsg[128];
+
+   /* try to produce a useful error message regarding the kind of NaN */
+#ifdef HAVE_FPCLASS
+   {  fpclass_t theClass = fpclass(value);
+      switch (theClass)
+      {
+      case FP_SNAN:    strcpy(errMsg,"signaling NaN"); break;
+      case FP_QNAN:    strcpy(errMsg,"quiet NaN"); break;
+      case FP_NINF:    strcpy(errMsg,"negative infinity"); break;
+      case FP_PINF:    strcpy(errMsg,"positive infinity"); break;
+      case FP_NDENORM: strcpy(errMsg,"negative denormalized non-zero"); break;
+      case FP_PDENORM: strcpy(errMsg,"positive denormalized non-zero"); break;
+      case FP_NZERO:   strcpy(errMsg,"negative zero"); break;
+      case FP_PZERO:   strcpy(errMsg,"positive zero"); break;
+      case FP_NNORM:   strcpy(errMsg,"negative normalized non-zero"); break;
+      case FP_PNORM:   strcpy(errMsg,"positive normalized non-zero"); break;
+      }
+   }
+#else
+   strcpy(errMsg, "unkown NaN");
+#endif
+
+   if (!disableVerbose)
+   {
+      /* strip off leading slash for root dir */
+      if (strcmp(lastDir, theDir) || strcmp(lastVar, varName))
+      {
+         if (!strcmp(theDir,"/"))
+            printf("   simple array /%s...\n", varName);
+         else
+            printf("   simple array %s/%s...\n", theDir, varName);
+      }
+      printf("   ...has %s issue at index %d\n", errMsg, index);
+   }
+   else
+   {
+      /* early termination of we not using verbose mode */
+      printf("   found %s issue\n", errMsg);
+      exit(-1);
+   }
+
+   /* keep a record of last dir and varname we used so we don't keep
+      issuing the `  simple array ... statement ' */
+   strcpy(lastDir, theDir);
+   strcpy(lastVar, varName);
+}
+
+
+/* We provide progress mainly for very large files, hundreds of megabytes
+   or more. The % complete is computed by assuming that the total number
+   of bytes in the file is primarily float and double data. Of course, there
+   can be a lot of integer data too, but rarely is it more than 10-20% of
+   the whole file. So, our % complete measure is a rough approximation that
+   is always an underestimate. Next, we would like to update the user about
+   progress on an elapsed time basis. So, we need to know how much time has
+   gone by. However, if we call gettimeofday after every NaN test, that would
+   kill us! So, we predict how long in the future, in terms of number of
+   NaN checks, we can go before we need to peek at the time. Then, we call
+   gettimeofday. At that point, we know how much time has passed since the
+   last call and we know how many checks we've done. We can compute the
+   current check rate and a new count of checks into the future before we
+   need to call gettimeofday again. */
+static void
+updateProgress(int bytes)
+{
+   static int nextUpdate;
+   static int processedBytes;
+   static int checksPerformed;
+   static double tLast;
+   struct timeval timeVal;
+   struct timezone timeZone;
+
+   /* bytes==0 ==> initialization */
+   if (bytes == 0)
+   {
+      nextUpdate = INITIAL_CHECK_RATE * UPDATE_INTERVAL;
+      processedBytes = 0;
+      checksPerformed = 0;
+      gettimeofday(&timeVal, &timeZone);
+      tLast = (double) timeVal.tv_sec + (double) timeVal.tv_usec * 1.0E-6;
+   }
+   else
+   {
+
+      processedBytes += bytes;
+      checksPerformed++;
+
+      if (checksPerformed >= nextUpdate)
+      {
+         double currentCheckRate;
+         double tNow;
+
+         printf("\n*** %2d %% completed ***\n", processedBytes*100/totalBytes);
+
+         gettimeofday(&timeVal, &timeZone);
+         tNow = (double) timeVal.tv_sec + (double) timeVal.tv_usec * 1.0E-6;
+         currentCheckRate = checksPerformed / (tNow - tLast);
+         nextUpdate += (currentCheckRate * UPDATE_INTERVAL);
+         tLast = tNow;
+      }
+   }
+}
+
+
+/* We examine all of Silo's data by traversing the all the "simple" arrays
+   in the file. Ultimately, the data associated with all of Silo's abstract
+   objects, excpet for object headers, is implemented in terms of simple
+   arrays. This function finds all the simple arrays in the current dir
+   and for each float or double array, reads it and examines it for NaNs.
+   To avoid constantly allocating and freeing the buffers for arrays, we
+   simply keep a growing buffer that grows to the largest array in the file
+   and is freed only upon exit. We use Silo's non-allocating simple array
+   read function. To make the loops for checking a NaN as fast as possible,
+   we have two versions of the loop, one where progress is checked and 
+   one where progress is not checked. We first examine all the simple
+   arrays in the current dir, then we loop over subdirs and recurse */
+static void
+scanSiloDir(DBfile *siloFile, char *theDir)
+{
+   char **dirNames;
+   int i,nDirs,nObjects;
+   DBtoc *toc;
+
+   DBNewToc(siloFile);
+   toc = DBGetToc(siloFile);
+
+   if (toc == NULL)
+      return ;
+
+   nObjects = toc->nvar + toc->ndir;
+
+   if (!nObjects)
+      return ;
+
+   /* process the simple arrays in this dir */
+   for (i = 0; i < toc->nvar; i++)
+   {
+      char *varName = toc->var_names[i];
+      int n         = DBGetVarLength(siloFile, varName);
+      int dbType    = DBGetVarType(siloFile, varName);
+      int j;
+
+      if (!disableVerbose)
+      {
+         if (dbType == DB_FLOAT || dbType == DB_DOUBLE)
+            printf("CHECKING array %-56s\r", varName);
+         else
+            printf("skipping array %-56s\r", varName);
+      }
+
+      /* for float arrays */
+      if (dbType == DB_FLOAT)
+      {
+
+         /* increase allocated buffer if necessary */
+         if (n*sizeof(float) > fBufSize)
+         {
+            if (fBuf != NULL)
+               free(fBuf);
+            fBuf = (float *) malloc(n * sizeof(float));
+            fBufSize = n;
+         }
+
+         DBReadVar(siloFile, varName, fBuf);
+
+         if (disableProgress)
+         {
+            for (j = 0; j < n; j++)
+               if (!IS_VALID_FLOAT(fBuf[j]))
+                  handleInvalidValue(theDir, varName, j, (double) fBuf[j]);
+         }
+         else
+         {
+            for (j = 0; j < n; j++)
+            {
+               if (!IS_VALID_FLOAT(fBuf[j]))
+                  handleInvalidValue(theDir, varName, j, (double) fBuf[j]);
+               updateProgress(sizeof(float));
+            }
+         }
+      }
+
+      /* for double arrays */
+      if (dbType == DB_DOUBLE)
+      {
+         /* increase allocated buffer if necessary */
+         if (n*sizeof(double) > dBufSize)
+         {
+            if (dBuf != NULL)
+               free(dBuf);
+            dBuf = (double *) malloc(n * sizeof(double));
+            dBufSize = n;
+         }
+
+         DBReadVar(siloFile, varName, dBuf);
+
+         if (disableProgress)
+         {
+            for (j = 0; j < n; j++)
+               if (!IS_VALID_DOUBLE(dBuf[j]))
+                  handleInvalidValue(theDir, varName, j, dBuf[j]);
+         }
+         else
+         {
+            for (j = 0; j < n; j++)
+            {
+               if (!IS_VALID_DOUBLE(dBuf[j]))
+                  handleInvalidValue(theDir, varName, j, dBuf[j]);
+               updateProgress(sizeof(double));
+            }
+         }
+      }
+   } /* for i */
+
+   /* save off the dir-stuff out of the toc so we don't loose it during the
+      recursions */
+   nDirs = toc->ndir;
+   dirNames = (char **) malloc(nDirs * sizeof(char*));
+   for (i = 0; i < nDirs; i++)
+   {
+      dirNames[i] = (char *) malloc(strlen(toc->dir_names[i])+1);
+      strcpy(dirNames[i], toc->dir_names[i]);
+   }
+
+   /* recurse on any subdirs */
+   for (i = 0; i < nDirs; i++)
+   {
+      DBSetDir(siloFile, dirNames[i]);
+      scanSiloDir(siloFile, dirNames[i]); 
+      DBSetDir(siloFile, "..");
+      free(dirNames[i]);
+   }
+
+   /* free the dir-stuff we set aside */
+   free(dirNames);
+
+}
+
+
+int
+main(int argc, char *argv[])
+{
+   int i;
+   DBfile *siloFile;
+
+   /* set default values */
+   disableProgress = False;
+   disableVerbose  = False;
+
+   /* initialization */
+   fBufSize = 0;
+   dBufSize = 0;
+   fBuf = NULL;
+   dBuf = NULL;
+
+   /* here's where we issue an error message if we have no isnan() test */
+#ifndef HAVE_ISNAN
+   fprintf(stderr,"silock cannot operate on this platform.\n");
+   fprintf(stderr,"No isnan() function was found during configure\n");
+   exit(-1);
+#endif
+
+   /* process the command line */
+   for (i = 1; i < argc; i++)
+   {
+      if (!strcmp(argv[i], "-progress"))
+         disableProgress = True;
+      else if (!strcmp(argv[i], "-q"))
+         disableVerbose = True;
+      else if (!strcmp(argv[i], "-help"))
+      {
+         fprintf(stderr,"Scan a silo file for NaN/Inf floating point data\n"); 
+         fprintf(stderr,"Warning: As a precaution, you should use this tool\n");
+         fprintf(stderr,"         only on the same class of platform the\n");
+         fprintf(stderr,"         data was generated on.\n");
+         fprintf(stderr,"usage: silock [-q] [-progress]"
+            " silofile\n");
+         fprintf(stderr,"available options...\n");
+         fprintf(stderr,"   -progress: Disable progress display\n");
+         fprintf(stderr,"   -q:        Quiet. Report only if bad values\n");
+         fprintf(stderr,"              exist and exit on first occurence\n");
+         exit(-1);
+      }
+      else /* assume its a file and try to open it */
+      {
+         struct stat stat_buf;
+
+         strncpy(fileName, argv[i], sizeof(fileName)-1);
+         if (stat(fileName, &stat_buf) != 0)
+         {
+            fprintf(stderr,"unrecognized option \"%s\". Use -help for usage\n",
+               fileName);
+            exit(-1);
+         }
+         totalBytes = stat_buf.st_size;
+      }
+   }
+
+   /* initialize progress meter */
+   updateProgress(0);
+
+   DBShowErrors(DB_NONE, NULL);
+
+   siloFile = DBOpen(fileName, DB_UNKNOWN, DB_READ);
+
+   if (siloFile == NULL)
+   {
+      fprintf(stderr, "unable to open silo file \"%s\"\n", fileName);
+      exit(-1);
+   }
+
+   DBShowErrors(DB_TOP, NULL);
+
+   if (DBGetDriverType(siloFile) == DB_HDF5 && !DBGuessHasFriendlyHDF5Names(siloFile))
+   {
+       fprintf(stderr,"WARNING: This is an HDF5 file without \"Friendly\" HDF5 array names.\n");
+       fprintf(stderr,"WARNING: Consequently, while %s will be able to find/detect nans/infs,\n",
+           strrchr(argv[0],'/')?strrchr(argv[0],'/')+1:argv[0]);
+       fprintf(stderr,"WARNING: the names of the arrays in which it finds them will be cryptic.\n");
+       fprintf(stderr,"WARNING: You will most likely have to use h5ls/h5dump to determine which\n");
+       fprintf(stderr,"WARNING: Silo objects are involved.\n");
+       DBSetDir(siloFile, "/.silo");
+       scanSiloDir(siloFile, "/.silo");
+   }
+   else
+   {
+       scanSiloDir(siloFile, "/");
+   }
+
+   DBClose(siloFile);
+
+   if (fBuf != NULL)
+      free(fBuf);
+   if (dBuf != NULL)
+      free(dBuf);
+
+   if (!disableProgress)
+      printf("\n*** 100 %% completed ***\n");
+
+   if (!disableVerbose)
+      printf("\n");
+
+   return 0;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/silo-llnl.git



More information about the debian-science-commits mailing list